From 2549c084dc784e0a5147f069e576baff95c4a86c Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Fri, 29 Aug 2025 18:59:41 +0100 Subject: [PATCH 1/4] Remove dependencies built into Node --- lib/analyze-action-post.js | 5 +---- lib/analyze-action.js | 5 +---- lib/autobuild-action.js | 5 +---- lib/init-action-post.js | 5 +---- lib/init-action.js | 5 +---- lib/resolve-environment-action.js | 5 +---- lib/start-proxy-action-post.js | 5 +---- lib/start-proxy-action.js | 5 +---- lib/upload-lib.js | 5 +---- lib/upload-sarif-action-post.js | 5 +---- lib/upload-sarif-action.js | 5 +---- package-lock.json | 30 +----------------------------- package.json | 5 +---- 13 files changed, 13 insertions(+), 77 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 00f43c5ca..fa389abdf 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -36412,17 +36412,14 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - fs: "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", "node-forge": "^1.3.1", octokit: "^5.0.3", - path: "^0.12.7", semver: "^7.7.2", - uuid: "^11.1.0", - zlib: "^1.0.5" + uuid: "^11.1.0" }, devDependencies: { "@ava/typescript": "6.0.0", diff --git a/lib/analyze-action.js b/lib/analyze-action.js index f7d53f053..4d8aa26d3 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -36412,17 +36412,14 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - fs: "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", "node-forge": "^1.3.1", octokit: "^5.0.3", - path: "^0.12.7", semver: "^7.7.2", - uuid: "^11.1.0", - zlib: "^1.0.5" + uuid: "^11.1.0" }, devDependencies: { "@ava/typescript": "6.0.0", diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index 90bdda525..964f6ebca 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -36412,17 +36412,14 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - fs: "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", "node-forge": "^1.3.1", octokit: "^5.0.3", - path: "^0.12.7", semver: "^7.7.2", - uuid: "^11.1.0", - zlib: "^1.0.5" + uuid: "^11.1.0" }, devDependencies: { "@ava/typescript": "6.0.0", diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 486174c91..5ef71128c 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -36412,17 +36412,14 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - fs: "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", "node-forge": "^1.3.1", octokit: "^5.0.3", - path: "^0.12.7", semver: "^7.7.2", - uuid: "^11.1.0", - zlib: "^1.0.5" + uuid: "^11.1.0" }, devDependencies: { "@ava/typescript": "6.0.0", diff --git a/lib/init-action.js b/lib/init-action.js index fa4f477e6..051cbe02d 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -36412,17 +36412,14 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - fs: "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", "node-forge": "^1.3.1", octokit: "^5.0.3", - path: "^0.12.7", semver: "^7.7.2", - uuid: "^11.1.0", - zlib: "^1.0.5" + uuid: "^11.1.0" }, devDependencies: { "@ava/typescript": "6.0.0", diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index 1afc95e7e..b790a67ce 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -36412,17 +36412,14 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - fs: "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", "node-forge": "^1.3.1", octokit: "^5.0.3", - path: "^0.12.7", semver: "^7.7.2", - uuid: "^11.1.0", - zlib: "^1.0.5" + uuid: "^11.1.0" }, devDependencies: { "@ava/typescript": "6.0.0", diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 8907df03f..07be67504 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -36412,17 +36412,14 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - fs: "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", "node-forge": "^1.3.1", octokit: "^5.0.3", - path: "^0.12.7", semver: "^7.7.2", - uuid: "^11.1.0", - zlib: "^1.0.5" + uuid: "^11.1.0" }, devDependencies: { "@ava/typescript": "6.0.0", diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index a39ed8660..d3d75cad1 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -54940,17 +54940,14 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - fs: "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", "node-forge": "^1.3.1", octokit: "^5.0.3", - path: "^0.12.7", semver: "^7.7.2", - uuid: "^11.1.0", - zlib: "^1.0.5" + uuid: "^11.1.0" }, devDependencies: { "@ava/typescript": "6.0.0", diff --git a/lib/upload-lib.js b/lib/upload-lib.js index ce3c1ba0b..928711b52 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -37735,17 +37735,14 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - fs: "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", "node-forge": "^1.3.1", octokit: "^5.0.3", - path: "^0.12.7", semver: "^7.7.2", - uuid: "^11.1.0", - zlib: "^1.0.5" + uuid: "^11.1.0" }, devDependencies: { "@ava/typescript": "6.0.0", diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 9e9487afc..e17f9b23b 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -36412,17 +36412,14 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - fs: "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", "node-forge": "^1.3.1", octokit: "^5.0.3", - path: "^0.12.7", semver: "^7.7.2", - uuid: "^11.1.0", - zlib: "^1.0.5" + uuid: "^11.1.0" }, devDependencies: { "@ava/typescript": "6.0.0", diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 3d12e80bf..414601a7a 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -36412,17 +36412,14 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - fs: "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", "node-forge": "^1.3.1", octokit: "^5.0.3", - path: "^0.12.7", semver: "^7.7.2", - uuid: "^11.1.0", - zlib: "^1.0.5" + uuid: "^11.1.0" }, devDependencies: { "@ava/typescript": "6.0.0", diff --git a/package-lock.json b/package-lock.json index b83f8c8b3..a3e0e24f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,17 +28,14 @@ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "fs": "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", "jsonschema": "1.4.1", "long": "^5.3.2", "node-forge": "^1.3.1", "octokit": "^5.0.3", - "path": "^0.12.7", "semver": "^7.7.2", - "uuid": "^11.1.0", - "zlib": "^1.0.5" + "uuid": "^11.1.0" }, "devDependencies": { "@ava/typescript": "6.0.0", @@ -6007,10 +6004,6 @@ "node": ">= 0.12" } }, - "node_modules/fs": { - "version": "0.0.1-security", - "license": "ISC" - }, "node_modules/fs.realpath": { "version": "1.0.0", "license": "ISC" @@ -7677,14 +7670,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/path": { - "version": "0.12.7", - "license": "MIT", - "dependencies": { - "process": "^0.11.1", - "util": "^0.10.3" - } - }, "node_modules/path-is-absolute": { "version": "1.0.1", "license": "MIT", @@ -9175,13 +9160,6 @@ "integrity": "sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ==", "dev": true }, - "node_modules/util": { - "version": "0.10.4", - "license": "MIT", - "dependencies": { - "inherits": "2.0.3" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -9439,12 +9417,6 @@ "engines": { "node": ">= 14" } - }, - "node_modules/zlib": { - "version": "1.0.5", - "engines": { - "node": ">=0.2.0" - } } } } diff --git a/package.json b/package.json index 1592d0afd..06ad3fdf4 100644 --- a/package.json +++ b/package.json @@ -42,17 +42,14 @@ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "fs": "0.0.1-security", "get-folder-size": "^2.0.1", "js-yaml": "^4.1.0", "jsonschema": "1.4.1", "long": "^5.3.2", "node-forge": "^1.3.1", "octokit": "^5.0.3", - "path": "^0.12.7", "semver": "^7.7.2", - "uuid": "^11.1.0", - "zlib": "^1.0.5" + "uuid": "^11.1.0" }, "devDependencies": { "@ava/typescript": "6.0.0", From c2b56013b4d8c8d6e33cdb5e1053e7fed76b6d30 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Fri, 29 Aug 2025 19:03:20 +0100 Subject: [PATCH 2/4] Update `get-folder-size` --- eslint.config.mjs | 2 +- lib/analyze-action-post.js | 755 +++++++++++++-------------- lib/analyze-action.js | 644 +++++++++++------------ lib/autobuild-action.js | 559 +++++++++----------- lib/init-action-post.js | 827 ++++++++++++++---------------- lib/init-action.js | 660 +++++++++++------------- lib/resolve-environment-action.js | 543 +++++++++----------- lib/start-proxy-action-post.js | 737 ++++++++++++-------------- lib/start-proxy-action.js | 289 ++++------- lib/upload-lib.js | 509 ++++++++---------- lib/upload-sarif-action-post.js | 747 ++++++++++++--------------- lib/upload-sarif-action.js | 569 +++++++++----------- package-lock.json | 23 +- package.json | 2 +- src/util.ts | 4 +- 15 files changed, 3062 insertions(+), 3808 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index a27a005fe..6bd669df8 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -76,7 +76,7 @@ export default [ typescript: {}, }, - "import/ignore": ["sinon", "uuid", "@octokit/plugin-retry"], + "import/ignore": ["sinon", "uuid", "@octokit/plugin-retry", "get-folder-size"], }, rules: { diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index fa389abdf..34bb97bb1 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -34336,127 +34336,6 @@ var require_del = __commonJS({ } }); -// node_modules/tiny-each-async/index.js -var require_tiny_each_async = __commonJS({ - "node_modules/tiny-each-async/index.js"(exports2, module2) { - "use strict"; - module2.exports = function eachAsync(arr, parallelLimit, iteratorFn, cb) { - var pending = 0; - var index = 0; - var lastIndex = arr.length - 1; - var called = false; - var limit; - var callback; - var iterate; - if (typeof parallelLimit === "number") { - limit = parallelLimit; - iterate = iteratorFn; - callback = cb || function noop() { - }; - } else { - iterate = parallelLimit; - callback = iteratorFn || function noop() { - }; - limit = arr.length; - } - if (!arr.length) { - return callback(); - } - var iteratorLength = iterate.length; - var shouldCallNextIterator = function shouldCallNextIterator2() { - return !called && pending < limit && index < lastIndex; - }; - var iteratorCallback = function iteratorCallback2(err) { - if (called) { - return; - } - pending--; - if (err || index === lastIndex && !pending) { - called = true; - callback(err); - } else if (shouldCallNextIterator()) { - processIterator(++index); - } - }; - var processIterator = function processIterator2() { - pending++; - var args = iteratorLength === 2 ? [arr[index], iteratorCallback] : [arr[index], index, iteratorCallback]; - iterate.apply(null, args); - if (shouldCallNextIterator()) { - processIterator2(++index); - } - }; - processIterator(); - }; - } -}); - -// node_modules/get-folder-size/index.js -var require_get_folder_size = __commonJS({ - "node_modules/get-folder-size/index.js"(exports2, module2) { - "use strict"; - var fs7 = require("fs"); - var path6 = require("path"); - var eachAsync = require_tiny_each_async(); - function readSizeRecursive(seen, item, ignoreRegEx, callback) { - let cb; - let ignoreRegExp; - if (!callback) { - cb = ignoreRegEx; - ignoreRegExp = null; - } else { - cb = callback; - ignoreRegExp = ignoreRegEx; - } - fs7.lstat(item, function lstat(e, stats) { - let total = !e ? stats.size || 0 : 0; - if (stats) { - if (seen.has(stats.ino)) { - return cb(null, 0); - } - seen.add(stats.ino); - } - if (!e && stats.isDirectory()) { - fs7.readdir(item, (err, list) => { - if (err) { - return cb(err); - } - eachAsync( - list, - 5e3, - (dirItem, next) => { - readSizeRecursive( - seen, - path6.join(item, dirItem), - ignoreRegExp, - (error2, size) => { - if (!error2) { - total += size; - } - next(error2); - } - ); - }, - (finalErr) => { - cb(finalErr, total); - } - ); - }); - } else { - if (ignoreRegExp && ignoreRegExp.test(item)) { - total = 0; - } - cb(e, total); - } - }); - } - module2.exports = (...args) => { - args.unshift(/* @__PURE__ */ new Set()); - return readSizeRecursive(...args); - }; - } -}); - // node_modules/semver/internal/constants.js var require_constants9 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -36412,7 +36291,7 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", @@ -38076,7 +37955,7 @@ var require_internal_glob_options_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -38086,15 +37965,15 @@ var require_internal_glob_options_helper = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core13.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core13.debug(`implicitDescendants '${result.implicitDescendants}'`); + core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; @@ -38758,7 +38637,7 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs7 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); var path6 = __importStar4(require("path")); @@ -38809,7 +38688,7 @@ var require_internal_globber = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core13.debug(`Search path '${searchPath}'`); + core14.debug(`Search path '${searchPath}'`); try { yield __await4(fs7.promises.lstat(searchPath)); } catch (err) { @@ -38881,7 +38760,7 @@ var require_internal_globber = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core13.debug(`Broken symlink '${item.path}'`); + core14.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -38897,7 +38776,7 @@ var require_internal_globber = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -40221,7 +40100,7 @@ var require_cacheUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob2 = __importStar4(require_glob2()); var io6 = __importStar4(require_io()); @@ -40274,7 +40153,7 @@ var require_cacheUtils = __commonJS({ _e = false; const file = _c; const relativeFile = path6.relative(workspace, file).replace(new RegExp(`\\${path6.sep}`, "g"), "/"); - core13.debug(`Matched: ${relativeFile}`); + core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { @@ -40304,7 +40183,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); - core13.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec2.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, @@ -40315,10 +40194,10 @@ var require_cacheUtils = __commonJS({ } }); } catch (err) { - core13.debug(err.message); + core14.debug(err.message); } versionOutput = versionOutput.trim(); - core13.debug(versionOutput); + core14.debug(versionOutput); return versionOutput; }); } @@ -40326,7 +40205,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); - core13.debug(`zstd version: ${version}`); + core14.debug(`zstd version: ${version}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -75638,7 +75517,7 @@ var require_uploadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var storage_blob_1 = require_dist7(); var errors_1 = require_errors2(); var UploadProgress = class { @@ -75680,7 +75559,7 @@ var require_uploadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core13.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + core14.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -75735,14 +75614,14 @@ var require_uploadUtils = __commonJS({ }; try { uploadProgress.startDisplayTimer(); - core13.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + core14.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); if (response._response.status >= 400) { throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); } return response; } catch (error2) { - core13.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); + core14.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); throw error2; } finally { uploadProgress.stopDisplayTimer(); @@ -75813,7 +75692,7 @@ var require_requestUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var constants_1 = require_constants10(); function isSuccessStatusCode(statusCode) { @@ -75874,9 +75753,9 @@ var require_requestUtils = __commonJS({ isRetryable = isRetryableStatusCode(statusCode); errorMessage = `Cache service responded with ${statusCode}`; } - core13.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core14.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); if (!isRetryable) { - core13.debug(`${name} - Error is not retryable`); + core14.debug(`${name} - Error is not retryable`); break; } yield sleep(delay); @@ -75981,7 +75860,7 @@ var require_downloadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); @@ -76019,7 +75898,7 @@ var require_downloadUtils = __commonJS({ this.segmentIndex = this.segmentIndex + 1; this.segmentSize = segmentSize; this.receivedBytes = 0; - core13.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + core14.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); } /** * Sets the number of bytes received for the current segment. @@ -76053,7 +75932,7 @@ var require_downloadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core13.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + core14.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -76103,7 +75982,7 @@ var require_downloadUtils = __commonJS({ })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { downloadResponse.message.destroy(); - core13.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + core14.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); }); yield pipeResponseToStream(downloadResponse, writeStream); const contentLengthHeader = downloadResponse.message.headers["content-length"]; @@ -76114,7 +75993,7 @@ var require_downloadUtils = __commonJS({ throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); } } else { - core13.debug("Unable to validate download, no Content-Length header"); + core14.debug("Unable to validate download, no Content-Length header"); } }); } @@ -76234,7 +76113,7 @@ var require_downloadUtils = __commonJS({ const properties = yield client.getProperties(); const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; if (contentLength < 0) { - core13.debug("Unable to determine content length, downloading file with http-client..."); + core14.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); @@ -76314,7 +76193,7 @@ var require_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -76334,9 +76213,9 @@ var require_options = __commonJS({ } result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; - core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core13.debug(`Upload concurrency: ${result.uploadConcurrency}`); - core13.debug(`Upload chunk size: ${result.uploadChunkSize}`); + core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core14.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } exports2.getUploadOptions = getUploadOptions; @@ -76373,12 +76252,12 @@ var require_options = __commonJS({ if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) { result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; } - core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core13.debug(`Download concurrency: ${result.downloadConcurrency}`); - core13.debug(`Request timeout (ms): ${result.timeoutInMs}`); - core13.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); - core13.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); - core13.debug(`Lookup only: ${result.lookupOnly}`); + core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core14.debug(`Download concurrency: ${result.downloadConcurrency}`); + core14.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core14.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); + core14.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core14.debug(`Lookup only: ${result.lookupOnly}`); return result; } exports2.getDownloadOptions = getDownloadOptions; @@ -76558,7 +76437,7 @@ var require_cacheHttpClient = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); var fs7 = __importStar4(require("fs")); @@ -76576,7 +76455,7 @@ var require_cacheHttpClient = __commonJS({ throw new Error("Cache Service Url not found, unable to restore cache."); } const url = `${baseUrl}_apis/artifactcache/${resource}`; - core13.debug(`Resource Url: ${url}`); + core14.debug(`Resource Url: ${url}`); return url; } function createAcceptHeader(type2, apiVersion) { @@ -76604,7 +76483,7 @@ var require_cacheHttpClient = __commonJS({ return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { - if (core13.isDebug()) { + if (core14.isDebug()) { yield printCachesListForDiagnostics(keys[0], httpClient, version); } return null; @@ -76617,9 +76496,9 @@ var require_cacheHttpClient = __commonJS({ if (!cacheDownloadUrl) { throw new Error("Cache not found."); } - core13.setSecret(cacheDownloadUrl); - core13.debug(`Cache Result:`); - core13.debug(JSON.stringify(cacheResult)); + core14.setSecret(cacheDownloadUrl); + core14.debug(`Cache Result:`); + core14.debug(JSON.stringify(cacheResult)); return cacheResult; }); } @@ -76634,10 +76513,10 @@ var require_cacheHttpClient = __commonJS({ const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { - core13.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key + core14.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { - core13.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); + core14.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); } } } @@ -76682,7 +76561,7 @@ Other caches with similar key:`); } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter4(this, void 0, void 0, function* () { - core13.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) @@ -76704,7 +76583,7 @@ Other caches with similar key:`); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); const parallelUploads = [...new Array(concurrency).keys()]; - core13.debug("Awaiting all uploads"); + core14.debug("Awaiting all uploads"); let offset = 0; try { yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { @@ -76747,16 +76626,16 @@ Other caches with similar key:`); yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); } else { const httpClient = createHttpClient(); - core13.debug("Upload cache"); + core14.debug("Upload cache"); yield uploadFile(httpClient, cacheId, archivePath, options); - core13.debug("Commiting cache"); + core14.debug("Commiting cache"); const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + core14.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); } - core13.info("Cache saved successfully"); + core14.info("Cache saved successfully"); } }); } @@ -82182,7 +82061,7 @@ var require_cache3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var path6 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); @@ -82235,7 +82114,7 @@ var require_cache3 = __commonJS({ function restoreCache4(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core13.debug(`Cache service version: ${cacheServiceVersion}`); + core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); switch (cacheServiceVersion) { case "v2": @@ -82251,8 +82130,8 @@ var require_cache3 = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core13.debug("Resolved Keys:"); - core13.debug(JSON.stringify(keys)); + core14.debug("Resolved Keys:"); + core14.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82270,19 +82149,19 @@ var require_cache3 = __commonJS({ return void 0; } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core13.info("Lookup only - skipping download"); + core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } archivePath = path6.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core13.info("Cache restored successfully"); + core14.info("Cache restored successfully"); return cacheEntry.cacheKey; } catch (error2) { const typedError = error2; @@ -82290,16 +82169,16 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to restore: ${error2.message}`); + core14.error(`Failed to restore: ${error2.message}`); } else { - core13.warning(`Failed to restore: ${error2.message}`); + core14.warning(`Failed to restore: ${error2.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82310,8 +82189,8 @@ var require_cache3 = __commonJS({ options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core13.debug("Resolved Keys:"); - core13.debug(JSON.stringify(keys)); + core14.debug("Resolved Keys:"); + core14.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82329,30 +82208,30 @@ var require_cache3 = __commonJS({ }; const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core13.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); + core14.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); return void 0; } const isRestoreKeyMatch = request.key !== response.matchedKey; if (isRestoreKeyMatch) { - core13.info(`Cache hit for restore-key: ${response.matchedKey}`); + core14.info(`Cache hit for restore-key: ${response.matchedKey}`); } else { - core13.info(`Cache hit for: ${response.matchedKey}`); + core14.info(`Cache hit for: ${response.matchedKey}`); } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core13.info("Lookup only - skipping download"); + core14.info("Lookup only - skipping download"); return response.matchedKey; } archivePath = path6.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive path: ${archivePath}`); - core13.debug(`Starting download of archive to: ${archivePath}`); + core14.debug(`Archive path: ${archivePath}`); + core14.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - if (core13.isDebug()) { + core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core13.info("Cache restored successfully"); + core14.info("Cache restored successfully"); return response.matchedKey; } catch (error2) { const typedError = error2; @@ -82360,9 +82239,9 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to restore: ${error2.message}`); + core14.error(`Failed to restore: ${error2.message}`); } else { - core13.warning(`Failed to restore: ${error2.message}`); + core14.warning(`Failed to restore: ${error2.message}`); } } } finally { @@ -82371,7 +82250,7 @@ var require_cache3 = __commonJS({ yield utils.unlinkFile(archivePath); } } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82380,7 +82259,7 @@ var require_cache3 = __commonJS({ function saveCache4(paths, key, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core13.debug(`Cache service version: ${cacheServiceVersion}`); + core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); checkKey(key); switch (cacheServiceVersion) { @@ -82399,26 +82278,26 @@ var require_cache3 = __commonJS({ const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core13.debug("Cache Paths:"); - core13.debug(`${JSON.stringify(cachePaths)}`); + core14.debug("Cache Paths:"); + core14.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path6.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const fileSizeLimit = 10 * 1024 * 1024 * 1024; const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.debug(`File Size: ${archiveFileSize}`); + core14.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } - core13.debug("Reserving Cache"); + core14.debug("Reserving Cache"); const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { compressionMethod, enableCrossOsArchive, @@ -82431,26 +82310,26 @@ var require_cache3 = __commonJS({ } else { throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); } - core13.debug(`Saving Cache (ID: ${cacheId})`); + core14.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); } catch (error2) { const typedError = error2; if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError2.name) { - core13.info(`Failed to save: ${typedError.message}`); + core14.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to save: ${typedError.message}`); + core14.error(`Failed to save: ${typedError.message}`); } else { - core13.warning(`Failed to save: ${typedError.message}`); + core14.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82463,26 +82342,26 @@ var require_cache3 = __commonJS({ const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core13.debug("Cache Paths:"); - core13.debug(`${JSON.stringify(cachePaths)}`); + core14.debug("Cache Paths:"); + core14.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path6.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.debug(`File Size: ${archiveFileSize}`); + core14.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } options.archiveSizeBytes = archiveFileSize; - core13.debug("Reserving Cache"); + core14.debug("Reserving Cache"); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const request = { key, @@ -82496,10 +82375,10 @@ var require_cache3 = __commonJS({ } signedUploadUrl = response.signedUploadUrl; } catch (error2) { - core13.debug(`Failed to reserve cache: ${error2}`); + core14.debug(`Failed to reserve cache: ${error2}`); throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } - core13.debug(`Attempting to upload cache located at: ${archivePath}`); + core14.debug(`Attempting to upload cache located at: ${archivePath}`); yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); const finalizeRequest = { key, @@ -82507,7 +82386,7 @@ var require_cache3 = __commonJS({ sizeBytes: `${archiveFileSize}` }; const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); - core13.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); if (!finalizeResponse.ok) { throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); } @@ -82517,19 +82396,19 @@ var require_cache3 = __commonJS({ if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError2.name) { - core13.info(`Failed to save: ${typedError.message}`); + core14.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to save: ${typedError.message}`); + core14.error(`Failed to save: ${typedError.message}`); } else { - core13.warning(`Failed to save: ${typedError.message}`); + core14.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82737,7 +82616,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -82760,10 +82639,10 @@ var require_retry_helper = __commonJS({ if (isRetryable && !isRetryable(err)) { throw err; } - core13.info(err.message); + core14.info(err.message); } const seconds = this.getSleepAmount(); - core13.info(`Waiting ${seconds} seconds before trying again`); + core14.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } @@ -82843,7 +82722,7 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs7 = __importStar4(require("fs")); @@ -82872,8 +82751,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { dest = dest || path6.join(_getTempDirectory(), crypto.randomUUID()); yield io6.mkdirP(path6.dirname(dest)); - core13.debug(`Downloading ${url}`); - core13.debug(`Destination ${dest}`); + core14.debug(`Downloading ${url}`); + core14.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); @@ -82900,7 +82779,7 @@ var require_tool_cache = __commonJS({ allowRetries: false }); if (auth) { - core13.debug("set auth"); + core14.debug("set auth"); if (headers === void 0) { headers = {}; } @@ -82909,7 +82788,7 @@ var require_tool_cache = __commonJS({ const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core13.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core14.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream.pipeline); @@ -82918,16 +82797,16 @@ var require_tool_cache = __commonJS({ let succeeded = false; try { yield pipeline(readStream, fs7.createWriteStream(dest)); - core13.debug("download complete"); + core14.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { - core13.debug("download failed"); + core14.debug("download failed"); try { yield io6.rmRF(dest); } catch (err) { - core13.debug(`Failed to delete '${dest}'. ${err.message}`); + core14.debug(`Failed to delete '${dest}'. ${err.message}`); } } } @@ -82942,7 +82821,7 @@ var require_tool_cache = __commonJS({ process.chdir(dest); if (_7zPath) { try { - const logLevel = core13.isDebug() ? "-bb1" : "-bb0"; + const logLevel = core14.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, @@ -82992,7 +82871,7 @@ var require_tool_cache = __commonJS({ throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); - core13.debug("Checking tar --version"); + core14.debug("Checking tar --version"); let versionOutput = ""; yield (0, exec_1.exec)("tar --version", [], { ignoreReturnCode: true, @@ -83002,7 +82881,7 @@ var require_tool_cache = __commonJS({ stderr: (data) => versionOutput += data.toString() } }); - core13.debug(versionOutput.trim()); + core14.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { @@ -83010,7 +82889,7 @@ var require_tool_cache = __commonJS({ } else { args = [flags]; } - if (core13.isDebug() && !flags.includes("v")) { + if (core14.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; @@ -83042,7 +82921,7 @@ var require_tool_cache = __commonJS({ args = [flags]; } args.push("-x", "-C", dest, "-f", file); - if (core13.isDebug()) { + if (core14.isDebug()) { args.push("-v"); } const xarPath = yield io6.which("xar", true); @@ -83087,7 +82966,7 @@ var require_tool_cache = __commonJS({ "-Command", pwshCommand ]; - core13.debug(`Using pwsh at path: ${pwshPath}`); + core14.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { const powershellCommand = [ @@ -83107,7 +82986,7 @@ var require_tool_cache = __commonJS({ powershellCommand ]; const powershellPath = yield io6.which("powershell", true); - core13.debug(`Using powershell at path: ${powershellPath}`); + core14.debug(`Using powershell at path: ${powershellPath}`); yield (0, exec_1.exec)(`"${powershellPath}"`, args); } }); @@ -83116,7 +82995,7 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const unzipPath = yield io6.which("unzip", true); const args = [file]; - if (!core13.isDebug()) { + if (!core14.isDebug()) { args.unshift("-q"); } args.unshift("-o"); @@ -83127,8 +83006,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os.arch(); - core13.debug(`Caching tool ${tool} ${version} ${arch}`); - core13.debug(`source dir: ${sourceDir}`); + core14.debug(`Caching tool ${tool} ${version} ${arch}`); + core14.debug(`source dir: ${sourceDir}`); if (!fs7.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } @@ -83146,14 +83025,14 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os.arch(); - core13.debug(`Caching tool ${tool} ${version} ${arch}`); - core13.debug(`source file: ${sourceFile}`); + core14.debug(`Caching tool ${tool} ${version} ${arch}`); + core14.debug(`source file: ${sourceFile}`); if (!fs7.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch); const destPath = path6.join(destFolder, targetFile); - core13.debug(`destination file ${destPath}`); + core14.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch); return destFolder; @@ -83177,12 +83056,12 @@ var require_tool_cache = __commonJS({ if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; const cachePath = path6.join(_getCacheDirectory(), toolName, versionSpec, arch); - core13.debug(`checking cache: ${cachePath}`); + core14.debug(`checking cache: ${cachePath}`); if (fs7.existsSync(cachePath) && fs7.existsSync(`${cachePath}.complete`)) { - core13.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); + core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); toolPath = cachePath; } else { - core13.debug("not found"); + core14.debug("not found"); } } return toolPath; @@ -83213,7 +83092,7 @@ var require_tool_cache = __commonJS({ const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { - core13.debug("set auth"); + core14.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); @@ -83234,7 +83113,7 @@ var require_tool_cache = __commonJS({ try { releases = JSON.parse(versionsRaw); } catch (_a) { - core13.debug("Invalid json"); + core14.debug("Invalid json"); } } return releases; @@ -83260,7 +83139,7 @@ var require_tool_cache = __commonJS({ function _createToolPath(tool, version, arch) { return __awaiter4(this, void 0, void 0, function* () { const folderPath = path6.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); - core13.debug(`destination ${folderPath}`); + core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); yield io6.rmRF(markerPath); @@ -83272,19 +83151,19 @@ var require_tool_cache = __commonJS({ const folderPath = path6.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); const markerPath = `${folderPath}.complete`; fs7.writeFileSync(markerPath, ""); - core13.debug("finished caching tool"); + core14.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { const c = semver8.clean(versionSpec) || ""; - core13.debug(`isExplicit: ${c}`); + core14.debug(`isExplicit: ${c}`); const valid3 = semver8.valid(c) != null; - core13.debug(`explicit? ${valid3}`); + core14.debug(`explicit? ${valid3}`); return valid3; } exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version = ""; - core13.debug(`evaluating ${versions.length} versions`); + core14.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver8.gt(a, b)) { return 1; @@ -83300,9 +83179,9 @@ var require_tool_cache = __commonJS({ } } if (version) { - core13.debug(`matched: ${version}`); + core14.debug(`matched: ${version}`); } else { - core13.debug("match not found"); + core14.debug("match not found"); } return version; } @@ -85976,14 +85855,14 @@ var require_retention = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getExpiration = void 0; var generated_1 = require_generated(); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getExpiration(retentionDays) { if (!retentionDays) { return void 0; } const maxRetentionDays = getRetentionDays(); if (maxRetentionDays && maxRetentionDays < retentionDays) { - core13.warning(`Retention days cannot be greater than the maximum allowed retention set within the repository. Using ${maxRetentionDays} instead.`); + core14.warning(`Retention days cannot be greater than the maximum allowed retention set within the repository. Using ${maxRetentionDays} instead.`); retentionDays = maxRetentionDays; } const expirationDate = /* @__PURE__ */ new Date(); @@ -86575,7 +86454,7 @@ var require_util11 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getBackendIdsFromToken = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var config_1 = require_config2(); var jwt_decode_1 = __importDefault4(require_jwt_decode_cjs()); var InvalidJwtError = new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims"); @@ -86601,8 +86480,8 @@ var require_util11 = __commonJS({ workflowRunBackendId: scopeParts[1], workflowJobRunBackendId: scopeParts[2] }; - core13.debug(`Workflow Run Backend ID: ${ids.workflowRunBackendId}`); - core13.debug(`Workflow Job Run Backend ID: ${ids.workflowJobRunBackendId}`); + core14.debug(`Workflow Run Backend ID: ${ids.workflowRunBackendId}`); + core14.debug(`Workflow Job Run Backend ID: ${ids.workflowJobRunBackendId}`); return ids; } throw InvalidJwtError; @@ -86673,7 +86552,7 @@ var require_blob_upload = __commonJS({ exports2.uploadZipToBlobStorage = void 0; var storage_blob_1 = require_dist7(); var config_1 = require_config2(); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var crypto = __importStar4(require("crypto")); var stream = __importStar4(require("stream")); var errors_1 = require_errors3(); @@ -86699,9 +86578,9 @@ var require_blob_upload = __commonJS({ const bufferSize = (0, config_1.getUploadChunkSize)(); const blobClient = new storage_blob_1.BlobClient(authenticatedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); - core13.debug(`Uploading artifact zip to blob storage with maxConcurrency: ${maxConcurrency}, bufferSize: ${bufferSize}`); + core14.debug(`Uploading artifact zip to blob storage with maxConcurrency: ${maxConcurrency}, bufferSize: ${bufferSize}`); const uploadCallback = (progress) => { - core13.info(`Uploaded bytes ${progress.loadedBytes}`); + core14.info(`Uploaded bytes ${progress.loadedBytes}`); uploadByteCount = progress.loadedBytes; lastProgressTime = Date.now(); }; @@ -86715,7 +86594,7 @@ var require_blob_upload = __commonJS({ const hashStream = crypto.createHash("sha256"); zipUploadStream.pipe(uploadStream); zipUploadStream.pipe(hashStream).setEncoding("hex"); - core13.info("Beginning upload of artifact content to blob storage"); + core14.info("Beginning upload of artifact content to blob storage"); try { yield Promise.race([ blockBlobClient.uploadStream(uploadStream, bufferSize, maxConcurrency, options), @@ -86729,12 +86608,12 @@ var require_blob_upload = __commonJS({ } finally { abortController.abort(); } - core13.info("Finished uploading artifact content to blob storage!"); + core14.info("Finished uploading artifact content to blob storage!"); hashStream.end(); sha256Hash = hashStream.read(); - core13.info(`SHA256 hash of uploaded artifact zip is ${sha256Hash}`); + core14.info(`SHA256 hash of uploaded artifact zip is ${sha256Hash}`); if (uploadByteCount === 0) { - core13.warning(`No data was uploaded to blob storage. Reported upload byte count is 0.`); + core14.warning(`No data was uploaded to blob storage. Reported upload byte count is 0.`); } return { uploadSize: uploadByteCount, @@ -89790,7 +89669,7 @@ var require_BufferList = __commonJS({ this.head = this.tail = null; this.length = 0; }; - BufferList.prototype.join = function join6(s) { + BufferList.prototype.join = function join7(s) { if (this.length === 0) return ""; var p = this.head; var ret = "" + p.data; @@ -110793,7 +110672,7 @@ var require_zip2 = __commonJS({ var stream = __importStar4(require("stream")); var promises_1 = require("fs/promises"); var archiver2 = __importStar4(require_archiver()); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var config_1 = require_config2(); exports2.DEFAULT_COMPRESSION_LEVEL = 6; var ZipUploadStream = class extends stream.Transform { @@ -110810,7 +110689,7 @@ var require_zip2 = __commonJS({ exports2.ZipUploadStream = ZipUploadStream; function createZipUploadStream(uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) { return __awaiter4(this, void 0, void 0, function* () { - core13.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); + core14.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); const zip = archiver2.create("zip", { highWaterMark: (0, config_1.getUploadChunkSize)(), zlib: { level: compressionLevel } @@ -110834,8 +110713,8 @@ var require_zip2 = __commonJS({ } const bufferSize = (0, config_1.getUploadChunkSize)(); const zipUploadStream = new ZipUploadStream(bufferSize); - core13.debug(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`); - core13.debug(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`); + core14.debug(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`); + core14.debug(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`); zip.pipe(zipUploadStream); zip.finalize(); return zipUploadStream; @@ -110843,24 +110722,24 @@ var require_zip2 = __commonJS({ } exports2.createZipUploadStream = createZipUploadStream; var zipErrorCallback = (error2) => { - core13.error("An error has occurred while creating the zip file for upload"); - core13.info(error2); + core14.error("An error has occurred while creating the zip file for upload"); + core14.info(error2); throw new Error("An error has occurred during zip creation for the artifact"); }; var zipWarningCallback = (error2) => { if (error2.code === "ENOENT") { - core13.warning("ENOENT warning during artifact zip creation. No such file or directory"); - core13.info(error2); + core14.warning("ENOENT warning during artifact zip creation. No such file or directory"); + core14.info(error2); } else { - core13.warning(`A non-blocking warning has occurred during artifact zip creation: ${error2.code}`); - core13.info(error2); + core14.warning(`A non-blocking warning has occurred during artifact zip creation: ${error2.code}`); + core14.info(error2); } }; var zipFinishCallback = () => { - core13.debug("Zip stream for upload has finished."); + core14.debug("Zip stream for upload has finished."); }; var zipEndCallback = () => { - core13.debug("Zip stream for upload has ended."); + core14.debug("Zip stream for upload has ended."); }; } }); @@ -110925,7 +110804,7 @@ var require_upload_artifact = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadArtifact = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var retention_1 = require_retention(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); @@ -110972,13 +110851,13 @@ var require_upload_artifact = __commonJS({ value: `sha256:${uploadResult.sha256Hash}` }); } - core13.info(`Finalizing artifact upload`); + core14.info(`Finalizing artifact upload`); const finalizeArtifactResp = yield artifactClient.FinalizeArtifact(finalizeArtifactReq); if (!finalizeArtifactResp.ok) { throw new errors_1.InvalidResponseError("FinalizeArtifact: response from backend was not ok"); } const artifactId = BigInt(finalizeArtifactResp.artifactId); - core13.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`); + core14.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`); return { size: uploadResult.uploadSize, digest: uploadResult.sha256Hash, @@ -118126,7 +118005,7 @@ var require_download_artifact = __commonJS({ var crypto = __importStar4(require("crypto")); var stream = __importStar4(require("stream")); var github2 = __importStar4(require_github2()); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var httpClient = __importStar4(require_lib()); var unzip_stream_1 = __importDefault4(require_unzip()); var user_agent_1 = require_user_agent2(); @@ -118162,7 +118041,7 @@ var require_download_artifact = __commonJS({ return yield streamExtractExternal(url, directory); } catch (error2) { retryCount++; - core13.debug(`Failed to download artifact after ${retryCount} retries due to ${error2.message}. Retrying in 5 seconds...`); + core14.debug(`Failed to download artifact after ${retryCount} retries due to ${error2.message}. Retrying in 5 seconds...`); yield new Promise((resolve5) => setTimeout(resolve5, 5e3)); } } @@ -118191,7 +118070,7 @@ var require_download_artifact = __commonJS({ extractStream.on("data", () => { timer.refresh(); }).on("error", (error2) => { - core13.debug(`response.message: Artifact download failed: ${error2.message}`); + core14.debug(`response.message: Artifact download failed: ${error2.message}`); clearTimeout(timer); reject(error2); }).pipe(unzip_stream_1.default.Extract({ path: directory })).on("close", () => { @@ -118199,7 +118078,7 @@ var require_download_artifact = __commonJS({ if (hashStream) { hashStream.end(); sha256Digest = hashStream.read(); - core13.info(`SHA256 digest of downloaded artifact is ${sha256Digest}`); + core14.info(`SHA256 digest of downloaded artifact is ${sha256Digest}`); } resolve5({ sha256Digest: `sha256:${sha256Digest}` }); }).on("error", (error2) => { @@ -118214,7 +118093,7 @@ var require_download_artifact = __commonJS({ const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const api = github2.getOctokit(token); let digestMismatch = false; - core13.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`); + core14.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`); const { headers, status } = yield api.rest.actions.downloadArtifact({ owner: repositoryOwner, repo: repositoryName, @@ -118231,16 +118110,16 @@ var require_download_artifact = __commonJS({ if (!location) { throw new Error(`Unable to redirect to artifact download url`); } - core13.info(`Redirecting to blob download url: ${scrubQueryParameters(location)}`); + core14.info(`Redirecting to blob download url: ${scrubQueryParameters(location)}`); try { - core13.info(`Starting download of artifact to: ${downloadPath}`); + core14.info(`Starting download of artifact to: ${downloadPath}`); const extractResponse = yield streamExtract(location, downloadPath); - core13.info(`Artifact download completed successfully.`); + core14.info(`Artifact download completed successfully.`); if (options === null || options === void 0 ? void 0 : options.expectedHash) { if ((options === null || options === void 0 ? void 0 : options.expectedHash) !== extractResponse.sha256Digest) { digestMismatch = true; - core13.debug(`Computed digest: ${extractResponse.sha256Digest}`); - core13.debug(`Expected digest: ${options.expectedHash}`); + core14.debug(`Computed digest: ${extractResponse.sha256Digest}`); + core14.debug(`Expected digest: ${options.expectedHash}`); } } } catch (error2) { @@ -118267,7 +118146,7 @@ var require_download_artifact = __commonJS({ Are you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`); } if (artifacts.length > 1) { - core13.warning("Multiple artifacts found, defaulting to first."); + core14.warning("Multiple artifacts found, defaulting to first."); } const signedReq = { workflowRunBackendId: artifacts[0].workflowRunBackendId, @@ -118275,16 +118154,16 @@ Are you trying to download from a different run? Try specifying a github-token w name: artifacts[0].name }; const { signedUrl } = yield artifactClient.GetSignedArtifactURL(signedReq); - core13.info(`Redirecting to blob download url: ${scrubQueryParameters(signedUrl)}`); + core14.info(`Redirecting to blob download url: ${scrubQueryParameters(signedUrl)}`); try { - core13.info(`Starting download of artifact to: ${downloadPath}`); + core14.info(`Starting download of artifact to: ${downloadPath}`); const extractResponse = yield streamExtract(signedUrl, downloadPath); - core13.info(`Artifact download completed successfully.`); + core14.info(`Artifact download completed successfully.`); if (options === null || options === void 0 ? void 0 : options.expectedHash) { if ((options === null || options === void 0 ? void 0 : options.expectedHash) !== extractResponse.sha256Digest) { digestMismatch = true; - core13.debug(`Computed digest: ${extractResponse.sha256Digest}`); - core13.debug(`Expected digest: ${options.expectedHash}`); + core14.debug(`Computed digest: ${extractResponse.sha256Digest}`); + core14.debug(`Expected digest: ${options.expectedHash}`); } } } catch (error2) { @@ -118297,10 +118176,10 @@ Are you trying to download from a different run? Try specifying a github-token w function resolveOrCreateDirectory(downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { return __awaiter4(this, void 0, void 0, function* () { if (!(yield exists(downloadPath))) { - core13.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); + core14.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); yield promises_1.default.mkdir(downloadPath, { recursive: true }); } else { - core13.debug(`Artifact destination folder already exists: ${downloadPath}`); + core14.debug(`Artifact destination folder already exists: ${downloadPath}`); } return downloadPath; }); @@ -118341,7 +118220,7 @@ var require_retry_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRetryOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var defaultMaxRetryNumber = 5; var defaultExemptStatusCodes = [400, 401, 403, 404, 422]; function getRetryOptions(defaultOptions, retries = defaultMaxRetryNumber, exemptStatusCodes = defaultExemptStatusCodes) { @@ -118356,7 +118235,7 @@ var require_retry_options = __commonJS({ retryOptions.doNotRetry = exemptStatusCodes; } const requestOptions = Object.assign(Object.assign({}, defaultOptions.request), { retries }); - core13.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : "octokit default: [400, 401, 403, 404, 422]"})`); + core14.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : "octokit default: [400, 401, 403, 404, 422]"})`); return [retryOptions, requestOptions]; } exports2.getRetryOptions = getRetryOptions; @@ -118513,7 +118392,7 @@ var require_get_artifact = __commonJS({ exports2.getArtifactInternal = exports2.getArtifactPublic = void 0; var github_1 = require_github2(); var plugin_retry_1 = require_dist_node25(); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var utils_1 = require_utils13(); var retry_options_1 = require_retry_options(); var plugin_request_log_1 = require_dist_node24(); @@ -118551,7 +118430,7 @@ var require_get_artifact = __commonJS({ let artifact2 = getArtifactResp.data.artifacts[0]; if (getArtifactResp.data.artifacts.length > 1) { artifact2 = getArtifactResp.data.artifacts.sort((a, b) => b.id - a.id)[0]; - core13.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.id})`); + core14.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.id})`); } return { artifact: { @@ -118584,7 +118463,7 @@ var require_get_artifact = __commonJS({ let artifact2 = res.artifacts[0]; if (res.artifacts.length > 1) { artifact2 = res.artifacts.sort((a, b) => Number(b.databaseId) - Number(a.databaseId))[0]; - core13.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.databaseId})`); + core14.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.databaseId})`); } return { artifact: { @@ -120532,7 +120411,7 @@ var require_requestUtils2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientRequest = exports2.retry = void 0; var utils_1 = require_utils14(); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { return __awaiter4(this, void 0, void 0, function* () { @@ -120559,13 +120438,13 @@ var require_requestUtils2 = __commonJS({ errorMessage = error2.message; } if (!isRetryable) { - core13.info(`${name} - Error is not retryable`); + core14.info(`${name} - Error is not retryable`); if (response) { (0, utils_1.displayHttpDiagnostics)(response); } break; } - core13.info(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core14.info(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); yield (0, utils_1.sleep)((0, utils_1.getExponentialRetryTimeInMilliseconds)(attempt)); attempt++; } @@ -120649,7 +120528,7 @@ var require_upload_http_client = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadHttpClient = void 0; var fs7 = __importStar4(require("fs")); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var tmp = __importStar4(require_tmp_promise()); var stream = __importStar4(require("stream")); var utils_1 = require_utils14(); @@ -120714,7 +120593,7 @@ var require_upload_http_client = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const FILE_CONCURRENCY = (0, config_variables_1.getUploadFileConcurrency)(); const MAX_CHUNK_SIZE = (0, config_variables_1.getUploadChunkSize)(); - core13.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`); + core14.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`); const parameters = []; let continueOnError = true; if (options) { @@ -120751,15 +120630,15 @@ var require_upload_http_client = __commonJS({ } const startTime = perf_hooks_1.performance.now(); const uploadFileResult = yield this.uploadFileAsync(index, currentFileParameters); - if (core13.isDebug()) { - core13.debug(`File: ${++completedFiles}/${filesToUpload.length}. ${currentFileParameters.file} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish upload`); + if (core14.isDebug()) { + core14.debug(`File: ${++completedFiles}/${filesToUpload.length}. ${currentFileParameters.file} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish upload`); } uploadFileSize += uploadFileResult.successfulUploadSize; totalFileSize += uploadFileResult.totalSize; if (uploadFileResult.isSuccess === false) { failedItemsToReport.push(currentFileParameters.file); if (!continueOnError) { - core13.error(`aborting artifact upload`); + core14.error(`aborting artifact upload`); abortPendingFileUploads = true; } } @@ -120768,7 +120647,7 @@ var require_upload_http_client = __commonJS({ }))); this.statusReporter.stop(); this.uploadHttpManager.disposeAndReplaceAllClients(); - core13.info(`Total size of all the files uploaded is ${uploadFileSize} bytes`); + core14.info(`Total size of all the files uploaded is ${uploadFileSize} bytes`); return { uploadSize: uploadFileSize, totalSize: totalFileSize, @@ -120794,16 +120673,16 @@ var require_upload_http_client = __commonJS({ let uploadFileSize = 0; let isGzip = true; if (!isFIFO && totalFileSize < 65536) { - core13.debug(`${parameters.file} is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size`); + core14.debug(`${parameters.file} is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size`); const buffer = yield (0, upload_gzip_1.createGZipFileInBuffer)(parameters.file); let openUploadStream; if (totalFileSize < buffer.byteLength) { - core13.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); + core14.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); openUploadStream = () => fs7.createReadStream(parameters.file); isGzip = false; uploadFileSize = totalFileSize; } else { - core13.debug(`A gzip file created for ${parameters.file} helped with reducing the size of the original file. The file will be uploaded using gzip.`); + core14.debug(`A gzip file created for ${parameters.file} helped with reducing the size of the original file. The file will be uploaded using gzip.`); openUploadStream = () => { const passThrough = new stream.PassThrough(); passThrough.end(buffer); @@ -120815,7 +120694,7 @@ var require_upload_http_client = __commonJS({ if (!result) { isUploadSuccessful = false; failedChunkSizes += uploadFileSize; - core13.warning(`Aborting upload for ${parameters.file} due to failure`); + core14.warning(`Aborting upload for ${parameters.file} due to failure`); } return { isSuccess: isUploadSuccessful, @@ -120824,16 +120703,16 @@ var require_upload_http_client = __commonJS({ }; } else { const tempFile = yield tmp.file(); - core13.debug(`${parameters.file} is greater than 64k in size. Creating a gzip file on-disk ${tempFile.path} to potentially reduce the upload size`); + core14.debug(`${parameters.file} is greater than 64k in size. Creating a gzip file on-disk ${tempFile.path} to potentially reduce the upload size`); uploadFileSize = yield (0, upload_gzip_1.createGZipFileOnDisk)(parameters.file, tempFile.path); let uploadFilePath = tempFile.path; if (!isFIFO && totalFileSize < uploadFileSize) { - core13.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); + core14.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); uploadFileSize = totalFileSize; uploadFilePath = parameters.file; isGzip = false; } else { - core13.debug(`The gzip file created for ${parameters.file} is smaller than the original file. The file will be uploaded using gzip.`); + core14.debug(`The gzip file created for ${parameters.file} is smaller than the original file. The file will be uploaded using gzip.`); } let abortFileUpload = false; while (offset < uploadFileSize) { @@ -120853,7 +120732,7 @@ var require_upload_http_client = __commonJS({ if (!result) { isUploadSuccessful = false; failedChunkSizes += chunkSize; - core13.warning(`Aborting upload for ${parameters.file} due to failure`); + core14.warning(`Aborting upload for ${parameters.file} due to failure`); abortFileUpload = true; } else { if (uploadFileSize > 8388608) { @@ -120861,7 +120740,7 @@ var require_upload_http_client = __commonJS({ } } } - core13.debug(`deleting temporary gzip file ${tempFile.path}`); + core14.debug(`deleting temporary gzip file ${tempFile.path}`); yield tempFile.cleanup(); return { isSuccess: isUploadSuccessful, @@ -120900,7 +120779,7 @@ var require_upload_http_client = __commonJS({ if (response) { (0, utils_1.displayHttpDiagnostics)(response); } - core13.info(`Retry limit has been reached for chunk at offset ${start} to ${resourceUrl}`); + core14.info(`Retry limit has been reached for chunk at offset ${start} to ${resourceUrl}`); return true; } return false; @@ -120908,14 +120787,14 @@ var require_upload_http_client = __commonJS({ const backOff = (retryAfterValue) => __awaiter4(this, void 0, void 0, function* () { this.uploadHttpManager.disposeAndReplaceClient(httpClientIndex); if (retryAfterValue) { - core13.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`); + core14.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`); yield (0, utils_1.sleep)(retryAfterValue); } else { const backoffTime = (0, utils_1.getExponentialRetryTimeInMilliseconds)(retryCount); - core13.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the upload at offset ${start}`); + core14.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the upload at offset ${start}`); yield (0, utils_1.sleep)(backoffTime); } - core13.info(`Finished backoff for retry #${retryCount}, continuing with upload`); + core14.info(`Finished backoff for retry #${retryCount}, continuing with upload`); return; }); while (retryCount <= retryLimit) { @@ -120923,7 +120802,7 @@ var require_upload_http_client = __commonJS({ try { response = yield uploadChunkRequest(); } catch (error2) { - core13.info(`An error has been caught http-client index ${httpClientIndex}, retrying the upload`); + core14.info(`An error has been caught http-client index ${httpClientIndex}, retrying the upload`); console.log(error2); if (incrementAndCheckRetryLimit()) { return false; @@ -120935,13 +120814,13 @@ var require_upload_http_client = __commonJS({ if ((0, utils_1.isSuccessStatusCode)(response.message.statusCode)) { return true; } else if ((0, utils_1.isRetryableStatusCode)(response.message.statusCode)) { - core13.info(`A ${response.message.statusCode} status code has been received, will attempt to retry the upload`); + core14.info(`A ${response.message.statusCode} status code has been received, will attempt to retry the upload`); if (incrementAndCheckRetryLimit(response)) { return false; } (0, utils_1.isThrottledStatusCode)(response.message.statusCode) ? yield backOff((0, utils_1.tryGetRetryAfterValueTimeInMilliseconds)(response.message.headers)) : yield backOff(); } else { - core13.error(`Unexpected response. Unable to upload chunk to ${resourceUrl}`); + core14.error(`Unexpected response. Unable to upload chunk to ${resourceUrl}`); (0, utils_1.displayHttpDiagnostics)(response); return false; } @@ -120959,7 +120838,7 @@ var require_upload_http_client = __commonJS({ resourceUrl.searchParams.append("artifactName", artifactName); const parameters = { Size: size }; const data = JSON.stringify(parameters, null, 2); - core13.debug(`URL is ${resourceUrl.toString()}`); + core14.debug(`URL is ${resourceUrl.toString()}`); const client = this.uploadHttpManager.getClient(0); const headers = (0, utils_1.getUploadHeaders)("application/json", false); const customErrorMessages = /* @__PURE__ */ new Map([ @@ -120972,7 +120851,7 @@ var require_upload_http_client = __commonJS({ return client.patch(resourceUrl.toString(), data, headers); }), customErrorMessages); yield response.readBody(); - core13.debug(`Artifact ${artifactName} has been successfully uploaded, total size in bytes: ${size}`); + core14.debug(`Artifact ${artifactName} has been successfully uploaded, total size in bytes: ${size}`); }); } }; @@ -121041,7 +120920,7 @@ var require_download_http_client = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DownloadHttpClient = void 0; var fs7 = __importStar4(require("fs")); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var zlib = __importStar4(require("zlib")); var utils_1 = require_utils14(); var url_1 = require("url"); @@ -121095,11 +120974,11 @@ var require_download_http_client = __commonJS({ downloadSingleArtifact(downloadItems) { return __awaiter4(this, void 0, void 0, function* () { const DOWNLOAD_CONCURRENCY = (0, config_variables_1.getDownloadFileConcurrency)(); - core13.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`); + core14.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`); const parallelDownloads = [...new Array(DOWNLOAD_CONCURRENCY).keys()]; let currentFile = 0; let downloadedFiles = 0; - core13.info(`Total number of files that will be downloaded: ${downloadItems.length}`); + core14.info(`Total number of files that will be downloaded: ${downloadItems.length}`); this.statusReporter.setTotalNumberOfFilesToProcess(downloadItems.length); this.statusReporter.start(); yield Promise.all(parallelDownloads.map((index) => __awaiter4(this, void 0, void 0, function* () { @@ -121108,8 +120987,8 @@ var require_download_http_client = __commonJS({ currentFile += 1; const startTime = perf_hooks_1.performance.now(); yield this.downloadIndividualFile(index, currentFileToDownload.sourceLocation, currentFileToDownload.targetPath); - if (core13.isDebug()) { - core13.debug(`File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish downloading`); + if (core14.isDebug()) { + core14.debug(`File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish downloading`); } this.statusReporter.incrementProcessedCount(); } @@ -121147,19 +121026,19 @@ var require_download_http_client = __commonJS({ } else { this.downloadHttpManager.disposeAndReplaceClient(httpClientIndex); if (retryAfterValue) { - core13.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the download`); + core14.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the download`); yield (0, utils_1.sleep)(retryAfterValue); } else { const backoffTime = (0, utils_1.getExponentialRetryTimeInMilliseconds)(retryCount); - core13.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the download`); + core14.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the download`); yield (0, utils_1.sleep)(backoffTime); } - core13.info(`Finished backoff for retry #${retryCount}, continuing with download`); + core14.info(`Finished backoff for retry #${retryCount}, continuing with download`); } }); const isAllBytesReceived = (expected, received) => { if (!expected || !received || process.env["ACTIONS_ARTIFACT_SKIP_DOWNLOAD_VALIDATION"]) { - core13.info("Skipping download validation."); + core14.info("Skipping download validation."); return true; } return parseInt(expected) === received; @@ -121180,7 +121059,7 @@ var require_download_http_client = __commonJS({ try { response = yield makeDownloadRequest(); } catch (error2) { - core13.info("An error occurred while attempting to download a file"); + core14.info("An error occurred while attempting to download a file"); console.log(error2); yield backOff(); continue; @@ -121200,7 +121079,7 @@ var require_download_http_client = __commonJS({ } } if (forceRetry || (0, utils_1.isRetryableStatusCode)(response.message.statusCode)) { - core13.info(`A ${response.message.statusCode} response code has been received while attempting to download an artifact`); + core14.info(`A ${response.message.statusCode} response code has been received while attempting to download an artifact`); resetDestinationStream(downloadPath); (0, utils_1.isThrottledStatusCode)(response.message.statusCode) ? yield backOff((0, utils_1.tryGetRetryAfterValueTimeInMilliseconds)(response.message.headers)) : yield backOff(); } else { @@ -121222,29 +121101,29 @@ var require_download_http_client = __commonJS({ if (isGzip) { const gunzip = zlib.createGunzip(); response.message.on("error", (error2) => { - core13.info(`An error occurred while attempting to read the response stream`); + core14.info(`An error occurred while attempting to read the response stream`); gunzip.close(); destinationStream.close(); reject(error2); }).pipe(gunzip).on("error", (error2) => { - core13.info(`An error occurred while attempting to decompress the response stream`); + core14.info(`An error occurred while attempting to decompress the response stream`); destinationStream.close(); reject(error2); }).pipe(destinationStream).on("close", () => { resolve5(); }).on("error", (error2) => { - core13.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); + core14.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); reject(error2); }); } else { response.message.on("error", (error2) => { - core13.info(`An error occurred while attempting to read the response stream`); + core14.info(`An error occurred while attempting to read the response stream`); destinationStream.close(); reject(error2); }).pipe(destinationStream).on("close", () => { resolve5(); }).on("error", (error2) => { - core13.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); + core14.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); reject(error2); }); } @@ -121383,7 +121262,7 @@ var require_artifact_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultArtifactClient = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var upload_specification_1 = require_upload_specification(); var upload_http_client_1 = require_upload_http_client(); var utils_1 = require_utils14(); @@ -121404,7 +121283,7 @@ var require_artifact_client = __commonJS({ */ uploadArtifact(name, files, rootDirectory, options) { return __awaiter4(this, void 0, void 0, function* () { - core13.info(`Starting artifact upload + core14.info(`Starting artifact upload For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`); (0, path_and_artifact_name_validation_1.checkArtifactName)(name); const uploadSpecification = (0, upload_specification_1.getUploadSpecification)(name, rootDirectory, files); @@ -121416,24 +121295,24 @@ For more detailed logs during the artifact upload process, enable step-debugging }; const uploadHttpClient = new upload_http_client_1.UploadHttpClient(); if (uploadSpecification.length === 0) { - core13.warning(`No files found that can be uploaded`); + core14.warning(`No files found that can be uploaded`); } else { const response = yield uploadHttpClient.createArtifactInFileContainer(name, options); if (!response.fileContainerResourceUrl) { - core13.debug(response.toString()); + core14.debug(response.toString()); throw new Error("No URL provided by the Artifact Service to upload an artifact to"); } - core13.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`); - core13.info(`Container for artifact "${name}" successfully created. Starting upload of file(s)`); + core14.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`); + core14.info(`Container for artifact "${name}" successfully created. Starting upload of file(s)`); const uploadResult = yield uploadHttpClient.uploadArtifactToFileContainer(response.fileContainerResourceUrl, uploadSpecification, options); - core13.info(`File upload process has finished. Finalizing the artifact upload`); + core14.info(`File upload process has finished. Finalizing the artifact upload`); yield uploadHttpClient.patchArtifactSize(uploadResult.totalSize, name); if (uploadResult.failedItems.length > 0) { - core13.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`); + core14.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`); } else { - core13.info(`Artifact has been finalized. All files have been successfully uploaded!`); + core14.info(`Artifact has been finalized. All files have been successfully uploaded!`); } - core13.info(` + core14.info(` The raw size of all the files that were specified for upload is ${uploadResult.totalSize} bytes The size of all the files that were uploaded is ${uploadResult.uploadSize} bytes. This takes into account any gzip compression used to reduce the upload size, time and storage @@ -121467,10 +121346,10 @@ Note: The size of downloaded zips can differ significantly from the reported siz path6 = (0, path_1.resolve)(path6); const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path6, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); if (downloadSpecification.filesToDownload.length === 0) { - core13.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); + core14.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); } else { yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure); - core13.info("Directory structure has been set up for the artifact"); + core14.info("Directory structure has been set up for the artifact"); yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate); yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload); } @@ -121486,7 +121365,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz const response = []; const artifacts = yield downloadHttpClient.listArtifacts(); if (artifacts.count === 0) { - core13.info("Unable to find any artifacts for the associated workflow"); + core14.info("Unable to find any artifacts for the associated workflow"); return response; } if (!path6) { @@ -121498,11 +121377,11 @@ Note: The size of downloaded zips can differ significantly from the reported siz while (downloadedArtifacts < artifacts.count) { const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; downloadedArtifacts += 1; - core13.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); + core14.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl); const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path6, true); if (downloadSpecification.filesToDownload.length === 0) { - core13.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); + core14.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); } else { yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure); yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate); @@ -121568,7 +121447,7 @@ var require_internal_glob_options_helper2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -121580,23 +121459,23 @@ var require_internal_glob_options_helper2 = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core13.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core13.debug(`implicitDescendants '${result.implicitDescendants}'`); + core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.matchDirectories === "boolean") { result.matchDirectories = copy.matchDirectories; - core13.debug(`matchDirectories '${result.matchDirectories}'`); + core14.debug(`matchDirectories '${result.matchDirectories}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } if (typeof copy.excludeHiddenFiles === "boolean") { result.excludeHiddenFiles = copy.excludeHiddenFiles; - core13.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); } } return result; @@ -122280,7 +122159,7 @@ var require_internal_globber2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs7 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); var path6 = __importStar4(require("path")); @@ -122333,7 +122212,7 @@ var require_internal_globber2 = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core13.debug(`Search path '${searchPath}'`); + core14.debug(`Search path '${searchPath}'`); try { yield __await4(fs7.promises.lstat(searchPath)); } catch (err) { @@ -122408,7 +122287,7 @@ var require_internal_globber2 = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core13.debug(`Broken symlink '${item.path}'`); + core14.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -122424,7 +122303,7 @@ var require_internal_globber2 = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -122517,7 +122396,7 @@ var require_internal_hash_files = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.hashFiles = void 0; var crypto = __importStar4(require("crypto")); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs7 = __importStar4(require("fs")); var stream = __importStar4(require("stream")); var util = __importStar4(require("util")); @@ -122526,7 +122405,7 @@ var require_internal_hash_files = __commonJS({ var _a, e_1, _b, _c; var _d; return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core13.info : core13.debug; + const writeDelegate = verbose ? core14.info : core14.debug; let hasMatch = false; const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const result = crypto.createHash("sha256"); @@ -122634,22 +122513,76 @@ var require_glob4 = __commonJS({ // src/analyze-action-post.ts var fs6 = __toESM(require("fs")); -var core12 = __toESM(require_core()); +var core13 = __toESM(require_core()); // src/actions-util.ts var fs = __toESM(require("fs")); -var core3 = __toESM(require_core()); +var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts var path = __toESM(require("path")); -var core2 = __toESM(require_core()); +var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); var import_del = __toESM(require_del()); -var import_get_folder_size = __toESM(require_get_folder_size()); + +// node_modules/get-folder-size/index.js +var import_node_path = require("node:path"); +async function getFolderSize(itemPath, options) { + return await core(itemPath, options, { errors: true }); +} +getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); +getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); +async function core(rootItemPath, options = {}, returnType = {}) { + const fs7 = options.fs || await import("node:fs/promises"); + let folderSize = 0n; + const foundInos = /* @__PURE__ */ new Set(); + const errors = []; + await processItem(rootItemPath); + async function processItem(itemPath) { + if (options.ignore?.test(itemPath)) return; + const stats = returnType.strict ? await fs7.lstat(itemPath, { bigint: true }) : await fs7.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + if (typeof stats !== "object") return; + if (!foundInos.has(stats.ino)) { + foundInos.add(stats.ino); + folderSize += stats.size; + } + if (stats.isDirectory()) { + const directoryItems = returnType.strict ? await fs7.readdir(itemPath) : await fs7.readdir(itemPath).catch((error2) => errors.push(error2)); + if (typeof directoryItems !== "object") return; + await Promise.all( + directoryItems.map( + (directoryItem) => processItem((0, import_node_path.join)(itemPath, directoryItem)) + ) + ); + } + } + if (!options.bigint) { + if (folderSize > BigInt(Number.MAX_SAFE_INTEGER)) { + const error2 = new RangeError( + "The folder size is too large to return as a Number. You can instruct this package to return a BigInt instead." + ); + if (returnType.strict) { + throw error2; + } + errors.push(error2); + folderSize = Number.MAX_SAFE_INTEGER; + } else { + folderSize = Number(folderSize); + } + } + if (returnType.errors) { + return { + size: folderSize, + errors: errors.length > 0 ? errors : null + }; + } else { + return folderSize; + } +} // node_modules/js-yaml/dist/js-yaml.mjs function isNothing(subject) { @@ -123220,7 +123153,7 @@ var json = failsafe.extend({ float ] }); -var core = json; +var core2 = json; var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); @@ -123434,7 +123367,7 @@ var set = new type("tag:yaml.org,2002:set", { resolve: resolveYamlSet, construct: constructYamlSet }); -var _default = core.extend({ +var _default = core2.extend({ implicit: [ timestamp, merge @@ -125312,7 +125245,7 @@ function checkGitHubVersionInRange(version, logger) { ); } hasBeenWarnedAboutVersion = true; - core2.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); + core3.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); } function apiVersionInRange(version, minimumVersion2, maximumVersion2) { if (!semver.satisfies(version, `>=${minimumVersion2}`)) { @@ -125365,14 +125298,14 @@ async function asyncSome(array, predicate) { // src/actions-util.ts var pkg = require_package(); var getRequiredInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); if (!value) { throw new ConfigurationError(`Input required and not supplied: ${name}`); } return value; }; var getOptionalInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); return value.length > 0 ? value : void 0; }; function getTemporaryDirectory() { @@ -125453,7 +125386,7 @@ async function runTool(cmd, args = [], opts = {}) { } var persistedInputsKey = "persisted_inputs"; var restoreInputs = function() { - const persistedInputs = core3.getState(persistedInputsKey); + const persistedInputs = core4.getState(persistedInputsKey); if (persistedInputs) { for (const [name, value] of JSON.parse(persistedInputs)) { process.env[name] = value; @@ -125462,7 +125395,7 @@ var restoreInputs = function() { }; // src/api-client.ts -var core4 = __toESM(require_core()); +var core5 = __toESM(require_core()); var githubUtils = __toESM(require_utils4()); var retry = __toESM(require_dist_node15()); var import_console_log_level = __toESM(require_console_log_level()); @@ -125516,7 +125449,7 @@ async function getGitHubVersion() { // src/codeql.ts var fs4 = __toESM(require("fs")); var path4 = __toESM(require("path")); -var core9 = __toESM(require_core()); +var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); // src/cli-errors.ts @@ -125770,7 +125703,7 @@ var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var supportedAnalysisKinds = new Set(Object.values(AnalysisKind)); // src/caching-utils.ts -var core5 = __toESM(require_core()); +var core6 = __toESM(require_core()); // src/feature-flags.ts var semver3 = __toESM(require_semver2()); @@ -125781,13 +125714,13 @@ var path2 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts -var core6 = __toESM(require_core()); +var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; - core6.debug(`Running git command: git ${args.join(" ")}`); + core7.debug(`Running git command: git ${args.join(" ")}`); try { await new toolrunner2.ToolRunner(await io3.which("git", true), args, { silent: true, @@ -125807,7 +125740,7 @@ var runGitCommand = async function(workingDirectory, args, customErrorMessage) { if (stderr.includes("not a git repository")) { reason = "The checkout path provided to the action does not appear to be a git repository."; } - core6.info(`git call failed. ${customErrorMessage} Error: ${reason}`); + core7.info(`git call failed. ${customErrorMessage} Error: ${reason}`); throw error2; } }; @@ -125918,7 +125851,7 @@ async function getRef() { ) !== head; if (hasChangedRef) { const newRef = ref.replace(pull_ref_regex, "refs/pull/$1/head"); - core6.debug( + core7.debug( `No longer on merge commit, rewriting ref from ${ref} to ${newRef}.` ); return newRef; @@ -125944,16 +125877,16 @@ async function isAnalyzingDefaultBranch() { } // src/logging.ts -var core7 = __toESM(require_core()); +var core8 = __toESM(require_core()); function getActionsLogger() { - return core7; + return core8; } function withGroup(groupName, f) { - core7.startGroup(groupName); + core8.startGroup(groupName); try { return f(); } finally { - core7.endGroup(); + core8.endGroup(); } } @@ -126304,7 +126237,7 @@ var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); // src/tools-download.ts -var core8 = __toESM(require_core()); +var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); @@ -126763,12 +126696,12 @@ ${output}` ); } else if (checkVersion && process.env["CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */] !== "true" && !await codeQlVersionAtLeast(codeql, CODEQL_NEXT_MINIMUM_VERSION)) { const result = await codeql.getVersion(); - core9.warning( + core10.warning( `CodeQL CLI version ${result.version} was discontinued on ${GHES_MOST_RECENT_DEPRECATION_DATE} alongside GitHub Enterprise Server ${GHES_VERSION_MOST_RECENTLY_DEPRECATED} and will not be supported by the next minor release of the CodeQL Action. Please update to CodeQL CLI version ${CODEQL_NEXT_MINIMUM_VERSION} or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version. Alternatively, if you want to continue using CodeQL CLI version ${result.version}, you can replace 'github/codeql-action/*@v${getActionVersion().split(".")[0]}' by 'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to continue using this version of the CodeQL Action.` ); - core9.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); + core10.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); } return codeql; } @@ -126878,7 +126811,7 @@ var fs5 = __toESM(require("fs")); var path5 = __toESM(require("path")); var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); -var core11 = __toESM(require_core()); +var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); var import_del3 = __toESM(require_del()); @@ -126887,7 +126820,7 @@ var io5 = __toESM(require_io()); var import_del2 = __toESM(require_del()); // src/autobuild.ts -var core10 = __toESM(require_core()); +var core11 = __toESM(require_core()); // src/dependency-caching.ts var import_path = require("path"); @@ -126944,7 +126877,7 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV } const uploadSupported = isSafeArtifactUpload(codeQlVersion); if (!uploadSupported) { - core11.info( + core12.info( `Skipping debug artifact upload because the current CLI does not support safe upload. Please upgrade to CLI v${SafeArtifactUploadVersion} or later.` ); return "upload-not-supported"; @@ -126958,7 +126891,7 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV ).sort()) suffix += `-${matrixVal}`; } catch { - core11.info( + core12.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." ); } @@ -126976,7 +126909,7 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV ); return "upload-successful"; } catch (e) { - core11.warning(`Failed to upload debug artifacts: ${e}`); + core12.warning(`Failed to upload debug artifacts: ${e}`); return "upload-failed"; } } @@ -127027,7 +126960,7 @@ async function runWrapper() { } } } catch (error2) { - core12.setFailed( + core13.setFailed( `analyze post-action step failed: ${getErrorMessage(error2)}` ); } diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 4d8aa26d3..20f118bbc 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -10754,7 +10754,7 @@ var require_mock_interceptor = __commonJS({ var require_mock_client = __commonJS({ "node_modules/undici/lib/mock/mock-client.js"(exports2, module2) { "use strict"; - var { promisify: promisify3 } = require("util"); + var { promisify: promisify2 } = require("util"); var Client = require_client(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10794,7 +10794,7 @@ var require_mock_client = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify3(this[kOriginalClose])(); + await promisify2(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10807,7 +10807,7 @@ var require_mock_client = __commonJS({ var require_mock_pool = __commonJS({ "node_modules/undici/lib/mock/mock-pool.js"(exports2, module2) { "use strict"; - var { promisify: promisify3 } = require("util"); + var { promisify: promisify2 } = require("util"); var Pool = require_pool(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10847,7 +10847,7 @@ var require_mock_pool = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify3(this[kOriginalClose])(); + await promisify2(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -29931,14 +29931,14 @@ var require_out4 = __commonJS({ var require_path_type = __commonJS({ "node_modules/path-type/index.js"(exports2) { "use strict"; - var { promisify: promisify3 } = require("util"); + var { promisify: promisify2 } = require("util"); var fs17 = require("fs"); async function isType(fsStatType, statsMethodName, filePath) { if (typeof filePath !== "string") { throw new TypeError(`Expected a string, got ${typeof filePath}`); } try { - const stats = await promisify3(fs17[fsStatType])(filePath); + const stats = await promisify2(fs17[fsStatType])(filePath); return stats[statsMethodName](); } catch (error2) { if (error2.code === "ENOENT") { @@ -30431,7 +30431,7 @@ var require_slash = __commonJS({ var require_gitignore = __commonJS({ "node_modules/globby/gitignore.js"(exports2, module2) { "use strict"; - var { promisify: promisify3 } = require("util"); + var { promisify: promisify2 } = require("util"); var fs17 = require("fs"); var path16 = require("path"); var fastGlob = require_out4(); @@ -30443,7 +30443,7 @@ var require_gitignore = __commonJS({ "**/coverage/**", "**/.git" ]; - var readFileP = promisify3(fs17.readFile); + var readFileP = promisify2(fs17.readFile); var mapGitIgnorePatternTo = (base) => (ignore) => { if (ignore.startsWith("!")) { return "!" + path16.posix.join(base, ignore.slice(1)); @@ -34227,7 +34227,7 @@ var require_p_map = __commonJS({ var require_del = __commonJS({ "node_modules/del/index.js"(exports2, module2) { "use strict"; - var { promisify: promisify3 } = require("util"); + var { promisify: promisify2 } = require("util"); var path16 = require("path"); var globby = require_globby(); var isGlob = require_is_glob(); @@ -34237,7 +34237,7 @@ var require_del = __commonJS({ var isPathInside = require_is_path_inside(); var rimraf = require_rimraf(); var pMap = require_p_map(); - var rimrafP = promisify3(rimraf); + var rimrafP = promisify2(rimraf); var rimrafOptions = { glob: false, unlink: gracefulFs.unlink, @@ -34336,127 +34336,6 @@ var require_del = __commonJS({ } }); -// node_modules/tiny-each-async/index.js -var require_tiny_each_async = __commonJS({ - "node_modules/tiny-each-async/index.js"(exports2, module2) { - "use strict"; - module2.exports = function eachAsync(arr, parallelLimit, iteratorFn, cb) { - var pending = 0; - var index = 0; - var lastIndex = arr.length - 1; - var called = false; - var limit; - var callback; - var iterate; - if (typeof parallelLimit === "number") { - limit = parallelLimit; - iterate = iteratorFn; - callback = cb || function noop() { - }; - } else { - iterate = parallelLimit; - callback = iteratorFn || function noop() { - }; - limit = arr.length; - } - if (!arr.length) { - return callback(); - } - var iteratorLength = iterate.length; - var shouldCallNextIterator = function shouldCallNextIterator2() { - return !called && pending < limit && index < lastIndex; - }; - var iteratorCallback = function iteratorCallback2(err) { - if (called) { - return; - } - pending--; - if (err || index === lastIndex && !pending) { - called = true; - callback(err); - } else if (shouldCallNextIterator()) { - processIterator(++index); - } - }; - var processIterator = function processIterator2() { - pending++; - var args = iteratorLength === 2 ? [arr[index], iteratorCallback] : [arr[index], index, iteratorCallback]; - iterate.apply(null, args); - if (shouldCallNextIterator()) { - processIterator2(++index); - } - }; - processIterator(); - }; - } -}); - -// node_modules/get-folder-size/index.js -var require_get_folder_size = __commonJS({ - "node_modules/get-folder-size/index.js"(exports2, module2) { - "use strict"; - var fs17 = require("fs"); - var path16 = require("path"); - var eachAsync = require_tiny_each_async(); - function readSizeRecursive(seen, item, ignoreRegEx, callback) { - let cb; - let ignoreRegExp; - if (!callback) { - cb = ignoreRegEx; - ignoreRegExp = null; - } else { - cb = callback; - ignoreRegExp = ignoreRegEx; - } - fs17.lstat(item, function lstat(e, stats) { - let total = !e ? stats.size || 0 : 0; - if (stats) { - if (seen.has(stats.ino)) { - return cb(null, 0); - } - seen.add(stats.ino); - } - if (!e && stats.isDirectory()) { - fs17.readdir(item, (err, list) => { - if (err) { - return cb(err); - } - eachAsync( - list, - 5e3, - (dirItem, next) => { - readSizeRecursive( - seen, - path16.join(item, dirItem), - ignoreRegExp, - (error2, size) => { - if (!error2) { - total += size; - } - next(error2); - } - ); - }, - (finalErr) => { - cb(finalErr, total); - } - ); - }); - } else { - if (ignoreRegExp && ignoreRegExp.test(item)) { - total = 0; - } - cb(e, total); - } - }); - } - module2.exports = (...args) => { - args.unshift(/* @__PURE__ */ new Set()); - return readSizeRecursive(...args); - }; - } -}); - // node_modules/semver/internal/constants.js var require_constants9 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -36412,7 +36291,7 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", @@ -38076,7 +37955,7 @@ var require_internal_glob_options_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -38086,15 +37965,15 @@ var require_internal_glob_options_helper = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core15.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core14.debug(`implicitDescendants '${result.implicitDescendants}'`); + core15.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core15.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; @@ -38758,7 +38637,7 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); var fs17 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); var path16 = __importStar4(require("path")); @@ -38809,7 +38688,7 @@ var require_internal_globber = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core14.debug(`Search path '${searchPath}'`); + core15.debug(`Search path '${searchPath}'`); try { yield __await4(fs17.promises.lstat(searchPath)); } catch (err) { @@ -38881,7 +38760,7 @@ var require_internal_globber = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core14.debug(`Broken symlink '${item.path}'`); + core15.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -38897,7 +38776,7 @@ var require_internal_globber = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core15.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -40221,7 +40100,7 @@ var require_cacheUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob2 = __importStar4(require_glob2()); var io7 = __importStar4(require_io()); @@ -40274,7 +40153,7 @@ var require_cacheUtils = __commonJS({ _e = false; const file = _c; const relativeFile = path16.relative(workspace, file).replace(new RegExp(`\\${path16.sep}`, "g"), "/"); - core14.debug(`Matched: ${relativeFile}`); + core15.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { @@ -40304,7 +40183,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); - core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + core15.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec2.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, @@ -40315,10 +40194,10 @@ var require_cacheUtils = __commonJS({ } }); } catch (err) { - core14.debug(err.message); + core15.debug(err.message); } versionOutput = versionOutput.trim(); - core14.debug(versionOutput); + core15.debug(versionOutput); return versionOutput; }); } @@ -40326,7 +40205,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); - core14.debug(`zstd version: ${version}`); + core15.debug(`zstd version: ${version}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -75638,7 +75517,7 @@ var require_uploadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); var storage_blob_1 = require_dist7(); var errors_1 = require_errors2(); var UploadProgress = class { @@ -75680,7 +75559,7 @@ var require_uploadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core14.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + core15.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -75735,14 +75614,14 @@ var require_uploadUtils = __commonJS({ }; try { uploadProgress.startDisplayTimer(); - core14.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + core15.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); if (response._response.status >= 400) { throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); } return response; } catch (error2) { - core14.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); + core15.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); throw error2; } finally { uploadProgress.stopDisplayTimer(); @@ -75813,7 +75692,7 @@ var require_requestUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); var http_client_1 = require_lib(); var constants_1 = require_constants10(); function isSuccessStatusCode(statusCode) { @@ -75874,9 +75753,9 @@ var require_requestUtils = __commonJS({ isRetryable = isRetryableStatusCode(statusCode); errorMessage = `Cache service responded with ${statusCode}`; } - core14.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core15.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); if (!isRetryable) { - core14.debug(`${name} - Error is not retryable`); + core15.debug(`${name} - Error is not retryable`); break; } yield sleep(delay2); @@ -75981,7 +75860,7 @@ var require_downloadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); @@ -76019,7 +75898,7 @@ var require_downloadUtils = __commonJS({ this.segmentIndex = this.segmentIndex + 1; this.segmentSize = segmentSize; this.receivedBytes = 0; - core14.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + core15.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); } /** * Sets the number of bytes received for the current segment. @@ -76053,7 +75932,7 @@ var require_downloadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core14.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + core15.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -76103,7 +75982,7 @@ var require_downloadUtils = __commonJS({ })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { downloadResponse.message.destroy(); - core14.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + core15.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); }); yield pipeResponseToStream(downloadResponse, writeStream); const contentLengthHeader = downloadResponse.message.headers["content-length"]; @@ -76114,7 +75993,7 @@ var require_downloadUtils = __commonJS({ throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); } } else { - core14.debug("Unable to validate download, no Content-Length header"); + core15.debug("Unable to validate download, no Content-Length header"); } }); } @@ -76234,7 +76113,7 @@ var require_downloadUtils = __commonJS({ const properties = yield client.getProperties(); const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; if (contentLength < 0) { - core14.debug("Unable to determine content length, downloading file with http-client..."); + core15.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); @@ -76314,7 +76193,7 @@ var require_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -76334,9 +76213,9 @@ var require_options = __commonJS({ } result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; - core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core14.debug(`Upload concurrency: ${result.uploadConcurrency}`); - core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); + core15.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core15.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core15.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } exports2.getUploadOptions = getUploadOptions; @@ -76373,12 +76252,12 @@ var require_options = __commonJS({ if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) { result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; } - core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core14.debug(`Download concurrency: ${result.downloadConcurrency}`); - core14.debug(`Request timeout (ms): ${result.timeoutInMs}`); - core14.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); - core14.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); - core14.debug(`Lookup only: ${result.lookupOnly}`); + core15.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core15.debug(`Download concurrency: ${result.downloadConcurrency}`); + core15.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core15.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); + core15.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core15.debug(`Lookup only: ${result.lookupOnly}`); return result; } exports2.getDownloadOptions = getDownloadOptions; @@ -76558,7 +76437,7 @@ var require_cacheHttpClient = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); var fs17 = __importStar4(require("fs")); @@ -76576,7 +76455,7 @@ var require_cacheHttpClient = __commonJS({ throw new Error("Cache Service Url not found, unable to restore cache."); } const url = `${baseUrl}_apis/artifactcache/${resource}`; - core14.debug(`Resource Url: ${url}`); + core15.debug(`Resource Url: ${url}`); return url; } function createAcceptHeader(type2, apiVersion) { @@ -76604,7 +76483,7 @@ var require_cacheHttpClient = __commonJS({ return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { - if (core14.isDebug()) { + if (core15.isDebug()) { yield printCachesListForDiagnostics(keys[0], httpClient, version); } return null; @@ -76617,9 +76496,9 @@ var require_cacheHttpClient = __commonJS({ if (!cacheDownloadUrl) { throw new Error("Cache not found."); } - core14.setSecret(cacheDownloadUrl); - core14.debug(`Cache Result:`); - core14.debug(JSON.stringify(cacheResult)); + core15.setSecret(cacheDownloadUrl); + core15.debug(`Cache Result:`); + core15.debug(JSON.stringify(cacheResult)); return cacheResult; }); } @@ -76634,10 +76513,10 @@ var require_cacheHttpClient = __commonJS({ const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { - core14.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key + core15.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { - core14.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); + core15.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); } } } @@ -76682,7 +76561,7 @@ Other caches with similar key:`); } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter4(this, void 0, void 0, function* () { - core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + core15.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) @@ -76704,7 +76583,7 @@ Other caches with similar key:`); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); const parallelUploads = [...new Array(concurrency).keys()]; - core14.debug("Awaiting all uploads"); + core15.debug("Awaiting all uploads"); let offset = 0; try { yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { @@ -76747,16 +76626,16 @@ Other caches with similar key:`); yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); } else { const httpClient = createHttpClient(); - core14.debug("Upload cache"); + core15.debug("Upload cache"); yield uploadFile(httpClient, cacheId, archivePath, options); - core14.debug("Commiting cache"); + core15.debug("Commiting cache"); const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core14.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + core15.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); } - core14.info("Cache saved successfully"); + core15.info("Cache saved successfully"); } }); } @@ -82182,7 +82061,7 @@ var require_cache3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); var path16 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); @@ -82235,7 +82114,7 @@ var require_cache3 = __commonJS({ function restoreCache4(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core14.debug(`Cache service version: ${cacheServiceVersion}`); + core15.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); switch (cacheServiceVersion) { case "v2": @@ -82251,8 +82130,8 @@ var require_cache3 = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core14.debug("Resolved Keys:"); - core14.debug(JSON.stringify(keys)); + core15.debug("Resolved Keys:"); + core15.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82270,19 +82149,19 @@ var require_cache3 = __commonJS({ return void 0; } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core14.info("Lookup only - skipping download"); + core15.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core14.debug(`Archive Path: ${archivePath}`); + core15.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); - if (core14.isDebug()) { + if (core15.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + core15.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core14.info("Cache restored successfully"); + core15.info("Cache restored successfully"); return cacheEntry.cacheKey; } catch (error2) { const typedError = error2; @@ -82290,16 +82169,16 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core14.error(`Failed to restore: ${error2.message}`); + core15.error(`Failed to restore: ${error2.message}`); } else { - core14.warning(`Failed to restore: ${error2.message}`); + core15.warning(`Failed to restore: ${error2.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core14.debug(`Failed to delete archive: ${error2}`); + core15.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82310,8 +82189,8 @@ var require_cache3 = __commonJS({ options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core14.debug("Resolved Keys:"); - core14.debug(JSON.stringify(keys)); + core15.debug("Resolved Keys:"); + core15.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82329,30 +82208,30 @@ var require_cache3 = __commonJS({ }; const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core14.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); + core15.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); return void 0; } const isRestoreKeyMatch = request.key !== response.matchedKey; if (isRestoreKeyMatch) { - core14.info(`Cache hit for restore-key: ${response.matchedKey}`); + core15.info(`Cache hit for restore-key: ${response.matchedKey}`); } else { - core14.info(`Cache hit for: ${response.matchedKey}`); + core15.info(`Cache hit for: ${response.matchedKey}`); } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core14.info("Lookup only - skipping download"); + core15.info("Lookup only - skipping download"); return response.matchedKey; } archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core14.debug(`Archive path: ${archivePath}`); - core14.debug(`Starting download of archive to: ${archivePath}`); + core15.debug(`Archive path: ${archivePath}`); + core15.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - if (core14.isDebug()) { + core15.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core15.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core14.info("Cache restored successfully"); + core15.info("Cache restored successfully"); return response.matchedKey; } catch (error2) { const typedError = error2; @@ -82360,9 +82239,9 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core14.error(`Failed to restore: ${error2.message}`); + core15.error(`Failed to restore: ${error2.message}`); } else { - core14.warning(`Failed to restore: ${error2.message}`); + core15.warning(`Failed to restore: ${error2.message}`); } } } finally { @@ -82371,7 +82250,7 @@ var require_cache3 = __commonJS({ yield utils.unlinkFile(archivePath); } } catch (error2) { - core14.debug(`Failed to delete archive: ${error2}`); + core15.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82380,7 +82259,7 @@ var require_cache3 = __commonJS({ function saveCache4(paths, key, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core14.debug(`Cache service version: ${cacheServiceVersion}`); + core15.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); checkKey(key); switch (cacheServiceVersion) { @@ -82399,26 +82278,26 @@ var require_cache3 = __commonJS({ const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core14.debug("Cache Paths:"); - core14.debug(`${JSON.stringify(cachePaths)}`); + core15.debug("Cache Paths:"); + core15.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path16.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core14.debug(`Archive Path: ${archivePath}`); + core15.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core14.isDebug()) { + if (core15.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const fileSizeLimit = 10 * 1024 * 1024 * 1024; const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core14.debug(`File Size: ${archiveFileSize}`); + core15.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } - core14.debug("Reserving Cache"); + core15.debug("Reserving Cache"); const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { compressionMethod, enableCrossOsArchive, @@ -82431,26 +82310,26 @@ var require_cache3 = __commonJS({ } else { throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); } - core14.debug(`Saving Cache (ID: ${cacheId})`); + core15.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); } catch (error2) { const typedError = error2; if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError2.name) { - core14.info(`Failed to save: ${typedError.message}`); + core15.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core14.error(`Failed to save: ${typedError.message}`); + core15.error(`Failed to save: ${typedError.message}`); } else { - core14.warning(`Failed to save: ${typedError.message}`); + core15.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core14.debug(`Failed to delete archive: ${error2}`); + core15.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82463,26 +82342,26 @@ var require_cache3 = __commonJS({ const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core14.debug("Cache Paths:"); - core14.debug(`${JSON.stringify(cachePaths)}`); + core15.debug("Cache Paths:"); + core15.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path16.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core14.debug(`Archive Path: ${archivePath}`); + core15.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core14.isDebug()) { + if (core15.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core14.debug(`File Size: ${archiveFileSize}`); + core15.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } options.archiveSizeBytes = archiveFileSize; - core14.debug("Reserving Cache"); + core15.debug("Reserving Cache"); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const request = { key, @@ -82496,10 +82375,10 @@ var require_cache3 = __commonJS({ } signedUploadUrl = response.signedUploadUrl; } catch (error2) { - core14.debug(`Failed to reserve cache: ${error2}`); + core15.debug(`Failed to reserve cache: ${error2}`); throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } - core14.debug(`Attempting to upload cache located at: ${archivePath}`); + core15.debug(`Attempting to upload cache located at: ${archivePath}`); yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); const finalizeRequest = { key, @@ -82507,7 +82386,7 @@ var require_cache3 = __commonJS({ sizeBytes: `${archiveFileSize}` }; const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); - core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + core15.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); if (!finalizeResponse.ok) { throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); } @@ -82517,19 +82396,19 @@ var require_cache3 = __commonJS({ if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError2.name) { - core14.info(`Failed to save: ${typedError.message}`); + core15.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core14.error(`Failed to save: ${typedError.message}`); + core15.error(`Failed to save: ${typedError.message}`); } else { - core14.warning(`Failed to save: ${typedError.message}`); + core15.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core14.debug(`Failed to delete archive: ${error2}`); + core15.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82737,7 +82616,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -82760,10 +82639,10 @@ var require_retry_helper = __commonJS({ if (isRetryable && !isRetryable(err)) { throw err; } - core14.info(err.message); + core15.info(err.message); } const seconds = this.getSleepAmount(); - core14.info(`Waiting ${seconds} seconds before trying again`); + core15.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } @@ -82843,7 +82722,7 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); var io7 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs17 = __importStar4(require("fs")); @@ -82872,8 +82751,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { dest = dest || path16.join(_getTempDirectory(), crypto.randomUUID()); yield io7.mkdirP(path16.dirname(dest)); - core14.debug(`Downloading ${url}`); - core14.debug(`Destination ${dest}`); + core15.debug(`Downloading ${url}`); + core15.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); @@ -82900,7 +82779,7 @@ var require_tool_cache = __commonJS({ allowRetries: false }); if (auth) { - core14.debug("set auth"); + core15.debug("set auth"); if (headers === void 0) { headers = {}; } @@ -82909,7 +82788,7 @@ var require_tool_cache = __commonJS({ const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core14.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core15.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -82918,16 +82797,16 @@ var require_tool_cache = __commonJS({ let succeeded = false; try { yield pipeline(readStream, fs17.createWriteStream(dest)); - core14.debug("download complete"); + core15.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { - core14.debug("download failed"); + core15.debug("download failed"); try { yield io7.rmRF(dest); } catch (err) { - core14.debug(`Failed to delete '${dest}'. ${err.message}`); + core15.debug(`Failed to delete '${dest}'. ${err.message}`); } } } @@ -82942,7 +82821,7 @@ var require_tool_cache = __commonJS({ process.chdir(dest); if (_7zPath) { try { - const logLevel = core14.isDebug() ? "-bb1" : "-bb0"; + const logLevel = core15.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, @@ -82992,7 +82871,7 @@ var require_tool_cache = __commonJS({ throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); - core14.debug("Checking tar --version"); + core15.debug("Checking tar --version"); let versionOutput = ""; yield (0, exec_1.exec)("tar --version", [], { ignoreReturnCode: true, @@ -83002,7 +82881,7 @@ var require_tool_cache = __commonJS({ stderr: (data) => versionOutput += data.toString() } }); - core14.debug(versionOutput.trim()); + core15.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { @@ -83010,7 +82889,7 @@ var require_tool_cache = __commonJS({ } else { args = [flags]; } - if (core14.isDebug() && !flags.includes("v")) { + if (core15.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; @@ -83042,7 +82921,7 @@ var require_tool_cache = __commonJS({ args = [flags]; } args.push("-x", "-C", dest, "-f", file); - if (core14.isDebug()) { + if (core15.isDebug()) { args.push("-v"); } const xarPath = yield io7.which("xar", true); @@ -83087,7 +82966,7 @@ var require_tool_cache = __commonJS({ "-Command", pwshCommand ]; - core14.debug(`Using pwsh at path: ${pwshPath}`); + core15.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { const powershellCommand = [ @@ -83107,7 +82986,7 @@ var require_tool_cache = __commonJS({ powershellCommand ]; const powershellPath = yield io7.which("powershell", true); - core14.debug(`Using powershell at path: ${powershellPath}`); + core15.debug(`Using powershell at path: ${powershellPath}`); yield (0, exec_1.exec)(`"${powershellPath}"`, args); } }); @@ -83116,7 +82995,7 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const unzipPath = yield io7.which("unzip", true); const args = [file]; - if (!core14.isDebug()) { + if (!core15.isDebug()) { args.unshift("-q"); } args.unshift("-o"); @@ -83127,8 +83006,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os5.arch(); - core14.debug(`Caching tool ${tool} ${version} ${arch2}`); - core14.debug(`source dir: ${sourceDir}`); + core15.debug(`Caching tool ${tool} ${version} ${arch2}`); + core15.debug(`source dir: ${sourceDir}`); if (!fs17.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } @@ -83146,14 +83025,14 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os5.arch(); - core14.debug(`Caching tool ${tool} ${version} ${arch2}`); - core14.debug(`source file: ${sourceFile}`); + core15.debug(`Caching tool ${tool} ${version} ${arch2}`); + core15.debug(`source file: ${sourceFile}`); if (!fs17.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); const destPath = path16.join(destFolder, targetFile); - core14.debug(`destination file ${destPath}`); + core15.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); return destFolder; @@ -83177,12 +83056,12 @@ var require_tool_cache = __commonJS({ if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; const cachePath = path16.join(_getCacheDirectory(), toolName, versionSpec, arch2); - core14.debug(`checking cache: ${cachePath}`); + core15.debug(`checking cache: ${cachePath}`); if (fs17.existsSync(cachePath) && fs17.existsSync(`${cachePath}.complete`)) { - core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); + core15.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { - core14.debug("not found"); + core15.debug("not found"); } } return toolPath; @@ -83213,7 +83092,7 @@ var require_tool_cache = __commonJS({ const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { - core14.debug("set auth"); + core15.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); @@ -83234,7 +83113,7 @@ var require_tool_cache = __commonJS({ try { releases = JSON.parse(versionsRaw); } catch (_a) { - core14.debug("Invalid json"); + core15.debug("Invalid json"); } } return releases; @@ -83260,7 +83139,7 @@ var require_tool_cache = __commonJS({ function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { const folderPath = path16.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); - core14.debug(`destination ${folderPath}`); + core15.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); yield io7.rmRF(markerPath); @@ -83272,19 +83151,19 @@ var require_tool_cache = __commonJS({ const folderPath = path16.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs17.writeFileSync(markerPath, ""); - core14.debug("finished caching tool"); + core15.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { const c = semver8.clean(versionSpec) || ""; - core14.debug(`isExplicit: ${c}`); + core15.debug(`isExplicit: ${c}`); const valid3 = semver8.valid(c) != null; - core14.debug(`explicit? ${valid3}`); + core15.debug(`explicit? ${valid3}`); return valid3; } exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version = ""; - core14.debug(`evaluating ${versions.length} versions`); + core15.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver8.gt(a, b)) { return 1; @@ -83300,9 +83179,9 @@ var require_tool_cache = __commonJS({ } } if (version) { - core14.debug(`matched: ${version}`); + core15.debug(`matched: ${version}`); } else { - core14.debug("match not found"); + core15.debug("match not found"); } return version; } @@ -83911,7 +83790,7 @@ var require_internal_glob_options_helper2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -83923,23 +83802,23 @@ var require_internal_glob_options_helper2 = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core15.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core14.debug(`implicitDescendants '${result.implicitDescendants}'`); + core15.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.matchDirectories === "boolean") { result.matchDirectories = copy.matchDirectories; - core14.debug(`matchDirectories '${result.matchDirectories}'`); + core15.debug(`matchDirectories '${result.matchDirectories}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core15.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } if (typeof copy.excludeHiddenFiles === "boolean") { result.excludeHiddenFiles = copy.excludeHiddenFiles; - core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + core15.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); } } return result; @@ -84623,7 +84502,7 @@ var require_internal_globber2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); var fs17 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); var path16 = __importStar4(require("path")); @@ -84676,7 +84555,7 @@ var require_internal_globber2 = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core14.debug(`Search path '${searchPath}'`); + core15.debug(`Search path '${searchPath}'`); try { yield __await4(fs17.promises.lstat(searchPath)); } catch (err) { @@ -84751,7 +84630,7 @@ var require_internal_globber2 = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core14.debug(`Broken symlink '${item.path}'`); + core15.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -84767,7 +84646,7 @@ var require_internal_globber2 = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core15.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -84860,7 +84739,7 @@ var require_internal_hash_files = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.hashFiles = void 0; var crypto = __importStar4(require("crypto")); - var core14 = __importStar4(require_core()); + var core15 = __importStar4(require_core()); var fs17 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); @@ -84869,7 +84748,7 @@ var require_internal_hash_files = __commonJS({ var _a, e_1, _b, _c; var _d; return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core14.info : core14.debug; + const writeDelegate = verbose ? core15.info : core15.debug; let hasMatch = false; const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const result = crypto.createHash("sha256"); @@ -89203,12 +89082,12 @@ module.exports = __toCommonJS(analyze_action_exports); var fs16 = __toESM(require("fs")); var import_path4 = __toESM(require("path")); var import_perf_hooks3 = require("perf_hooks"); -var core13 = __toESM(require_core()); +var core14 = __toESM(require_core()); // src/actions-util.ts var fs2 = __toESM(require("fs")); var path2 = __toESM(require("path")); -var core3 = __toESM(require_core()); +var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); @@ -89217,8 +89096,7 @@ var io2 = __toESM(require_io()); var fs = __toESM(require("fs")); var os = __toESM(require("os")); var path = __toESM(require("path")); -var import_util = require("util"); -var core2 = __toESM(require_core()); +var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -89359,7 +89237,61 @@ function checkDiskSpace(directoryPath, dependencies = { // src/util.ts var import_del = __toESM(require_del()); -var import_get_folder_size = __toESM(require_get_folder_size()); + +// node_modules/get-folder-size/index.js +var import_node_path2 = require("node:path"); +async function getFolderSize(itemPath, options) { + return await core(itemPath, options, { errors: true }); +} +getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); +getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); +async function core(rootItemPath, options = {}, returnType = {}) { + const fs17 = options.fs || await import("node:fs/promises"); + let folderSize = 0n; + const foundInos = /* @__PURE__ */ new Set(); + const errors = []; + await processItem(rootItemPath); + async function processItem(itemPath) { + if (options.ignore?.test(itemPath)) return; + const stats = returnType.strict ? await fs17.lstat(itemPath, { bigint: true }) : await fs17.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + if (typeof stats !== "object") return; + if (!foundInos.has(stats.ino)) { + foundInos.add(stats.ino); + folderSize += stats.size; + } + if (stats.isDirectory()) { + const directoryItems = returnType.strict ? await fs17.readdir(itemPath) : await fs17.readdir(itemPath).catch((error2) => errors.push(error2)); + if (typeof directoryItems !== "object") return; + await Promise.all( + directoryItems.map( + (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) + ) + ); + } + } + if (!options.bigint) { + if (folderSize > BigInt(Number.MAX_SAFE_INTEGER)) { + const error2 = new RangeError( + "The folder size is too large to return as a Number. You can instruct this package to return a BigInt instead." + ); + if (returnType.strict) { + throw error2; + } + errors.push(error2); + folderSize = Number.MAX_SAFE_INTEGER; + } else { + folderSize = Number(folderSize); + } + } + if (returnType.errors) { + return { + size: folderSize, + errors: errors.length > 0 ? errors : null + }; + } else { + return folderSize; + } +} // node_modules/js-yaml/dist/js-yaml.mjs function isNothing(subject) { @@ -89930,7 +89862,7 @@ var json = failsafe.extend({ float ] }); -var core = json; +var core2 = json; var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); @@ -90144,7 +90076,7 @@ var set = new type("tag:yaml.org,2002:set", { resolve: resolveYamlSet, construct: constructYamlSet }); -var _default = core.extend({ +var _default = core2.extend({ implicit: [ timestamp, merge @@ -92216,11 +92148,11 @@ function assertNever(value) { throw new ExhaustivityCheckingError(value); } function initializeEnvironment(version) { - core2.exportVariable("CODEQL_ACTION_FEATURE_MULTI_LANGUAGE" /* FEATURE_MULTI_LANGUAGE */, "false"); - core2.exportVariable("CODEQL_ACTION_FEATURE_SANDWICH" /* FEATURE_SANDWICH */, "false"); - core2.exportVariable("CODEQL_ACTION_FEATURE_SARIF_COMBINE" /* FEATURE_SARIF_COMBINE */, "true"); - core2.exportVariable("CODEQL_ACTION_FEATURE_WILL_UPLOAD" /* FEATURE_WILL_UPLOAD */, "true"); - core2.exportVariable("CODEQL_ACTION_VERSION" /* VERSION */, version); + core3.exportVariable("CODEQL_ACTION_FEATURE_MULTI_LANGUAGE" /* FEATURE_MULTI_LANGUAGE */, "false"); + core3.exportVariable("CODEQL_ACTION_FEATURE_SANDWICH" /* FEATURE_SANDWICH */, "false"); + core3.exportVariable("CODEQL_ACTION_FEATURE_SARIF_COMBINE" /* FEATURE_SARIF_COMBINE */, "true"); + core3.exportVariable("CODEQL_ACTION_FEATURE_WILL_UPLOAD" /* FEATURE_WILL_UPLOAD */, "true"); + core3.exportVariable("CODEQL_ACTION_VERSION" /* VERSION */, version); } function getRequiredEnvParam(paramName) { const value = process.env[paramName]; @@ -92283,7 +92215,7 @@ function getTestingEnvironment() { } async function tryGetFolderBytes(cacheDir, logger, quiet = false) { try { - return await (0, import_util.promisify)(import_get_folder_size.default)(cacheDir); + return await getFolderSize.loose(cacheDir); } catch (e) { if (!quiet || logger.isDebug()) { logger.warning( @@ -92313,7 +92245,7 @@ async function withTimeout(timeoutMs, promise, onTimeout) { } async function checkForTimeout() { if (hadTimeout === true) { - core2.info( + core3.info( "A timeout occurred, force exiting the process after 30 seconds to prevent hanging." ); await delay(3e4, { allowProcessExit: true }); @@ -92349,7 +92281,7 @@ async function checkDiskUsage(logger) { } else { logger.debug(message); } - core2.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true"); + core3.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true"); } return { numAvailableBytes: diskUsage.free, @@ -92369,10 +92301,10 @@ function checkActionVersion(version, githubVersion) { semver.coerce(githubVersion.version) ?? "0.0.0", ">=3.11" )) { - core2.error( + core3.error( "CodeQL Action major versions v1 and v2 have been deprecated. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2025-01-10-code-scanning-codeql-action-v2-is-now-deprecated/" ); - core2.exportVariable("CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION" /* LOG_VERSION_DEPRECATION */, "true"); + core3.exportVariable("CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION" /* LOG_VERSION_DEPRECATION */, "true"); } } } @@ -92397,13 +92329,13 @@ async function checkSipEnablement(logger) { if (sipStatusOutput.stdout.includes( "System Integrity Protection status: enabled." )) { - core2.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true"); + core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true"); return true; } if (sipStatusOutput.stdout.includes( "System Integrity Protection status: disabled." )) { - core2.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false"); + core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false"); return false; } } @@ -92450,14 +92382,14 @@ async function asyncSome(array, predicate) { // src/actions-util.ts var pkg = require_package(); var getRequiredInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); if (!value) { throw new ConfigurationError(`Input required and not supplied: ${name}`); } return value; }; var getOptionalInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); return value.length > 0 ? value : void 0; }; function getTemporaryDirectory() { @@ -92501,7 +92433,7 @@ function getUploadValue(input) { case "never": return "never"; default: - core3.warning( + core4.warning( `Unrecognized 'upload' input to 'analyze' Action: ${input}. Defaulting to 'always'.` ); return "always"; @@ -92604,7 +92536,7 @@ var persistInputs = function() { const inputEnvironmentVariables = Object.entries(process.env).filter( ([name]) => name.startsWith("INPUT_") ); - core3.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables)); + core4.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables)); }; function getPullRequestBranches() { const pullRequest = github.context.payload.pull_request; @@ -92662,7 +92594,7 @@ var io5 = __toESM(require_io()); var import_del2 = __toESM(require_del()); // src/api-client.ts -var core4 = __toESM(require_core()); +var core5 = __toESM(require_core()); var githubUtils = __toESM(require_utils4()); var retry = __toESM(require_dist_node15()); var import_console_log_level = __toESM(require_console_log_level()); @@ -92767,7 +92699,7 @@ async function getAnalysisKey() { const workflowPath = await getWorkflowRelativePath(); const jobName = getRequiredEnvParam("GITHUB_JOB"); analysisKey = `${workflowPath}:${jobName}`; - core4.exportVariable(analysisKeyEnvVar, analysisKey); + core5.exportVariable(analysisKeyEnvVar, analysisKey); return analysisKey; } function computeAutomationID(analysis_key, environment) { @@ -92818,12 +92750,12 @@ function wrapApiConfigurationError(e) { } // src/autobuild.ts -var core10 = __toESM(require_core()); +var core11 = __toESM(require_core()); // src/codeql.ts var fs11 = __toESM(require("fs")); var path10 = __toESM(require("path")); -var core9 = __toESM(require_core()); +var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); // src/cli-errors.ts @@ -93077,7 +93009,7 @@ var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var supportedAnalysisKinds = new Set(Object.values(AnalysisKind)); // src/caching-utils.ts -var core5 = __toESM(require_core()); +var core6 = __toESM(require_core()); async function getTotalCacheSize(paths, logger, quiet = false) { const sizes = await Promise.all( paths.map((cacheDir) => tryGetFolderBytes(cacheDir, logger, quiet)) @@ -93107,13 +93039,13 @@ var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts -var core6 = __toESM(require_core()); +var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; - core6.debug(`Running git command: git ${args.join(" ")}`); + core7.debug(`Running git command: git ${args.join(" ")}`); try { await new toolrunner2.ToolRunner(await io3.which("git", true), args, { silent: true, @@ -93133,7 +93065,7 @@ var runGitCommand = async function(workingDirectory, args, customErrorMessage) { if (stderr.includes("not a git repository")) { reason = "The checkout path provided to the action does not appear to be a git repository."; } - core6.info(`git call failed. ${customErrorMessage} Error: ${reason}`); + core7.info(`git call failed. ${customErrorMessage} Error: ${reason}`); throw error2; } }; @@ -93278,7 +93210,7 @@ async function getRef() { ) !== head; if (hasChangedRef) { const newRef = ref.replace(pull_ref_regex, "refs/pull/$1/head"); - core6.debug( + core7.debug( `No longer on merge commit, rewriting ref from ${ref} to ${newRef}.` ); return newRef; @@ -93304,16 +93236,16 @@ async function isAnalyzingDefaultBranch() { } // src/logging.ts -var core7 = __toESM(require_core()); +var core8 = __toESM(require_core()); function getActionsLogger() { - return core7; + return core8; } async function withGroupAsync(groupName, f) { - core7.startGroup(groupName); + core8.startGroup(groupName); try { return await f(); } finally { - core7.endGroup(); + core8.endGroup(); } } function formatDuration(durationMs) { @@ -94405,7 +94337,7 @@ var fs8 = __toESM(require("fs")); var os2 = __toESM(require("os")); var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); -var core8 = __toESM(require_core()); +var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); @@ -94459,10 +94391,10 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } } catch (e) { - core8.warning( + core9.warning( `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}` ); - core8.warning(`Falling back to downloading the bundle before extracting.`); + core9.warning(`Falling back to downloading the bundle before extracting.`); await cleanUpGlob(dest, "CodeQL bundle", logger); } const toolsDownloadStart = import_perf_hooks.performance.now(); @@ -95543,12 +95475,12 @@ ${output}` ); } else if (checkVersion && process.env["CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */] !== "true" && !await codeQlVersionAtLeast(codeql, CODEQL_NEXT_MINIMUM_VERSION)) { const result = await codeql.getVersion(); - core9.warning( + core10.warning( `CodeQL CLI version ${result.version} was discontinued on ${GHES_MOST_RECENT_DEPRECATION_DATE} alongside GitHub Enterprise Server ${GHES_VERSION_MOST_RECENTLY_DEPRECATED} and will not be supported by the next minor release of the CodeQL Action. Please update to CodeQL CLI version ${CODEQL_NEXT_MINIMUM_VERSION} or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version. Alternatively, if you want to continue using CodeQL CLI version ${result.version}, you can replace 'github/codeql-action/*@v${getActionVersion().split(".")[0]}' by 'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to continue using this version of the CodeQL Action.` ); - core9.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); + core10.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); } return codeql; } @@ -95670,16 +95602,16 @@ async function setupCppAutobuild(codeql, logger) { logger.info( `Disabling ${featureName} as we are on a self-hosted runner.${getWorkflowEventName() !== "dynamic" ? ` To override this, set the ${envVar} environment variable to 'true' in your workflow. See ${"https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow" /* DEFINE_ENV_VARIABLES */} for more information.` : ""}` ); - core10.exportVariable(envVar, "false"); + core11.exportVariable(envVar, "false"); } else { logger.info( `Enabling ${featureName}. This can be disabled by setting the ${envVar} environment variable to 'false'. See ${"https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow" /* DEFINE_ENV_VARIABLES */} for more information.` ); - core10.exportVariable(envVar, "true"); + core11.exportVariable(envVar, "true"); } } else { logger.info(`Disabling ${featureName}.`); - core10.exportVariable(envVar, "false"); + core11.exportVariable(envVar, "false"); } } async function runAutobuild(config, language, logger) { @@ -95694,7 +95626,7 @@ async function runAutobuild(config, language, logger) { await codeQL.runAutobuild(config, language); } if (language === "go" /* go */) { - core10.exportVariable("CODEQL_ACTION_DID_AUTOBUILD_GOLANG" /* DID_AUTOBUILD_GOLANG */, "true"); + core11.exportVariable("CODEQL_ACTION_DID_AUTOBUILD_GOLANG" /* DID_AUTOBUILD_GOLANG */, "true"); } logger.endGroup(); } @@ -96388,7 +96320,7 @@ async function uploadDatabases(repositoryNwo, codeql, config, apiDetails, logger // src/status-report.ts var os4 = __toESM(require("os")); -var core11 = __toESM(require_core()); +var core12 = __toESM(require_core()); function isFirstPartyAnalysis(actionName) { if (actionName !== "upload-sarif" /* UploadSarif */) { return true; @@ -96404,12 +96336,12 @@ function getActionsStatus(error2, otherFailureCause) { } function setJobStatusIfUnsuccessful(actionStatus) { if (actionStatus === "user-error") { - core11.exportVariable( + core12.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_CONFIGURATION_ERROR" /* ConfigErrorStatus */ ); } else if (actionStatus === "failure" || actionStatus === "aborted") { - core11.exportVariable( + core12.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_FAILURE" /* FailureStatus */ ); @@ -96428,14 +96360,14 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi let workflowStartedAt = process.env["CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */]; if (workflowStartedAt === void 0) { workflowStartedAt = actionStartedAt.toISOString(); - core11.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt); + core12.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt); } const runnerOs = getRequiredEnvParam("RUNNER_OS"); const codeQlCliVersion = getCachedCodeQlVersion(); const actionRef = process.env["GITHUB_ACTION_REF"] || ""; const testingEnvironment = getTestingEnvironment(); if (testingEnvironment) { - core11.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment); + core12.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment); } const isSteadyStateDefaultSetupRun = process.env["CODE_SCANNING_IS_STEADY_STATE_DEFAULT_SETUP"] === "true"; const statusReport = { @@ -96513,9 +96445,9 @@ var INCOMPATIBLE_MSG = "CodeQL Action version is incompatible with the code scan async function sendStatusReport(statusReport) { setJobStatusIfUnsuccessful(statusReport.status); const statusReportJSON = JSON.stringify(statusReport); - core11.debug(`Sending status report: ${statusReportJSON}`); + core12.debug(`Sending status report: ${statusReportJSON}`); if (isInTestMode()) { - core11.debug("In test mode. Status reports are not uploaded."); + core12.debug("In test mode. Status reports are not uploaded."); return; } const nwo = getRepositoryNwo(); @@ -96534,26 +96466,26 @@ async function sendStatusReport(statusReport) { switch (e.status) { case 403: if (getWorkflowEventName() === "push" && process.env["GITHUB_ACTOR"] === "dependabot[bot]") { - core11.warning( + core12.warning( `Workflows triggered by Dependabot on the "push" event run with read-only access. Uploading Code Scanning results requires write access. To use Code Scanning with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. See ${"https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push" /* SCANNING_ON_PUSH */} for more information on how to configure these events.` ); } else { - core11.warning(e.message); + core12.warning(e.message); } return; case 404: - core11.warning(e.message); + core12.warning(e.message); return; case 422: if (getRequiredEnvParam("GITHUB_SERVER_URL") !== GITHUB_DOTCOM_URL) { - core11.debug(INCOMPATIBLE_MSG); + core12.debug(INCOMPATIBLE_MSG); } else { - core11.debug(OUT_OF_DATE_MSG); + core12.debug(OUT_OF_DATE_MSG); } return; } } - core11.warning( + core12.warning( `An unexpected error occurred when sending code scanning status report: ${getErrorMessage( e )}` @@ -96565,7 +96497,7 @@ async function sendStatusReport(statusReport) { var fs15 = __toESM(require("fs")); var path14 = __toESM(require("path")); var import_zlib = __toESM(require("zlib")); -var core12 = __toESM(require_core()); +var core13 = __toESM(require_core()); var import_file_url = __toESM(require_file_url()); var jsonschema = __toESM(require_lib2()); @@ -97822,7 +97754,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo logger.warning( `Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}` ); - core12.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); + core13.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); } return combineSarifFiles(sarifFiles, logger); } @@ -97872,7 +97804,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo logger.warning( `Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage} for CodeQL CLI 2.16.6 and earlier. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}` ); - core12.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); + core13.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); } return combineSarifFiles(sarifFiles, logger); } @@ -97937,13 +97869,13 @@ async function uploadPayload(payload, repositoryNwo, logger, target) { if (isHTTPError(e)) { switch (e.status) { case 403: - core12.warning(e.message || GENERIC_403_MSG); + core13.warning(e.message || GENERIC_403_MSG); break; case 404: - core12.warning(e.message || GENERIC_404_MSG); + core13.warning(e.message || GENERIC_404_MSG); break; default: - core12.warning(e.message); + core13.warning(e.message); break; } } @@ -98289,7 +98221,7 @@ function validateUniqueCategory(sarif, sentinelPrefix = CodeScanningTarget.senti `Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. The easiest fix is to specify a unique value for the \`category\` input. If .runs[].automationDetails.id is specified in the sarif file, that will take precedence over your configured \`category\`. Category: (${id ? id : "none"}) Tool: (${tool ? tool : "none"})` ); } - core12.exportVariable(sentinelEnvVar, sentinelEnvVar); + core13.exportVariable(sentinelEnvVar, sentinelEnvVar); } } function sanitize(str2) { @@ -98468,7 +98400,7 @@ async function run() { } const apiDetails = getApiDetails(); const outputDir = getRequiredInput("output"); - core13.exportVariable("CODEQL_ACTION_SARIF_RESULTS_OUTPUT_DIR" /* SARIF_RESULTS_OUTPUT_DIR */, outputDir); + core14.exportVariable("CODEQL_ACTION_SARIF_RESULTS_OUTPUT_DIR" /* SARIF_RESULTS_OUTPUT_DIR */, outputDir); const threads = getThreadsFlag( getOptionalInput("threads") || process.env["CODEQL_THREADS"], logger @@ -98520,8 +98452,8 @@ async function run() { for (const language of config.languages) { dbLocations[language] = getCodeQLDatabasePath(config, language); } - core13.setOutput("db-locations", dbLocations); - core13.setOutput("sarif-output", import_path4.default.resolve(outputDir)); + core14.setOutput("db-locations", dbLocations); + core14.setOutput("sarif-output", import_path4.default.resolve(outputDir)); const uploadInput = getOptionalInput("upload"); if (runStats && getUploadValue(uploadInput) === "always") { uploadResult = await uploadFiles( @@ -98532,7 +98464,7 @@ async function run() { logger, CodeScanningTarget ); - core13.setOutput("sarif-id", uploadResult.sarifID); + core14.setOutput("sarif-id", uploadResult.sarifID); if (isCodeQualityEnabled(config)) { const qualityUploadResult = await uploadFiles( outputDir, @@ -98545,7 +98477,7 @@ async function run() { logger, CodeQualityTarget ); - core13.setOutput("quality-sarif-id", qualityUploadResult.sarifID); + core14.setOutput("quality-sarif-id", qualityUploadResult.sarifID); } } else { logger.info("Not uploading results"); @@ -98573,15 +98505,15 @@ async function run() { ); } if (getOptionalInput("expect-error") === "true") { - core13.setFailed( + core14.setFailed( `expect-error input was set to true but no error was thrown.` ); } - core13.exportVariable("CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY" /* ANALYZE_DID_COMPLETE_SUCCESSFULLY */, "true"); + core14.exportVariable("CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY" /* ANALYZE_DID_COMPLETE_SUCCESSFULLY */, "true"); } catch (unwrappedError) { const error2 = wrapError(unwrappedError); if (getOptionalInput("expect-error") !== "true" || hasBadExpectErrorInput()) { - core13.setFailed(error2.message); + core14.setFailed(error2.message); } await sendStatusReport2( startedAt, @@ -98642,7 +98574,7 @@ async function runWrapper() { try { await runPromise; } catch (error2) { - core13.setFailed(`analyze action failed: ${getErrorMessage(error2)}`); + core14.setFailed(`analyze action failed: ${getErrorMessage(error2)}`); } await checkForTimeout(); } diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index 964f6ebca..ea7cbdbc3 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -34336,127 +34336,6 @@ var require_del = __commonJS({ } }); -// node_modules/tiny-each-async/index.js -var require_tiny_each_async = __commonJS({ - "node_modules/tiny-each-async/index.js"(exports2, module2) { - "use strict"; - module2.exports = function eachAsync(arr, parallelLimit, iteratorFn, cb) { - var pending = 0; - var index = 0; - var lastIndex = arr.length - 1; - var called = false; - var limit; - var callback; - var iterate; - if (typeof parallelLimit === "number") { - limit = parallelLimit; - iterate = iteratorFn; - callback = cb || function noop() { - }; - } else { - iterate = parallelLimit; - callback = iteratorFn || function noop() { - }; - limit = arr.length; - } - if (!arr.length) { - return callback(); - } - var iteratorLength = iterate.length; - var shouldCallNextIterator = function shouldCallNextIterator2() { - return !called && pending < limit && index < lastIndex; - }; - var iteratorCallback = function iteratorCallback2(err) { - if (called) { - return; - } - pending--; - if (err || index === lastIndex && !pending) { - called = true; - callback(err); - } else if (shouldCallNextIterator()) { - processIterator(++index); - } - }; - var processIterator = function processIterator2() { - pending++; - var args = iteratorLength === 2 ? [arr[index], iteratorCallback] : [arr[index], index, iteratorCallback]; - iterate.apply(null, args); - if (shouldCallNextIterator()) { - processIterator2(++index); - } - }; - processIterator(); - }; - } -}); - -// node_modules/get-folder-size/index.js -var require_get_folder_size = __commonJS({ - "node_modules/get-folder-size/index.js"(exports2, module2) { - "use strict"; - var fs7 = require("fs"); - var path7 = require("path"); - var eachAsync = require_tiny_each_async(); - function readSizeRecursive(seen, item, ignoreRegEx, callback) { - let cb; - let ignoreRegExp; - if (!callback) { - cb = ignoreRegEx; - ignoreRegExp = null; - } else { - cb = callback; - ignoreRegExp = ignoreRegEx; - } - fs7.lstat(item, function lstat(e, stats) { - let total = !e ? stats.size || 0 : 0; - if (stats) { - if (seen.has(stats.ino)) { - return cb(null, 0); - } - seen.add(stats.ino); - } - if (!e && stats.isDirectory()) { - fs7.readdir(item, (err, list) => { - if (err) { - return cb(err); - } - eachAsync( - list, - 5e3, - (dirItem, next) => { - readSizeRecursive( - seen, - path7.join(item, dirItem), - ignoreRegExp, - (error2, size) => { - if (!error2) { - total += size; - } - next(error2); - } - ); - }, - (finalErr) => { - cb(finalErr, total); - } - ); - }); - } else { - if (ignoreRegExp && ignoreRegExp.test(item)) { - total = 0; - } - cb(e, total); - } - }); - } - module2.exports = (...args) => { - args.unshift(/* @__PURE__ */ new Set()); - return readSizeRecursive(...args); - }; - } -}); - // node_modules/semver/internal/constants.js var require_constants9 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -36412,7 +36291,7 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", @@ -38076,7 +37955,7 @@ var require_internal_glob_options_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -38086,15 +37965,15 @@ var require_internal_glob_options_helper = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core13.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core13.debug(`implicitDescendants '${result.implicitDescendants}'`); + core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; @@ -38758,7 +38637,7 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs7 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); var path7 = __importStar4(require("path")); @@ -38809,7 +38688,7 @@ var require_internal_globber = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core13.debug(`Search path '${searchPath}'`); + core14.debug(`Search path '${searchPath}'`); try { yield __await4(fs7.promises.lstat(searchPath)); } catch (err) { @@ -38881,7 +38760,7 @@ var require_internal_globber = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core13.debug(`Broken symlink '${item.path}'`); + core14.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -38897,7 +38776,7 @@ var require_internal_globber = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -40221,7 +40100,7 @@ var require_cacheUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob = __importStar4(require_glob2()); var io5 = __importStar4(require_io()); @@ -40274,7 +40153,7 @@ var require_cacheUtils = __commonJS({ _e = false; const file = _c; const relativeFile = path7.relative(workspace, file).replace(new RegExp(`\\${path7.sep}`, "g"), "/"); - core13.debug(`Matched: ${relativeFile}`); + core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { @@ -40304,7 +40183,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); - core13.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec2.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, @@ -40315,10 +40194,10 @@ var require_cacheUtils = __commonJS({ } }); } catch (err) { - core13.debug(err.message); + core14.debug(err.message); } versionOutput = versionOutput.trim(); - core13.debug(versionOutput); + core14.debug(versionOutput); return versionOutput; }); } @@ -40326,7 +40205,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); - core13.debug(`zstd version: ${version}`); + core14.debug(`zstd version: ${version}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -75638,7 +75517,7 @@ var require_uploadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var storage_blob_1 = require_dist7(); var errors_1 = require_errors2(); var UploadProgress = class { @@ -75680,7 +75559,7 @@ var require_uploadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core13.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + core14.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -75735,14 +75614,14 @@ var require_uploadUtils = __commonJS({ }; try { uploadProgress.startDisplayTimer(); - core13.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + core14.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); if (response._response.status >= 400) { throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); } return response; } catch (error2) { - core13.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); + core14.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); throw error2; } finally { uploadProgress.stopDisplayTimer(); @@ -75813,7 +75692,7 @@ var require_requestUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var constants_1 = require_constants10(); function isSuccessStatusCode(statusCode) { @@ -75874,9 +75753,9 @@ var require_requestUtils = __commonJS({ isRetryable = isRetryableStatusCode(statusCode); errorMessage = `Cache service responded with ${statusCode}`; } - core13.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core14.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); if (!isRetryable) { - core13.debug(`${name} - Error is not retryable`); + core14.debug(`${name} - Error is not retryable`); break; } yield sleep(delay); @@ -75981,7 +75860,7 @@ var require_downloadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); @@ -76019,7 +75898,7 @@ var require_downloadUtils = __commonJS({ this.segmentIndex = this.segmentIndex + 1; this.segmentSize = segmentSize; this.receivedBytes = 0; - core13.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + core14.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); } /** * Sets the number of bytes received for the current segment. @@ -76053,7 +75932,7 @@ var require_downloadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core13.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + core14.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -76103,7 +75982,7 @@ var require_downloadUtils = __commonJS({ })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { downloadResponse.message.destroy(); - core13.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + core14.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); }); yield pipeResponseToStream(downloadResponse, writeStream); const contentLengthHeader = downloadResponse.message.headers["content-length"]; @@ -76114,7 +75993,7 @@ var require_downloadUtils = __commonJS({ throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); } } else { - core13.debug("Unable to validate download, no Content-Length header"); + core14.debug("Unable to validate download, no Content-Length header"); } }); } @@ -76234,7 +76113,7 @@ var require_downloadUtils = __commonJS({ const properties = yield client.getProperties(); const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; if (contentLength < 0) { - core13.debug("Unable to determine content length, downloading file with http-client..."); + core14.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); @@ -76314,7 +76193,7 @@ var require_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -76334,9 +76213,9 @@ var require_options = __commonJS({ } result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; - core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core13.debug(`Upload concurrency: ${result.uploadConcurrency}`); - core13.debug(`Upload chunk size: ${result.uploadChunkSize}`); + core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core14.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } exports2.getUploadOptions = getUploadOptions; @@ -76373,12 +76252,12 @@ var require_options = __commonJS({ if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) { result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; } - core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core13.debug(`Download concurrency: ${result.downloadConcurrency}`); - core13.debug(`Request timeout (ms): ${result.timeoutInMs}`); - core13.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); - core13.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); - core13.debug(`Lookup only: ${result.lookupOnly}`); + core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core14.debug(`Download concurrency: ${result.downloadConcurrency}`); + core14.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core14.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); + core14.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core14.debug(`Lookup only: ${result.lookupOnly}`); return result; } exports2.getDownloadOptions = getDownloadOptions; @@ -76558,7 +76437,7 @@ var require_cacheHttpClient = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); var fs7 = __importStar4(require("fs")); @@ -76576,7 +76455,7 @@ var require_cacheHttpClient = __commonJS({ throw new Error("Cache Service Url not found, unable to restore cache."); } const url = `${baseUrl}_apis/artifactcache/${resource}`; - core13.debug(`Resource Url: ${url}`); + core14.debug(`Resource Url: ${url}`); return url; } function createAcceptHeader(type2, apiVersion) { @@ -76604,7 +76483,7 @@ var require_cacheHttpClient = __commonJS({ return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { - if (core13.isDebug()) { + if (core14.isDebug()) { yield printCachesListForDiagnostics(keys[0], httpClient, version); } return null; @@ -76617,9 +76496,9 @@ var require_cacheHttpClient = __commonJS({ if (!cacheDownloadUrl) { throw new Error("Cache not found."); } - core13.setSecret(cacheDownloadUrl); - core13.debug(`Cache Result:`); - core13.debug(JSON.stringify(cacheResult)); + core14.setSecret(cacheDownloadUrl); + core14.debug(`Cache Result:`); + core14.debug(JSON.stringify(cacheResult)); return cacheResult; }); } @@ -76634,10 +76513,10 @@ var require_cacheHttpClient = __commonJS({ const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { - core13.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key + core14.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { - core13.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); + core14.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); } } } @@ -76682,7 +76561,7 @@ Other caches with similar key:`); } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter4(this, void 0, void 0, function* () { - core13.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) @@ -76704,7 +76583,7 @@ Other caches with similar key:`); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); const parallelUploads = [...new Array(concurrency).keys()]; - core13.debug("Awaiting all uploads"); + core14.debug("Awaiting all uploads"); let offset = 0; try { yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { @@ -76747,16 +76626,16 @@ Other caches with similar key:`); yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); } else { const httpClient = createHttpClient(); - core13.debug("Upload cache"); + core14.debug("Upload cache"); yield uploadFile(httpClient, cacheId, archivePath, options); - core13.debug("Commiting cache"); + core14.debug("Commiting cache"); const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + core14.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); } - core13.info("Cache saved successfully"); + core14.info("Cache saved successfully"); } }); } @@ -82182,7 +82061,7 @@ var require_cache3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var path7 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); @@ -82235,7 +82114,7 @@ var require_cache3 = __commonJS({ function restoreCache3(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core13.debug(`Cache service version: ${cacheServiceVersion}`); + core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); switch (cacheServiceVersion) { case "v2": @@ -82251,8 +82130,8 @@ var require_cache3 = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core13.debug("Resolved Keys:"); - core13.debug(JSON.stringify(keys)); + core14.debug("Resolved Keys:"); + core14.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82270,19 +82149,19 @@ var require_cache3 = __commonJS({ return void 0; } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core13.info("Lookup only - skipping download"); + core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } archivePath = path7.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core13.info("Cache restored successfully"); + core14.info("Cache restored successfully"); return cacheEntry.cacheKey; } catch (error2) { const typedError = error2; @@ -82290,16 +82169,16 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to restore: ${error2.message}`); + core14.error(`Failed to restore: ${error2.message}`); } else { - core13.warning(`Failed to restore: ${error2.message}`); + core14.warning(`Failed to restore: ${error2.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82310,8 +82189,8 @@ var require_cache3 = __commonJS({ options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core13.debug("Resolved Keys:"); - core13.debug(JSON.stringify(keys)); + core14.debug("Resolved Keys:"); + core14.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82329,30 +82208,30 @@ var require_cache3 = __commonJS({ }; const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core13.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); + core14.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); return void 0; } const isRestoreKeyMatch = request.key !== response.matchedKey; if (isRestoreKeyMatch) { - core13.info(`Cache hit for restore-key: ${response.matchedKey}`); + core14.info(`Cache hit for restore-key: ${response.matchedKey}`); } else { - core13.info(`Cache hit for: ${response.matchedKey}`); + core14.info(`Cache hit for: ${response.matchedKey}`); } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core13.info("Lookup only - skipping download"); + core14.info("Lookup only - skipping download"); return response.matchedKey; } archivePath = path7.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive path: ${archivePath}`); - core13.debug(`Starting download of archive to: ${archivePath}`); + core14.debug(`Archive path: ${archivePath}`); + core14.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - if (core13.isDebug()) { + core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core13.info("Cache restored successfully"); + core14.info("Cache restored successfully"); return response.matchedKey; } catch (error2) { const typedError = error2; @@ -82360,9 +82239,9 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to restore: ${error2.message}`); + core14.error(`Failed to restore: ${error2.message}`); } else { - core13.warning(`Failed to restore: ${error2.message}`); + core14.warning(`Failed to restore: ${error2.message}`); } } } finally { @@ -82371,7 +82250,7 @@ var require_cache3 = __commonJS({ yield utils.unlinkFile(archivePath); } } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82380,7 +82259,7 @@ var require_cache3 = __commonJS({ function saveCache3(paths, key, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core13.debug(`Cache service version: ${cacheServiceVersion}`); + core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); checkKey(key); switch (cacheServiceVersion) { @@ -82399,26 +82278,26 @@ var require_cache3 = __commonJS({ const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core13.debug("Cache Paths:"); - core13.debug(`${JSON.stringify(cachePaths)}`); + core14.debug("Cache Paths:"); + core14.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path7.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const fileSizeLimit = 10 * 1024 * 1024 * 1024; const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.debug(`File Size: ${archiveFileSize}`); + core14.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } - core13.debug("Reserving Cache"); + core14.debug("Reserving Cache"); const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { compressionMethod, enableCrossOsArchive, @@ -82431,26 +82310,26 @@ var require_cache3 = __commonJS({ } else { throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); } - core13.debug(`Saving Cache (ID: ${cacheId})`); + core14.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); } catch (error2) { const typedError = error2; if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError.name) { - core13.info(`Failed to save: ${typedError.message}`); + core14.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to save: ${typedError.message}`); + core14.error(`Failed to save: ${typedError.message}`); } else { - core13.warning(`Failed to save: ${typedError.message}`); + core14.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82463,26 +82342,26 @@ var require_cache3 = __commonJS({ const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core13.debug("Cache Paths:"); - core13.debug(`${JSON.stringify(cachePaths)}`); + core14.debug("Cache Paths:"); + core14.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path7.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.debug(`File Size: ${archiveFileSize}`); + core14.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } options.archiveSizeBytes = archiveFileSize; - core13.debug("Reserving Cache"); + core14.debug("Reserving Cache"); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const request = { key, @@ -82496,10 +82375,10 @@ var require_cache3 = __commonJS({ } signedUploadUrl = response.signedUploadUrl; } catch (error2) { - core13.debug(`Failed to reserve cache: ${error2}`); + core14.debug(`Failed to reserve cache: ${error2}`); throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } - core13.debug(`Attempting to upload cache located at: ${archivePath}`); + core14.debug(`Attempting to upload cache located at: ${archivePath}`); yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); const finalizeRequest = { key, @@ -82507,7 +82386,7 @@ var require_cache3 = __commonJS({ sizeBytes: `${archiveFileSize}` }; const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); - core13.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); if (!finalizeResponse.ok) { throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); } @@ -82517,19 +82396,19 @@ var require_cache3 = __commonJS({ if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError.name) { - core13.info(`Failed to save: ${typedError.message}`); + core14.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to save: ${typedError.message}`); + core14.error(`Failed to save: ${typedError.message}`); } else { - core13.warning(`Failed to save: ${typedError.message}`); + core14.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82737,7 +82616,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -82760,10 +82639,10 @@ var require_retry_helper = __commonJS({ if (isRetryable && !isRetryable(err)) { throw err; } - core13.info(err.message); + core14.info(err.message); } const seconds = this.getSleepAmount(); - core13.info(`Waiting ${seconds} seconds before trying again`); + core14.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } @@ -82843,7 +82722,7 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var io5 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs7 = __importStar4(require("fs")); @@ -82872,8 +82751,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { dest = dest || path7.join(_getTempDirectory(), crypto.randomUUID()); yield io5.mkdirP(path7.dirname(dest)); - core13.debug(`Downloading ${url}`); - core13.debug(`Destination ${dest}`); + core14.debug(`Downloading ${url}`); + core14.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); @@ -82900,7 +82779,7 @@ var require_tool_cache = __commonJS({ allowRetries: false }); if (auth) { - core13.debug("set auth"); + core14.debug("set auth"); if (headers === void 0) { headers = {}; } @@ -82909,7 +82788,7 @@ var require_tool_cache = __commonJS({ const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core13.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core14.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream.pipeline); @@ -82918,16 +82797,16 @@ var require_tool_cache = __commonJS({ let succeeded = false; try { yield pipeline(readStream, fs7.createWriteStream(dest)); - core13.debug("download complete"); + core14.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { - core13.debug("download failed"); + core14.debug("download failed"); try { yield io5.rmRF(dest); } catch (err) { - core13.debug(`Failed to delete '${dest}'. ${err.message}`); + core14.debug(`Failed to delete '${dest}'. ${err.message}`); } } } @@ -82942,7 +82821,7 @@ var require_tool_cache = __commonJS({ process.chdir(dest); if (_7zPath) { try { - const logLevel = core13.isDebug() ? "-bb1" : "-bb0"; + const logLevel = core14.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, @@ -82992,7 +82871,7 @@ var require_tool_cache = __commonJS({ throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); - core13.debug("Checking tar --version"); + core14.debug("Checking tar --version"); let versionOutput = ""; yield (0, exec_1.exec)("tar --version", [], { ignoreReturnCode: true, @@ -83002,7 +82881,7 @@ var require_tool_cache = __commonJS({ stderr: (data) => versionOutput += data.toString() } }); - core13.debug(versionOutput.trim()); + core14.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { @@ -83010,7 +82889,7 @@ var require_tool_cache = __commonJS({ } else { args = [flags]; } - if (core13.isDebug() && !flags.includes("v")) { + if (core14.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; @@ -83042,7 +82921,7 @@ var require_tool_cache = __commonJS({ args = [flags]; } args.push("-x", "-C", dest, "-f", file); - if (core13.isDebug()) { + if (core14.isDebug()) { args.push("-v"); } const xarPath = yield io5.which("xar", true); @@ -83087,7 +82966,7 @@ var require_tool_cache = __commonJS({ "-Command", pwshCommand ]; - core13.debug(`Using pwsh at path: ${pwshPath}`); + core14.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { const powershellCommand = [ @@ -83107,7 +82986,7 @@ var require_tool_cache = __commonJS({ powershellCommand ]; const powershellPath = yield io5.which("powershell", true); - core13.debug(`Using powershell at path: ${powershellPath}`); + core14.debug(`Using powershell at path: ${powershellPath}`); yield (0, exec_1.exec)(`"${powershellPath}"`, args); } }); @@ -83116,7 +82995,7 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const unzipPath = yield io5.which("unzip", true); const args = [file]; - if (!core13.isDebug()) { + if (!core14.isDebug()) { args.unshift("-q"); } args.unshift("-o"); @@ -83127,8 +83006,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os2.arch(); - core13.debug(`Caching tool ${tool} ${version} ${arch}`); - core13.debug(`source dir: ${sourceDir}`); + core14.debug(`Caching tool ${tool} ${version} ${arch}`); + core14.debug(`source dir: ${sourceDir}`); if (!fs7.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } @@ -83146,14 +83025,14 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os2.arch(); - core13.debug(`Caching tool ${tool} ${version} ${arch}`); - core13.debug(`source file: ${sourceFile}`); + core14.debug(`Caching tool ${tool} ${version} ${arch}`); + core14.debug(`source file: ${sourceFile}`); if (!fs7.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch); const destPath = path7.join(destFolder, targetFile); - core13.debug(`destination file ${destPath}`); + core14.debug(`destination file ${destPath}`); yield io5.cp(sourceFile, destPath); _completeToolPath(tool, version, arch); return destFolder; @@ -83177,12 +83056,12 @@ var require_tool_cache = __commonJS({ if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; const cachePath = path7.join(_getCacheDirectory(), toolName, versionSpec, arch); - core13.debug(`checking cache: ${cachePath}`); + core14.debug(`checking cache: ${cachePath}`); if (fs7.existsSync(cachePath) && fs7.existsSync(`${cachePath}.complete`)) { - core13.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); + core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); toolPath = cachePath; } else { - core13.debug("not found"); + core14.debug("not found"); } } return toolPath; @@ -83213,7 +83092,7 @@ var require_tool_cache = __commonJS({ const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { - core13.debug("set auth"); + core14.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); @@ -83234,7 +83113,7 @@ var require_tool_cache = __commonJS({ try { releases = JSON.parse(versionsRaw); } catch (_a) { - core13.debug("Invalid json"); + core14.debug("Invalid json"); } } return releases; @@ -83260,7 +83139,7 @@ var require_tool_cache = __commonJS({ function _createToolPath(tool, version, arch) { return __awaiter4(this, void 0, void 0, function* () { const folderPath = path7.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); - core13.debug(`destination ${folderPath}`); + core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io5.rmRF(folderPath); yield io5.rmRF(markerPath); @@ -83272,19 +83151,19 @@ var require_tool_cache = __commonJS({ const folderPath = path7.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); const markerPath = `${folderPath}.complete`; fs7.writeFileSync(markerPath, ""); - core13.debug("finished caching tool"); + core14.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { const c = semver8.clean(versionSpec) || ""; - core13.debug(`isExplicit: ${c}`); + core14.debug(`isExplicit: ${c}`); const valid3 = semver8.valid(c) != null; - core13.debug(`explicit? ${valid3}`); + core14.debug(`explicit? ${valid3}`); return valid3; } exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version = ""; - core13.debug(`evaluating ${versions.length} versions`); + core14.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver8.gt(a, b)) { return 1; @@ -83300,9 +83179,9 @@ var require_tool_cache = __commonJS({ } } if (version) { - core13.debug(`matched: ${version}`); + core14.debug(`matched: ${version}`); } else { - core13.debug("match not found"); + core14.debug("match not found"); } return version; } @@ -83879,18 +83758,18 @@ var require_follow_redirects = __commonJS({ }); // src/autobuild-action.ts -var core12 = __toESM(require_core()); +var core13 = __toESM(require_core()); // src/actions-util.ts var fs = __toESM(require("fs")); -var core3 = __toESM(require_core()); +var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts var path = __toESM(require("path")); -var core2 = __toESM(require_core()); +var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -84031,7 +83910,61 @@ function checkDiskSpace(directoryPath, dependencies = { // src/util.ts var import_del = __toESM(require_del()); -var import_get_folder_size = __toESM(require_get_folder_size()); + +// node_modules/get-folder-size/index.js +var import_node_path2 = require("node:path"); +async function getFolderSize(itemPath, options) { + return await core(itemPath, options, { errors: true }); +} +getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); +getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); +async function core(rootItemPath, options = {}, returnType = {}) { + const fs7 = options.fs || await import("node:fs/promises"); + let folderSize = 0n; + const foundInos = /* @__PURE__ */ new Set(); + const errors = []; + await processItem(rootItemPath); + async function processItem(itemPath) { + if (options.ignore?.test(itemPath)) return; + const stats = returnType.strict ? await fs7.lstat(itemPath, { bigint: true }) : await fs7.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + if (typeof stats !== "object") return; + if (!foundInos.has(stats.ino)) { + foundInos.add(stats.ino); + folderSize += stats.size; + } + if (stats.isDirectory()) { + const directoryItems = returnType.strict ? await fs7.readdir(itemPath) : await fs7.readdir(itemPath).catch((error2) => errors.push(error2)); + if (typeof directoryItems !== "object") return; + await Promise.all( + directoryItems.map( + (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) + ) + ); + } + } + if (!options.bigint) { + if (folderSize > BigInt(Number.MAX_SAFE_INTEGER)) { + const error2 = new RangeError( + "The folder size is too large to return as a Number. You can instruct this package to return a BigInt instead." + ); + if (returnType.strict) { + throw error2; + } + errors.push(error2); + folderSize = Number.MAX_SAFE_INTEGER; + } else { + folderSize = Number(folderSize); + } + } + if (returnType.errors) { + return { + size: folderSize, + errors: errors.length > 0 ? errors : null + }; + } else { + return folderSize; + } +} // node_modules/js-yaml/dist/js-yaml.mjs function isNothing(subject) { @@ -84602,7 +84535,7 @@ var json = failsafe.extend({ float ] }); -var core = json; +var core2 = json; var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); @@ -84816,7 +84749,7 @@ var set = new type("tag:yaml.org,2002:set", { resolve: resolveYamlSet, construct: constructYamlSet }); -var _default = core.extend({ +var _default = core2.extend({ implicit: [ timestamp, merge @@ -86694,7 +86627,7 @@ function checkGitHubVersionInRange(version, logger) { ); } hasBeenWarnedAboutVersion = true; - core2.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); + core3.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); } function apiVersionInRange(version, minimumVersion2, maximumVersion2) { if (!semver.satisfies(version, `>=${minimumVersion2}`)) { @@ -86706,11 +86639,11 @@ function apiVersionInRange(version, minimumVersion2, maximumVersion2) { return void 0; } function initializeEnvironment(version) { - core2.exportVariable("CODEQL_ACTION_FEATURE_MULTI_LANGUAGE" /* FEATURE_MULTI_LANGUAGE */, "false"); - core2.exportVariable("CODEQL_ACTION_FEATURE_SANDWICH" /* FEATURE_SANDWICH */, "false"); - core2.exportVariable("CODEQL_ACTION_FEATURE_SARIF_COMBINE" /* FEATURE_SARIF_COMBINE */, "true"); - core2.exportVariable("CODEQL_ACTION_FEATURE_WILL_UPLOAD" /* FEATURE_WILL_UPLOAD */, "true"); - core2.exportVariable("CODEQL_ACTION_VERSION" /* VERSION */, version); + core3.exportVariable("CODEQL_ACTION_FEATURE_MULTI_LANGUAGE" /* FEATURE_MULTI_LANGUAGE */, "false"); + core3.exportVariable("CODEQL_ACTION_FEATURE_SANDWICH" /* FEATURE_SANDWICH */, "false"); + core3.exportVariable("CODEQL_ACTION_FEATURE_SARIF_COMBINE" /* FEATURE_SARIF_COMBINE */, "true"); + core3.exportVariable("CODEQL_ACTION_FEATURE_WILL_UPLOAD" /* FEATURE_WILL_UPLOAD */, "true"); + core3.exportVariable("CODEQL_ACTION_VERSION" /* VERSION */, version); } function getRequiredEnvParam(paramName) { const value = process.env[paramName]; @@ -86773,7 +86706,7 @@ async function checkDiskUsage(logger) { } else { logger.debug(message); } - core2.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true"); + core3.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true"); } return { numAvailableBytes: diskUsage.free, @@ -86793,10 +86726,10 @@ function checkActionVersion(version, githubVersion) { semver.coerce(githubVersion.version) ?? "0.0.0", ">=3.11" )) { - core2.error( + core3.error( "CodeQL Action major versions v1 and v2 have been deprecated. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2025-01-10-code-scanning-codeql-action-v2-is-now-deprecated/" ); - core2.exportVariable("CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION" /* LOG_VERSION_DEPRECATION */, "true"); + core3.exportVariable("CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION" /* LOG_VERSION_DEPRECATION */, "true"); } } } @@ -86813,13 +86746,13 @@ async function checkSipEnablement(logger) { if (sipStatusOutput.stdout.includes( "System Integrity Protection status: enabled." )) { - core2.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true"); + core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true"); return true; } if (sipStatusOutput.stdout.includes( "System Integrity Protection status: disabled." )) { - core2.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false"); + core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false"); return false; } } @@ -86843,14 +86776,14 @@ async function asyncSome(array, predicate) { // src/actions-util.ts var pkg = require_package(); var getRequiredInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); if (!value) { throw new ConfigurationError(`Input required and not supplied: ${name}`); } return value; }; var getOptionalInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); return value.length > 0 ? value : void 0; }; function getTemporaryDirectory() { @@ -86964,7 +86897,7 @@ async function runTool(cmd, args = [], opts = {}) { } // src/api-client.ts -var core4 = __toESM(require_core()); +var core5 = __toESM(require_core()); var githubUtils = __toESM(require_utils4()); var retry = __toESM(require_dist_node15()); var import_console_log_level = __toESM(require_console_log_level()); @@ -87069,17 +87002,17 @@ async function getAnalysisKey() { const workflowPath = await getWorkflowRelativePath(); const jobName = getRequiredEnvParam("GITHUB_JOB"); analysisKey = `${workflowPath}:${jobName}`; - core4.exportVariable(analysisKeyEnvVar, analysisKey); + core5.exportVariable(analysisKeyEnvVar, analysisKey); return analysisKey; } // src/autobuild.ts -var core10 = __toESM(require_core()); +var core11 = __toESM(require_core()); // src/codeql.ts var fs6 = __toESM(require("fs")); var path6 = __toESM(require("path")); -var core9 = __toESM(require_core()); +var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); // src/cli-errors.ts @@ -87333,7 +87266,7 @@ var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var supportedAnalysisKinds = new Set(Object.values(AnalysisKind)); // src/caching-utils.ts -var core5 = __toESM(require_core()); +var core6 = __toESM(require_core()); // src/feature-flags.ts var fs3 = __toESM(require("fs")); @@ -87350,13 +87283,13 @@ var path2 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts -var core6 = __toESM(require_core()); +var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; - core6.debug(`Running git command: git ${args.join(" ")}`); + core7.debug(`Running git command: git ${args.join(" ")}`); try { await new toolrunner2.ToolRunner(await io3.which("git", true), args, { silent: true, @@ -87376,7 +87309,7 @@ var runGitCommand = async function(workingDirectory, args, customErrorMessage) { if (stderr.includes("not a git repository")) { reason = "The checkout path provided to the action does not appear to be a git repository."; } - core6.info(`git call failed. ${customErrorMessage} Error: ${reason}`); + core7.info(`git call failed. ${customErrorMessage} Error: ${reason}`); throw error2; } }; @@ -87487,7 +87420,7 @@ async function getRef() { ) !== head; if (hasChangedRef) { const newRef = ref.replace(pull_ref_regex, "refs/pull/$1/head"); - core6.debug( + core7.debug( `No longer on merge commit, rewriting ref from ${ref} to ${newRef}.` ); return newRef; @@ -87513,9 +87446,9 @@ async function isAnalyzingDefaultBranch() { } // src/logging.ts -var core7 = __toESM(require_core()); +var core8 = __toESM(require_core()); function getActionsLogger() { - return core7; + return core8; } // src/overlay-database-utils.ts @@ -88127,7 +88060,7 @@ var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); // src/tools-download.ts -var core8 = __toESM(require_core()); +var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); @@ -88619,12 +88552,12 @@ ${output}` ); } else if (checkVersion && process.env["CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */] !== "true" && !await codeQlVersionAtLeast(codeql, CODEQL_NEXT_MINIMUM_VERSION)) { const result = await codeql.getVersion(); - core9.warning( + core10.warning( `CodeQL CLI version ${result.version} was discontinued on ${GHES_MOST_RECENT_DEPRECATION_DATE} alongside GitHub Enterprise Server ${GHES_VERSION_MOST_RECENTLY_DEPRECATED} and will not be supported by the next minor release of the CodeQL Action. Please update to CodeQL CLI version ${CODEQL_NEXT_MINIMUM_VERSION} or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version. Alternatively, if you want to continue using CodeQL CLI version ${result.version}, you can replace 'github/codeql-action/*@v${getActionVersion().split(".")[0]}' by 'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to continue using this version of the CodeQL Action.` ); - core9.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); + core10.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); } return codeql; } @@ -88785,16 +88718,16 @@ async function setupCppAutobuild(codeql, logger) { logger.info( `Disabling ${featureName} as we are on a self-hosted runner.${getWorkflowEventName() !== "dynamic" ? ` To override this, set the ${envVar} environment variable to 'true' in your workflow. See ${"https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow" /* DEFINE_ENV_VARIABLES */} for more information.` : ""}` ); - core10.exportVariable(envVar, "false"); + core11.exportVariable(envVar, "false"); } else { logger.info( `Enabling ${featureName}. This can be disabled by setting the ${envVar} environment variable to 'false'. See ${"https://docs.github.com/en/actions/learn-github-actions/variables#defining-environment-variables-for-a-single-workflow" /* DEFINE_ENV_VARIABLES */} for more information.` ); - core10.exportVariable(envVar, "true"); + core11.exportVariable(envVar, "true"); } } else { logger.info(`Disabling ${featureName}.`); - core10.exportVariable(envVar, "false"); + core11.exportVariable(envVar, "false"); } } async function runAutobuild(config, language, logger) { @@ -88809,14 +88742,14 @@ async function runAutobuild(config, language, logger) { await codeQL.runAutobuild(config, language); } if (language === "go" /* go */) { - core10.exportVariable("CODEQL_ACTION_DID_AUTOBUILD_GOLANG" /* DID_AUTOBUILD_GOLANG */, "true"); + core11.exportVariable("CODEQL_ACTION_DID_AUTOBUILD_GOLANG" /* DID_AUTOBUILD_GOLANG */, "true"); } logger.endGroup(); } // src/status-report.ts var os = __toESM(require("os")); -var core11 = __toESM(require_core()); +var core12 = __toESM(require_core()); function isFirstPartyAnalysis(actionName) { if (actionName !== "upload-sarif" /* UploadSarif */) { return true; @@ -88832,12 +88765,12 @@ function getActionsStatus(error2, otherFailureCause) { } function setJobStatusIfUnsuccessful(actionStatus) { if (actionStatus === "user-error") { - core11.exportVariable( + core12.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_CONFIGURATION_ERROR" /* ConfigErrorStatus */ ); } else if (actionStatus === "failure" || actionStatus === "aborted") { - core11.exportVariable( + core12.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_FAILURE" /* FailureStatus */ ); @@ -88856,14 +88789,14 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi let workflowStartedAt = process.env["CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */]; if (workflowStartedAt === void 0) { workflowStartedAt = actionStartedAt.toISOString(); - core11.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt); + core12.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt); } const runnerOs = getRequiredEnvParam("RUNNER_OS"); const codeQlCliVersion = getCachedCodeQlVersion(); const actionRef = process.env["GITHUB_ACTION_REF"] || ""; const testingEnvironment = getTestingEnvironment(); if (testingEnvironment) { - core11.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment); + core12.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment); } const isSteadyStateDefaultSetupRun = process.env["CODE_SCANNING_IS_STEADY_STATE_DEFAULT_SETUP"] === "true"; const statusReport = { @@ -88941,9 +88874,9 @@ var INCOMPATIBLE_MSG = "CodeQL Action version is incompatible with the code scan async function sendStatusReport(statusReport) { setJobStatusIfUnsuccessful(statusReport.status); const statusReportJSON = JSON.stringify(statusReport); - core11.debug(`Sending status report: ${statusReportJSON}`); + core12.debug(`Sending status report: ${statusReportJSON}`); if (isInTestMode()) { - core11.debug("In test mode. Status reports are not uploaded."); + core12.debug("In test mode. Status reports are not uploaded."); return; } const nwo = getRepositoryNwo(); @@ -88962,26 +88895,26 @@ async function sendStatusReport(statusReport) { switch (e.status) { case 403: if (getWorkflowEventName() === "push" && process.env["GITHUB_ACTOR"] === "dependabot[bot]") { - core11.warning( + core12.warning( `Workflows triggered by Dependabot on the "push" event run with read-only access. Uploading Code Scanning results requires write access. To use Code Scanning with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. See ${"https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push" /* SCANNING_ON_PUSH */} for more information on how to configure these events.` ); } else { - core11.warning(e.message); + core12.warning(e.message); } return; case 404: - core11.warning(e.message); + core12.warning(e.message); return; case 422: if (getRequiredEnvParam("GITHUB_SERVER_URL") !== GITHUB_DOTCOM_URL) { - core11.debug(INCOMPATIBLE_MSG); + core12.debug(INCOMPATIBLE_MSG); } else { - core11.debug(OUT_OF_DATE_MSG); + core12.debug(OUT_OF_DATE_MSG); } return; } } - core11.warning( + core12.warning( `An unexpected error occurred when sending code scanning status report: ${getErrorMessage( e )}` @@ -89057,7 +88990,7 @@ async function run() { await endTracingForCluster(codeql, config, logger); } catch (unwrappedError) { const error2 = wrapError(unwrappedError); - core12.setFailed( + core13.setFailed( `We were unable to automatically build your code. Please replace the call to the autobuild action with your custom build steps. ${error2.message}` ); await sendCompletedStatusReport( @@ -89070,14 +89003,14 @@ async function run() { ); return; } - core12.exportVariable("CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY" /* AUTOBUILD_DID_COMPLETE_SUCCESSFULLY */, "true"); + core13.exportVariable("CODEQL_ACTION_AUTOBUILD_DID_COMPLETE_SUCCESSFULLY" /* AUTOBUILD_DID_COMPLETE_SUCCESSFULLY */, "true"); await sendCompletedStatusReport(config, logger, startedAt, languages ?? []); } async function runWrapper() { try { await run(); } catch (error2) { - core12.setFailed(`autobuild action failed. ${getErrorMessage(error2)}`); + core13.setFailed(`autobuild action failed. ${getErrorMessage(error2)}`); } } void runWrapper(); diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 5ef71128c..d013d7b12 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -34336,127 +34336,6 @@ var require_del = __commonJS({ } }); -// node_modules/tiny-each-async/index.js -var require_tiny_each_async = __commonJS({ - "node_modules/tiny-each-async/index.js"(exports2, module2) { - "use strict"; - module2.exports = function eachAsync(arr, parallelLimit, iteratorFn, cb) { - var pending = 0; - var index = 0; - var lastIndex = arr.length - 1; - var called = false; - var limit; - var callback; - var iterate; - if (typeof parallelLimit === "number") { - limit = parallelLimit; - iterate = iteratorFn; - callback = cb || function noop() { - }; - } else { - iterate = parallelLimit; - callback = iteratorFn || function noop() { - }; - limit = arr.length; - } - if (!arr.length) { - return callback(); - } - var iteratorLength = iterate.length; - var shouldCallNextIterator = function shouldCallNextIterator2() { - return !called && pending < limit && index < lastIndex; - }; - var iteratorCallback = function iteratorCallback2(err) { - if (called) { - return; - } - pending--; - if (err || index === lastIndex && !pending) { - called = true; - callback(err); - } else if (shouldCallNextIterator()) { - processIterator(++index); - } - }; - var processIterator = function processIterator2() { - pending++; - var args = iteratorLength === 2 ? [arr[index], iteratorCallback] : [arr[index], index, iteratorCallback]; - iterate.apply(null, args); - if (shouldCallNextIterator()) { - processIterator2(++index); - } - }; - processIterator(); - }; - } -}); - -// node_modules/get-folder-size/index.js -var require_get_folder_size = __commonJS({ - "node_modules/get-folder-size/index.js"(exports2, module2) { - "use strict"; - var fs17 = require("fs"); - var path15 = require("path"); - var eachAsync = require_tiny_each_async(); - function readSizeRecursive(seen, item, ignoreRegEx, callback) { - let cb; - let ignoreRegExp; - if (!callback) { - cb = ignoreRegEx; - ignoreRegExp = null; - } else { - cb = callback; - ignoreRegExp = ignoreRegEx; - } - fs17.lstat(item, function lstat(e, stats) { - let total = !e ? stats.size || 0 : 0; - if (stats) { - if (seen.has(stats.ino)) { - return cb(null, 0); - } - seen.add(stats.ino); - } - if (!e && stats.isDirectory()) { - fs17.readdir(item, (err, list) => { - if (err) { - return cb(err); - } - eachAsync( - list, - 5e3, - (dirItem, next) => { - readSizeRecursive( - seen, - path15.join(item, dirItem), - ignoreRegExp, - (error2, size) => { - if (!error2) { - total += size; - } - next(error2); - } - ); - }, - (finalErr) => { - cb(finalErr, total); - } - ); - }); - } else { - if (ignoreRegExp && ignoreRegExp.test(item)) { - total = 0; - } - cb(e, total); - } - }); - } - module2.exports = (...args) => { - args.unshift(/* @__PURE__ */ new Set()); - return readSizeRecursive(...args); - }; - } -}); - // node_modules/semver/internal/constants.js var require_constants9 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -36412,7 +36291,7 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", @@ -38076,7 +37955,7 @@ var require_internal_glob_options_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -38086,15 +37965,15 @@ var require_internal_glob_options_helper = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core17.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core18.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core17.debug(`implicitDescendants '${result.implicitDescendants}'`); + core18.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core17.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core18.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; @@ -38758,7 +38637,7 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var fs17 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); var path15 = __importStar4(require("path")); @@ -38809,7 +38688,7 @@ var require_internal_globber = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core17.debug(`Search path '${searchPath}'`); + core18.debug(`Search path '${searchPath}'`); try { yield __await4(fs17.promises.lstat(searchPath)); } catch (err) { @@ -38881,7 +38760,7 @@ var require_internal_globber = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core17.debug(`Broken symlink '${item.path}'`); + core18.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -38897,7 +38776,7 @@ var require_internal_globber = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core17.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core18.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -40221,7 +40100,7 @@ var require_cacheUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob2 = __importStar4(require_glob2()); var io7 = __importStar4(require_io()); @@ -40274,7 +40153,7 @@ var require_cacheUtils = __commonJS({ _e = false; const file = _c; const relativeFile = path15.relative(workspace, file).replace(new RegExp(`\\${path15.sep}`, "g"), "/"); - core17.debug(`Matched: ${relativeFile}`); + core18.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { @@ -40304,7 +40183,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); - core17.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + core18.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec2.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, @@ -40315,10 +40194,10 @@ var require_cacheUtils = __commonJS({ } }); } catch (err) { - core17.debug(err.message); + core18.debug(err.message); } versionOutput = versionOutput.trim(); - core17.debug(versionOutput); + core18.debug(versionOutput); return versionOutput; }); } @@ -40326,7 +40205,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); - core17.debug(`zstd version: ${version}`); + core18.debug(`zstd version: ${version}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -75638,7 +75517,7 @@ var require_uploadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var storage_blob_1 = require_dist7(); var errors_1 = require_errors2(); var UploadProgress = class { @@ -75680,7 +75559,7 @@ var require_uploadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core17.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + core18.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -75735,14 +75614,14 @@ var require_uploadUtils = __commonJS({ }; try { uploadProgress.startDisplayTimer(); - core17.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + core18.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); if (response._response.status >= 400) { throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); } return response; } catch (error2) { - core17.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); + core18.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); throw error2; } finally { uploadProgress.stopDisplayTimer(); @@ -75813,7 +75692,7 @@ var require_requestUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var http_client_1 = require_lib(); var constants_1 = require_constants10(); function isSuccessStatusCode(statusCode) { @@ -75874,9 +75753,9 @@ var require_requestUtils = __commonJS({ isRetryable = isRetryableStatusCode(statusCode); errorMessage = `Cache service responded with ${statusCode}`; } - core17.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core18.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); if (!isRetryable) { - core17.debug(`${name} - Error is not retryable`); + core18.debug(`${name} - Error is not retryable`); break; } yield sleep(delay2); @@ -75981,7 +75860,7 @@ var require_downloadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); @@ -76019,7 +75898,7 @@ var require_downloadUtils = __commonJS({ this.segmentIndex = this.segmentIndex + 1; this.segmentSize = segmentSize; this.receivedBytes = 0; - core17.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + core18.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); } /** * Sets the number of bytes received for the current segment. @@ -76053,7 +75932,7 @@ var require_downloadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core17.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + core18.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -76103,7 +75982,7 @@ var require_downloadUtils = __commonJS({ })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { downloadResponse.message.destroy(); - core17.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + core18.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); }); yield pipeResponseToStream(downloadResponse, writeStream); const contentLengthHeader = downloadResponse.message.headers["content-length"]; @@ -76114,7 +75993,7 @@ var require_downloadUtils = __commonJS({ throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); } } else { - core17.debug("Unable to validate download, no Content-Length header"); + core18.debug("Unable to validate download, no Content-Length header"); } }); } @@ -76234,7 +76113,7 @@ var require_downloadUtils = __commonJS({ const properties = yield client.getProperties(); const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; if (contentLength < 0) { - core17.debug("Unable to determine content length, downloading file with http-client..."); + core18.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); @@ -76314,7 +76193,7 @@ var require_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -76334,9 +76213,9 @@ var require_options = __commonJS({ } result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; - core17.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core17.debug(`Upload concurrency: ${result.uploadConcurrency}`); - core17.debug(`Upload chunk size: ${result.uploadChunkSize}`); + core18.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core18.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core18.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } exports2.getUploadOptions = getUploadOptions; @@ -76373,12 +76252,12 @@ var require_options = __commonJS({ if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) { result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; } - core17.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core17.debug(`Download concurrency: ${result.downloadConcurrency}`); - core17.debug(`Request timeout (ms): ${result.timeoutInMs}`); - core17.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); - core17.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); - core17.debug(`Lookup only: ${result.lookupOnly}`); + core18.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core18.debug(`Download concurrency: ${result.downloadConcurrency}`); + core18.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core18.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); + core18.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core18.debug(`Lookup only: ${result.lookupOnly}`); return result; } exports2.getDownloadOptions = getDownloadOptions; @@ -76558,7 +76437,7 @@ var require_cacheHttpClient = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); var fs17 = __importStar4(require("fs")); @@ -76576,7 +76455,7 @@ var require_cacheHttpClient = __commonJS({ throw new Error("Cache Service Url not found, unable to restore cache."); } const url = `${baseUrl}_apis/artifactcache/${resource}`; - core17.debug(`Resource Url: ${url}`); + core18.debug(`Resource Url: ${url}`); return url; } function createAcceptHeader(type2, apiVersion) { @@ -76604,7 +76483,7 @@ var require_cacheHttpClient = __commonJS({ return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { - if (core17.isDebug()) { + if (core18.isDebug()) { yield printCachesListForDiagnostics(keys[0], httpClient, version); } return null; @@ -76617,9 +76496,9 @@ var require_cacheHttpClient = __commonJS({ if (!cacheDownloadUrl) { throw new Error("Cache not found."); } - core17.setSecret(cacheDownloadUrl); - core17.debug(`Cache Result:`); - core17.debug(JSON.stringify(cacheResult)); + core18.setSecret(cacheDownloadUrl); + core18.debug(`Cache Result:`); + core18.debug(JSON.stringify(cacheResult)); return cacheResult; }); } @@ -76634,10 +76513,10 @@ var require_cacheHttpClient = __commonJS({ const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { - core17.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key + core18.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { - core17.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); + core18.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); } } } @@ -76682,7 +76561,7 @@ Other caches with similar key:`); } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter4(this, void 0, void 0, function* () { - core17.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + core18.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) @@ -76704,7 +76583,7 @@ Other caches with similar key:`); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); const parallelUploads = [...new Array(concurrency).keys()]; - core17.debug("Awaiting all uploads"); + core18.debug("Awaiting all uploads"); let offset = 0; try { yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { @@ -76747,16 +76626,16 @@ Other caches with similar key:`); yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); } else { const httpClient = createHttpClient(); - core17.debug("Upload cache"); + core18.debug("Upload cache"); yield uploadFile(httpClient, cacheId, archivePath, options); - core17.debug("Commiting cache"); + core18.debug("Commiting cache"); const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core17.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + core18.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); } - core17.info("Cache saved successfully"); + core18.info("Cache saved successfully"); } }); } @@ -82182,7 +82061,7 @@ var require_cache3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var path15 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); @@ -82235,7 +82114,7 @@ var require_cache3 = __commonJS({ function restoreCache4(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core17.debug(`Cache service version: ${cacheServiceVersion}`); + core18.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); switch (cacheServiceVersion) { case "v2": @@ -82251,8 +82130,8 @@ var require_cache3 = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core17.debug("Resolved Keys:"); - core17.debug(JSON.stringify(keys)); + core18.debug("Resolved Keys:"); + core18.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82270,19 +82149,19 @@ var require_cache3 = __commonJS({ return void 0; } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core17.info("Lookup only - skipping download"); + core18.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core17.debug(`Archive Path: ${archivePath}`); + core18.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); - if (core17.isDebug()) { + if (core18.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core17.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + core18.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core17.info("Cache restored successfully"); + core18.info("Cache restored successfully"); return cacheEntry.cacheKey; } catch (error2) { const typedError = error2; @@ -82290,16 +82169,16 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core17.error(`Failed to restore: ${error2.message}`); + core18.error(`Failed to restore: ${error2.message}`); } else { - core17.warning(`Failed to restore: ${error2.message}`); + core18.warning(`Failed to restore: ${error2.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core17.debug(`Failed to delete archive: ${error2}`); + core18.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82310,8 +82189,8 @@ var require_cache3 = __commonJS({ options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core17.debug("Resolved Keys:"); - core17.debug(JSON.stringify(keys)); + core18.debug("Resolved Keys:"); + core18.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82329,30 +82208,30 @@ var require_cache3 = __commonJS({ }; const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core17.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); + core18.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); return void 0; } const isRestoreKeyMatch = request.key !== response.matchedKey; if (isRestoreKeyMatch) { - core17.info(`Cache hit for restore-key: ${response.matchedKey}`); + core18.info(`Cache hit for restore-key: ${response.matchedKey}`); } else { - core17.info(`Cache hit for: ${response.matchedKey}`); + core18.info(`Cache hit for: ${response.matchedKey}`); } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core17.info("Lookup only - skipping download"); + core18.info("Lookup only - skipping download"); return response.matchedKey; } archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core17.debug(`Archive path: ${archivePath}`); - core17.debug(`Starting download of archive to: ${archivePath}`); + core18.debug(`Archive path: ${archivePath}`); + core18.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core17.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - if (core17.isDebug()) { + core18.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core18.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core17.info("Cache restored successfully"); + core18.info("Cache restored successfully"); return response.matchedKey; } catch (error2) { const typedError = error2; @@ -82360,9 +82239,9 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core17.error(`Failed to restore: ${error2.message}`); + core18.error(`Failed to restore: ${error2.message}`); } else { - core17.warning(`Failed to restore: ${error2.message}`); + core18.warning(`Failed to restore: ${error2.message}`); } } } finally { @@ -82371,7 +82250,7 @@ var require_cache3 = __commonJS({ yield utils.unlinkFile(archivePath); } } catch (error2) { - core17.debug(`Failed to delete archive: ${error2}`); + core18.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82380,7 +82259,7 @@ var require_cache3 = __commonJS({ function saveCache4(paths, key, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core17.debug(`Cache service version: ${cacheServiceVersion}`); + core18.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); checkKey(key); switch (cacheServiceVersion) { @@ -82399,26 +82278,26 @@ var require_cache3 = __commonJS({ const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core17.debug("Cache Paths:"); - core17.debug(`${JSON.stringify(cachePaths)}`); + core18.debug("Cache Paths:"); + core18.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core17.debug(`Archive Path: ${archivePath}`); + core18.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core17.isDebug()) { + if (core18.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const fileSizeLimit = 10 * 1024 * 1024 * 1024; const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core17.debug(`File Size: ${archiveFileSize}`); + core18.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } - core17.debug("Reserving Cache"); + core18.debug("Reserving Cache"); const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { compressionMethod, enableCrossOsArchive, @@ -82431,26 +82310,26 @@ var require_cache3 = __commonJS({ } else { throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); } - core17.debug(`Saving Cache (ID: ${cacheId})`); + core18.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); } catch (error2) { const typedError = error2; if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError2.name) { - core17.info(`Failed to save: ${typedError.message}`); + core18.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core17.error(`Failed to save: ${typedError.message}`); + core18.error(`Failed to save: ${typedError.message}`); } else { - core17.warning(`Failed to save: ${typedError.message}`); + core18.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core17.debug(`Failed to delete archive: ${error2}`); + core18.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82463,26 +82342,26 @@ var require_cache3 = __commonJS({ const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core17.debug("Cache Paths:"); - core17.debug(`${JSON.stringify(cachePaths)}`); + core18.debug("Cache Paths:"); + core18.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core17.debug(`Archive Path: ${archivePath}`); + core18.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core17.isDebug()) { + if (core18.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core17.debug(`File Size: ${archiveFileSize}`); + core18.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } options.archiveSizeBytes = archiveFileSize; - core17.debug("Reserving Cache"); + core18.debug("Reserving Cache"); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const request = { key, @@ -82496,10 +82375,10 @@ var require_cache3 = __commonJS({ } signedUploadUrl = response.signedUploadUrl; } catch (error2) { - core17.debug(`Failed to reserve cache: ${error2}`); + core18.debug(`Failed to reserve cache: ${error2}`); throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } - core17.debug(`Attempting to upload cache located at: ${archivePath}`); + core18.debug(`Attempting to upload cache located at: ${archivePath}`); yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); const finalizeRequest = { key, @@ -82507,7 +82386,7 @@ var require_cache3 = __commonJS({ sizeBytes: `${archiveFileSize}` }; const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); - core17.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + core18.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); if (!finalizeResponse.ok) { throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); } @@ -82517,19 +82396,19 @@ var require_cache3 = __commonJS({ if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError2.name) { - core17.info(`Failed to save: ${typedError.message}`); + core18.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core17.error(`Failed to save: ${typedError.message}`); + core18.error(`Failed to save: ${typedError.message}`); } else { - core17.warning(`Failed to save: ${typedError.message}`); + core18.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core17.debug(`Failed to delete archive: ${error2}`); + core18.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82737,7 +82616,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -82760,10 +82639,10 @@ var require_retry_helper = __commonJS({ if (isRetryable && !isRetryable(err)) { throw err; } - core17.info(err.message); + core18.info(err.message); } const seconds = this.getSleepAmount(); - core17.info(`Waiting ${seconds} seconds before trying again`); + core18.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } @@ -82843,7 +82722,7 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var io7 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs17 = __importStar4(require("fs")); @@ -82872,8 +82751,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { dest = dest || path15.join(_getTempDirectory(), crypto.randomUUID()); yield io7.mkdirP(path15.dirname(dest)); - core17.debug(`Downloading ${url}`); - core17.debug(`Destination ${dest}`); + core18.debug(`Downloading ${url}`); + core18.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); @@ -82900,7 +82779,7 @@ var require_tool_cache = __commonJS({ allowRetries: false }); if (auth) { - core17.debug("set auth"); + core18.debug("set auth"); if (headers === void 0) { headers = {}; } @@ -82909,7 +82788,7 @@ var require_tool_cache = __commonJS({ const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core17.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core18.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -82918,16 +82797,16 @@ var require_tool_cache = __commonJS({ let succeeded = false; try { yield pipeline(readStream, fs17.createWriteStream(dest)); - core17.debug("download complete"); + core18.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { - core17.debug("download failed"); + core18.debug("download failed"); try { yield io7.rmRF(dest); } catch (err) { - core17.debug(`Failed to delete '${dest}'. ${err.message}`); + core18.debug(`Failed to delete '${dest}'. ${err.message}`); } } } @@ -82942,7 +82821,7 @@ var require_tool_cache = __commonJS({ process.chdir(dest); if (_7zPath) { try { - const logLevel = core17.isDebug() ? "-bb1" : "-bb0"; + const logLevel = core18.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, @@ -82992,7 +82871,7 @@ var require_tool_cache = __commonJS({ throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); - core17.debug("Checking tar --version"); + core18.debug("Checking tar --version"); let versionOutput = ""; yield (0, exec_1.exec)("tar --version", [], { ignoreReturnCode: true, @@ -83002,7 +82881,7 @@ var require_tool_cache = __commonJS({ stderr: (data) => versionOutput += data.toString() } }); - core17.debug(versionOutput.trim()); + core18.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { @@ -83010,7 +82889,7 @@ var require_tool_cache = __commonJS({ } else { args = [flags]; } - if (core17.isDebug() && !flags.includes("v")) { + if (core18.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; @@ -83042,7 +82921,7 @@ var require_tool_cache = __commonJS({ args = [flags]; } args.push("-x", "-C", dest, "-f", file); - if (core17.isDebug()) { + if (core18.isDebug()) { args.push("-v"); } const xarPath = yield io7.which("xar", true); @@ -83087,7 +82966,7 @@ var require_tool_cache = __commonJS({ "-Command", pwshCommand ]; - core17.debug(`Using pwsh at path: ${pwshPath}`); + core18.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { const powershellCommand = [ @@ -83107,7 +82986,7 @@ var require_tool_cache = __commonJS({ powershellCommand ]; const powershellPath = yield io7.which("powershell", true); - core17.debug(`Using powershell at path: ${powershellPath}`); + core18.debug(`Using powershell at path: ${powershellPath}`); yield (0, exec_1.exec)(`"${powershellPath}"`, args); } }); @@ -83116,7 +82995,7 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const unzipPath = yield io7.which("unzip", true); const args = [file]; - if (!core17.isDebug()) { + if (!core18.isDebug()) { args.unshift("-q"); } args.unshift("-o"); @@ -83127,8 +83006,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os3.arch(); - core17.debug(`Caching tool ${tool} ${version} ${arch2}`); - core17.debug(`source dir: ${sourceDir}`); + core18.debug(`Caching tool ${tool} ${version} ${arch2}`); + core18.debug(`source dir: ${sourceDir}`); if (!fs17.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } @@ -83146,14 +83025,14 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os3.arch(); - core17.debug(`Caching tool ${tool} ${version} ${arch2}`); - core17.debug(`source file: ${sourceFile}`); + core18.debug(`Caching tool ${tool} ${version} ${arch2}`); + core18.debug(`source file: ${sourceFile}`); if (!fs17.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); const destPath = path15.join(destFolder, targetFile); - core17.debug(`destination file ${destPath}`); + core18.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); return destFolder; @@ -83177,12 +83056,12 @@ var require_tool_cache = __commonJS({ if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; const cachePath = path15.join(_getCacheDirectory(), toolName, versionSpec, arch2); - core17.debug(`checking cache: ${cachePath}`); + core18.debug(`checking cache: ${cachePath}`); if (fs17.existsSync(cachePath) && fs17.existsSync(`${cachePath}.complete`)) { - core17.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); + core18.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { - core17.debug("not found"); + core18.debug("not found"); } } return toolPath; @@ -83213,7 +83092,7 @@ var require_tool_cache = __commonJS({ const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { - core17.debug("set auth"); + core18.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); @@ -83234,7 +83113,7 @@ var require_tool_cache = __commonJS({ try { releases = JSON.parse(versionsRaw); } catch (_a) { - core17.debug("Invalid json"); + core18.debug("Invalid json"); } } return releases; @@ -83260,7 +83139,7 @@ var require_tool_cache = __commonJS({ function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { const folderPath = path15.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); - core17.debug(`destination ${folderPath}`); + core18.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); yield io7.rmRF(markerPath); @@ -83272,19 +83151,19 @@ var require_tool_cache = __commonJS({ const folderPath = path15.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs17.writeFileSync(markerPath, ""); - core17.debug("finished caching tool"); + core18.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { const c = semver8.clean(versionSpec) || ""; - core17.debug(`isExplicit: ${c}`); + core18.debug(`isExplicit: ${c}`); const valid3 = semver8.valid(c) != null; - core17.debug(`explicit? ${valid3}`); + core18.debug(`explicit? ${valid3}`); return valid3; } exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version = ""; - core17.debug(`evaluating ${versions.length} versions`); + core18.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver8.gt(a, b)) { return 1; @@ -83300,9 +83179,9 @@ var require_tool_cache = __commonJS({ } } if (version) { - core17.debug(`matched: ${version}`); + core18.debug(`matched: ${version}`); } else { - core17.debug("match not found"); + core18.debug("match not found"); } return version; } @@ -85976,14 +85855,14 @@ var require_retention = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getExpiration = void 0; var generated_1 = require_generated(); - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); function getExpiration(retentionDays) { if (!retentionDays) { return void 0; } const maxRetentionDays = getRetentionDays(); if (maxRetentionDays && maxRetentionDays < retentionDays) { - core17.warning(`Retention days cannot be greater than the maximum allowed retention set within the repository. Using ${maxRetentionDays} instead.`); + core18.warning(`Retention days cannot be greater than the maximum allowed retention set within the repository. Using ${maxRetentionDays} instead.`); retentionDays = maxRetentionDays; } const expirationDate = /* @__PURE__ */ new Date(); @@ -86575,7 +86454,7 @@ var require_util11 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getBackendIdsFromToken = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var config_1 = require_config2(); var jwt_decode_1 = __importDefault4(require_jwt_decode_cjs()); var InvalidJwtError = new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims"); @@ -86601,8 +86480,8 @@ var require_util11 = __commonJS({ workflowRunBackendId: scopeParts[1], workflowJobRunBackendId: scopeParts[2] }; - core17.debug(`Workflow Run Backend ID: ${ids.workflowRunBackendId}`); - core17.debug(`Workflow Job Run Backend ID: ${ids.workflowJobRunBackendId}`); + core18.debug(`Workflow Run Backend ID: ${ids.workflowRunBackendId}`); + core18.debug(`Workflow Job Run Backend ID: ${ids.workflowJobRunBackendId}`); return ids; } throw InvalidJwtError; @@ -86673,7 +86552,7 @@ var require_blob_upload = __commonJS({ exports2.uploadZipToBlobStorage = void 0; var storage_blob_1 = require_dist7(); var config_1 = require_config2(); - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var crypto = __importStar4(require("crypto")); var stream2 = __importStar4(require("stream")); var errors_1 = require_errors3(); @@ -86699,9 +86578,9 @@ var require_blob_upload = __commonJS({ const bufferSize = (0, config_1.getUploadChunkSize)(); const blobClient = new storage_blob_1.BlobClient(authenticatedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); - core17.debug(`Uploading artifact zip to blob storage with maxConcurrency: ${maxConcurrency}, bufferSize: ${bufferSize}`); + core18.debug(`Uploading artifact zip to blob storage with maxConcurrency: ${maxConcurrency}, bufferSize: ${bufferSize}`); const uploadCallback = (progress) => { - core17.info(`Uploaded bytes ${progress.loadedBytes}`); + core18.info(`Uploaded bytes ${progress.loadedBytes}`); uploadByteCount = progress.loadedBytes; lastProgressTime = Date.now(); }; @@ -86715,7 +86594,7 @@ var require_blob_upload = __commonJS({ const hashStream = crypto.createHash("sha256"); zipUploadStream.pipe(uploadStream); zipUploadStream.pipe(hashStream).setEncoding("hex"); - core17.info("Beginning upload of artifact content to blob storage"); + core18.info("Beginning upload of artifact content to blob storage"); try { yield Promise.race([ blockBlobClient.uploadStream(uploadStream, bufferSize, maxConcurrency, options), @@ -86729,12 +86608,12 @@ var require_blob_upload = __commonJS({ } finally { abortController.abort(); } - core17.info("Finished uploading artifact content to blob storage!"); + core18.info("Finished uploading artifact content to blob storage!"); hashStream.end(); sha256Hash = hashStream.read(); - core17.info(`SHA256 hash of uploaded artifact zip is ${sha256Hash}`); + core18.info(`SHA256 hash of uploaded artifact zip is ${sha256Hash}`); if (uploadByteCount === 0) { - core17.warning(`No data was uploaded to blob storage. Reported upload byte count is 0.`); + core18.warning(`No data was uploaded to blob storage. Reported upload byte count is 0.`); } return { uploadSize: uploadByteCount, @@ -89790,7 +89669,7 @@ var require_BufferList = __commonJS({ this.head = this.tail = null; this.length = 0; }; - BufferList.prototype.join = function join13(s) { + BufferList.prototype.join = function join14(s) { if (this.length === 0) return ""; var p = this.head; var ret = "" + p.data; @@ -110793,7 +110672,7 @@ var require_zip2 = __commonJS({ var stream2 = __importStar4(require("stream")); var promises_1 = require("fs/promises"); var archiver2 = __importStar4(require_archiver()); - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var config_1 = require_config2(); exports2.DEFAULT_COMPRESSION_LEVEL = 6; var ZipUploadStream = class extends stream2.Transform { @@ -110810,7 +110689,7 @@ var require_zip2 = __commonJS({ exports2.ZipUploadStream = ZipUploadStream; function createZipUploadStream(uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) { return __awaiter4(this, void 0, void 0, function* () { - core17.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); + core18.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); const zip = archiver2.create("zip", { highWaterMark: (0, config_1.getUploadChunkSize)(), zlib: { level: compressionLevel } @@ -110834,8 +110713,8 @@ var require_zip2 = __commonJS({ } const bufferSize = (0, config_1.getUploadChunkSize)(); const zipUploadStream = new ZipUploadStream(bufferSize); - core17.debug(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`); - core17.debug(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`); + core18.debug(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`); + core18.debug(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`); zip.pipe(zipUploadStream); zip.finalize(); return zipUploadStream; @@ -110843,24 +110722,24 @@ var require_zip2 = __commonJS({ } exports2.createZipUploadStream = createZipUploadStream; var zipErrorCallback = (error2) => { - core17.error("An error has occurred while creating the zip file for upload"); - core17.info(error2); + core18.error("An error has occurred while creating the zip file for upload"); + core18.info(error2); throw new Error("An error has occurred during zip creation for the artifact"); }; var zipWarningCallback = (error2) => { if (error2.code === "ENOENT") { - core17.warning("ENOENT warning during artifact zip creation. No such file or directory"); - core17.info(error2); + core18.warning("ENOENT warning during artifact zip creation. No such file or directory"); + core18.info(error2); } else { - core17.warning(`A non-blocking warning has occurred during artifact zip creation: ${error2.code}`); - core17.info(error2); + core18.warning(`A non-blocking warning has occurred during artifact zip creation: ${error2.code}`); + core18.info(error2); } }; var zipFinishCallback = () => { - core17.debug("Zip stream for upload has finished."); + core18.debug("Zip stream for upload has finished."); }; var zipEndCallback = () => { - core17.debug("Zip stream for upload has ended."); + core18.debug("Zip stream for upload has ended."); }; } }); @@ -110925,7 +110804,7 @@ var require_upload_artifact = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadArtifact = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var retention_1 = require_retention(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); @@ -110972,13 +110851,13 @@ var require_upload_artifact = __commonJS({ value: `sha256:${uploadResult.sha256Hash}` }); } - core17.info(`Finalizing artifact upload`); + core18.info(`Finalizing artifact upload`); const finalizeArtifactResp = yield artifactClient.FinalizeArtifact(finalizeArtifactReq); if (!finalizeArtifactResp.ok) { throw new errors_1.InvalidResponseError("FinalizeArtifact: response from backend was not ok"); } const artifactId = BigInt(finalizeArtifactResp.artifactId); - core17.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`); + core18.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`); return { size: uploadResult.uploadSize, digest: uploadResult.sha256Hash, @@ -118126,7 +118005,7 @@ var require_download_artifact = __commonJS({ var crypto = __importStar4(require("crypto")); var stream2 = __importStar4(require("stream")); var github3 = __importStar4(require_github2()); - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var httpClient = __importStar4(require_lib()); var unzip_stream_1 = __importDefault4(require_unzip()); var user_agent_1 = require_user_agent2(); @@ -118162,7 +118041,7 @@ var require_download_artifact = __commonJS({ return yield streamExtractExternal(url, directory); } catch (error2) { retryCount++; - core17.debug(`Failed to download artifact after ${retryCount} retries due to ${error2.message}. Retrying in 5 seconds...`); + core18.debug(`Failed to download artifact after ${retryCount} retries due to ${error2.message}. Retrying in 5 seconds...`); yield new Promise((resolve8) => setTimeout(resolve8, 5e3)); } } @@ -118191,7 +118070,7 @@ var require_download_artifact = __commonJS({ extractStream.on("data", () => { timer.refresh(); }).on("error", (error2) => { - core17.debug(`response.message: Artifact download failed: ${error2.message}`); + core18.debug(`response.message: Artifact download failed: ${error2.message}`); clearTimeout(timer); reject(error2); }).pipe(unzip_stream_1.default.Extract({ path: directory })).on("close", () => { @@ -118199,7 +118078,7 @@ var require_download_artifact = __commonJS({ if (hashStream) { hashStream.end(); sha256Digest = hashStream.read(); - core17.info(`SHA256 digest of downloaded artifact is ${sha256Digest}`); + core18.info(`SHA256 digest of downloaded artifact is ${sha256Digest}`); } resolve8({ sha256Digest: `sha256:${sha256Digest}` }); }).on("error", (error2) => { @@ -118214,7 +118093,7 @@ var require_download_artifact = __commonJS({ const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const api = github3.getOctokit(token); let digestMismatch = false; - core17.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`); + core18.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`); const { headers, status } = yield api.rest.actions.downloadArtifact({ owner: repositoryOwner, repo: repositoryName, @@ -118231,16 +118110,16 @@ var require_download_artifact = __commonJS({ if (!location) { throw new Error(`Unable to redirect to artifact download url`); } - core17.info(`Redirecting to blob download url: ${scrubQueryParameters(location)}`); + core18.info(`Redirecting to blob download url: ${scrubQueryParameters(location)}`); try { - core17.info(`Starting download of artifact to: ${downloadPath}`); + core18.info(`Starting download of artifact to: ${downloadPath}`); const extractResponse = yield streamExtract(location, downloadPath); - core17.info(`Artifact download completed successfully.`); + core18.info(`Artifact download completed successfully.`); if (options === null || options === void 0 ? void 0 : options.expectedHash) { if ((options === null || options === void 0 ? void 0 : options.expectedHash) !== extractResponse.sha256Digest) { digestMismatch = true; - core17.debug(`Computed digest: ${extractResponse.sha256Digest}`); - core17.debug(`Expected digest: ${options.expectedHash}`); + core18.debug(`Computed digest: ${extractResponse.sha256Digest}`); + core18.debug(`Expected digest: ${options.expectedHash}`); } } } catch (error2) { @@ -118267,7 +118146,7 @@ var require_download_artifact = __commonJS({ Are you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`); } if (artifacts.length > 1) { - core17.warning("Multiple artifacts found, defaulting to first."); + core18.warning("Multiple artifacts found, defaulting to first."); } const signedReq = { workflowRunBackendId: artifacts[0].workflowRunBackendId, @@ -118275,16 +118154,16 @@ Are you trying to download from a different run? Try specifying a github-token w name: artifacts[0].name }; const { signedUrl } = yield artifactClient.GetSignedArtifactURL(signedReq); - core17.info(`Redirecting to blob download url: ${scrubQueryParameters(signedUrl)}`); + core18.info(`Redirecting to blob download url: ${scrubQueryParameters(signedUrl)}`); try { - core17.info(`Starting download of artifact to: ${downloadPath}`); + core18.info(`Starting download of artifact to: ${downloadPath}`); const extractResponse = yield streamExtract(signedUrl, downloadPath); - core17.info(`Artifact download completed successfully.`); + core18.info(`Artifact download completed successfully.`); if (options === null || options === void 0 ? void 0 : options.expectedHash) { if ((options === null || options === void 0 ? void 0 : options.expectedHash) !== extractResponse.sha256Digest) { digestMismatch = true; - core17.debug(`Computed digest: ${extractResponse.sha256Digest}`); - core17.debug(`Expected digest: ${options.expectedHash}`); + core18.debug(`Computed digest: ${extractResponse.sha256Digest}`); + core18.debug(`Expected digest: ${options.expectedHash}`); } } } catch (error2) { @@ -118297,10 +118176,10 @@ Are you trying to download from a different run? Try specifying a github-token w function resolveOrCreateDirectory(downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { return __awaiter4(this, void 0, void 0, function* () { if (!(yield exists(downloadPath))) { - core17.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); + core18.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); yield promises_1.default.mkdir(downloadPath, { recursive: true }); } else { - core17.debug(`Artifact destination folder already exists: ${downloadPath}`); + core18.debug(`Artifact destination folder already exists: ${downloadPath}`); } return downloadPath; }); @@ -118341,7 +118220,7 @@ var require_retry_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRetryOptions = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var defaultMaxRetryNumber = 5; var defaultExemptStatusCodes = [400, 401, 403, 404, 422]; function getRetryOptions(defaultOptions, retries = defaultMaxRetryNumber, exemptStatusCodes = defaultExemptStatusCodes) { @@ -118356,7 +118235,7 @@ var require_retry_options = __commonJS({ retryOptions.doNotRetry = exemptStatusCodes; } const requestOptions = Object.assign(Object.assign({}, defaultOptions.request), { retries }); - core17.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : "octokit default: [400, 401, 403, 404, 422]"})`); + core18.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : "octokit default: [400, 401, 403, 404, 422]"})`); return [retryOptions, requestOptions]; } exports2.getRetryOptions = getRetryOptions; @@ -118513,7 +118392,7 @@ var require_get_artifact = __commonJS({ exports2.getArtifactInternal = exports2.getArtifactPublic = void 0; var github_1 = require_github2(); var plugin_retry_1 = require_dist_node25(); - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var utils_1 = require_utils13(); var retry_options_1 = require_retry_options(); var plugin_request_log_1 = require_dist_node24(); @@ -118551,7 +118430,7 @@ var require_get_artifact = __commonJS({ let artifact2 = getArtifactResp.data.artifacts[0]; if (getArtifactResp.data.artifacts.length > 1) { artifact2 = getArtifactResp.data.artifacts.sort((a, b) => b.id - a.id)[0]; - core17.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.id})`); + core18.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.id})`); } return { artifact: { @@ -118584,7 +118463,7 @@ var require_get_artifact = __commonJS({ let artifact2 = res.artifacts[0]; if (res.artifacts.length > 1) { artifact2 = res.artifacts.sort((a, b) => Number(b.databaseId) - Number(a.databaseId))[0]; - core17.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.databaseId})`); + core18.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.databaseId})`); } return { artifact: { @@ -120532,7 +120411,7 @@ var require_requestUtils2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientRequest = exports2.retry = void 0; var utils_1 = require_utils14(); - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { return __awaiter4(this, void 0, void 0, function* () { @@ -120559,13 +120438,13 @@ var require_requestUtils2 = __commonJS({ errorMessage = error2.message; } if (!isRetryable) { - core17.info(`${name} - Error is not retryable`); + core18.info(`${name} - Error is not retryable`); if (response) { (0, utils_1.displayHttpDiagnostics)(response); } break; } - core17.info(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core18.info(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); yield (0, utils_1.sleep)((0, utils_1.getExponentialRetryTimeInMilliseconds)(attempt)); attempt++; } @@ -120649,7 +120528,7 @@ var require_upload_http_client = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadHttpClient = void 0; var fs17 = __importStar4(require("fs")); - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var tmp = __importStar4(require_tmp_promise()); var stream2 = __importStar4(require("stream")); var utils_1 = require_utils14(); @@ -120714,7 +120593,7 @@ var require_upload_http_client = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const FILE_CONCURRENCY = (0, config_variables_1.getUploadFileConcurrency)(); const MAX_CHUNK_SIZE = (0, config_variables_1.getUploadChunkSize)(); - core17.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`); + core18.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`); const parameters = []; let continueOnError = true; if (options) { @@ -120751,15 +120630,15 @@ var require_upload_http_client = __commonJS({ } const startTime = perf_hooks_1.performance.now(); const uploadFileResult = yield this.uploadFileAsync(index, currentFileParameters); - if (core17.isDebug()) { - core17.debug(`File: ${++completedFiles}/${filesToUpload.length}. ${currentFileParameters.file} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish upload`); + if (core18.isDebug()) { + core18.debug(`File: ${++completedFiles}/${filesToUpload.length}. ${currentFileParameters.file} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish upload`); } uploadFileSize += uploadFileResult.successfulUploadSize; totalFileSize += uploadFileResult.totalSize; if (uploadFileResult.isSuccess === false) { failedItemsToReport.push(currentFileParameters.file); if (!continueOnError) { - core17.error(`aborting artifact upload`); + core18.error(`aborting artifact upload`); abortPendingFileUploads = true; } } @@ -120768,7 +120647,7 @@ var require_upload_http_client = __commonJS({ }))); this.statusReporter.stop(); this.uploadHttpManager.disposeAndReplaceAllClients(); - core17.info(`Total size of all the files uploaded is ${uploadFileSize} bytes`); + core18.info(`Total size of all the files uploaded is ${uploadFileSize} bytes`); return { uploadSize: uploadFileSize, totalSize: totalFileSize, @@ -120794,16 +120673,16 @@ var require_upload_http_client = __commonJS({ let uploadFileSize = 0; let isGzip = true; if (!isFIFO && totalFileSize < 65536) { - core17.debug(`${parameters.file} is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size`); + core18.debug(`${parameters.file} is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size`); const buffer = yield (0, upload_gzip_1.createGZipFileInBuffer)(parameters.file); let openUploadStream; if (totalFileSize < buffer.byteLength) { - core17.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); + core18.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); openUploadStream = () => fs17.createReadStream(parameters.file); isGzip = false; uploadFileSize = totalFileSize; } else { - core17.debug(`A gzip file created for ${parameters.file} helped with reducing the size of the original file. The file will be uploaded using gzip.`); + core18.debug(`A gzip file created for ${parameters.file} helped with reducing the size of the original file. The file will be uploaded using gzip.`); openUploadStream = () => { const passThrough = new stream2.PassThrough(); passThrough.end(buffer); @@ -120815,7 +120694,7 @@ var require_upload_http_client = __commonJS({ if (!result) { isUploadSuccessful = false; failedChunkSizes += uploadFileSize; - core17.warning(`Aborting upload for ${parameters.file} due to failure`); + core18.warning(`Aborting upload for ${parameters.file} due to failure`); } return { isSuccess: isUploadSuccessful, @@ -120824,16 +120703,16 @@ var require_upload_http_client = __commonJS({ }; } else { const tempFile = yield tmp.file(); - core17.debug(`${parameters.file} is greater than 64k in size. Creating a gzip file on-disk ${tempFile.path} to potentially reduce the upload size`); + core18.debug(`${parameters.file} is greater than 64k in size. Creating a gzip file on-disk ${tempFile.path} to potentially reduce the upload size`); uploadFileSize = yield (0, upload_gzip_1.createGZipFileOnDisk)(parameters.file, tempFile.path); let uploadFilePath = tempFile.path; if (!isFIFO && totalFileSize < uploadFileSize) { - core17.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); + core18.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); uploadFileSize = totalFileSize; uploadFilePath = parameters.file; isGzip = false; } else { - core17.debug(`The gzip file created for ${parameters.file} is smaller than the original file. The file will be uploaded using gzip.`); + core18.debug(`The gzip file created for ${parameters.file} is smaller than the original file. The file will be uploaded using gzip.`); } let abortFileUpload = false; while (offset < uploadFileSize) { @@ -120853,7 +120732,7 @@ var require_upload_http_client = __commonJS({ if (!result) { isUploadSuccessful = false; failedChunkSizes += chunkSize; - core17.warning(`Aborting upload for ${parameters.file} due to failure`); + core18.warning(`Aborting upload for ${parameters.file} due to failure`); abortFileUpload = true; } else { if (uploadFileSize > 8388608) { @@ -120861,7 +120740,7 @@ var require_upload_http_client = __commonJS({ } } } - core17.debug(`deleting temporary gzip file ${tempFile.path}`); + core18.debug(`deleting temporary gzip file ${tempFile.path}`); yield tempFile.cleanup(); return { isSuccess: isUploadSuccessful, @@ -120900,7 +120779,7 @@ var require_upload_http_client = __commonJS({ if (response) { (0, utils_1.displayHttpDiagnostics)(response); } - core17.info(`Retry limit has been reached for chunk at offset ${start} to ${resourceUrl}`); + core18.info(`Retry limit has been reached for chunk at offset ${start} to ${resourceUrl}`); return true; } return false; @@ -120908,14 +120787,14 @@ var require_upload_http_client = __commonJS({ const backOff = (retryAfterValue) => __awaiter4(this, void 0, void 0, function* () { this.uploadHttpManager.disposeAndReplaceClient(httpClientIndex); if (retryAfterValue) { - core17.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`); + core18.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`); yield (0, utils_1.sleep)(retryAfterValue); } else { const backoffTime = (0, utils_1.getExponentialRetryTimeInMilliseconds)(retryCount); - core17.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the upload at offset ${start}`); + core18.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the upload at offset ${start}`); yield (0, utils_1.sleep)(backoffTime); } - core17.info(`Finished backoff for retry #${retryCount}, continuing with upload`); + core18.info(`Finished backoff for retry #${retryCount}, continuing with upload`); return; }); while (retryCount <= retryLimit) { @@ -120923,7 +120802,7 @@ var require_upload_http_client = __commonJS({ try { response = yield uploadChunkRequest(); } catch (error2) { - core17.info(`An error has been caught http-client index ${httpClientIndex}, retrying the upload`); + core18.info(`An error has been caught http-client index ${httpClientIndex}, retrying the upload`); console.log(error2); if (incrementAndCheckRetryLimit()) { return false; @@ -120935,13 +120814,13 @@ var require_upload_http_client = __commonJS({ if ((0, utils_1.isSuccessStatusCode)(response.message.statusCode)) { return true; } else if ((0, utils_1.isRetryableStatusCode)(response.message.statusCode)) { - core17.info(`A ${response.message.statusCode} status code has been received, will attempt to retry the upload`); + core18.info(`A ${response.message.statusCode} status code has been received, will attempt to retry the upload`); if (incrementAndCheckRetryLimit(response)) { return false; } (0, utils_1.isThrottledStatusCode)(response.message.statusCode) ? yield backOff((0, utils_1.tryGetRetryAfterValueTimeInMilliseconds)(response.message.headers)) : yield backOff(); } else { - core17.error(`Unexpected response. Unable to upload chunk to ${resourceUrl}`); + core18.error(`Unexpected response. Unable to upload chunk to ${resourceUrl}`); (0, utils_1.displayHttpDiagnostics)(response); return false; } @@ -120959,7 +120838,7 @@ var require_upload_http_client = __commonJS({ resourceUrl.searchParams.append("artifactName", artifactName); const parameters = { Size: size }; const data = JSON.stringify(parameters, null, 2); - core17.debug(`URL is ${resourceUrl.toString()}`); + core18.debug(`URL is ${resourceUrl.toString()}`); const client = this.uploadHttpManager.getClient(0); const headers = (0, utils_1.getUploadHeaders)("application/json", false); const customErrorMessages = /* @__PURE__ */ new Map([ @@ -120972,7 +120851,7 @@ var require_upload_http_client = __commonJS({ return client.patch(resourceUrl.toString(), data, headers); }), customErrorMessages); yield response.readBody(); - core17.debug(`Artifact ${artifactName} has been successfully uploaded, total size in bytes: ${size}`); + core18.debug(`Artifact ${artifactName} has been successfully uploaded, total size in bytes: ${size}`); }); } }; @@ -121041,7 +120920,7 @@ var require_download_http_client = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DownloadHttpClient = void 0; var fs17 = __importStar4(require("fs")); - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var zlib3 = __importStar4(require("zlib")); var utils_1 = require_utils14(); var url_1 = require("url"); @@ -121095,11 +120974,11 @@ var require_download_http_client = __commonJS({ downloadSingleArtifact(downloadItems) { return __awaiter4(this, void 0, void 0, function* () { const DOWNLOAD_CONCURRENCY = (0, config_variables_1.getDownloadFileConcurrency)(); - core17.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`); + core18.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`); const parallelDownloads = [...new Array(DOWNLOAD_CONCURRENCY).keys()]; let currentFile = 0; let downloadedFiles = 0; - core17.info(`Total number of files that will be downloaded: ${downloadItems.length}`); + core18.info(`Total number of files that will be downloaded: ${downloadItems.length}`); this.statusReporter.setTotalNumberOfFilesToProcess(downloadItems.length); this.statusReporter.start(); yield Promise.all(parallelDownloads.map((index) => __awaiter4(this, void 0, void 0, function* () { @@ -121108,8 +120987,8 @@ var require_download_http_client = __commonJS({ currentFile += 1; const startTime = perf_hooks_1.performance.now(); yield this.downloadIndividualFile(index, currentFileToDownload.sourceLocation, currentFileToDownload.targetPath); - if (core17.isDebug()) { - core17.debug(`File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish downloading`); + if (core18.isDebug()) { + core18.debug(`File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish downloading`); } this.statusReporter.incrementProcessedCount(); } @@ -121147,19 +121026,19 @@ var require_download_http_client = __commonJS({ } else { this.downloadHttpManager.disposeAndReplaceClient(httpClientIndex); if (retryAfterValue) { - core17.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the download`); + core18.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the download`); yield (0, utils_1.sleep)(retryAfterValue); } else { const backoffTime = (0, utils_1.getExponentialRetryTimeInMilliseconds)(retryCount); - core17.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the download`); + core18.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the download`); yield (0, utils_1.sleep)(backoffTime); } - core17.info(`Finished backoff for retry #${retryCount}, continuing with download`); + core18.info(`Finished backoff for retry #${retryCount}, continuing with download`); } }); const isAllBytesReceived = (expected, received) => { if (!expected || !received || process.env["ACTIONS_ARTIFACT_SKIP_DOWNLOAD_VALIDATION"]) { - core17.info("Skipping download validation."); + core18.info("Skipping download validation."); return true; } return parseInt(expected) === received; @@ -121180,7 +121059,7 @@ var require_download_http_client = __commonJS({ try { response = yield makeDownloadRequest(); } catch (error2) { - core17.info("An error occurred while attempting to download a file"); + core18.info("An error occurred while attempting to download a file"); console.log(error2); yield backOff(); continue; @@ -121200,7 +121079,7 @@ var require_download_http_client = __commonJS({ } } if (forceRetry || (0, utils_1.isRetryableStatusCode)(response.message.statusCode)) { - core17.info(`A ${response.message.statusCode} response code has been received while attempting to download an artifact`); + core18.info(`A ${response.message.statusCode} response code has been received while attempting to download an artifact`); resetDestinationStream(downloadPath); (0, utils_1.isThrottledStatusCode)(response.message.statusCode) ? yield backOff((0, utils_1.tryGetRetryAfterValueTimeInMilliseconds)(response.message.headers)) : yield backOff(); } else { @@ -121222,29 +121101,29 @@ var require_download_http_client = __commonJS({ if (isGzip) { const gunzip = zlib3.createGunzip(); response.message.on("error", (error2) => { - core17.info(`An error occurred while attempting to read the response stream`); + core18.info(`An error occurred while attempting to read the response stream`); gunzip.close(); destinationStream.close(); reject(error2); }).pipe(gunzip).on("error", (error2) => { - core17.info(`An error occurred while attempting to decompress the response stream`); + core18.info(`An error occurred while attempting to decompress the response stream`); destinationStream.close(); reject(error2); }).pipe(destinationStream).on("close", () => { resolve8(); }).on("error", (error2) => { - core17.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); + core18.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); reject(error2); }); } else { response.message.on("error", (error2) => { - core17.info(`An error occurred while attempting to read the response stream`); + core18.info(`An error occurred while attempting to read the response stream`); destinationStream.close(); reject(error2); }).pipe(destinationStream).on("close", () => { resolve8(); }).on("error", (error2) => { - core17.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); + core18.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); reject(error2); }); } @@ -121383,7 +121262,7 @@ var require_artifact_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultArtifactClient = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var upload_specification_1 = require_upload_specification(); var upload_http_client_1 = require_upload_http_client(); var utils_1 = require_utils14(); @@ -121404,7 +121283,7 @@ var require_artifact_client = __commonJS({ */ uploadArtifact(name, files, rootDirectory, options) { return __awaiter4(this, void 0, void 0, function* () { - core17.info(`Starting artifact upload + core18.info(`Starting artifact upload For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`); (0, path_and_artifact_name_validation_1.checkArtifactName)(name); const uploadSpecification = (0, upload_specification_1.getUploadSpecification)(name, rootDirectory, files); @@ -121416,24 +121295,24 @@ For more detailed logs during the artifact upload process, enable step-debugging }; const uploadHttpClient = new upload_http_client_1.UploadHttpClient(); if (uploadSpecification.length === 0) { - core17.warning(`No files found that can be uploaded`); + core18.warning(`No files found that can be uploaded`); } else { const response = yield uploadHttpClient.createArtifactInFileContainer(name, options); if (!response.fileContainerResourceUrl) { - core17.debug(response.toString()); + core18.debug(response.toString()); throw new Error("No URL provided by the Artifact Service to upload an artifact to"); } - core17.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`); - core17.info(`Container for artifact "${name}" successfully created. Starting upload of file(s)`); + core18.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`); + core18.info(`Container for artifact "${name}" successfully created. Starting upload of file(s)`); const uploadResult = yield uploadHttpClient.uploadArtifactToFileContainer(response.fileContainerResourceUrl, uploadSpecification, options); - core17.info(`File upload process has finished. Finalizing the artifact upload`); + core18.info(`File upload process has finished. Finalizing the artifact upload`); yield uploadHttpClient.patchArtifactSize(uploadResult.totalSize, name); if (uploadResult.failedItems.length > 0) { - core17.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`); + core18.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`); } else { - core17.info(`Artifact has been finalized. All files have been successfully uploaded!`); + core18.info(`Artifact has been finalized. All files have been successfully uploaded!`); } - core17.info(` + core18.info(` The raw size of all the files that were specified for upload is ${uploadResult.totalSize} bytes The size of all the files that were uploaded is ${uploadResult.uploadSize} bytes. This takes into account any gzip compression used to reduce the upload size, time and storage @@ -121467,10 +121346,10 @@ Note: The size of downloaded zips can differ significantly from the reported siz path15 = (0, path_1.resolve)(path15); const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path15, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); if (downloadSpecification.filesToDownload.length === 0) { - core17.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); + core18.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); } else { yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure); - core17.info("Directory structure has been set up for the artifact"); + core18.info("Directory structure has been set up for the artifact"); yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate); yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload); } @@ -121486,7 +121365,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz const response = []; const artifacts = yield downloadHttpClient.listArtifacts(); if (artifacts.count === 0) { - core17.info("Unable to find any artifacts for the associated workflow"); + core18.info("Unable to find any artifacts for the associated workflow"); return response; } if (!path15) { @@ -121498,11 +121377,11 @@ Note: The size of downloaded zips can differ significantly from the reported siz while (downloadedArtifacts < artifacts.count) { const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; downloadedArtifacts += 1; - core17.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); + core18.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl); const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path15, true); if (downloadSpecification.filesToDownload.length === 0) { - core17.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); + core18.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); } else { yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure); yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate); @@ -121568,7 +121447,7 @@ var require_internal_glob_options_helper2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -121580,23 +121459,23 @@ var require_internal_glob_options_helper2 = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core17.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core18.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core17.debug(`implicitDescendants '${result.implicitDescendants}'`); + core18.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.matchDirectories === "boolean") { result.matchDirectories = copy.matchDirectories; - core17.debug(`matchDirectories '${result.matchDirectories}'`); + core18.debug(`matchDirectories '${result.matchDirectories}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core17.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core18.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } if (typeof copy.excludeHiddenFiles === "boolean") { result.excludeHiddenFiles = copy.excludeHiddenFiles; - core17.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + core18.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); } } return result; @@ -122280,7 +122159,7 @@ var require_internal_globber2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var fs17 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); var path15 = __importStar4(require("path")); @@ -122333,7 +122212,7 @@ var require_internal_globber2 = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core17.debug(`Search path '${searchPath}'`); + core18.debug(`Search path '${searchPath}'`); try { yield __await4(fs17.promises.lstat(searchPath)); } catch (err) { @@ -122408,7 +122287,7 @@ var require_internal_globber2 = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core17.debug(`Broken symlink '${item.path}'`); + core18.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -122424,7 +122303,7 @@ var require_internal_globber2 = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core17.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core18.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -122517,7 +122396,7 @@ var require_internal_hash_files = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.hashFiles = void 0; var crypto = __importStar4(require("crypto")); - var core17 = __importStar4(require_core()); + var core18 = __importStar4(require_core()); var fs17 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); @@ -122526,7 +122405,7 @@ var require_internal_hash_files = __commonJS({ var _a, e_1, _b, _c; var _d; return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core17.info : core17.debug; + const writeDelegate = verbose ? core18.info : core18.debug; let hasMatch = false; const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const result = crypto.createHash("sha256"); @@ -126852,12 +126731,12 @@ var require_sarif_schema_2_1_0 = __commonJS({ }); // src/init-action-post.ts -var core16 = __toESM(require_core()); +var core17 = __toESM(require_core()); // src/actions-util.ts var fs2 = __toESM(require("fs")); var path2 = __toESM(require("path")); -var core3 = __toESM(require_core()); +var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); @@ -126865,7 +126744,7 @@ var io2 = __toESM(require_io()); // src/util.ts var fs = __toESM(require("fs")); var path = __toESM(require("path")); -var core2 = __toESM(require_core()); +var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -127006,7 +126885,61 @@ function checkDiskSpace(directoryPath, dependencies = { // src/util.ts var import_del = __toESM(require_del()); -var import_get_folder_size = __toESM(require_get_folder_size()); + +// node_modules/get-folder-size/index.js +var import_node_path2 = require("node:path"); +async function getFolderSize(itemPath, options) { + return await core(itemPath, options, { errors: true }); +} +getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); +getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); +async function core(rootItemPath, options = {}, returnType = {}) { + const fs17 = options.fs || await import("node:fs/promises"); + let folderSize = 0n; + const foundInos = /* @__PURE__ */ new Set(); + const errors = []; + await processItem(rootItemPath); + async function processItem(itemPath) { + if (options.ignore?.test(itemPath)) return; + const stats = returnType.strict ? await fs17.lstat(itemPath, { bigint: true }) : await fs17.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + if (typeof stats !== "object") return; + if (!foundInos.has(stats.ino)) { + foundInos.add(stats.ino); + folderSize += stats.size; + } + if (stats.isDirectory()) { + const directoryItems = returnType.strict ? await fs17.readdir(itemPath) : await fs17.readdir(itemPath).catch((error2) => errors.push(error2)); + if (typeof directoryItems !== "object") return; + await Promise.all( + directoryItems.map( + (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) + ) + ); + } + } + if (!options.bigint) { + if (folderSize > BigInt(Number.MAX_SAFE_INTEGER)) { + const error2 = new RangeError( + "The folder size is too large to return as a Number. You can instruct this package to return a BigInt instead." + ); + if (returnType.strict) { + throw error2; + } + errors.push(error2); + folderSize = Number.MAX_SAFE_INTEGER; + } else { + folderSize = Number(folderSize); + } + } + if (returnType.errors) { + return { + size: folderSize, + errors: errors.length > 0 ? errors : null + }; + } else { + return folderSize; + } +} // node_modules/js-yaml/dist/js-yaml.mjs function isNothing(subject) { @@ -127577,7 +127510,7 @@ var json = failsafe.extend({ float ] }); -var core = json; +var core2 = json; var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); @@ -127791,7 +127724,7 @@ var set = new type("tag:yaml.org,2002:set", { resolve: resolveYamlSet, construct: constructYamlSet }); -var _default = core.extend({ +var _default = core2.extend({ implicit: [ timestamp, merge @@ -129681,7 +129614,7 @@ function checkGitHubVersionInRange(version, logger) { ); } hasBeenWarnedAboutVersion = true; - core2.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); + core3.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); } function apiVersionInRange(version, minimumVersion2, maximumVersion2) { if (!semver.satisfies(version, `>=${minimumVersion2}`)) { @@ -129812,7 +129745,7 @@ async function checkDiskUsage(logger) { } else { logger.debug(message); } - core2.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true"); + core3.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true"); } return { numAvailableBytes: diskUsage.free, @@ -129846,13 +129779,13 @@ async function checkSipEnablement(logger) { if (sipStatusOutput.stdout.includes( "System Integrity Protection status: enabled." )) { - core2.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true"); + core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true"); return true; } if (sipStatusOutput.stdout.includes( "System Integrity Protection status: disabled." )) { - core2.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false"); + core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false"); return false; } } @@ -129899,14 +129832,14 @@ async function asyncSome(array, predicate) { // src/actions-util.ts var pkg = require_package(); var getRequiredInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); if (!value) { throw new ConfigurationError(`Input required and not supplied: ${name}`); } return value; }; var getOptionalInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); return value.length > 0 ? value : void 0; }; function getTemporaryDirectory() { @@ -129943,22 +129876,22 @@ async function printDebugLogs(config) { const databaseDirectory = getCodeQLDatabasePath(config, language); const logsDirectory = path2.join(databaseDirectory, "log"); if (!doesDirectoryExist(logsDirectory)) { - core3.info(`Directory ${logsDirectory} does not exist.`); + core4.info(`Directory ${logsDirectory} does not exist.`); continue; } const walkLogFiles = (dir) => { const entries = fs2.readdirSync(dir, { withFileTypes: true }); if (entries.length === 0) { - core3.info(`No debug logs found at directory ${logsDirectory}.`); + core4.info(`No debug logs found at directory ${logsDirectory}.`); } for (const entry of entries) { if (entry.isFile()) { const absolutePath = path2.resolve(dir, entry.name); - core3.startGroup( + core4.startGroup( `CodeQL Debug Logs - ${language} - ${entry.name} from file at path ${absolutePath}` ); process.stdout.write(fs2.readFileSync(absolutePath)); - core3.endGroup(); + core4.endGroup(); } else if (entry.isDirectory()) { walkLogFiles(path2.resolve(dir, entry.name)); } @@ -129979,7 +129912,7 @@ function getUploadValue(input) { case "never": return "never"; default: - core3.warning( + core4.warning( `Unrecognized 'upload' input to 'analyze' Action: ${input}. Defaulting to 'always'.` ); return "always"; @@ -130076,7 +130009,7 @@ async function runTool(cmd, args = [], opts = {}) { } var persistedInputsKey = "persisted_inputs"; var restoreInputs = function() { - const persistedInputs = core3.getState(persistedInputsKey); + const persistedInputs = core4.getState(persistedInputsKey); if (persistedInputs) { for (const [name, value] of JSON.parse(persistedInputs)) { process.env[name] = value; @@ -130085,7 +130018,7 @@ var restoreInputs = function() { }; // src/api-client.ts -var core4 = __toESM(require_core()); +var core5 = __toESM(require_core()); var githubUtils = __toESM(require_utils4()); var retry = __toESM(require_dist_node15()); var import_console_log_level = __toESM(require_console_log_level()); @@ -130190,7 +130123,7 @@ async function getAnalysisKey() { const workflowPath = await getWorkflowRelativePath(); const jobName = getRequiredEnvParam("GITHUB_JOB"); analysisKey = `${workflowPath}:${jobName}`; - core4.exportVariable(analysisKeyEnvVar, analysisKey); + core5.exportVariable(analysisKeyEnvVar, analysisKey); return analysisKey; } function computeAutomationID(analysis_key, environment) { @@ -130223,7 +130156,7 @@ function wrapApiConfigurationError(e) { // src/codeql.ts var fs10 = __toESM(require("fs")); var path9 = __toESM(require("path")); -var core9 = __toESM(require_core()); +var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); // src/cli-errors.ts @@ -130477,7 +130410,7 @@ var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var supportedAnalysisKinds = new Set(Object.values(AnalysisKind)); // src/caching-utils.ts -var core5 = __toESM(require_core()); +var core6 = __toESM(require_core()); // src/diff-informed-analysis-utils.ts var fs5 = __toESM(require("fs")); @@ -130498,13 +130431,13 @@ var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts -var core6 = __toESM(require_core()); +var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; - core6.debug(`Running git command: git ${args.join(" ")}`); + core7.debug(`Running git command: git ${args.join(" ")}`); try { await new toolrunner2.ToolRunner(await io3.which("git", true), args, { silent: true, @@ -130524,7 +130457,7 @@ var runGitCommand = async function(workingDirectory, args, customErrorMessage) { if (stderr.includes("not a git repository")) { reason = "The checkout path provided to the action does not appear to be a git repository."; } - core6.info(`git call failed. ${customErrorMessage} Error: ${reason}`); + core7.info(`git call failed. ${customErrorMessage} Error: ${reason}`); throw error2; } }; @@ -130669,7 +130602,7 @@ async function getRef() { ) !== head; if (hasChangedRef) { const newRef = ref.replace(pull_ref_regex, "refs/pull/$1/head"); - core6.debug( + core7.debug( `No longer on merge commit, rewriting ref from ${ref} to ${newRef}.` ); return newRef; @@ -130695,16 +130628,16 @@ async function isAnalyzingDefaultBranch() { } // src/logging.ts -var core7 = __toESM(require_core()); +var core8 = __toESM(require_core()); function getActionsLogger() { - return core7; + return core8; } function withGroup(groupName, f) { - core7.startGroup(groupName); + core8.startGroup(groupName); try { return f(); } finally { - core7.endGroup(); + core8.endGroup(); } } function formatDuration(durationMs) { @@ -131560,7 +131493,7 @@ var fs8 = __toESM(require("fs")); var os = __toESM(require("os")); var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); -var core8 = __toESM(require_core()); +var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); @@ -131614,10 +131547,10 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } } catch (e) { - core8.warning( + core9.warning( `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}` ); - core8.warning(`Falling back to downloading the bundle before extracting.`); + core9.warning(`Falling back to downloading the bundle before extracting.`); await cleanUpGlob(dest, "CodeQL bundle", logger); } const toolsDownloadStart = import_perf_hooks.performance.now(); @@ -132665,12 +132598,12 @@ ${output}` ); } else if (checkVersion && process.env["CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */] !== "true" && !await codeQlVersionAtLeast(codeql, CODEQL_NEXT_MINIMUM_VERSION)) { const result = await codeql.getVersion(); - core9.warning( + core10.warning( `CodeQL CLI version ${result.version} was discontinued on ${GHES_MOST_RECENT_DEPRECATION_DATE} alongside GitHub Enterprise Server ${GHES_VERSION_MOST_RECENTLY_DEPRECATED} and will not be supported by the next minor release of the CodeQL Action. Please update to CodeQL CLI version ${CODEQL_NEXT_MINIMUM_VERSION} or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version. Alternatively, if you want to continue using CodeQL CLI version ${result.version}, you can replace 'github/codeql-action/*@v${getActionVersion().split(".")[0]}' by 'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to continue using this version of the CodeQL Action.` ); - core9.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); + core10.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); } return codeql; } @@ -132780,7 +132713,7 @@ var fs12 = __toESM(require("fs")); var path11 = __toESM(require("path")); var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); -var core11 = __toESM(require_core()); +var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); var import_del3 = __toESM(require_del()); @@ -132791,7 +132724,7 @@ var io5 = __toESM(require_io()); var import_del2 = __toESM(require_del()); // src/autobuild.ts -var core10 = __toESM(require_core()); +var core11 = __toESM(require_core()); // src/dependency-caching.ts var actionsCache3 = __toESM(require_cache3()); @@ -132938,7 +132871,7 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV } const uploadSupported = isSafeArtifactUpload(codeQlVersion); if (!uploadSupported) { - core11.info( + core12.info( `Skipping debug artifact upload because the current CLI does not support safe upload. Please upgrade to CLI v${SafeArtifactUploadVersion} or later.` ); return "upload-not-supported"; @@ -132952,7 +132885,7 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV ).sort()) suffix += `-${matrixVal}`; } catch { - core11.info( + core12.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." ); } @@ -132970,7 +132903,7 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV ); return "upload-successful"; } catch (e) { - core11.warning(`Failed to upload debug artifacts: ${e}`); + core12.warning(`Failed to upload debug artifacts: ${e}`); return "upload-failed"; } } @@ -132993,7 +132926,7 @@ async function createPartialDatabaseBundle(config, language) { config.dbLocation, `${config.debugDatabaseName}-${language}-partial.zip` ); - core11.info( + core12.info( `${config.debugDatabaseName}-${language} is not finalized. Uploading partial database bundle at ${databaseBundlePath}...` ); if (fs12.existsSync(databaseBundlePath)) { @@ -133026,12 +132959,12 @@ async function createDatabaseBundleCli(codeql, config, language) { // src/init-action-post-helper.ts var fs16 = __toESM(require("fs")); -var core15 = __toESM(require_core()); +var core16 = __toESM(require_core()); var github2 = __toESM(require_github()); // src/status-report.ts var os2 = __toESM(require("os")); -var core12 = __toESM(require_core()); +var core13 = __toESM(require_core()); function isFirstPartyAnalysis(actionName) { if (actionName !== "upload-sarif" /* UploadSarif */) { return true; @@ -133068,12 +133001,12 @@ function getJobStatusDisplayName(status) { } function setJobStatusIfUnsuccessful(actionStatus) { if (actionStatus === "user-error") { - core12.exportVariable( + core13.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_CONFIGURATION_ERROR" /* ConfigErrorStatus */ ); } else if (actionStatus === "failure" || actionStatus === "aborted") { - core12.exportVariable( + core13.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_FAILURE" /* FailureStatus */ ); @@ -133092,14 +133025,14 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi let workflowStartedAt = process.env["CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */]; if (workflowStartedAt === void 0) { workflowStartedAt = actionStartedAt.toISOString(); - core12.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt); + core13.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt); } const runnerOs = getRequiredEnvParam("RUNNER_OS"); const codeQlCliVersion = getCachedCodeQlVersion(); const actionRef = process.env["GITHUB_ACTION_REF"] || ""; const testingEnvironment = getTestingEnvironment(); if (testingEnvironment) { - core12.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment); + core13.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment); } const isSteadyStateDefaultSetupRun = process.env["CODE_SCANNING_IS_STEADY_STATE_DEFAULT_SETUP"] === "true"; const statusReport = { @@ -133177,9 +133110,9 @@ var INCOMPATIBLE_MSG = "CodeQL Action version is incompatible with the code scan async function sendStatusReport(statusReport) { setJobStatusIfUnsuccessful(statusReport.status); const statusReportJSON = JSON.stringify(statusReport); - core12.debug(`Sending status report: ${statusReportJSON}`); + core13.debug(`Sending status report: ${statusReportJSON}`); if (isInTestMode()) { - core12.debug("In test mode. Status reports are not uploaded."); + core13.debug("In test mode. Status reports are not uploaded."); return; } const nwo = getRepositoryNwo(); @@ -133198,26 +133131,26 @@ async function sendStatusReport(statusReport) { switch (e.status) { case 403: if (getWorkflowEventName() === "push" && process.env["GITHUB_ACTOR"] === "dependabot[bot]") { - core12.warning( + core13.warning( `Workflows triggered by Dependabot on the "push" event run with read-only access. Uploading Code Scanning results requires write access. To use Code Scanning with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. See ${"https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push" /* SCANNING_ON_PUSH */} for more information on how to configure these events.` ); } else { - core12.warning(e.message); + core13.warning(e.message); } return; case 404: - core12.warning(e.message); + core13.warning(e.message); return; case 422: if (getRequiredEnvParam("GITHUB_SERVER_URL") !== GITHUB_DOTCOM_URL) { - core12.debug(INCOMPATIBLE_MSG); + core13.debug(INCOMPATIBLE_MSG); } else { - core12.debug(OUT_OF_DATE_MSG); + core13.debug(OUT_OF_DATE_MSG); } return; } } - core12.warning( + core13.warning( `An unexpected error occurred when sending code scanning status report: ${getErrorMessage( e )}` @@ -133229,7 +133162,7 @@ async function sendStatusReport(statusReport) { var fs14 = __toESM(require("fs")); var path13 = __toESM(require("path")); var import_zlib = __toESM(require("zlib")); -var core13 = __toESM(require_core()); +var core14 = __toESM(require_core()); var import_file_url = __toESM(require_file_url()); var jsonschema = __toESM(require_lib5()); @@ -134486,7 +134419,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo logger.warning( `Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}` ); - core13.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); + core14.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); } return combineSarifFiles(sarifFiles, logger); } @@ -134536,7 +134469,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo logger.warning( `Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage} for CodeQL CLI 2.16.6 and earlier. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}` ); - core13.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); + core14.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); } return combineSarifFiles(sarifFiles, logger); } @@ -134601,13 +134534,13 @@ async function uploadPayload(payload, repositoryNwo, logger, target) { if (isHTTPError(e)) { switch (e.status) { case 403: - core13.warning(e.message || GENERIC_403_MSG); + core14.warning(e.message || GENERIC_403_MSG); break; case 404: - core13.warning(e.message || GENERIC_404_MSG); + core14.warning(e.message || GENERIC_404_MSG); break; default: - core13.warning(e.message); + core14.warning(e.message); break; } } @@ -134953,7 +134886,7 @@ function validateUniqueCategory(sarif, sentinelPrefix = CodeScanningTarget.senti `Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. The easiest fix is to specify a unique value for the \`category\` input. If .runs[].automationDetails.id is specified in the sarif file, that will take precedence over your configured \`category\`. Category: (${id ? id : "none"}) Tool: (${tool ? tool : "none"})` ); } - core13.exportVariable(sentinelEnvVar, sentinelEnvVar); + core14.exportVariable(sentinelEnvVar, sentinelEnvVar); } } function sanitize(str2) { @@ -134998,7 +134931,7 @@ function filterAlertsByDiffRange(logger, sarif) { var fs15 = __toESM(require("fs")); var path14 = __toESM(require("path")); var import_zlib2 = __toESM(require("zlib")); -var core14 = __toESM(require_core()); +var core15 = __toESM(require_core()); function toCodedErrors(errors) { return Object.entries(errors).reduce( (acc, [code, message]) => { @@ -135175,7 +135108,7 @@ async function maybeUploadFailedSarif(config, repositoryNwo, features, logger) { } async function tryUploadSarifIfRunFailed(config, repositoryNwo, features, logger) { if (process.env["CODEQL_ACTION_ANALYZE_DID_COMPLETE_SUCCESSFULLY" /* ANALYZE_DID_COMPLETE_SUCCESSFULLY */] !== "true") { - core15.exportVariable( + core16.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_CONFIGURATION_ERROR" /* ConfigErrorStatus */ ); @@ -135193,7 +135126,7 @@ async function tryUploadSarifIfRunFailed(config, repositoryNwo, features, logger return createFailedUploadFailedSarifResult(e); } } else { - core15.exportVariable( + core16.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_SUCCESS" /* SuccessStatus */ ); @@ -135367,7 +135300,7 @@ async function runWrapper() { } } catch (unwrappedError) { const error2 = wrapError(unwrappedError); - core16.setFailed(error2.message); + core17.setFailed(error2.message); const statusReportBase2 = await createStatusReportBase( "init-post" /* InitPost */, getActionsStatus(error2), diff --git a/lib/init-action.js b/lib/init-action.js index 051cbe02d..b0e4427f4 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -10754,7 +10754,7 @@ var require_mock_interceptor = __commonJS({ var require_mock_client = __commonJS({ "node_modules/undici/lib/mock/mock-client.js"(exports2, module2) { "use strict"; - var { promisify: promisify3 } = require("util"); + var { promisify: promisify2 } = require("util"); var Client = require_client(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10794,7 +10794,7 @@ var require_mock_client = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify3(this[kOriginalClose])(); + await promisify2(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10807,7 +10807,7 @@ var require_mock_client = __commonJS({ var require_mock_pool = __commonJS({ "node_modules/undici/lib/mock/mock-pool.js"(exports2, module2) { "use strict"; - var { promisify: promisify3 } = require("util"); + var { promisify: promisify2 } = require("util"); var Pool = require_pool(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10847,7 +10847,7 @@ var require_mock_pool = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify3(this[kOriginalClose])(); + await promisify2(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -31839,14 +31839,14 @@ var require_out4 = __commonJS({ var require_path_type = __commonJS({ "node_modules/path-type/index.js"(exports2) { "use strict"; - var { promisify: promisify3 } = require("util"); + var { promisify: promisify2 } = require("util"); var fs15 = require("fs"); async function isType(fsStatType, statsMethodName, filePath) { if (typeof filePath !== "string") { throw new TypeError(`Expected a string, got ${typeof filePath}`); } try { - const stats = await promisify3(fs15[fsStatType])(filePath); + const stats = await promisify2(fs15[fsStatType])(filePath); return stats[statsMethodName](); } catch (error2) { if (error2.code === "ENOENT") { @@ -32339,7 +32339,7 @@ var require_slash = __commonJS({ var require_gitignore = __commonJS({ "node_modules/globby/gitignore.js"(exports2, module2) { "use strict"; - var { promisify: promisify3 } = require("util"); + var { promisify: promisify2 } = require("util"); var fs15 = require("fs"); var path15 = require("path"); var fastGlob = require_out4(); @@ -32351,7 +32351,7 @@ var require_gitignore = __commonJS({ "**/coverage/**", "**/.git" ]; - var readFileP = promisify3(fs15.readFile); + var readFileP = promisify2(fs15.readFile); var mapGitIgnorePatternTo = (base) => (ignore) => { if (ignore.startsWith("!")) { return "!" + path15.posix.join(base, ignore.slice(1)); @@ -36135,7 +36135,7 @@ var require_p_map = __commonJS({ var require_del = __commonJS({ "node_modules/del/index.js"(exports2, module2) { "use strict"; - var { promisify: promisify3 } = require("util"); + var { promisify: promisify2 } = require("util"); var path15 = require("path"); var globby = require_globby(); var isGlob = require_is_glob(); @@ -36145,7 +36145,7 @@ var require_del = __commonJS({ var isPathInside = require_is_path_inside(); var rimraf = require_rimraf(); var pMap = require_p_map(); - var rimrafP = promisify3(rimraf); + var rimrafP = promisify2(rimraf); var rimrafOptions = { glob: false, unlink: gracefulFs.unlink, @@ -36244,127 +36244,6 @@ var require_del = __commonJS({ } }); -// node_modules/tiny-each-async/index.js -var require_tiny_each_async = __commonJS({ - "node_modules/tiny-each-async/index.js"(exports2, module2) { - "use strict"; - module2.exports = function eachAsync(arr, parallelLimit, iteratorFn, cb) { - var pending = 0; - var index = 0; - var lastIndex = arr.length - 1; - var called = false; - var limit; - var callback; - var iterate; - if (typeof parallelLimit === "number") { - limit = parallelLimit; - iterate = iteratorFn; - callback = cb || function noop() { - }; - } else { - iterate = parallelLimit; - callback = iteratorFn || function noop() { - }; - limit = arr.length; - } - if (!arr.length) { - return callback(); - } - var iteratorLength = iterate.length; - var shouldCallNextIterator = function shouldCallNextIterator2() { - return !called && pending < limit && index < lastIndex; - }; - var iteratorCallback = function iteratorCallback2(err) { - if (called) { - return; - } - pending--; - if (err || index === lastIndex && !pending) { - called = true; - callback(err); - } else if (shouldCallNextIterator()) { - processIterator(++index); - } - }; - var processIterator = function processIterator2() { - pending++; - var args = iteratorLength === 2 ? [arr[index], iteratorCallback] : [arr[index], index, iteratorCallback]; - iterate.apply(null, args); - if (shouldCallNextIterator()) { - processIterator2(++index); - } - }; - processIterator(); - }; - } -}); - -// node_modules/get-folder-size/index.js -var require_get_folder_size = __commonJS({ - "node_modules/get-folder-size/index.js"(exports2, module2) { - "use strict"; - var fs15 = require("fs"); - var path15 = require("path"); - var eachAsync = require_tiny_each_async(); - function readSizeRecursive(seen, item, ignoreRegEx, callback) { - let cb; - let ignoreRegExp; - if (!callback) { - cb = ignoreRegEx; - ignoreRegExp = null; - } else { - cb = callback; - ignoreRegExp = ignoreRegEx; - } - fs15.lstat(item, function lstat(e, stats) { - let total = !e ? stats.size || 0 : 0; - if (stats) { - if (seen.has(stats.ino)) { - return cb(null, 0); - } - seen.add(stats.ino); - } - if (!e && stats.isDirectory()) { - fs15.readdir(item, (err, list) => { - if (err) { - return cb(err); - } - eachAsync( - list, - 5e3, - (dirItem, next) => { - readSizeRecursive( - seen, - path15.join(item, dirItem), - ignoreRegExp, - (error2, size) => { - if (!error2) { - total += size; - } - next(error2); - } - ); - }, - (finalErr) => { - cb(finalErr, total); - } - ); - }); - } else { - if (ignoreRegExp && ignoreRegExp.test(item)) { - total = 0; - } - cb(e, total); - } - }); - } - module2.exports = (...args) => { - args.unshift(/* @__PURE__ */ new Set()); - return readSizeRecursive(...args); - }; - } -}); - // package.json var require_package = __commonJS({ "package.json"(exports2, module2) { @@ -36412,7 +36291,7 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", @@ -38076,7 +37955,7 @@ var require_internal_glob_options_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -38086,15 +37965,15 @@ var require_internal_glob_options_helper = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core13.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core13.debug(`implicitDescendants '${result.implicitDescendants}'`); + core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; @@ -38758,7 +38637,7 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs15 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); var path15 = __importStar4(require("path")); @@ -38809,7 +38688,7 @@ var require_internal_globber = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core13.debug(`Search path '${searchPath}'`); + core14.debug(`Search path '${searchPath}'`); try { yield __await4(fs15.promises.lstat(searchPath)); } catch (err) { @@ -38881,7 +38760,7 @@ var require_internal_globber = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core13.debug(`Broken symlink '${item.path}'`); + core14.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -38897,7 +38776,7 @@ var require_internal_globber = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -40221,7 +40100,7 @@ var require_cacheUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob2 = __importStar4(require_glob2()); var io7 = __importStar4(require_io()); @@ -40274,7 +40153,7 @@ var require_cacheUtils = __commonJS({ _e = false; const file = _c; const relativeFile = path15.relative(workspace, file).replace(new RegExp(`\\${path15.sep}`, "g"), "/"); - core13.debug(`Matched: ${relativeFile}`); + core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { @@ -40304,7 +40183,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); - core13.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec2.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, @@ -40315,10 +40194,10 @@ var require_cacheUtils = __commonJS({ } }); } catch (err) { - core13.debug(err.message); + core14.debug(err.message); } versionOutput = versionOutput.trim(); - core13.debug(versionOutput); + core14.debug(versionOutput); return versionOutput; }); } @@ -40326,7 +40205,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver9.clean(versionOutput); - core13.debug(`zstd version: ${version}`); + core14.debug(`zstd version: ${version}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -75638,7 +75517,7 @@ var require_uploadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var storage_blob_1 = require_dist7(); var errors_1 = require_errors2(); var UploadProgress = class { @@ -75680,7 +75559,7 @@ var require_uploadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core13.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + core14.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -75735,14 +75614,14 @@ var require_uploadUtils = __commonJS({ }; try { uploadProgress.startDisplayTimer(); - core13.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + core14.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); if (response._response.status >= 400) { throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); } return response; } catch (error2) { - core13.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); + core14.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); throw error2; } finally { uploadProgress.stopDisplayTimer(); @@ -75813,7 +75692,7 @@ var require_requestUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var constants_1 = require_constants10(); function isSuccessStatusCode(statusCode) { @@ -75874,9 +75753,9 @@ var require_requestUtils = __commonJS({ isRetryable = isRetryableStatusCode(statusCode); errorMessage = `Cache service responded with ${statusCode}`; } - core13.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core14.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); if (!isRetryable) { - core13.debug(`${name} - Error is not retryable`); + core14.debug(`${name} - Error is not retryable`); break; } yield sleep(delay2); @@ -75981,7 +75860,7 @@ var require_downloadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); @@ -76019,7 +75898,7 @@ var require_downloadUtils = __commonJS({ this.segmentIndex = this.segmentIndex + 1; this.segmentSize = segmentSize; this.receivedBytes = 0; - core13.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + core14.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); } /** * Sets the number of bytes received for the current segment. @@ -76053,7 +75932,7 @@ var require_downloadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core13.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + core14.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -76103,7 +75982,7 @@ var require_downloadUtils = __commonJS({ })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { downloadResponse.message.destroy(); - core13.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + core14.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); }); yield pipeResponseToStream(downloadResponse, writeStream); const contentLengthHeader = downloadResponse.message.headers["content-length"]; @@ -76114,7 +75993,7 @@ var require_downloadUtils = __commonJS({ throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); } } else { - core13.debug("Unable to validate download, no Content-Length header"); + core14.debug("Unable to validate download, no Content-Length header"); } }); } @@ -76234,7 +76113,7 @@ var require_downloadUtils = __commonJS({ const properties = yield client.getProperties(); const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; if (contentLength < 0) { - core13.debug("Unable to determine content length, downloading file with http-client..."); + core14.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); @@ -76314,7 +76193,7 @@ var require_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -76334,9 +76213,9 @@ var require_options = __commonJS({ } result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; - core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core13.debug(`Upload concurrency: ${result.uploadConcurrency}`); - core13.debug(`Upload chunk size: ${result.uploadChunkSize}`); + core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core14.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } exports2.getUploadOptions = getUploadOptions; @@ -76373,12 +76252,12 @@ var require_options = __commonJS({ if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) { result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; } - core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core13.debug(`Download concurrency: ${result.downloadConcurrency}`); - core13.debug(`Request timeout (ms): ${result.timeoutInMs}`); - core13.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); - core13.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); - core13.debug(`Lookup only: ${result.lookupOnly}`); + core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core14.debug(`Download concurrency: ${result.downloadConcurrency}`); + core14.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core14.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); + core14.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core14.debug(`Lookup only: ${result.lookupOnly}`); return result; } exports2.getDownloadOptions = getDownloadOptions; @@ -76558,7 +76437,7 @@ var require_cacheHttpClient = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); var fs15 = __importStar4(require("fs")); @@ -76576,7 +76455,7 @@ var require_cacheHttpClient = __commonJS({ throw new Error("Cache Service Url not found, unable to restore cache."); } const url = `${baseUrl}_apis/artifactcache/${resource}`; - core13.debug(`Resource Url: ${url}`); + core14.debug(`Resource Url: ${url}`); return url; } function createAcceptHeader(type2, apiVersion) { @@ -76604,7 +76483,7 @@ var require_cacheHttpClient = __commonJS({ return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { - if (core13.isDebug()) { + if (core14.isDebug()) { yield printCachesListForDiagnostics(keys[0], httpClient, version); } return null; @@ -76617,9 +76496,9 @@ var require_cacheHttpClient = __commonJS({ if (!cacheDownloadUrl) { throw new Error("Cache not found."); } - core13.setSecret(cacheDownloadUrl); - core13.debug(`Cache Result:`); - core13.debug(JSON.stringify(cacheResult)); + core14.setSecret(cacheDownloadUrl); + core14.debug(`Cache Result:`); + core14.debug(JSON.stringify(cacheResult)); return cacheResult; }); } @@ -76634,10 +76513,10 @@ var require_cacheHttpClient = __commonJS({ const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { - core13.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key + core14.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { - core13.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); + core14.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); } } } @@ -76682,7 +76561,7 @@ Other caches with similar key:`); } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter4(this, void 0, void 0, function* () { - core13.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) @@ -76704,7 +76583,7 @@ Other caches with similar key:`); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); const parallelUploads = [...new Array(concurrency).keys()]; - core13.debug("Awaiting all uploads"); + core14.debug("Awaiting all uploads"); let offset = 0; try { yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { @@ -76747,16 +76626,16 @@ Other caches with similar key:`); yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); } else { const httpClient = createHttpClient(); - core13.debug("Upload cache"); + core14.debug("Upload cache"); yield uploadFile(httpClient, cacheId, archivePath, options); - core13.debug("Commiting cache"); + core14.debug("Commiting cache"); const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + core14.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); } - core13.info("Cache saved successfully"); + core14.info("Cache saved successfully"); } }); } @@ -82182,7 +82061,7 @@ var require_cache3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var path15 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); @@ -82235,7 +82114,7 @@ var require_cache3 = __commonJS({ function restoreCache4(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core13.debug(`Cache service version: ${cacheServiceVersion}`); + core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); switch (cacheServiceVersion) { case "v2": @@ -82251,8 +82130,8 @@ var require_cache3 = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core13.debug("Resolved Keys:"); - core13.debug(JSON.stringify(keys)); + core14.debug("Resolved Keys:"); + core14.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82270,19 +82149,19 @@ var require_cache3 = __commonJS({ return void 0; } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core13.info("Lookup only - skipping download"); + core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core13.info("Cache restored successfully"); + core14.info("Cache restored successfully"); return cacheEntry.cacheKey; } catch (error2) { const typedError = error2; @@ -82290,16 +82169,16 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to restore: ${error2.message}`); + core14.error(`Failed to restore: ${error2.message}`); } else { - core13.warning(`Failed to restore: ${error2.message}`); + core14.warning(`Failed to restore: ${error2.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82310,8 +82189,8 @@ var require_cache3 = __commonJS({ options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core13.debug("Resolved Keys:"); - core13.debug(JSON.stringify(keys)); + core14.debug("Resolved Keys:"); + core14.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82329,30 +82208,30 @@ var require_cache3 = __commonJS({ }; const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core13.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); + core14.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); return void 0; } const isRestoreKeyMatch = request.key !== response.matchedKey; if (isRestoreKeyMatch) { - core13.info(`Cache hit for restore-key: ${response.matchedKey}`); + core14.info(`Cache hit for restore-key: ${response.matchedKey}`); } else { - core13.info(`Cache hit for: ${response.matchedKey}`); + core14.info(`Cache hit for: ${response.matchedKey}`); } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core13.info("Lookup only - skipping download"); + core14.info("Lookup only - skipping download"); return response.matchedKey; } archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive path: ${archivePath}`); - core13.debug(`Starting download of archive to: ${archivePath}`); + core14.debug(`Archive path: ${archivePath}`); + core14.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - if (core13.isDebug()) { + core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core13.info("Cache restored successfully"); + core14.info("Cache restored successfully"); return response.matchedKey; } catch (error2) { const typedError = error2; @@ -82360,9 +82239,9 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to restore: ${error2.message}`); + core14.error(`Failed to restore: ${error2.message}`); } else { - core13.warning(`Failed to restore: ${error2.message}`); + core14.warning(`Failed to restore: ${error2.message}`); } } } finally { @@ -82371,7 +82250,7 @@ var require_cache3 = __commonJS({ yield utils.unlinkFile(archivePath); } } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82380,7 +82259,7 @@ var require_cache3 = __commonJS({ function saveCache4(paths, key, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core13.debug(`Cache service version: ${cacheServiceVersion}`); + core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); checkKey(key); switch (cacheServiceVersion) { @@ -82399,26 +82278,26 @@ var require_cache3 = __commonJS({ const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core13.debug("Cache Paths:"); - core13.debug(`${JSON.stringify(cachePaths)}`); + core14.debug("Cache Paths:"); + core14.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const fileSizeLimit = 10 * 1024 * 1024 * 1024; const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.debug(`File Size: ${archiveFileSize}`); + core14.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } - core13.debug("Reserving Cache"); + core14.debug("Reserving Cache"); const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { compressionMethod, enableCrossOsArchive, @@ -82431,26 +82310,26 @@ var require_cache3 = __commonJS({ } else { throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); } - core13.debug(`Saving Cache (ID: ${cacheId})`); + core14.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); } catch (error2) { const typedError = error2; if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError2.name) { - core13.info(`Failed to save: ${typedError.message}`); + core14.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to save: ${typedError.message}`); + core14.error(`Failed to save: ${typedError.message}`); } else { - core13.warning(`Failed to save: ${typedError.message}`); + core14.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82463,26 +82342,26 @@ var require_cache3 = __commonJS({ const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core13.debug("Cache Paths:"); - core13.debug(`${JSON.stringify(cachePaths)}`); + core14.debug("Cache Paths:"); + core14.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.debug(`File Size: ${archiveFileSize}`); + core14.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } options.archiveSizeBytes = archiveFileSize; - core13.debug("Reserving Cache"); + core14.debug("Reserving Cache"); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const request = { key, @@ -82496,10 +82375,10 @@ var require_cache3 = __commonJS({ } signedUploadUrl = response.signedUploadUrl; } catch (error2) { - core13.debug(`Failed to reserve cache: ${error2}`); + core14.debug(`Failed to reserve cache: ${error2}`); throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } - core13.debug(`Attempting to upload cache located at: ${archivePath}`); + core14.debug(`Attempting to upload cache located at: ${archivePath}`); yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); const finalizeRequest = { key, @@ -82507,7 +82386,7 @@ var require_cache3 = __commonJS({ sizeBytes: `${archiveFileSize}` }; const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); - core13.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); if (!finalizeResponse.ok) { throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); } @@ -82517,19 +82396,19 @@ var require_cache3 = __commonJS({ if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError2.name) { - core13.info(`Failed to save: ${typedError.message}`); + core14.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to save: ${typedError.message}`); + core14.error(`Failed to save: ${typedError.message}`); } else { - core13.warning(`Failed to save: ${typedError.message}`); + core14.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82571,7 +82450,7 @@ var require_internal_glob_options_helper2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -82583,23 +82462,23 @@ var require_internal_glob_options_helper2 = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core13.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core13.debug(`implicitDescendants '${result.implicitDescendants}'`); + core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.matchDirectories === "boolean") { result.matchDirectories = copy.matchDirectories; - core13.debug(`matchDirectories '${result.matchDirectories}'`); + core14.debug(`matchDirectories '${result.matchDirectories}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } if (typeof copy.excludeHiddenFiles === "boolean") { result.excludeHiddenFiles = copy.excludeHiddenFiles; - core13.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); } } return result; @@ -83283,7 +83162,7 @@ var require_internal_globber2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs15 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); var path15 = __importStar4(require("path")); @@ -83336,7 +83215,7 @@ var require_internal_globber2 = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core13.debug(`Search path '${searchPath}'`); + core14.debug(`Search path '${searchPath}'`); try { yield __await4(fs15.promises.lstat(searchPath)); } catch (err) { @@ -83411,7 +83290,7 @@ var require_internal_globber2 = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core13.debug(`Broken symlink '${item.path}'`); + core14.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -83427,7 +83306,7 @@ var require_internal_globber2 = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -83520,7 +83399,7 @@ var require_internal_hash_files = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.hashFiles = void 0; var crypto = __importStar4(require("crypto")); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs15 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); @@ -83529,7 +83408,7 @@ var require_internal_hash_files = __commonJS({ var _a, e_1, _b, _c; var _d; return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core13.info : core13.debug; + const writeDelegate = verbose ? core14.info : core14.debug; let hasMatch = false; const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const result = crypto.createHash("sha256"); @@ -83834,7 +83713,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -83857,10 +83736,10 @@ var require_retry_helper = __commonJS({ if (isRetryable && !isRetryable(err)) { throw err; } - core13.info(err.message); + core14.info(err.message); } const seconds = this.getSleepAmount(); - core13.info(`Waiting ${seconds} seconds before trying again`); + core14.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } @@ -83940,7 +83819,7 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var io7 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs15 = __importStar4(require("fs")); @@ -83969,8 +83848,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { dest = dest || path15.join(_getTempDirectory(), crypto.randomUUID()); yield io7.mkdirP(path15.dirname(dest)); - core13.debug(`Downloading ${url}`); - core13.debug(`Destination ${dest}`); + core14.debug(`Downloading ${url}`); + core14.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); @@ -83997,7 +83876,7 @@ var require_tool_cache = __commonJS({ allowRetries: false }); if (auth) { - core13.debug("set auth"); + core14.debug("set auth"); if (headers === void 0) { headers = {}; } @@ -84006,7 +83885,7 @@ var require_tool_cache = __commonJS({ const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core13.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core14.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -84015,16 +83894,16 @@ var require_tool_cache = __commonJS({ let succeeded = false; try { yield pipeline(readStream, fs15.createWriteStream(dest)); - core13.debug("download complete"); + core14.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { - core13.debug("download failed"); + core14.debug("download failed"); try { yield io7.rmRF(dest); } catch (err) { - core13.debug(`Failed to delete '${dest}'. ${err.message}`); + core14.debug(`Failed to delete '${dest}'. ${err.message}`); } } } @@ -84039,7 +83918,7 @@ var require_tool_cache = __commonJS({ process.chdir(dest); if (_7zPath) { try { - const logLevel = core13.isDebug() ? "-bb1" : "-bb0"; + const logLevel = core14.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, @@ -84089,7 +83968,7 @@ var require_tool_cache = __commonJS({ throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); - core13.debug("Checking tar --version"); + core14.debug("Checking tar --version"); let versionOutput = ""; yield (0, exec_1.exec)("tar --version", [], { ignoreReturnCode: true, @@ -84099,7 +83978,7 @@ var require_tool_cache = __commonJS({ stderr: (data) => versionOutput += data.toString() } }); - core13.debug(versionOutput.trim()); + core14.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { @@ -84107,7 +83986,7 @@ var require_tool_cache = __commonJS({ } else { args = [flags]; } - if (core13.isDebug() && !flags.includes("v")) { + if (core14.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; @@ -84139,7 +84018,7 @@ var require_tool_cache = __commonJS({ args = [flags]; } args.push("-x", "-C", dest, "-f", file); - if (core13.isDebug()) { + if (core14.isDebug()) { args.push("-v"); } const xarPath = yield io7.which("xar", true); @@ -84184,7 +84063,7 @@ var require_tool_cache = __commonJS({ "-Command", pwshCommand ]; - core13.debug(`Using pwsh at path: ${pwshPath}`); + core14.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { const powershellCommand = [ @@ -84204,7 +84083,7 @@ var require_tool_cache = __commonJS({ powershellCommand ]; const powershellPath = yield io7.which("powershell", true); - core13.debug(`Using powershell at path: ${powershellPath}`); + core14.debug(`Using powershell at path: ${powershellPath}`); yield (0, exec_1.exec)(`"${powershellPath}"`, args); } }); @@ -84213,7 +84092,7 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const unzipPath = yield io7.which("unzip", true); const args = [file]; - if (!core13.isDebug()) { + if (!core14.isDebug()) { args.unshift("-q"); } args.unshift("-o"); @@ -84224,8 +84103,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver9.clean(version) || version; arch2 = arch2 || os5.arch(); - core13.debug(`Caching tool ${tool} ${version} ${arch2}`); - core13.debug(`source dir: ${sourceDir}`); + core14.debug(`Caching tool ${tool} ${version} ${arch2}`); + core14.debug(`source dir: ${sourceDir}`); if (!fs15.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } @@ -84243,14 +84122,14 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver9.clean(version) || version; arch2 = arch2 || os5.arch(); - core13.debug(`Caching tool ${tool} ${version} ${arch2}`); - core13.debug(`source file: ${sourceFile}`); + core14.debug(`Caching tool ${tool} ${version} ${arch2}`); + core14.debug(`source file: ${sourceFile}`); if (!fs15.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); const destPath = path15.join(destFolder, targetFile); - core13.debug(`destination file ${destPath}`); + core14.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); return destFolder; @@ -84274,12 +84153,12 @@ var require_tool_cache = __commonJS({ if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; const cachePath = path15.join(_getCacheDirectory(), toolName, versionSpec, arch2); - core13.debug(`checking cache: ${cachePath}`); + core14.debug(`checking cache: ${cachePath}`); if (fs15.existsSync(cachePath) && fs15.existsSync(`${cachePath}.complete`)) { - core13.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); + core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { - core13.debug("not found"); + core14.debug("not found"); } } return toolPath; @@ -84310,7 +84189,7 @@ var require_tool_cache = __commonJS({ const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { - core13.debug("set auth"); + core14.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); @@ -84331,7 +84210,7 @@ var require_tool_cache = __commonJS({ try { releases = JSON.parse(versionsRaw); } catch (_a) { - core13.debug("Invalid json"); + core14.debug("Invalid json"); } } return releases; @@ -84357,7 +84236,7 @@ var require_tool_cache = __commonJS({ function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { const folderPath = path15.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); - core13.debug(`destination ${folderPath}`); + core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); yield io7.rmRF(markerPath); @@ -84369,19 +84248,19 @@ var require_tool_cache = __commonJS({ const folderPath = path15.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs15.writeFileSync(markerPath, ""); - core13.debug("finished caching tool"); + core14.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { const c = semver9.clean(versionSpec) || ""; - core13.debug(`isExplicit: ${c}`); + core14.debug(`isExplicit: ${c}`); const valid3 = semver9.valid(c) != null; - core13.debug(`explicit? ${valid3}`); + core14.debug(`explicit? ${valid3}`); return valid3; } exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version = ""; - core13.debug(`evaluating ${versions.length} versions`); + core14.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver9.gt(a, b)) { return 1; @@ -84397,9 +84276,9 @@ var require_tool_cache = __commonJS({ } } if (version) { - core13.debug(`matched: ${version}`); + core14.debug(`matched: ${version}`); } else { - core13.debug("match not found"); + core14.debug("match not found"); } return version; } @@ -84978,7 +84857,7 @@ var require_follow_redirects = __commonJS({ // src/init-action.ts var fs14 = __toESM(require("fs")); var path14 = __toESM(require("path")); -var core12 = __toESM(require_core()); +var core13 = __toESM(require_core()); var io6 = __toESM(require_io()); var semver8 = __toESM(require_semver2()); @@ -85036,7 +84915,7 @@ var v4_default = v4; // src/actions-util.ts var fs2 = __toESM(require("fs")); var path2 = __toESM(require("path")); -var core3 = __toESM(require_core()); +var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); @@ -85045,8 +84924,7 @@ var io2 = __toESM(require_io()); var fs = __toESM(require("fs")); var os = __toESM(require("os")); var path = __toESM(require("path")); -var import_util = require("util"); -var core2 = __toESM(require_core()); +var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -85187,7 +85065,61 @@ function checkDiskSpace(directoryPath, dependencies = { // src/util.ts var import_del = __toESM(require_del()); -var import_get_folder_size = __toESM(require_get_folder_size()); + +// node_modules/get-folder-size/index.js +var import_node_path2 = require("node:path"); +async function getFolderSize(itemPath, options) { + return await core(itemPath, options, { errors: true }); +} +getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); +getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); +async function core(rootItemPath, options = {}, returnType = {}) { + const fs15 = options.fs || await import("node:fs/promises"); + let folderSize = 0n; + const foundInos = /* @__PURE__ */ new Set(); + const errors = []; + await processItem(rootItemPath); + async function processItem(itemPath) { + if (options.ignore?.test(itemPath)) return; + const stats = returnType.strict ? await fs15.lstat(itemPath, { bigint: true }) : await fs15.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + if (typeof stats !== "object") return; + if (!foundInos.has(stats.ino)) { + foundInos.add(stats.ino); + folderSize += stats.size; + } + if (stats.isDirectory()) { + const directoryItems = returnType.strict ? await fs15.readdir(itemPath) : await fs15.readdir(itemPath).catch((error2) => errors.push(error2)); + if (typeof directoryItems !== "object") return; + await Promise.all( + directoryItems.map( + (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) + ) + ); + } + } + if (!options.bigint) { + if (folderSize > BigInt(Number.MAX_SAFE_INTEGER)) { + const error2 = new RangeError( + "The folder size is too large to return as a Number. You can instruct this package to return a BigInt instead." + ); + if (returnType.strict) { + throw error2; + } + errors.push(error2); + folderSize = Number.MAX_SAFE_INTEGER; + } else { + folderSize = Number(folderSize); + } + } + if (returnType.errors) { + return { + size: folderSize, + errors: errors.length > 0 ? errors : null + }; + } else { + return folderSize; + } +} // node_modules/js-yaml/dist/js-yaml.mjs function isNothing(subject) { @@ -85758,7 +85690,7 @@ var json = failsafe.extend({ float ] }); -var core = json; +var core2 = json; var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); @@ -85972,7 +85904,7 @@ var set = new type("tag:yaml.org,2002:set", { resolve: resolveYamlSet, construct: constructYamlSet }); -var _default = core.extend({ +var _default = core2.extend({ implicit: [ timestamp, merge @@ -88040,7 +87972,7 @@ function checkGitHubVersionInRange(version, logger) { ); } hasBeenWarnedAboutVersion = true; - core2.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); + core3.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); } function apiVersionInRange(version, minimumVersion2, maximumVersion2) { if (!semver.satisfies(version, `>=${minimumVersion2}`)) { @@ -88061,11 +87993,11 @@ function assertNever(value) { throw new ExhaustivityCheckingError(value); } function initializeEnvironment(version) { - core2.exportVariable("CODEQL_ACTION_FEATURE_MULTI_LANGUAGE" /* FEATURE_MULTI_LANGUAGE */, "false"); - core2.exportVariable("CODEQL_ACTION_FEATURE_SANDWICH" /* FEATURE_SANDWICH */, "false"); - core2.exportVariable("CODEQL_ACTION_FEATURE_SARIF_COMBINE" /* FEATURE_SARIF_COMBINE */, "true"); - core2.exportVariable("CODEQL_ACTION_FEATURE_WILL_UPLOAD" /* FEATURE_WILL_UPLOAD */, "true"); - core2.exportVariable("CODEQL_ACTION_VERSION" /* VERSION */, version); + core3.exportVariable("CODEQL_ACTION_FEATURE_MULTI_LANGUAGE" /* FEATURE_MULTI_LANGUAGE */, "false"); + core3.exportVariable("CODEQL_ACTION_FEATURE_SANDWICH" /* FEATURE_SANDWICH */, "false"); + core3.exportVariable("CODEQL_ACTION_FEATURE_SARIF_COMBINE" /* FEATURE_SARIF_COMBINE */, "true"); + core3.exportVariable("CODEQL_ACTION_FEATURE_WILL_UPLOAD" /* FEATURE_WILL_UPLOAD */, "true"); + core3.exportVariable("CODEQL_ACTION_VERSION" /* VERSION */, version); } function getRequiredEnvParam(paramName) { const value = process.env[paramName]; @@ -88119,7 +88051,7 @@ function getTestingEnvironment() { } async function tryGetFolderBytes(cacheDir, logger, quiet = false) { try { - return await (0, import_util.promisify)(import_get_folder_size.default)(cacheDir); + return await getFolderSize.loose(cacheDir); } catch (e) { if (!quiet || logger.isDebug()) { logger.warning( @@ -88149,7 +88081,7 @@ async function withTimeout(timeoutMs, promise, onTimeout) { } async function checkForTimeout() { if (hadTimeout === true) { - core2.info( + core3.info( "A timeout occurred, force exiting the process after 30 seconds to prevent hanging." ); await delay(3e4, { allowProcessExit: true }); @@ -88190,7 +88122,7 @@ async function checkDiskUsage(logger) { } else { logger.debug(message); } - core2.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true"); + core3.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true"); } return { numAvailableBytes: diskUsage.free, @@ -88210,10 +88142,10 @@ function checkActionVersion(version, githubVersion) { semver.coerce(githubVersion.version) ?? "0.0.0", ">=3.11" )) { - core2.error( + core3.error( "CodeQL Action major versions v1 and v2 have been deprecated. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2025-01-10-code-scanning-codeql-action-v2-is-now-deprecated/" ); - core2.exportVariable("CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION" /* LOG_VERSION_DEPRECATION */, "true"); + core3.exportVariable("CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION" /* LOG_VERSION_DEPRECATION */, "true"); } } } @@ -88244,13 +88176,13 @@ async function checkSipEnablement(logger) { if (sipStatusOutput.stdout.includes( "System Integrity Protection status: enabled." )) { - core2.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true"); + core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true"); return true; } if (sipStatusOutput.stdout.includes( "System Integrity Protection status: disabled." )) { - core2.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false"); + core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false"); return false; } } @@ -88297,14 +88229,14 @@ async function asyncSome(array, predicate) { // src/actions-util.ts var pkg = require_package(); var getRequiredInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); if (!value) { throw new ConfigurationError(`Input required and not supplied: ${name}`); } return value; }; var getOptionalInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); return value.length > 0 ? value : void 0; }; function getTemporaryDirectory() { @@ -88397,7 +88329,7 @@ var getFileType = async (filePath) => { }).exec(); return stdout.trim(); } catch (e) { - core3.info( + core4.info( `Could not determine type of ${filePath} from ${stdout}. ${stderr}` ); throw e; @@ -88470,7 +88402,7 @@ var persistInputs = function() { const inputEnvironmentVariables = Object.entries(process.env).filter( ([name]) => name.startsWith("INPUT_") ); - core3.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables)); + core4.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables)); }; function getPullRequestBranches() { const pullRequest = github.context.payload.pull_request; @@ -88500,7 +88432,7 @@ function isAnalyzingPullRequest() { } // src/api-client.ts -var core4 = __toESM(require_core()); +var core5 = __toESM(require_core()); var githubUtils = __toESM(require_utils4()); var retry = __toESM(require_dist_node15()); var import_console_log_level = __toESM(require_console_log_level()); @@ -88608,12 +88540,12 @@ async function getAnalysisKey() { const workflowPath = await getWorkflowRelativePath(); const jobName = getRequiredEnvParam("GITHUB_JOB"); analysisKey = `${workflowPath}:${jobName}`; - core4.exportVariable(analysisKeyEnvVar, analysisKey); + core5.exportVariable(analysisKeyEnvVar, analysisKey); return analysisKey; } // src/caching-utils.ts -var core5 = __toESM(require_core()); +var core6 = __toESM(require_core()); async function getTotalCacheSize(paths, logger, quiet = false) { const sizes = await Promise.all( paths.map((cacheDir) => tryGetFolderBytes(cacheDir, logger, quiet)) @@ -88639,7 +88571,7 @@ function getCachingKind(input) { case "restore": return "restore" /* Restore */; default: - core5.warning( + core6.warning( `Unrecognized 'dependency-caching' input: ${input}. Defaulting to 'none'.` ); return "none" /* None */; @@ -88698,13 +88630,13 @@ var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts -var core6 = __toESM(require_core()); +var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; - core6.debug(`Running git command: git ${args.join(" ")}`); + core7.debug(`Running git command: git ${args.join(" ")}`); try { await new toolrunner2.ToolRunner(await io3.which("git", true), args, { silent: true, @@ -88724,7 +88656,7 @@ var runGitCommand = async function(workingDirectory, args, customErrorMessage) { if (stderr.includes("not a git repository")) { reason = "The checkout path provided to the action does not appear to be a git repository."; } - core6.info(`git call failed. ${customErrorMessage} Error: ${reason}`); + core7.info(`git call failed. ${customErrorMessage} Error: ${reason}`); throw error2; } }; @@ -88847,7 +88779,7 @@ async function getRef() { ) !== head; if (hasChangedRef) { const newRef = ref.replace(pull_ref_regex, "refs/pull/$1/head"); - core6.debug( + core7.debug( `No longer on merge commit, rewriting ref from ${ref} to ${newRef}.` ); return newRef; @@ -88873,16 +88805,16 @@ async function isAnalyzingDefaultBranch() { } // src/logging.ts -var core7 = __toESM(require_core()); +var core8 = __toESM(require_core()); function getActionsLogger() { - return core7; + return core8; } async function withGroupAsync(groupName, f) { - core7.startGroup(groupName); + core8.startGroup(groupName); try { return await f(); } finally { - core7.endGroup(); + core8.endGroup(); } } function formatDuration(durationMs) { @@ -90538,7 +90470,7 @@ var io5 = __toESM(require_io()); // src/codeql.ts var fs11 = __toESM(require("fs")); var path11 = __toESM(require("path")); -var core9 = __toESM(require_core()); +var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); // src/cli-errors.ts @@ -90948,7 +90880,7 @@ var fs8 = __toESM(require("fs")); var os3 = __toESM(require("os")); var path8 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); -var core8 = __toESM(require_core()); +var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); @@ -91002,10 +90934,10 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } } catch (e) { - core8.warning( + core9.warning( `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}` ); - core8.warning(`Falling back to downloading the bundle before extracting.`); + core9.warning(`Falling back to downloading the bundle before extracting.`); await cleanUpGlob(dest, "CodeQL bundle", logger); } const toolsDownloadStart = import_perf_hooks2.performance.now(); @@ -92069,12 +92001,12 @@ ${output}` ); } else if (checkVersion && process.env["CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */] !== "true" && !await codeQlVersionAtLeast(codeql, CODEQL_NEXT_MINIMUM_VERSION)) { const result = await codeql.getVersion(); - core9.warning( + core10.warning( `CodeQL CLI version ${result.version} was discontinued on ${GHES_MOST_RECENT_DEPRECATION_DATE} alongside GitHub Enterprise Server ${GHES_VERSION_MOST_RECENTLY_DEPRECATED} and will not be supported by the next minor release of the CodeQL Action. Please update to CodeQL CLI version ${CODEQL_NEXT_MINIMUM_VERSION} or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version. Alternatively, if you want to continue using CodeQL CLI version ${result.version}, you can replace 'github/codeql-action/*@v${getActionVersion().split(".")[0]}' by 'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to continue using this version of the CodeQL Action.` ); - core9.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); + core10.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); } return codeql; } @@ -92336,7 +92268,7 @@ function cleanupDatabaseClusterDirectory(config, logger, options = {}, rmSync2 = // src/status-report.ts var os4 = __toESM(require("os")); -var core10 = __toESM(require_core()); +var core11 = __toESM(require_core()); function isFirstPartyAnalysis(actionName) { if (actionName !== "upload-sarif" /* UploadSarif */) { return true; @@ -92352,12 +92284,12 @@ function getActionsStatus(error2, otherFailureCause) { } function setJobStatusIfUnsuccessful(actionStatus) { if (actionStatus === "user-error") { - core10.exportVariable( + core11.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_CONFIGURATION_ERROR" /* ConfigErrorStatus */ ); } else if (actionStatus === "failure" || actionStatus === "aborted") { - core10.exportVariable( + core11.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_FAILURE" /* FailureStatus */ ); @@ -92376,14 +92308,14 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi let workflowStartedAt = process.env["CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */]; if (workflowStartedAt === void 0) { workflowStartedAt = actionStartedAt.toISOString(); - core10.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt); + core11.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt); } const runnerOs = getRequiredEnvParam("RUNNER_OS"); const codeQlCliVersion = getCachedCodeQlVersion(); const actionRef = process.env["GITHUB_ACTION_REF"] || ""; const testingEnvironment = getTestingEnvironment(); if (testingEnvironment) { - core10.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment); + core11.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment); } const isSteadyStateDefaultSetupRun = process.env["CODE_SCANNING_IS_STEADY_STATE_DEFAULT_SETUP"] === "true"; const statusReport = { @@ -92461,9 +92393,9 @@ var INCOMPATIBLE_MSG = "CodeQL Action version is incompatible with the code scan async function sendStatusReport(statusReport) { setJobStatusIfUnsuccessful(statusReport.status); const statusReportJSON = JSON.stringify(statusReport); - core10.debug(`Sending status report: ${statusReportJSON}`); + core11.debug(`Sending status report: ${statusReportJSON}`); if (isInTestMode()) { - core10.debug("In test mode. Status reports are not uploaded."); + core11.debug("In test mode. Status reports are not uploaded."); return; } const nwo = getRepositoryNwo(); @@ -92482,26 +92414,26 @@ async function sendStatusReport(statusReport) { switch (e.status) { case 403: if (getWorkflowEventName() === "push" && process.env["GITHUB_ACTOR"] === "dependabot[bot]") { - core10.warning( + core11.warning( `Workflows triggered by Dependabot on the "push" event run with read-only access. Uploading Code Scanning results requires write access. To use Code Scanning with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. See ${"https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push" /* SCANNING_ON_PUSH */} for more information on how to configure these events.` ); } else { - core10.warning(e.message); + core11.warning(e.message); } return; case 404: - core10.warning(e.message); + core11.warning(e.message); return; case 422: if (getRequiredEnvParam("GITHUB_SERVER_URL") !== GITHUB_DOTCOM_URL) { - core10.debug(INCOMPATIBLE_MSG); + core11.debug(INCOMPATIBLE_MSG); } else { - core10.debug(OUT_OF_DATE_MSG); + core11.debug(OUT_OF_DATE_MSG); } return; } } - core10.warning( + core11.warning( `An unexpected error occurred when sending code scanning status report: ${getErrorMessage( e )}` @@ -92513,7 +92445,7 @@ async function sendStatusReport(statusReport) { var fs13 = __toESM(require("fs")); var path13 = __toESM(require("path")); var import_zlib = __toESM(require("zlib")); -var core11 = __toESM(require_core()); +var core12 = __toESM(require_core()); function toCodedErrors(errors) { return Object.entries(errors).reduce( (acc, [code, message]) => { @@ -92619,7 +92551,7 @@ async function validateWorkflow(codeql, logger) { } catch (e) { return `error: formatWorkflowErrors() failed: ${String(e)}`; } - core11.warning(message); + core12.warning(message); } return formatWorkflowCause(workflowErrors); } @@ -92791,8 +92723,8 @@ async function run() { ); const jobRunUuid = v4_default(); logger.info(`Job run UUID is ${jobRunUuid}.`); - core12.exportVariable("JOB_RUN_UUID" /* JOB_RUN_UUID */, jobRunUuid); - core12.exportVariable("CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */, "true"); + core13.exportVariable("JOB_RUN_UUID" /* JOB_RUN_UUID */, jobRunUuid); + core13.exportVariable("CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */, "true"); const configFile = getOptionalInput("config-file"); const sourceRoot = path14.resolve( getRequiredEnvParam("GITHUB_WORKSPACE"), @@ -92827,7 +92759,7 @@ async function run() { toolsVersion = initCodeQLResult.toolsVersion; toolsSource = initCodeQLResult.toolsSource; zstdAvailability = initCodeQLResult.zstdAvailability; - core12.startGroup("Validating workflow"); + core13.startGroup("Validating workflow"); const validateWorkflowResult = await validateWorkflow(codeql, logger); if (validateWorkflowResult === void 0) { logger.info("Detected no issues with the code scanning workflow."); @@ -92836,7 +92768,7 @@ async function run() { `Unable to validate code scanning workflow: ${validateWorkflowResult}` ); } - core12.endGroup(); + core13.endGroup(); if ( // Only enable the experimental features env variable for Rust analysis if the user has explicitly // requested rust - don't enable it via language autodetection. @@ -92851,7 +92783,7 @@ async function run() { ); } if (semver8.lt(actualVer, publicPreview)) { - core12.exportVariable("CODEQL_ENABLE_EXPERIMENTAL_FEATURES" /* EXPERIMENTAL_FEATURES */, "true"); + core13.exportVariable("CODEQL_ENABLE_EXPERIMENTAL_FEATURES" /* EXPERIMENTAL_FEATURES */, "true"); logger.info("Experimental Rust analysis enabled"); } } @@ -92871,7 +92803,7 @@ async function run() { // - The `init` Action is passed `debug: true`. // - Actions step debugging is enabled (e.g. by [enabling debug logging for a rerun](https://docs.github.com/en/actions/managing-workflow-runs/re-running-workflows-and-jobs#re-running-all-the-jobs-in-a-workflow), // or by setting the `ACTIONS_STEP_DEBUG` secret to `true`). - debugMode: getOptionalInput("debug") === "true" || core12.isDebug(), + debugMode: getOptionalInput("debug") === "true" || core13.isDebug(), debugArtifactName: getOptionalInput("debug-artifact-name") || DEFAULT_DEBUG_ARTIFACT_NAME, debugDatabaseName: getOptionalInput("debug-database-name") || DEFAULT_DEBUG_DATABASE_NAME, repository: repositoryNwo, @@ -92887,7 +92819,7 @@ async function run() { await checkInstallPython311(config.languages, codeql); } catch (unwrappedError) { const error2 = wrapError(unwrappedError); - core12.setFailed(error2.message); + core13.setFailed(error2.message); const statusReportBase = await createStatusReportBase( "init" /* Init */, error2 instanceof ConfigurationError ? "user-error" : "aborted", @@ -92946,8 +92878,8 @@ async function run() { } const goFlags = process.env["GOFLAGS"]; if (goFlags) { - core12.exportVariable("GOFLAGS", goFlags); - core12.warning( + core13.exportVariable("GOFLAGS", goFlags); + core13.warning( "Passing the GOFLAGS env parameter to the init action is deprecated. Please move this to the analyze action." ); } @@ -92971,7 +92903,7 @@ async function run() { "bin" ); fs14.mkdirSync(tempBinPath, { recursive: true }); - core12.addPath(tempBinPath); + core13.addPath(tempBinPath); const goWrapperPath = path14.resolve(tempBinPath, "go"); fs14.writeFileSync( goWrapperPath, @@ -92980,14 +92912,14 @@ async function run() { exec ${goBinaryPath} "$@"` ); fs14.chmodSync(goWrapperPath, "755"); - core12.exportVariable("CODEQL_ACTION_GO_BINARY" /* GO_BINARY_LOCATION */, goWrapperPath); + core13.exportVariable("CODEQL_ACTION_GO_BINARY" /* GO_BINARY_LOCATION */, goWrapperPath); } catch (e) { logger.warning( `Analyzing Go on Linux, but failed to install wrapper script. Tracing custom builds may fail: ${e}` ); } } else { - core12.exportVariable("CODEQL_ACTION_GO_BINARY" /* GO_BINARY_LOCATION */, goBinaryPath); + core13.exportVariable("CODEQL_ACTION_GO_BINARY" /* GO_BINARY_LOCATION */, goBinaryPath); } } catch (e) { logger.warning( @@ -93014,20 +92946,20 @@ exec ${goBinaryPath} "$@"` } } } - core12.exportVariable( + core13.exportVariable( "CODEQL_RAM", process.env["CODEQL_RAM"] || getMemoryFlagValue(getOptionalInput("ram"), logger).toString() ); - core12.exportVariable( + core13.exportVariable( "CODEQL_THREADS", process.env["CODEQL_THREADS"] || getThreadsFlagValue(getOptionalInput("threads"), logger).toString() ); if (await features.getValue("disable_kotlin_analysis_enabled" /* DisableKotlinAnalysisEnabled */)) { - core12.exportVariable("CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN", "true"); + core13.exportVariable("CODEQL_EXTRACTOR_JAVA_AGENT_DISABLE_KOTLIN", "true"); } const kotlinLimitVar = "CODEQL_EXTRACTOR_KOTLIN_OVERRIDE_MAXIMUM_VERSION_LIMIT"; if (await codeQlVersionAtLeast(codeql, "2.20.3") && !await codeQlVersionAtLeast(codeql, "2.20.4")) { - core12.exportVariable(kotlinLimitVar, "2.1.20"); + core13.exportVariable(kotlinLimitVar, "2.1.20"); } if (config.languages.includes("cpp" /* cpp */)) { const envVar = "CODEQL_EXTRACTOR_CPP_TRAP_CACHING"; @@ -93037,10 +92969,10 @@ exec ${goBinaryPath} "$@"` ); } else if (getTrapCachingEnabled() && await codeQlVersionAtLeast(codeql, "2.17.5")) { logger.info("Enabling CodeQL C++ TRAP caching support"); - core12.exportVariable(envVar, "true"); + core13.exportVariable(envVar, "true"); } else { logger.info("Disabling CodeQL C++ TRAP caching support"); - core12.exportVariable(envVar, "false"); + core13.exportVariable(envVar, "false"); } } if (shouldRestoreCache(config.dependencyCachingEnabled)) { @@ -93048,7 +92980,7 @@ exec ${goBinaryPath} "$@"` } if (await codeQlVersionAtLeast(codeql, "2.17.1")) { } else { - core12.exportVariable( + core13.exportVariable( "CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION", "true" ); @@ -93074,7 +93006,7 @@ exec ${goBinaryPath} "$@"` "python_default_is_to_not_extract_stdlib" /* PythonDefaultIsToNotExtractStdlib */, codeql )) { - core12.exportVariable("CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB", "true"); + core13.exportVariable("CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB", "true"); } } const { registriesAuthTokens, qlconfigFile } = await generateRegistries( @@ -93116,15 +93048,15 @@ exec ${goBinaryPath} "$@"` const tracerConfig = await getCombinedTracerConfig(codeql, config); if (tracerConfig !== void 0) { for (const [key, value] of Object.entries(tracerConfig.env)) { - core12.exportVariable(key, value); + core13.exportVariable(key, value); } } flushDiagnostics(config); - core12.setOutput("codeql-path", config.codeQLCmd); - core12.setOutput("codeql-version", (await codeql.getVersion()).version); + core13.setOutput("codeql-path", config.codeQLCmd); + core13.setOutput("codeql-version", (await codeql.getVersion()).version); } catch (unwrappedError) { const error2 = wrapError(unwrappedError); - core12.setFailed(error2.message); + core13.setFailed(error2.message); await sendCompletedStatusReport( startedAt, config, @@ -93184,7 +93116,7 @@ async function runWrapper() { try { await run(); } catch (error2) { - core12.setFailed(`init action failed: ${getErrorMessage(error2)}`); + core13.setFailed(`init action failed: ${getErrorMessage(error2)}`); } await checkForTimeout(); } diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index b790a67ce..f5d5d6ce8 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -34336,127 +34336,6 @@ var require_del = __commonJS({ } }); -// node_modules/tiny-each-async/index.js -var require_tiny_each_async = __commonJS({ - "node_modules/tiny-each-async/index.js"(exports2, module2) { - "use strict"; - module2.exports = function eachAsync(arr, parallelLimit, iteratorFn, cb) { - var pending = 0; - var index = 0; - var lastIndex = arr.length - 1; - var called = false; - var limit; - var callback; - var iterate; - if (typeof parallelLimit === "number") { - limit = parallelLimit; - iterate = iteratorFn; - callback = cb || function noop() { - }; - } else { - iterate = parallelLimit; - callback = iteratorFn || function noop() { - }; - limit = arr.length; - } - if (!arr.length) { - return callback(); - } - var iteratorLength = iterate.length; - var shouldCallNextIterator = function shouldCallNextIterator2() { - return !called && pending < limit && index < lastIndex; - }; - var iteratorCallback = function iteratorCallback2(err) { - if (called) { - return; - } - pending--; - if (err || index === lastIndex && !pending) { - called = true; - callback(err); - } else if (shouldCallNextIterator()) { - processIterator(++index); - } - }; - var processIterator = function processIterator2() { - pending++; - var args = iteratorLength === 2 ? [arr[index], iteratorCallback] : [arr[index], index, iteratorCallback]; - iterate.apply(null, args); - if (shouldCallNextIterator()) { - processIterator2(++index); - } - }; - processIterator(); - }; - } -}); - -// node_modules/get-folder-size/index.js -var require_get_folder_size = __commonJS({ - "node_modules/get-folder-size/index.js"(exports2, module2) { - "use strict"; - var fs5 = require("fs"); - var path5 = require("path"); - var eachAsync = require_tiny_each_async(); - function readSizeRecursive(seen, item, ignoreRegEx, callback) { - let cb; - let ignoreRegExp; - if (!callback) { - cb = ignoreRegEx; - ignoreRegExp = null; - } else { - cb = callback; - ignoreRegExp = ignoreRegEx; - } - fs5.lstat(item, function lstat(e, stats) { - let total = !e ? stats.size || 0 : 0; - if (stats) { - if (seen.has(stats.ino)) { - return cb(null, 0); - } - seen.add(stats.ino); - } - if (!e && stats.isDirectory()) { - fs5.readdir(item, (err, list) => { - if (err) { - return cb(err); - } - eachAsync( - list, - 5e3, - (dirItem, next) => { - readSizeRecursive( - seen, - path5.join(item, dirItem), - ignoreRegExp, - (error2, size) => { - if (!error2) { - total += size; - } - next(error2); - } - ); - }, - (finalErr) => { - cb(finalErr, total); - } - ); - }); - } else { - if (ignoreRegExp && ignoreRegExp.test(item)) { - total = 0; - } - cb(e, total); - } - }); - } - module2.exports = (...args) => { - args.unshift(/* @__PURE__ */ new Set()); - return readSizeRecursive(...args); - }; - } -}); - // node_modules/semver/internal/constants.js var require_constants9 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -36412,7 +36291,7 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", @@ -38076,7 +37955,7 @@ var require_internal_glob_options_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core12 = __importStar4(require_core()); + var core13 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -38086,15 +37965,15 @@ var require_internal_glob_options_helper = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core12.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core13.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core12.debug(`implicitDescendants '${result.implicitDescendants}'`); + core13.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core12.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; @@ -38758,7 +38637,7 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core12 = __importStar4(require_core()); + var core13 = __importStar4(require_core()); var fs5 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); var path5 = __importStar4(require("path")); @@ -38809,7 +38688,7 @@ var require_internal_globber = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core12.debug(`Search path '${searchPath}'`); + core13.debug(`Search path '${searchPath}'`); try { yield __await4(fs5.promises.lstat(searchPath)); } catch (err) { @@ -38881,7 +38760,7 @@ var require_internal_globber = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core12.debug(`Broken symlink '${item.path}'`); + core13.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -38897,7 +38776,7 @@ var require_internal_globber = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core12.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -40221,7 +40100,7 @@ var require_cacheUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core12 = __importStar4(require_core()); + var core13 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob = __importStar4(require_glob2()); var io5 = __importStar4(require_io()); @@ -40274,7 +40153,7 @@ var require_cacheUtils = __commonJS({ _e = false; const file = _c; const relativeFile = path5.relative(workspace, file).replace(new RegExp(`\\${path5.sep}`, "g"), "/"); - core12.debug(`Matched: ${relativeFile}`); + core13.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { @@ -40304,7 +40183,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); - core12.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + core13.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec2.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, @@ -40315,10 +40194,10 @@ var require_cacheUtils = __commonJS({ } }); } catch (err) { - core12.debug(err.message); + core13.debug(err.message); } versionOutput = versionOutput.trim(); - core12.debug(versionOutput); + core13.debug(versionOutput); return versionOutput; }); } @@ -40326,7 +40205,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); - core12.debug(`zstd version: ${version}`); + core13.debug(`zstd version: ${version}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -75638,7 +75517,7 @@ var require_uploadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core12 = __importStar4(require_core()); + var core13 = __importStar4(require_core()); var storage_blob_1 = require_dist7(); var errors_1 = require_errors2(); var UploadProgress = class { @@ -75680,7 +75559,7 @@ var require_uploadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core12.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + core13.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -75735,14 +75614,14 @@ var require_uploadUtils = __commonJS({ }; try { uploadProgress.startDisplayTimer(); - core12.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + core13.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); if (response._response.status >= 400) { throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); } return response; } catch (error2) { - core12.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); + core13.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); throw error2; } finally { uploadProgress.stopDisplayTimer(); @@ -75813,7 +75692,7 @@ var require_requestUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core12 = __importStar4(require_core()); + var core13 = __importStar4(require_core()); var http_client_1 = require_lib(); var constants_1 = require_constants10(); function isSuccessStatusCode(statusCode) { @@ -75874,9 +75753,9 @@ var require_requestUtils = __commonJS({ isRetryable = isRetryableStatusCode(statusCode); errorMessage = `Cache service responded with ${statusCode}`; } - core12.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core13.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); if (!isRetryable) { - core12.debug(`${name} - Error is not retryable`); + core13.debug(`${name} - Error is not retryable`); break; } yield sleep(delay2); @@ -75981,7 +75860,7 @@ var require_downloadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core12 = __importStar4(require_core()); + var core13 = __importStar4(require_core()); var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); @@ -76019,7 +75898,7 @@ var require_downloadUtils = __commonJS({ this.segmentIndex = this.segmentIndex + 1; this.segmentSize = segmentSize; this.receivedBytes = 0; - core12.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + core13.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); } /** * Sets the number of bytes received for the current segment. @@ -76053,7 +75932,7 @@ var require_downloadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core12.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + core13.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -76103,7 +75982,7 @@ var require_downloadUtils = __commonJS({ })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { downloadResponse.message.destroy(); - core12.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + core13.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); }); yield pipeResponseToStream(downloadResponse, writeStream); const contentLengthHeader = downloadResponse.message.headers["content-length"]; @@ -76114,7 +75993,7 @@ var require_downloadUtils = __commonJS({ throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); } } else { - core12.debug("Unable to validate download, no Content-Length header"); + core13.debug("Unable to validate download, no Content-Length header"); } }); } @@ -76234,7 +76113,7 @@ var require_downloadUtils = __commonJS({ const properties = yield client.getProperties(); const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; if (contentLength < 0) { - core12.debug("Unable to determine content length, downloading file with http-client..."); + core13.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); @@ -76314,7 +76193,7 @@ var require_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core12 = __importStar4(require_core()); + var core13 = __importStar4(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -76334,9 +76213,9 @@ var require_options = __commonJS({ } result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; - core12.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core12.debug(`Upload concurrency: ${result.uploadConcurrency}`); - core12.debug(`Upload chunk size: ${result.uploadChunkSize}`); + core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core13.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core13.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } exports2.getUploadOptions = getUploadOptions; @@ -76373,12 +76252,12 @@ var require_options = __commonJS({ if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) { result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; } - core12.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core12.debug(`Download concurrency: ${result.downloadConcurrency}`); - core12.debug(`Request timeout (ms): ${result.timeoutInMs}`); - core12.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); - core12.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); - core12.debug(`Lookup only: ${result.lookupOnly}`); + core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core13.debug(`Download concurrency: ${result.downloadConcurrency}`); + core13.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core13.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); + core13.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core13.debug(`Lookup only: ${result.lookupOnly}`); return result; } exports2.getDownloadOptions = getDownloadOptions; @@ -76558,7 +76437,7 @@ var require_cacheHttpClient = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core12 = __importStar4(require_core()); + var core13 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); var fs5 = __importStar4(require("fs")); @@ -76576,7 +76455,7 @@ var require_cacheHttpClient = __commonJS({ throw new Error("Cache Service Url not found, unable to restore cache."); } const url = `${baseUrl}_apis/artifactcache/${resource}`; - core12.debug(`Resource Url: ${url}`); + core13.debug(`Resource Url: ${url}`); return url; } function createAcceptHeader(type2, apiVersion) { @@ -76604,7 +76483,7 @@ var require_cacheHttpClient = __commonJS({ return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { - if (core12.isDebug()) { + if (core13.isDebug()) { yield printCachesListForDiagnostics(keys[0], httpClient, version); } return null; @@ -76617,9 +76496,9 @@ var require_cacheHttpClient = __commonJS({ if (!cacheDownloadUrl) { throw new Error("Cache not found."); } - core12.setSecret(cacheDownloadUrl); - core12.debug(`Cache Result:`); - core12.debug(JSON.stringify(cacheResult)); + core13.setSecret(cacheDownloadUrl); + core13.debug(`Cache Result:`); + core13.debug(JSON.stringify(cacheResult)); return cacheResult; }); } @@ -76634,10 +76513,10 @@ var require_cacheHttpClient = __commonJS({ const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { - core12.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key + core13.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { - core12.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); + core13.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); } } } @@ -76682,7 +76561,7 @@ Other caches with similar key:`); } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter4(this, void 0, void 0, function* () { - core12.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + core13.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) @@ -76704,7 +76583,7 @@ Other caches with similar key:`); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); const parallelUploads = [...new Array(concurrency).keys()]; - core12.debug("Awaiting all uploads"); + core13.debug("Awaiting all uploads"); let offset = 0; try { yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { @@ -76747,16 +76626,16 @@ Other caches with similar key:`); yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); } else { const httpClient = createHttpClient(); - core12.debug("Upload cache"); + core13.debug("Upload cache"); yield uploadFile(httpClient, cacheId, archivePath, options); - core12.debug("Commiting cache"); + core13.debug("Commiting cache"); const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core12.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + core13.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); } - core12.info("Cache saved successfully"); + core13.info("Cache saved successfully"); } }); } @@ -82182,7 +82061,7 @@ var require_cache3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core12 = __importStar4(require_core()); + var core13 = __importStar4(require_core()); var path5 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); @@ -82235,7 +82114,7 @@ var require_cache3 = __commonJS({ function restoreCache3(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core12.debug(`Cache service version: ${cacheServiceVersion}`); + core13.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); switch (cacheServiceVersion) { case "v2": @@ -82251,8 +82130,8 @@ var require_cache3 = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core12.debug("Resolved Keys:"); - core12.debug(JSON.stringify(keys)); + core13.debug("Resolved Keys:"); + core13.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82270,19 +82149,19 @@ var require_cache3 = __commonJS({ return void 0; } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core12.info("Lookup only - skipping download"); + core13.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } archivePath = path5.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core12.debug(`Archive Path: ${archivePath}`); + core13.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); - if (core12.isDebug()) { + if (core13.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core12.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core12.info("Cache restored successfully"); + core13.info("Cache restored successfully"); return cacheEntry.cacheKey; } catch (error2) { const typedError = error2; @@ -82290,16 +82169,16 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core12.error(`Failed to restore: ${error2.message}`); + core13.error(`Failed to restore: ${error2.message}`); } else { - core12.warning(`Failed to restore: ${error2.message}`); + core13.warning(`Failed to restore: ${error2.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core12.debug(`Failed to delete archive: ${error2}`); + core13.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82310,8 +82189,8 @@ var require_cache3 = __commonJS({ options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core12.debug("Resolved Keys:"); - core12.debug(JSON.stringify(keys)); + core13.debug("Resolved Keys:"); + core13.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82329,30 +82208,30 @@ var require_cache3 = __commonJS({ }; const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core12.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); + core13.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); return void 0; } const isRestoreKeyMatch = request.key !== response.matchedKey; if (isRestoreKeyMatch) { - core12.info(`Cache hit for restore-key: ${response.matchedKey}`); + core13.info(`Cache hit for restore-key: ${response.matchedKey}`); } else { - core12.info(`Cache hit for: ${response.matchedKey}`); + core13.info(`Cache hit for: ${response.matchedKey}`); } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core12.info("Lookup only - skipping download"); + core13.info("Lookup only - skipping download"); return response.matchedKey; } archivePath = path5.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core12.debug(`Archive path: ${archivePath}`); - core12.debug(`Starting download of archive to: ${archivePath}`); + core13.debug(`Archive path: ${archivePath}`); + core13.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core12.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - if (core12.isDebug()) { + core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core13.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core12.info("Cache restored successfully"); + core13.info("Cache restored successfully"); return response.matchedKey; } catch (error2) { const typedError = error2; @@ -82360,9 +82239,9 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core12.error(`Failed to restore: ${error2.message}`); + core13.error(`Failed to restore: ${error2.message}`); } else { - core12.warning(`Failed to restore: ${error2.message}`); + core13.warning(`Failed to restore: ${error2.message}`); } } } finally { @@ -82371,7 +82250,7 @@ var require_cache3 = __commonJS({ yield utils.unlinkFile(archivePath); } } catch (error2) { - core12.debug(`Failed to delete archive: ${error2}`); + core13.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82380,7 +82259,7 @@ var require_cache3 = __commonJS({ function saveCache3(paths, key, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core12.debug(`Cache service version: ${cacheServiceVersion}`); + core13.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); checkKey(key); switch (cacheServiceVersion) { @@ -82399,26 +82278,26 @@ var require_cache3 = __commonJS({ const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core12.debug("Cache Paths:"); - core12.debug(`${JSON.stringify(cachePaths)}`); + core13.debug("Cache Paths:"); + core13.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path5.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core12.debug(`Archive Path: ${archivePath}`); + core13.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core12.isDebug()) { + if (core13.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const fileSizeLimit = 10 * 1024 * 1024 * 1024; const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core12.debug(`File Size: ${archiveFileSize}`); + core13.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } - core12.debug("Reserving Cache"); + core13.debug("Reserving Cache"); const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { compressionMethod, enableCrossOsArchive, @@ -82431,26 +82310,26 @@ var require_cache3 = __commonJS({ } else { throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); } - core12.debug(`Saving Cache (ID: ${cacheId})`); + core13.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); } catch (error2) { const typedError = error2; if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError.name) { - core12.info(`Failed to save: ${typedError.message}`); + core13.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core12.error(`Failed to save: ${typedError.message}`); + core13.error(`Failed to save: ${typedError.message}`); } else { - core12.warning(`Failed to save: ${typedError.message}`); + core13.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core12.debug(`Failed to delete archive: ${error2}`); + core13.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82463,26 +82342,26 @@ var require_cache3 = __commonJS({ const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core12.debug("Cache Paths:"); - core12.debug(`${JSON.stringify(cachePaths)}`); + core13.debug("Cache Paths:"); + core13.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path5.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core12.debug(`Archive Path: ${archivePath}`); + core13.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core12.isDebug()) { + if (core13.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core12.debug(`File Size: ${archiveFileSize}`); + core13.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } options.archiveSizeBytes = archiveFileSize; - core12.debug("Reserving Cache"); + core13.debug("Reserving Cache"); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const request = { key, @@ -82496,10 +82375,10 @@ var require_cache3 = __commonJS({ } signedUploadUrl = response.signedUploadUrl; } catch (error2) { - core12.debug(`Failed to reserve cache: ${error2}`); + core13.debug(`Failed to reserve cache: ${error2}`); throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } - core12.debug(`Attempting to upload cache located at: ${archivePath}`); + core13.debug(`Attempting to upload cache located at: ${archivePath}`); yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); const finalizeRequest = { key, @@ -82507,7 +82386,7 @@ var require_cache3 = __commonJS({ sizeBytes: `${archiveFileSize}` }; const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); - core12.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + core13.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); if (!finalizeResponse.ok) { throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); } @@ -82517,19 +82396,19 @@ var require_cache3 = __commonJS({ if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError.name) { - core12.info(`Failed to save: ${typedError.message}`); + core13.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core12.error(`Failed to save: ${typedError.message}`); + core13.error(`Failed to save: ${typedError.message}`); } else { - core12.warning(`Failed to save: ${typedError.message}`); + core13.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core12.debug(`Failed to delete archive: ${error2}`); + core13.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82737,7 +82616,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core12 = __importStar4(require_core()); + var core13 = __importStar4(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -82760,10 +82639,10 @@ var require_retry_helper = __commonJS({ if (isRetryable && !isRetryable(err)) { throw err; } - core12.info(err.message); + core13.info(err.message); } const seconds = this.getSleepAmount(); - core12.info(`Waiting ${seconds} seconds before trying again`); + core13.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } @@ -82843,7 +82722,7 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core12 = __importStar4(require_core()); + var core13 = __importStar4(require_core()); var io5 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs5 = __importStar4(require("fs")); @@ -82872,8 +82751,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { dest = dest || path5.join(_getTempDirectory(), crypto.randomUUID()); yield io5.mkdirP(path5.dirname(dest)); - core12.debug(`Downloading ${url}`); - core12.debug(`Destination ${dest}`); + core13.debug(`Downloading ${url}`); + core13.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); @@ -82900,7 +82779,7 @@ var require_tool_cache = __commonJS({ allowRetries: false }); if (auth) { - core12.debug("set auth"); + core13.debug("set auth"); if (headers === void 0) { headers = {}; } @@ -82909,7 +82788,7 @@ var require_tool_cache = __commonJS({ const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core12.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core13.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream.pipeline); @@ -82918,16 +82797,16 @@ var require_tool_cache = __commonJS({ let succeeded = false; try { yield pipeline(readStream, fs5.createWriteStream(dest)); - core12.debug("download complete"); + core13.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { - core12.debug("download failed"); + core13.debug("download failed"); try { yield io5.rmRF(dest); } catch (err) { - core12.debug(`Failed to delete '${dest}'. ${err.message}`); + core13.debug(`Failed to delete '${dest}'. ${err.message}`); } } } @@ -82942,7 +82821,7 @@ var require_tool_cache = __commonJS({ process.chdir(dest); if (_7zPath) { try { - const logLevel = core12.isDebug() ? "-bb1" : "-bb0"; + const logLevel = core13.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, @@ -82992,7 +82871,7 @@ var require_tool_cache = __commonJS({ throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); - core12.debug("Checking tar --version"); + core13.debug("Checking tar --version"); let versionOutput = ""; yield (0, exec_1.exec)("tar --version", [], { ignoreReturnCode: true, @@ -83002,7 +82881,7 @@ var require_tool_cache = __commonJS({ stderr: (data) => versionOutput += data.toString() } }); - core12.debug(versionOutput.trim()); + core13.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { @@ -83010,7 +82889,7 @@ var require_tool_cache = __commonJS({ } else { args = [flags]; } - if (core12.isDebug() && !flags.includes("v")) { + if (core13.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; @@ -83042,7 +82921,7 @@ var require_tool_cache = __commonJS({ args = [flags]; } args.push("-x", "-C", dest, "-f", file); - if (core12.isDebug()) { + if (core13.isDebug()) { args.push("-v"); } const xarPath = yield io5.which("xar", true); @@ -83087,7 +82966,7 @@ var require_tool_cache = __commonJS({ "-Command", pwshCommand ]; - core12.debug(`Using pwsh at path: ${pwshPath}`); + core13.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { const powershellCommand = [ @@ -83107,7 +82986,7 @@ var require_tool_cache = __commonJS({ powershellCommand ]; const powershellPath = yield io5.which("powershell", true); - core12.debug(`Using powershell at path: ${powershellPath}`); + core13.debug(`Using powershell at path: ${powershellPath}`); yield (0, exec_1.exec)(`"${powershellPath}"`, args); } }); @@ -83116,7 +82995,7 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const unzipPath = yield io5.which("unzip", true); const args = [file]; - if (!core12.isDebug()) { + if (!core13.isDebug()) { args.unshift("-q"); } args.unshift("-o"); @@ -83127,8 +83006,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os2.arch(); - core12.debug(`Caching tool ${tool} ${version} ${arch}`); - core12.debug(`source dir: ${sourceDir}`); + core13.debug(`Caching tool ${tool} ${version} ${arch}`); + core13.debug(`source dir: ${sourceDir}`); if (!fs5.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } @@ -83146,14 +83025,14 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os2.arch(); - core12.debug(`Caching tool ${tool} ${version} ${arch}`); - core12.debug(`source file: ${sourceFile}`); + core13.debug(`Caching tool ${tool} ${version} ${arch}`); + core13.debug(`source file: ${sourceFile}`); if (!fs5.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch); const destPath = path5.join(destFolder, targetFile); - core12.debug(`destination file ${destPath}`); + core13.debug(`destination file ${destPath}`); yield io5.cp(sourceFile, destPath); _completeToolPath(tool, version, arch); return destFolder; @@ -83177,12 +83056,12 @@ var require_tool_cache = __commonJS({ if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; const cachePath = path5.join(_getCacheDirectory(), toolName, versionSpec, arch); - core12.debug(`checking cache: ${cachePath}`); + core13.debug(`checking cache: ${cachePath}`); if (fs5.existsSync(cachePath) && fs5.existsSync(`${cachePath}.complete`)) { - core12.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); + core13.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); toolPath = cachePath; } else { - core12.debug("not found"); + core13.debug("not found"); } } return toolPath; @@ -83213,7 +83092,7 @@ var require_tool_cache = __commonJS({ const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { - core12.debug("set auth"); + core13.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); @@ -83234,7 +83113,7 @@ var require_tool_cache = __commonJS({ try { releases = JSON.parse(versionsRaw); } catch (_a) { - core12.debug("Invalid json"); + core13.debug("Invalid json"); } } return releases; @@ -83260,7 +83139,7 @@ var require_tool_cache = __commonJS({ function _createToolPath(tool, version, arch) { return __awaiter4(this, void 0, void 0, function* () { const folderPath = path5.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); - core12.debug(`destination ${folderPath}`); + core13.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io5.rmRF(folderPath); yield io5.rmRF(markerPath); @@ -83272,19 +83151,19 @@ var require_tool_cache = __commonJS({ const folderPath = path5.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); const markerPath = `${folderPath}.complete`; fs5.writeFileSync(markerPath, ""); - core12.debug("finished caching tool"); + core13.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { const c = semver8.clean(versionSpec) || ""; - core12.debug(`isExplicit: ${c}`); + core13.debug(`isExplicit: ${c}`); const valid3 = semver8.valid(c) != null; - core12.debug(`explicit? ${valid3}`); + core13.debug(`explicit? ${valid3}`); return valid3; } exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version = ""; - core12.debug(`evaluating ${versions.length} versions`); + core13.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver8.gt(a, b)) { return 1; @@ -83300,9 +83179,9 @@ var require_tool_cache = __commonJS({ } } if (version) { - core12.debug(`matched: ${version}`); + core13.debug(`matched: ${version}`); } else { - core12.debug("match not found"); + core13.debug("match not found"); } return version; } @@ -83879,18 +83758,18 @@ var require_follow_redirects = __commonJS({ }); // src/resolve-environment-action.ts -var core11 = __toESM(require_core()); +var core12 = __toESM(require_core()); // src/actions-util.ts var fs = __toESM(require("fs")); -var core3 = __toESM(require_core()); +var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts var path = __toESM(require("path")); -var core2 = __toESM(require_core()); +var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -84031,7 +83910,61 @@ function checkDiskSpace(directoryPath, dependencies = { // src/util.ts var import_del = __toESM(require_del()); -var import_get_folder_size = __toESM(require_get_folder_size()); + +// node_modules/get-folder-size/index.js +var import_node_path2 = require("node:path"); +async function getFolderSize(itemPath, options) { + return await core(itemPath, options, { errors: true }); +} +getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); +getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); +async function core(rootItemPath, options = {}, returnType = {}) { + const fs5 = options.fs || await import("node:fs/promises"); + let folderSize = 0n; + const foundInos = /* @__PURE__ */ new Set(); + const errors = []; + await processItem(rootItemPath); + async function processItem(itemPath) { + if (options.ignore?.test(itemPath)) return; + const stats = returnType.strict ? await fs5.lstat(itemPath, { bigint: true }) : await fs5.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + if (typeof stats !== "object") return; + if (!foundInos.has(stats.ino)) { + foundInos.add(stats.ino); + folderSize += stats.size; + } + if (stats.isDirectory()) { + const directoryItems = returnType.strict ? await fs5.readdir(itemPath) : await fs5.readdir(itemPath).catch((error2) => errors.push(error2)); + if (typeof directoryItems !== "object") return; + await Promise.all( + directoryItems.map( + (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) + ) + ); + } + } + if (!options.bigint) { + if (folderSize > BigInt(Number.MAX_SAFE_INTEGER)) { + const error2 = new RangeError( + "The folder size is too large to return as a Number. You can instruct this package to return a BigInt instead." + ); + if (returnType.strict) { + throw error2; + } + errors.push(error2); + folderSize = Number.MAX_SAFE_INTEGER; + } else { + folderSize = Number(folderSize); + } + } + if (returnType.errors) { + return { + size: folderSize, + errors: errors.length > 0 ? errors : null + }; + } else { + return folderSize; + } +} // node_modules/js-yaml/dist/js-yaml.mjs function isNothing(subject) { @@ -84602,7 +84535,7 @@ var json = failsafe.extend({ float ] }); -var core = json; +var core2 = json; var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); @@ -84816,7 +84749,7 @@ var set = new type("tag:yaml.org,2002:set", { resolve: resolveYamlSet, construct: constructYamlSet }); -var _default = core.extend({ +var _default = core2.extend({ implicit: [ timestamp, merge @@ -86694,7 +86627,7 @@ function checkGitHubVersionInRange(version, logger) { ); } hasBeenWarnedAboutVersion = true; - core2.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); + core3.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); } function apiVersionInRange(version, minimumVersion2, maximumVersion2) { if (!semver.satisfies(version, `>=${minimumVersion2}`)) { @@ -86755,7 +86688,7 @@ function getTestingEnvironment() { var hadTimeout = false; async function checkForTimeout() { if (hadTimeout === true) { - core2.info( + core3.info( "A timeout occurred, force exiting the process after 30 seconds to prevent hanging." ); await delay(3e4, { allowProcessExit: true }); @@ -86785,7 +86718,7 @@ async function checkDiskUsage(logger) { } else { logger.debug(message); } - core2.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true"); + core3.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true"); } return { numAvailableBytes: diskUsage.free, @@ -86805,10 +86738,10 @@ function checkActionVersion(version, githubVersion) { semver.coerce(githubVersion.version) ?? "0.0.0", ">=3.11" )) { - core2.error( + core3.error( "CodeQL Action major versions v1 and v2 have been deprecated. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2025-01-10-code-scanning-codeql-action-v2-is-now-deprecated/" ); - core2.exportVariable("CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION" /* LOG_VERSION_DEPRECATION */, "true"); + core3.exportVariable("CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION" /* LOG_VERSION_DEPRECATION */, "true"); } } } @@ -86825,13 +86758,13 @@ async function checkSipEnablement(logger) { if (sipStatusOutput.stdout.includes( "System Integrity Protection status: enabled." )) { - core2.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true"); + core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true"); return true; } if (sipStatusOutput.stdout.includes( "System Integrity Protection status: disabled." )) { - core2.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false"); + core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false"); return false; } } @@ -86851,14 +86784,14 @@ async function asyncSome(array, predicate) { // src/actions-util.ts var pkg = require_package(); var getRequiredInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); if (!value) { throw new ConfigurationError(`Input required and not supplied: ${name}`); } return value; }; var getOptionalInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); return value.length > 0 ? value : void 0; }; function getTemporaryDirectory() { @@ -86972,7 +86905,7 @@ async function runTool(cmd, args = [], opts = {}) { } // src/api-client.ts -var core4 = __toESM(require_core()); +var core5 = __toESM(require_core()); var githubUtils = __toESM(require_utils4()); var retry = __toESM(require_dist_node15()); var import_console_log_level = __toESM(require_console_log_level()); @@ -87077,7 +87010,7 @@ async function getAnalysisKey() { const workflowPath = await getWorkflowRelativePath(); const jobName = getRequiredEnvParam("GITHUB_JOB"); analysisKey = `${workflowPath}:${jobName}`; - core4.exportVariable(analysisKeyEnvVar, analysisKey); + core5.exportVariable(analysisKeyEnvVar, analysisKey); return analysisKey; } @@ -87332,7 +87265,7 @@ var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var supportedAnalysisKinds = new Set(Object.values(AnalysisKind)); // src/caching-utils.ts -var core5 = __toESM(require_core()); +var core6 = __toESM(require_core()); // src/feature-flags.ts var semver3 = __toESM(require_semver2()); @@ -87343,13 +87276,13 @@ var path2 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts -var core6 = __toESM(require_core()); +var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; - core6.debug(`Running git command: git ${args.join(" ")}`); + core7.debug(`Running git command: git ${args.join(" ")}`); try { await new toolrunner2.ToolRunner(await io3.which("git", true), args, { silent: true, @@ -87369,7 +87302,7 @@ var runGitCommand = async function(workingDirectory, args, customErrorMessage) { if (stderr.includes("not a git repository")) { reason = "The checkout path provided to the action does not appear to be a git repository."; } - core6.info(`git call failed. ${customErrorMessage} Error: ${reason}`); + core7.info(`git call failed. ${customErrorMessage} Error: ${reason}`); throw error2; } }; @@ -87480,7 +87413,7 @@ async function getRef() { ) !== head; if (hasChangedRef) { const newRef = ref.replace(pull_ref_regex, "refs/pull/$1/head"); - core6.debug( + core7.debug( `No longer on merge commit, rewriting ref from ${ref} to ${newRef}.` ); return newRef; @@ -87506,9 +87439,9 @@ async function isAnalyzingDefaultBranch() { } // src/logging.ts -var core7 = __toESM(require_core()); +var core8 = __toESM(require_core()); function getActionsLogger() { - return core7; + return core8; } // src/overlay-database-utils.ts @@ -87845,7 +87778,7 @@ function generateCodeScanningConfig(originalUserInput, augmentationProperties) { // src/codeql.ts var fs4 = __toESM(require("fs")); var path4 = __toESM(require("path")); -var core9 = __toESM(require_core()); +var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); // src/setup-codeql.ts @@ -87860,7 +87793,7 @@ var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); // src/tools-download.ts -var core8 = __toESM(require_core()); +var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); @@ -88319,12 +88252,12 @@ ${output}` ); } else if (checkVersion && process.env["CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */] !== "true" && !await codeQlVersionAtLeast(codeql, CODEQL_NEXT_MINIMUM_VERSION)) { const result = await codeql.getVersion(); - core9.warning( + core10.warning( `CodeQL CLI version ${result.version} was discontinued on ${GHES_MOST_RECENT_DEPRECATION_DATE} alongside GitHub Enterprise Server ${GHES_VERSION_MOST_RECENTLY_DEPRECATED} and will not be supported by the next minor release of the CodeQL Action. Please update to CodeQL CLI version ${CODEQL_NEXT_MINIMUM_VERSION} or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version. Alternatively, if you want to continue using CodeQL CLI version ${result.version}, you can replace 'github/codeql-action/*@v${getActionVersion().split(".")[0]}' by 'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to continue using this version of the CodeQL Action.` ); - core9.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); + core10.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); } return codeql; } @@ -88443,7 +88376,7 @@ async function runResolveBuildEnvironment(cmd, logger, workingDir, language) { // src/status-report.ts var os = __toESM(require("os")); -var core10 = __toESM(require_core()); +var core11 = __toESM(require_core()); function isFirstPartyAnalysis(actionName) { if (actionName !== "upload-sarif" /* UploadSarif */) { return true; @@ -88459,12 +88392,12 @@ function getActionsStatus(error2, otherFailureCause) { } function setJobStatusIfUnsuccessful(actionStatus) { if (actionStatus === "user-error") { - core10.exportVariable( + core11.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_CONFIGURATION_ERROR" /* ConfigErrorStatus */ ); } else if (actionStatus === "failure" || actionStatus === "aborted") { - core10.exportVariable( + core11.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_FAILURE" /* FailureStatus */ ); @@ -88483,14 +88416,14 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi let workflowStartedAt = process.env["CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */]; if (workflowStartedAt === void 0) { workflowStartedAt = actionStartedAt.toISOString(); - core10.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt); + core11.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt); } const runnerOs = getRequiredEnvParam("RUNNER_OS"); const codeQlCliVersion = getCachedCodeQlVersion(); const actionRef = process.env["GITHUB_ACTION_REF"] || ""; const testingEnvironment = getTestingEnvironment(); if (testingEnvironment) { - core10.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment); + core11.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment); } const isSteadyStateDefaultSetupRun = process.env["CODE_SCANNING_IS_STEADY_STATE_DEFAULT_SETUP"] === "true"; const statusReport = { @@ -88568,9 +88501,9 @@ var INCOMPATIBLE_MSG = "CodeQL Action version is incompatible with the code scan async function sendStatusReport(statusReport) { setJobStatusIfUnsuccessful(statusReport.status); const statusReportJSON = JSON.stringify(statusReport); - core10.debug(`Sending status report: ${statusReportJSON}`); + core11.debug(`Sending status report: ${statusReportJSON}`); if (isInTestMode()) { - core10.debug("In test mode. Status reports are not uploaded."); + core11.debug("In test mode. Status reports are not uploaded."); return; } const nwo = getRepositoryNwo(); @@ -88589,26 +88522,26 @@ async function sendStatusReport(statusReport) { switch (e.status) { case 403: if (getWorkflowEventName() === "push" && process.env["GITHUB_ACTOR"] === "dependabot[bot]") { - core10.warning( + core11.warning( `Workflows triggered by Dependabot on the "push" event run with read-only access. Uploading Code Scanning results requires write access. To use Code Scanning with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. See ${"https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push" /* SCANNING_ON_PUSH */} for more information on how to configure these events.` ); } else { - core10.warning(e.message); + core11.warning(e.message); } return; case 404: - core10.warning(e.message); + core11.warning(e.message); return; case 422: if (getRequiredEnvParam("GITHUB_SERVER_URL") !== GITHUB_DOTCOM_URL) { - core10.debug(INCOMPATIBLE_MSG); + core11.debug(INCOMPATIBLE_MSG); } else { - core10.debug(OUT_OF_DATE_MSG); + core11.debug(OUT_OF_DATE_MSG); } return; } } - core10.warning( + core11.warning( `An unexpected error occurred when sending code scanning status report: ${getErrorMessage( e )}` @@ -88650,16 +88583,16 @@ async function run() { workingDirectory, getRequiredInput("language") ); - core11.setOutput(ENVIRONMENT_OUTPUT_NAME, result); + core12.setOutput(ENVIRONMENT_OUTPUT_NAME, result); } catch (unwrappedError) { const error2 = wrapError(unwrappedError); if (error2 instanceof CliError) { - core11.setOutput(ENVIRONMENT_OUTPUT_NAME, {}); + core12.setOutput(ENVIRONMENT_OUTPUT_NAME, {}); logger.warning( `Failed to resolve a build environment suitable for automatically building your code. ${error2.message}` ); } else { - core11.setFailed( + core12.setFailed( `Failed to resolve a build environment suitable for automatically building your code. ${error2.message}` ); const statusReportBase2 = await createStatusReportBase( @@ -88694,7 +88627,7 @@ async function runWrapper() { try { await run(); } catch (error2) { - core11.setFailed( + core12.setFailed( `${"resolve-environment" /* ResolveEnvironment */} action failed: ${getErrorMessage( error2 )}` diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 07be67504..8fdf4c705 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -34336,127 +34336,6 @@ var require_del = __commonJS({ } }); -// node_modules/tiny-each-async/index.js -var require_tiny_each_async = __commonJS({ - "node_modules/tiny-each-async/index.js"(exports2, module2) { - "use strict"; - module2.exports = function eachAsync(arr, parallelLimit, iteratorFn, cb) { - var pending = 0; - var index = 0; - var lastIndex = arr.length - 1; - var called = false; - var limit; - var callback; - var iterate; - if (typeof parallelLimit === "number") { - limit = parallelLimit; - iterate = iteratorFn; - callback = cb || function noop() { - }; - } else { - iterate = parallelLimit; - callback = iteratorFn || function noop() { - }; - limit = arr.length; - } - if (!arr.length) { - return callback(); - } - var iteratorLength = iterate.length; - var shouldCallNextIterator = function shouldCallNextIterator2() { - return !called && pending < limit && index < lastIndex; - }; - var iteratorCallback = function iteratorCallback2(err) { - if (called) { - return; - } - pending--; - if (err || index === lastIndex && !pending) { - called = true; - callback(err); - } else if (shouldCallNextIterator()) { - processIterator(++index); - } - }; - var processIterator = function processIterator2() { - pending++; - var args = iteratorLength === 2 ? [arr[index], iteratorCallback] : [arr[index], index, iteratorCallback]; - iterate.apply(null, args); - if (shouldCallNextIterator()) { - processIterator2(++index); - } - }; - processIterator(); - }; - } -}); - -// node_modules/get-folder-size/index.js -var require_get_folder_size = __commonJS({ - "node_modules/get-folder-size/index.js"(exports2, module2) { - "use strict"; - var fs2 = require("fs"); - var path2 = require("path"); - var eachAsync = require_tiny_each_async(); - function readSizeRecursive(seen, item, ignoreRegEx, callback) { - let cb; - let ignoreRegExp; - if (!callback) { - cb = ignoreRegEx; - ignoreRegExp = null; - } else { - cb = callback; - ignoreRegExp = ignoreRegEx; - } - fs2.lstat(item, function lstat(e, stats) { - let total = !e ? stats.size || 0 : 0; - if (stats) { - if (seen.has(stats.ino)) { - return cb(null, 0); - } - seen.add(stats.ino); - } - if (!e && stats.isDirectory()) { - fs2.readdir(item, (err, list) => { - if (err) { - return cb(err); - } - eachAsync( - list, - 5e3, - (dirItem, next) => { - readSizeRecursive( - seen, - path2.join(item, dirItem), - ignoreRegExp, - (error2, size) => { - if (!error2) { - total += size; - } - next(error2); - } - ); - }, - (finalErr) => { - cb(finalErr, total); - } - ); - }); - } else { - if (ignoreRegExp && ignoreRegExp.test(item)) { - total = 0; - } - cb(e, total); - } - }); - } - module2.exports = (...args) => { - args.unshift(/* @__PURE__ */ new Set()); - return readSizeRecursive(...args); - }; - } -}); - // node_modules/semver/internal/constants.js var require_constants9 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -36412,7 +36291,7 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", @@ -38076,7 +37955,7 @@ var require_internal_glob_options_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -38086,15 +37965,15 @@ var require_internal_glob_options_helper = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core13.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core13.debug(`implicitDescendants '${result.implicitDescendants}'`); + core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; @@ -38758,7 +38637,7 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs2 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); var path2 = __importStar4(require("path")); @@ -38809,7 +38688,7 @@ var require_internal_globber = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core13.debug(`Search path '${searchPath}'`); + core14.debug(`Search path '${searchPath}'`); try { yield __await4(fs2.promises.lstat(searchPath)); } catch (err) { @@ -38881,7 +38760,7 @@ var require_internal_globber = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core13.debug(`Broken symlink '${item.path}'`); + core14.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -38897,7 +38776,7 @@ var require_internal_globber = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -40221,7 +40100,7 @@ var require_cacheUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob2 = __importStar4(require_glob2()); var io6 = __importStar4(require_io()); @@ -40274,7 +40153,7 @@ var require_cacheUtils = __commonJS({ _e = false; const file = _c; const relativeFile = path2.relative(workspace, file).replace(new RegExp(`\\${path2.sep}`, "g"), "/"); - core13.debug(`Matched: ${relativeFile}`); + core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { @@ -40304,7 +40183,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); - core13.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec2.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, @@ -40315,10 +40194,10 @@ var require_cacheUtils = __commonJS({ } }); } catch (err) { - core13.debug(err.message); + core14.debug(err.message); } versionOutput = versionOutput.trim(); - core13.debug(versionOutput); + core14.debug(versionOutput); return versionOutput; }); } @@ -40326,7 +40205,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); - core13.debug(`zstd version: ${version}`); + core14.debug(`zstd version: ${version}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -75638,7 +75517,7 @@ var require_uploadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var storage_blob_1 = require_dist7(); var errors_1 = require_errors2(); var UploadProgress = class { @@ -75680,7 +75559,7 @@ var require_uploadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core13.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + core14.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -75735,14 +75614,14 @@ var require_uploadUtils = __commonJS({ }; try { uploadProgress.startDisplayTimer(); - core13.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + core14.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); if (response._response.status >= 400) { throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); } return response; } catch (error2) { - core13.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); + core14.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); throw error2; } finally { uploadProgress.stopDisplayTimer(); @@ -75813,7 +75692,7 @@ var require_requestUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var constants_1 = require_constants10(); function isSuccessStatusCode(statusCode) { @@ -75874,9 +75753,9 @@ var require_requestUtils = __commonJS({ isRetryable = isRetryableStatusCode(statusCode); errorMessage = `Cache service responded with ${statusCode}`; } - core13.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core14.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); if (!isRetryable) { - core13.debug(`${name} - Error is not retryable`); + core14.debug(`${name} - Error is not retryable`); break; } yield sleep(delay); @@ -75981,7 +75860,7 @@ var require_downloadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); @@ -76019,7 +75898,7 @@ var require_downloadUtils = __commonJS({ this.segmentIndex = this.segmentIndex + 1; this.segmentSize = segmentSize; this.receivedBytes = 0; - core13.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + core14.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); } /** * Sets the number of bytes received for the current segment. @@ -76053,7 +75932,7 @@ var require_downloadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core13.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + core14.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -76103,7 +75982,7 @@ var require_downloadUtils = __commonJS({ })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { downloadResponse.message.destroy(); - core13.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + core14.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); }); yield pipeResponseToStream(downloadResponse, writeStream); const contentLengthHeader = downloadResponse.message.headers["content-length"]; @@ -76114,7 +75993,7 @@ var require_downloadUtils = __commonJS({ throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); } } else { - core13.debug("Unable to validate download, no Content-Length header"); + core14.debug("Unable to validate download, no Content-Length header"); } }); } @@ -76234,7 +76113,7 @@ var require_downloadUtils = __commonJS({ const properties = yield client.getProperties(); const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; if (contentLength < 0) { - core13.debug("Unable to determine content length, downloading file with http-client..."); + core14.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); @@ -76314,7 +76193,7 @@ var require_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -76334,9 +76213,9 @@ var require_options = __commonJS({ } result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; - core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core13.debug(`Upload concurrency: ${result.uploadConcurrency}`); - core13.debug(`Upload chunk size: ${result.uploadChunkSize}`); + core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core14.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } exports2.getUploadOptions = getUploadOptions; @@ -76373,12 +76252,12 @@ var require_options = __commonJS({ if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) { result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; } - core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core13.debug(`Download concurrency: ${result.downloadConcurrency}`); - core13.debug(`Request timeout (ms): ${result.timeoutInMs}`); - core13.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); - core13.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); - core13.debug(`Lookup only: ${result.lookupOnly}`); + core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core14.debug(`Download concurrency: ${result.downloadConcurrency}`); + core14.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core14.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); + core14.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core14.debug(`Lookup only: ${result.lookupOnly}`); return result; } exports2.getDownloadOptions = getDownloadOptions; @@ -76558,7 +76437,7 @@ var require_cacheHttpClient = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); var fs2 = __importStar4(require("fs")); @@ -76576,7 +76455,7 @@ var require_cacheHttpClient = __commonJS({ throw new Error("Cache Service Url not found, unable to restore cache."); } const url = `${baseUrl}_apis/artifactcache/${resource}`; - core13.debug(`Resource Url: ${url}`); + core14.debug(`Resource Url: ${url}`); return url; } function createAcceptHeader(type2, apiVersion) { @@ -76604,7 +76483,7 @@ var require_cacheHttpClient = __commonJS({ return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { - if (core13.isDebug()) { + if (core14.isDebug()) { yield printCachesListForDiagnostics(keys[0], httpClient, version); } return null; @@ -76617,9 +76496,9 @@ var require_cacheHttpClient = __commonJS({ if (!cacheDownloadUrl) { throw new Error("Cache not found."); } - core13.setSecret(cacheDownloadUrl); - core13.debug(`Cache Result:`); - core13.debug(JSON.stringify(cacheResult)); + core14.setSecret(cacheDownloadUrl); + core14.debug(`Cache Result:`); + core14.debug(JSON.stringify(cacheResult)); return cacheResult; }); } @@ -76634,10 +76513,10 @@ var require_cacheHttpClient = __commonJS({ const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { - core13.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key + core14.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { - core13.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); + core14.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); } } } @@ -76682,7 +76561,7 @@ Other caches with similar key:`); } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter4(this, void 0, void 0, function* () { - core13.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) @@ -76704,7 +76583,7 @@ Other caches with similar key:`); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); const parallelUploads = [...new Array(concurrency).keys()]; - core13.debug("Awaiting all uploads"); + core14.debug("Awaiting all uploads"); let offset = 0; try { yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { @@ -76747,16 +76626,16 @@ Other caches with similar key:`); yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); } else { const httpClient = createHttpClient(); - core13.debug("Upload cache"); + core14.debug("Upload cache"); yield uploadFile(httpClient, cacheId, archivePath, options); - core13.debug("Commiting cache"); + core14.debug("Commiting cache"); const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + core14.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); } - core13.info("Cache saved successfully"); + core14.info("Cache saved successfully"); } }); } @@ -82182,7 +82061,7 @@ var require_cache3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var path2 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); @@ -82235,7 +82114,7 @@ var require_cache3 = __commonJS({ function restoreCache4(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core13.debug(`Cache service version: ${cacheServiceVersion}`); + core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); switch (cacheServiceVersion) { case "v2": @@ -82251,8 +82130,8 @@ var require_cache3 = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core13.debug("Resolved Keys:"); - core13.debug(JSON.stringify(keys)); + core14.debug("Resolved Keys:"); + core14.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82270,19 +82149,19 @@ var require_cache3 = __commonJS({ return void 0; } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core13.info("Lookup only - skipping download"); + core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } archivePath = path2.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core13.info("Cache restored successfully"); + core14.info("Cache restored successfully"); return cacheEntry.cacheKey; } catch (error2) { const typedError = error2; @@ -82290,16 +82169,16 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to restore: ${error2.message}`); + core14.error(`Failed to restore: ${error2.message}`); } else { - core13.warning(`Failed to restore: ${error2.message}`); + core14.warning(`Failed to restore: ${error2.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82310,8 +82189,8 @@ var require_cache3 = __commonJS({ options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core13.debug("Resolved Keys:"); - core13.debug(JSON.stringify(keys)); + core14.debug("Resolved Keys:"); + core14.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82329,30 +82208,30 @@ var require_cache3 = __commonJS({ }; const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core13.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); + core14.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); return void 0; } const isRestoreKeyMatch = request.key !== response.matchedKey; if (isRestoreKeyMatch) { - core13.info(`Cache hit for restore-key: ${response.matchedKey}`); + core14.info(`Cache hit for restore-key: ${response.matchedKey}`); } else { - core13.info(`Cache hit for: ${response.matchedKey}`); + core14.info(`Cache hit for: ${response.matchedKey}`); } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core13.info("Lookup only - skipping download"); + core14.info("Lookup only - skipping download"); return response.matchedKey; } archivePath = path2.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive path: ${archivePath}`); - core13.debug(`Starting download of archive to: ${archivePath}`); + core14.debug(`Archive path: ${archivePath}`); + core14.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - if (core13.isDebug()) { + core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core13.info("Cache restored successfully"); + core14.info("Cache restored successfully"); return response.matchedKey; } catch (error2) { const typedError = error2; @@ -82360,9 +82239,9 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to restore: ${error2.message}`); + core14.error(`Failed to restore: ${error2.message}`); } else { - core13.warning(`Failed to restore: ${error2.message}`); + core14.warning(`Failed to restore: ${error2.message}`); } } } finally { @@ -82371,7 +82250,7 @@ var require_cache3 = __commonJS({ yield utils.unlinkFile(archivePath); } } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82380,7 +82259,7 @@ var require_cache3 = __commonJS({ function saveCache4(paths, key, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core13.debug(`Cache service version: ${cacheServiceVersion}`); + core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); checkKey(key); switch (cacheServiceVersion) { @@ -82399,26 +82278,26 @@ var require_cache3 = __commonJS({ const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core13.debug("Cache Paths:"); - core13.debug(`${JSON.stringify(cachePaths)}`); + core14.debug("Cache Paths:"); + core14.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path2.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const fileSizeLimit = 10 * 1024 * 1024 * 1024; const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.debug(`File Size: ${archiveFileSize}`); + core14.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } - core13.debug("Reserving Cache"); + core14.debug("Reserving Cache"); const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { compressionMethod, enableCrossOsArchive, @@ -82431,26 +82310,26 @@ var require_cache3 = __commonJS({ } else { throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); } - core13.debug(`Saving Cache (ID: ${cacheId})`); + core14.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); } catch (error2) { const typedError = error2; if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError2.name) { - core13.info(`Failed to save: ${typedError.message}`); + core14.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to save: ${typedError.message}`); + core14.error(`Failed to save: ${typedError.message}`); } else { - core13.warning(`Failed to save: ${typedError.message}`); + core14.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82463,26 +82342,26 @@ var require_cache3 = __commonJS({ const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core13.debug("Cache Paths:"); - core13.debug(`${JSON.stringify(cachePaths)}`); + core14.debug("Cache Paths:"); + core14.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path2.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.debug(`File Size: ${archiveFileSize}`); + core14.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } options.archiveSizeBytes = archiveFileSize; - core13.debug("Reserving Cache"); + core14.debug("Reserving Cache"); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const request = { key, @@ -82496,10 +82375,10 @@ var require_cache3 = __commonJS({ } signedUploadUrl = response.signedUploadUrl; } catch (error2) { - core13.debug(`Failed to reserve cache: ${error2}`); + core14.debug(`Failed to reserve cache: ${error2}`); throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } - core13.debug(`Attempting to upload cache located at: ${archivePath}`); + core14.debug(`Attempting to upload cache located at: ${archivePath}`); yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); const finalizeRequest = { key, @@ -82507,7 +82386,7 @@ var require_cache3 = __commonJS({ sizeBytes: `${archiveFileSize}` }; const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); - core13.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); if (!finalizeResponse.ok) { throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); } @@ -82517,19 +82396,19 @@ var require_cache3 = __commonJS({ if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError2.name) { - core13.info(`Failed to save: ${typedError.message}`); + core14.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to save: ${typedError.message}`); + core14.error(`Failed to save: ${typedError.message}`); } else { - core13.warning(`Failed to save: ${typedError.message}`); + core14.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -84636,14 +84515,14 @@ var require_retention = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getExpiration = void 0; var generated_1 = require_generated(); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getExpiration(retentionDays) { if (!retentionDays) { return void 0; } const maxRetentionDays = getRetentionDays(); if (maxRetentionDays && maxRetentionDays < retentionDays) { - core13.warning(`Retention days cannot be greater than the maximum allowed retention set within the repository. Using ${maxRetentionDays} instead.`); + core14.warning(`Retention days cannot be greater than the maximum allowed retention set within the repository. Using ${maxRetentionDays} instead.`); retentionDays = maxRetentionDays; } const expirationDate = /* @__PURE__ */ new Date(); @@ -85235,7 +85114,7 @@ var require_util11 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getBackendIdsFromToken = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var config_1 = require_config2(); var jwt_decode_1 = __importDefault4(require_jwt_decode_cjs()); var InvalidJwtError = new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims"); @@ -85261,8 +85140,8 @@ var require_util11 = __commonJS({ workflowRunBackendId: scopeParts[1], workflowJobRunBackendId: scopeParts[2] }; - core13.debug(`Workflow Run Backend ID: ${ids.workflowRunBackendId}`); - core13.debug(`Workflow Job Run Backend ID: ${ids.workflowJobRunBackendId}`); + core14.debug(`Workflow Run Backend ID: ${ids.workflowRunBackendId}`); + core14.debug(`Workflow Job Run Backend ID: ${ids.workflowJobRunBackendId}`); return ids; } throw InvalidJwtError; @@ -85333,7 +85212,7 @@ var require_blob_upload = __commonJS({ exports2.uploadZipToBlobStorage = void 0; var storage_blob_1 = require_dist7(); var config_1 = require_config2(); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var crypto = __importStar4(require("crypto")); var stream = __importStar4(require("stream")); var errors_1 = require_errors3(); @@ -85359,9 +85238,9 @@ var require_blob_upload = __commonJS({ const bufferSize = (0, config_1.getUploadChunkSize)(); const blobClient = new storage_blob_1.BlobClient(authenticatedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); - core13.debug(`Uploading artifact zip to blob storage with maxConcurrency: ${maxConcurrency}, bufferSize: ${bufferSize}`); + core14.debug(`Uploading artifact zip to blob storage with maxConcurrency: ${maxConcurrency}, bufferSize: ${bufferSize}`); const uploadCallback = (progress) => { - core13.info(`Uploaded bytes ${progress.loadedBytes}`); + core14.info(`Uploaded bytes ${progress.loadedBytes}`); uploadByteCount = progress.loadedBytes; lastProgressTime = Date.now(); }; @@ -85375,7 +85254,7 @@ var require_blob_upload = __commonJS({ const hashStream = crypto.createHash("sha256"); zipUploadStream.pipe(uploadStream); zipUploadStream.pipe(hashStream).setEncoding("hex"); - core13.info("Beginning upload of artifact content to blob storage"); + core14.info("Beginning upload of artifact content to blob storage"); try { yield Promise.race([ blockBlobClient.uploadStream(uploadStream, bufferSize, maxConcurrency, options), @@ -85389,12 +85268,12 @@ var require_blob_upload = __commonJS({ } finally { abortController.abort(); } - core13.info("Finished uploading artifact content to blob storage!"); + core14.info("Finished uploading artifact content to blob storage!"); hashStream.end(); sha256Hash = hashStream.read(); - core13.info(`SHA256 hash of uploaded artifact zip is ${sha256Hash}`); + core14.info(`SHA256 hash of uploaded artifact zip is ${sha256Hash}`); if (uploadByteCount === 0) { - core13.warning(`No data was uploaded to blob storage. Reported upload byte count is 0.`); + core14.warning(`No data was uploaded to blob storage. Reported upload byte count is 0.`); } return { uploadSize: uploadByteCount, @@ -88450,7 +88329,7 @@ var require_BufferList = __commonJS({ this.head = this.tail = null; this.length = 0; }; - BufferList.prototype.join = function join2(s) { + BufferList.prototype.join = function join3(s) { if (this.length === 0) return ""; var p = this.head; var ret = "" + p.data; @@ -109453,7 +109332,7 @@ var require_zip2 = __commonJS({ var stream = __importStar4(require("stream")); var promises_1 = require("fs/promises"); var archiver2 = __importStar4(require_archiver()); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var config_1 = require_config2(); exports2.DEFAULT_COMPRESSION_LEVEL = 6; var ZipUploadStream = class extends stream.Transform { @@ -109470,7 +109349,7 @@ var require_zip2 = __commonJS({ exports2.ZipUploadStream = ZipUploadStream; function createZipUploadStream(uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) { return __awaiter4(this, void 0, void 0, function* () { - core13.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); + core14.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); const zip = archiver2.create("zip", { highWaterMark: (0, config_1.getUploadChunkSize)(), zlib: { level: compressionLevel } @@ -109494,8 +109373,8 @@ var require_zip2 = __commonJS({ } const bufferSize = (0, config_1.getUploadChunkSize)(); const zipUploadStream = new ZipUploadStream(bufferSize); - core13.debug(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`); - core13.debug(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`); + core14.debug(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`); + core14.debug(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`); zip.pipe(zipUploadStream); zip.finalize(); return zipUploadStream; @@ -109503,24 +109382,24 @@ var require_zip2 = __commonJS({ } exports2.createZipUploadStream = createZipUploadStream; var zipErrorCallback = (error2) => { - core13.error("An error has occurred while creating the zip file for upload"); - core13.info(error2); + core14.error("An error has occurred while creating the zip file for upload"); + core14.info(error2); throw new Error("An error has occurred during zip creation for the artifact"); }; var zipWarningCallback = (error2) => { if (error2.code === "ENOENT") { - core13.warning("ENOENT warning during artifact zip creation. No such file or directory"); - core13.info(error2); + core14.warning("ENOENT warning during artifact zip creation. No such file or directory"); + core14.info(error2); } else { - core13.warning(`A non-blocking warning has occurred during artifact zip creation: ${error2.code}`); - core13.info(error2); + core14.warning(`A non-blocking warning has occurred during artifact zip creation: ${error2.code}`); + core14.info(error2); } }; var zipFinishCallback = () => { - core13.debug("Zip stream for upload has finished."); + core14.debug("Zip stream for upload has finished."); }; var zipEndCallback = () => { - core13.debug("Zip stream for upload has ended."); + core14.debug("Zip stream for upload has ended."); }; } }); @@ -109585,7 +109464,7 @@ var require_upload_artifact = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadArtifact = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var retention_1 = require_retention(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); @@ -109632,13 +109511,13 @@ var require_upload_artifact = __commonJS({ value: `sha256:${uploadResult.sha256Hash}` }); } - core13.info(`Finalizing artifact upload`); + core14.info(`Finalizing artifact upload`); const finalizeArtifactResp = yield artifactClient.FinalizeArtifact(finalizeArtifactReq); if (!finalizeArtifactResp.ok) { throw new errors_1.InvalidResponseError("FinalizeArtifact: response from backend was not ok"); } const artifactId = BigInt(finalizeArtifactResp.artifactId); - core13.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`); + core14.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`); return { size: uploadResult.uploadSize, digest: uploadResult.sha256Hash, @@ -116786,7 +116665,7 @@ var require_download_artifact = __commonJS({ var crypto = __importStar4(require("crypto")); var stream = __importStar4(require("stream")); var github2 = __importStar4(require_github2()); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var httpClient = __importStar4(require_lib()); var unzip_stream_1 = __importDefault4(require_unzip()); var user_agent_1 = require_user_agent2(); @@ -116822,7 +116701,7 @@ var require_download_artifact = __commonJS({ return yield streamExtractExternal(url, directory); } catch (error2) { retryCount++; - core13.debug(`Failed to download artifact after ${retryCount} retries due to ${error2.message}. Retrying in 5 seconds...`); + core14.debug(`Failed to download artifact after ${retryCount} retries due to ${error2.message}. Retrying in 5 seconds...`); yield new Promise((resolve2) => setTimeout(resolve2, 5e3)); } } @@ -116851,7 +116730,7 @@ var require_download_artifact = __commonJS({ extractStream.on("data", () => { timer.refresh(); }).on("error", (error2) => { - core13.debug(`response.message: Artifact download failed: ${error2.message}`); + core14.debug(`response.message: Artifact download failed: ${error2.message}`); clearTimeout(timer); reject(error2); }).pipe(unzip_stream_1.default.Extract({ path: directory })).on("close", () => { @@ -116859,7 +116738,7 @@ var require_download_artifact = __commonJS({ if (hashStream) { hashStream.end(); sha256Digest = hashStream.read(); - core13.info(`SHA256 digest of downloaded artifact is ${sha256Digest}`); + core14.info(`SHA256 digest of downloaded artifact is ${sha256Digest}`); } resolve2({ sha256Digest: `sha256:${sha256Digest}` }); }).on("error", (error2) => { @@ -116874,7 +116753,7 @@ var require_download_artifact = __commonJS({ const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const api = github2.getOctokit(token); let digestMismatch = false; - core13.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`); + core14.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`); const { headers, status } = yield api.rest.actions.downloadArtifact({ owner: repositoryOwner, repo: repositoryName, @@ -116891,16 +116770,16 @@ var require_download_artifact = __commonJS({ if (!location) { throw new Error(`Unable to redirect to artifact download url`); } - core13.info(`Redirecting to blob download url: ${scrubQueryParameters(location)}`); + core14.info(`Redirecting to blob download url: ${scrubQueryParameters(location)}`); try { - core13.info(`Starting download of artifact to: ${downloadPath}`); + core14.info(`Starting download of artifact to: ${downloadPath}`); const extractResponse = yield streamExtract(location, downloadPath); - core13.info(`Artifact download completed successfully.`); + core14.info(`Artifact download completed successfully.`); if (options === null || options === void 0 ? void 0 : options.expectedHash) { if ((options === null || options === void 0 ? void 0 : options.expectedHash) !== extractResponse.sha256Digest) { digestMismatch = true; - core13.debug(`Computed digest: ${extractResponse.sha256Digest}`); - core13.debug(`Expected digest: ${options.expectedHash}`); + core14.debug(`Computed digest: ${extractResponse.sha256Digest}`); + core14.debug(`Expected digest: ${options.expectedHash}`); } } } catch (error2) { @@ -116927,7 +116806,7 @@ var require_download_artifact = __commonJS({ Are you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`); } if (artifacts.length > 1) { - core13.warning("Multiple artifacts found, defaulting to first."); + core14.warning("Multiple artifacts found, defaulting to first."); } const signedReq = { workflowRunBackendId: artifacts[0].workflowRunBackendId, @@ -116935,16 +116814,16 @@ Are you trying to download from a different run? Try specifying a github-token w name: artifacts[0].name }; const { signedUrl } = yield artifactClient.GetSignedArtifactURL(signedReq); - core13.info(`Redirecting to blob download url: ${scrubQueryParameters(signedUrl)}`); + core14.info(`Redirecting to blob download url: ${scrubQueryParameters(signedUrl)}`); try { - core13.info(`Starting download of artifact to: ${downloadPath}`); + core14.info(`Starting download of artifact to: ${downloadPath}`); const extractResponse = yield streamExtract(signedUrl, downloadPath); - core13.info(`Artifact download completed successfully.`); + core14.info(`Artifact download completed successfully.`); if (options === null || options === void 0 ? void 0 : options.expectedHash) { if ((options === null || options === void 0 ? void 0 : options.expectedHash) !== extractResponse.sha256Digest) { digestMismatch = true; - core13.debug(`Computed digest: ${extractResponse.sha256Digest}`); - core13.debug(`Expected digest: ${options.expectedHash}`); + core14.debug(`Computed digest: ${extractResponse.sha256Digest}`); + core14.debug(`Expected digest: ${options.expectedHash}`); } } } catch (error2) { @@ -116957,10 +116836,10 @@ Are you trying to download from a different run? Try specifying a github-token w function resolveOrCreateDirectory(downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { return __awaiter4(this, void 0, void 0, function* () { if (!(yield exists(downloadPath))) { - core13.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); + core14.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); yield promises_1.default.mkdir(downloadPath, { recursive: true }); } else { - core13.debug(`Artifact destination folder already exists: ${downloadPath}`); + core14.debug(`Artifact destination folder already exists: ${downloadPath}`); } return downloadPath; }); @@ -117001,7 +116880,7 @@ var require_retry_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRetryOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var defaultMaxRetryNumber = 5; var defaultExemptStatusCodes = [400, 401, 403, 404, 422]; function getRetryOptions(defaultOptions, retries = defaultMaxRetryNumber, exemptStatusCodes = defaultExemptStatusCodes) { @@ -117016,7 +116895,7 @@ var require_retry_options = __commonJS({ retryOptions.doNotRetry = exemptStatusCodes; } const requestOptions = Object.assign(Object.assign({}, defaultOptions.request), { retries }); - core13.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : "octokit default: [400, 401, 403, 404, 422]"})`); + core14.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : "octokit default: [400, 401, 403, 404, 422]"})`); return [retryOptions, requestOptions]; } exports2.getRetryOptions = getRetryOptions; @@ -117173,7 +117052,7 @@ var require_get_artifact = __commonJS({ exports2.getArtifactInternal = exports2.getArtifactPublic = void 0; var github_1 = require_github2(); var plugin_retry_1 = require_dist_node25(); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var utils_1 = require_utils13(); var retry_options_1 = require_retry_options(); var plugin_request_log_1 = require_dist_node24(); @@ -117211,7 +117090,7 @@ var require_get_artifact = __commonJS({ let artifact2 = getArtifactResp.data.artifacts[0]; if (getArtifactResp.data.artifacts.length > 1) { artifact2 = getArtifactResp.data.artifacts.sort((a, b) => b.id - a.id)[0]; - core13.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.id})`); + core14.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.id})`); } return { artifact: { @@ -117244,7 +117123,7 @@ var require_get_artifact = __commonJS({ let artifact2 = res.artifacts[0]; if (res.artifacts.length > 1) { artifact2 = res.artifacts.sort((a, b) => Number(b.databaseId) - Number(a.databaseId))[0]; - core13.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.databaseId})`); + core14.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.databaseId})`); } return { artifact: { @@ -119192,7 +119071,7 @@ var require_requestUtils2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientRequest = exports2.retry = void 0; var utils_1 = require_utils14(); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { return __awaiter4(this, void 0, void 0, function* () { @@ -119219,13 +119098,13 @@ var require_requestUtils2 = __commonJS({ errorMessage = error2.message; } if (!isRetryable) { - core13.info(`${name} - Error is not retryable`); + core14.info(`${name} - Error is not retryable`); if (response) { (0, utils_1.displayHttpDiagnostics)(response); } break; } - core13.info(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core14.info(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); yield (0, utils_1.sleep)((0, utils_1.getExponentialRetryTimeInMilliseconds)(attempt)); attempt++; } @@ -119309,7 +119188,7 @@ var require_upload_http_client = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadHttpClient = void 0; var fs2 = __importStar4(require("fs")); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var tmp = __importStar4(require_tmp_promise()); var stream = __importStar4(require("stream")); var utils_1 = require_utils14(); @@ -119374,7 +119253,7 @@ var require_upload_http_client = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const FILE_CONCURRENCY = (0, config_variables_1.getUploadFileConcurrency)(); const MAX_CHUNK_SIZE = (0, config_variables_1.getUploadChunkSize)(); - core13.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`); + core14.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`); const parameters = []; let continueOnError = true; if (options) { @@ -119411,15 +119290,15 @@ var require_upload_http_client = __commonJS({ } const startTime = perf_hooks_1.performance.now(); const uploadFileResult = yield this.uploadFileAsync(index, currentFileParameters); - if (core13.isDebug()) { - core13.debug(`File: ${++completedFiles}/${filesToUpload.length}. ${currentFileParameters.file} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish upload`); + if (core14.isDebug()) { + core14.debug(`File: ${++completedFiles}/${filesToUpload.length}. ${currentFileParameters.file} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish upload`); } uploadFileSize += uploadFileResult.successfulUploadSize; totalFileSize += uploadFileResult.totalSize; if (uploadFileResult.isSuccess === false) { failedItemsToReport.push(currentFileParameters.file); if (!continueOnError) { - core13.error(`aborting artifact upload`); + core14.error(`aborting artifact upload`); abortPendingFileUploads = true; } } @@ -119428,7 +119307,7 @@ var require_upload_http_client = __commonJS({ }))); this.statusReporter.stop(); this.uploadHttpManager.disposeAndReplaceAllClients(); - core13.info(`Total size of all the files uploaded is ${uploadFileSize} bytes`); + core14.info(`Total size of all the files uploaded is ${uploadFileSize} bytes`); return { uploadSize: uploadFileSize, totalSize: totalFileSize, @@ -119454,16 +119333,16 @@ var require_upload_http_client = __commonJS({ let uploadFileSize = 0; let isGzip = true; if (!isFIFO && totalFileSize < 65536) { - core13.debug(`${parameters.file} is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size`); + core14.debug(`${parameters.file} is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size`); const buffer = yield (0, upload_gzip_1.createGZipFileInBuffer)(parameters.file); let openUploadStream; if (totalFileSize < buffer.byteLength) { - core13.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); + core14.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); openUploadStream = () => fs2.createReadStream(parameters.file); isGzip = false; uploadFileSize = totalFileSize; } else { - core13.debug(`A gzip file created for ${parameters.file} helped with reducing the size of the original file. The file will be uploaded using gzip.`); + core14.debug(`A gzip file created for ${parameters.file} helped with reducing the size of the original file. The file will be uploaded using gzip.`); openUploadStream = () => { const passThrough = new stream.PassThrough(); passThrough.end(buffer); @@ -119475,7 +119354,7 @@ var require_upload_http_client = __commonJS({ if (!result) { isUploadSuccessful = false; failedChunkSizes += uploadFileSize; - core13.warning(`Aborting upload for ${parameters.file} due to failure`); + core14.warning(`Aborting upload for ${parameters.file} due to failure`); } return { isSuccess: isUploadSuccessful, @@ -119484,16 +119363,16 @@ var require_upload_http_client = __commonJS({ }; } else { const tempFile = yield tmp.file(); - core13.debug(`${parameters.file} is greater than 64k in size. Creating a gzip file on-disk ${tempFile.path} to potentially reduce the upload size`); + core14.debug(`${parameters.file} is greater than 64k in size. Creating a gzip file on-disk ${tempFile.path} to potentially reduce the upload size`); uploadFileSize = yield (0, upload_gzip_1.createGZipFileOnDisk)(parameters.file, tempFile.path); let uploadFilePath = tempFile.path; if (!isFIFO && totalFileSize < uploadFileSize) { - core13.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); + core14.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); uploadFileSize = totalFileSize; uploadFilePath = parameters.file; isGzip = false; } else { - core13.debug(`The gzip file created for ${parameters.file} is smaller than the original file. The file will be uploaded using gzip.`); + core14.debug(`The gzip file created for ${parameters.file} is smaller than the original file. The file will be uploaded using gzip.`); } let abortFileUpload = false; while (offset < uploadFileSize) { @@ -119513,7 +119392,7 @@ var require_upload_http_client = __commonJS({ if (!result) { isUploadSuccessful = false; failedChunkSizes += chunkSize; - core13.warning(`Aborting upload for ${parameters.file} due to failure`); + core14.warning(`Aborting upload for ${parameters.file} due to failure`); abortFileUpload = true; } else { if (uploadFileSize > 8388608) { @@ -119521,7 +119400,7 @@ var require_upload_http_client = __commonJS({ } } } - core13.debug(`deleting temporary gzip file ${tempFile.path}`); + core14.debug(`deleting temporary gzip file ${tempFile.path}`); yield tempFile.cleanup(); return { isSuccess: isUploadSuccessful, @@ -119560,7 +119439,7 @@ var require_upload_http_client = __commonJS({ if (response) { (0, utils_1.displayHttpDiagnostics)(response); } - core13.info(`Retry limit has been reached for chunk at offset ${start} to ${resourceUrl}`); + core14.info(`Retry limit has been reached for chunk at offset ${start} to ${resourceUrl}`); return true; } return false; @@ -119568,14 +119447,14 @@ var require_upload_http_client = __commonJS({ const backOff = (retryAfterValue) => __awaiter4(this, void 0, void 0, function* () { this.uploadHttpManager.disposeAndReplaceClient(httpClientIndex); if (retryAfterValue) { - core13.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`); + core14.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`); yield (0, utils_1.sleep)(retryAfterValue); } else { const backoffTime = (0, utils_1.getExponentialRetryTimeInMilliseconds)(retryCount); - core13.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the upload at offset ${start}`); + core14.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the upload at offset ${start}`); yield (0, utils_1.sleep)(backoffTime); } - core13.info(`Finished backoff for retry #${retryCount}, continuing with upload`); + core14.info(`Finished backoff for retry #${retryCount}, continuing with upload`); return; }); while (retryCount <= retryLimit) { @@ -119583,7 +119462,7 @@ var require_upload_http_client = __commonJS({ try { response = yield uploadChunkRequest(); } catch (error2) { - core13.info(`An error has been caught http-client index ${httpClientIndex}, retrying the upload`); + core14.info(`An error has been caught http-client index ${httpClientIndex}, retrying the upload`); console.log(error2); if (incrementAndCheckRetryLimit()) { return false; @@ -119595,13 +119474,13 @@ var require_upload_http_client = __commonJS({ if ((0, utils_1.isSuccessStatusCode)(response.message.statusCode)) { return true; } else if ((0, utils_1.isRetryableStatusCode)(response.message.statusCode)) { - core13.info(`A ${response.message.statusCode} status code has been received, will attempt to retry the upload`); + core14.info(`A ${response.message.statusCode} status code has been received, will attempt to retry the upload`); if (incrementAndCheckRetryLimit(response)) { return false; } (0, utils_1.isThrottledStatusCode)(response.message.statusCode) ? yield backOff((0, utils_1.tryGetRetryAfterValueTimeInMilliseconds)(response.message.headers)) : yield backOff(); } else { - core13.error(`Unexpected response. Unable to upload chunk to ${resourceUrl}`); + core14.error(`Unexpected response. Unable to upload chunk to ${resourceUrl}`); (0, utils_1.displayHttpDiagnostics)(response); return false; } @@ -119619,7 +119498,7 @@ var require_upload_http_client = __commonJS({ resourceUrl.searchParams.append("artifactName", artifactName); const parameters = { Size: size }; const data = JSON.stringify(parameters, null, 2); - core13.debug(`URL is ${resourceUrl.toString()}`); + core14.debug(`URL is ${resourceUrl.toString()}`); const client = this.uploadHttpManager.getClient(0); const headers = (0, utils_1.getUploadHeaders)("application/json", false); const customErrorMessages = /* @__PURE__ */ new Map([ @@ -119632,7 +119511,7 @@ var require_upload_http_client = __commonJS({ return client.patch(resourceUrl.toString(), data, headers); }), customErrorMessages); yield response.readBody(); - core13.debug(`Artifact ${artifactName} has been successfully uploaded, total size in bytes: ${size}`); + core14.debug(`Artifact ${artifactName} has been successfully uploaded, total size in bytes: ${size}`); }); } }; @@ -119701,7 +119580,7 @@ var require_download_http_client = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DownloadHttpClient = void 0; var fs2 = __importStar4(require("fs")); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var zlib = __importStar4(require("zlib")); var utils_1 = require_utils14(); var url_1 = require("url"); @@ -119755,11 +119634,11 @@ var require_download_http_client = __commonJS({ downloadSingleArtifact(downloadItems) { return __awaiter4(this, void 0, void 0, function* () { const DOWNLOAD_CONCURRENCY = (0, config_variables_1.getDownloadFileConcurrency)(); - core13.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`); + core14.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`); const parallelDownloads = [...new Array(DOWNLOAD_CONCURRENCY).keys()]; let currentFile = 0; let downloadedFiles = 0; - core13.info(`Total number of files that will be downloaded: ${downloadItems.length}`); + core14.info(`Total number of files that will be downloaded: ${downloadItems.length}`); this.statusReporter.setTotalNumberOfFilesToProcess(downloadItems.length); this.statusReporter.start(); yield Promise.all(parallelDownloads.map((index) => __awaiter4(this, void 0, void 0, function* () { @@ -119768,8 +119647,8 @@ var require_download_http_client = __commonJS({ currentFile += 1; const startTime = perf_hooks_1.performance.now(); yield this.downloadIndividualFile(index, currentFileToDownload.sourceLocation, currentFileToDownload.targetPath); - if (core13.isDebug()) { - core13.debug(`File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish downloading`); + if (core14.isDebug()) { + core14.debug(`File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish downloading`); } this.statusReporter.incrementProcessedCount(); } @@ -119807,19 +119686,19 @@ var require_download_http_client = __commonJS({ } else { this.downloadHttpManager.disposeAndReplaceClient(httpClientIndex); if (retryAfterValue) { - core13.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the download`); + core14.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the download`); yield (0, utils_1.sleep)(retryAfterValue); } else { const backoffTime = (0, utils_1.getExponentialRetryTimeInMilliseconds)(retryCount); - core13.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the download`); + core14.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the download`); yield (0, utils_1.sleep)(backoffTime); } - core13.info(`Finished backoff for retry #${retryCount}, continuing with download`); + core14.info(`Finished backoff for retry #${retryCount}, continuing with download`); } }); const isAllBytesReceived = (expected, received) => { if (!expected || !received || process.env["ACTIONS_ARTIFACT_SKIP_DOWNLOAD_VALIDATION"]) { - core13.info("Skipping download validation."); + core14.info("Skipping download validation."); return true; } return parseInt(expected) === received; @@ -119840,7 +119719,7 @@ var require_download_http_client = __commonJS({ try { response = yield makeDownloadRequest(); } catch (error2) { - core13.info("An error occurred while attempting to download a file"); + core14.info("An error occurred while attempting to download a file"); console.log(error2); yield backOff(); continue; @@ -119860,7 +119739,7 @@ var require_download_http_client = __commonJS({ } } if (forceRetry || (0, utils_1.isRetryableStatusCode)(response.message.statusCode)) { - core13.info(`A ${response.message.statusCode} response code has been received while attempting to download an artifact`); + core14.info(`A ${response.message.statusCode} response code has been received while attempting to download an artifact`); resetDestinationStream(downloadPath); (0, utils_1.isThrottledStatusCode)(response.message.statusCode) ? yield backOff((0, utils_1.tryGetRetryAfterValueTimeInMilliseconds)(response.message.headers)) : yield backOff(); } else { @@ -119882,29 +119761,29 @@ var require_download_http_client = __commonJS({ if (isGzip) { const gunzip = zlib.createGunzip(); response.message.on("error", (error2) => { - core13.info(`An error occurred while attempting to read the response stream`); + core14.info(`An error occurred while attempting to read the response stream`); gunzip.close(); destinationStream.close(); reject(error2); }).pipe(gunzip).on("error", (error2) => { - core13.info(`An error occurred while attempting to decompress the response stream`); + core14.info(`An error occurred while attempting to decompress the response stream`); destinationStream.close(); reject(error2); }).pipe(destinationStream).on("close", () => { resolve2(); }).on("error", (error2) => { - core13.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); + core14.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); reject(error2); }); } else { response.message.on("error", (error2) => { - core13.info(`An error occurred while attempting to read the response stream`); + core14.info(`An error occurred while attempting to read the response stream`); destinationStream.close(); reject(error2); }).pipe(destinationStream).on("close", () => { resolve2(); }).on("error", (error2) => { - core13.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); + core14.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); reject(error2); }); } @@ -120043,7 +119922,7 @@ var require_artifact_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultArtifactClient = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var upload_specification_1 = require_upload_specification(); var upload_http_client_1 = require_upload_http_client(); var utils_1 = require_utils14(); @@ -120064,7 +119943,7 @@ var require_artifact_client = __commonJS({ */ uploadArtifact(name, files, rootDirectory, options) { return __awaiter4(this, void 0, void 0, function* () { - core13.info(`Starting artifact upload + core14.info(`Starting artifact upload For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`); (0, path_and_artifact_name_validation_1.checkArtifactName)(name); const uploadSpecification = (0, upload_specification_1.getUploadSpecification)(name, rootDirectory, files); @@ -120076,24 +119955,24 @@ For more detailed logs during the artifact upload process, enable step-debugging }; const uploadHttpClient = new upload_http_client_1.UploadHttpClient(); if (uploadSpecification.length === 0) { - core13.warning(`No files found that can be uploaded`); + core14.warning(`No files found that can be uploaded`); } else { const response = yield uploadHttpClient.createArtifactInFileContainer(name, options); if (!response.fileContainerResourceUrl) { - core13.debug(response.toString()); + core14.debug(response.toString()); throw new Error("No URL provided by the Artifact Service to upload an artifact to"); } - core13.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`); - core13.info(`Container for artifact "${name}" successfully created. Starting upload of file(s)`); + core14.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`); + core14.info(`Container for artifact "${name}" successfully created. Starting upload of file(s)`); const uploadResult = yield uploadHttpClient.uploadArtifactToFileContainer(response.fileContainerResourceUrl, uploadSpecification, options); - core13.info(`File upload process has finished. Finalizing the artifact upload`); + core14.info(`File upload process has finished. Finalizing the artifact upload`); yield uploadHttpClient.patchArtifactSize(uploadResult.totalSize, name); if (uploadResult.failedItems.length > 0) { - core13.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`); + core14.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`); } else { - core13.info(`Artifact has been finalized. All files have been successfully uploaded!`); + core14.info(`Artifact has been finalized. All files have been successfully uploaded!`); } - core13.info(` + core14.info(` The raw size of all the files that were specified for upload is ${uploadResult.totalSize} bytes The size of all the files that were uploaded is ${uploadResult.uploadSize} bytes. This takes into account any gzip compression used to reduce the upload size, time and storage @@ -120127,10 +120006,10 @@ Note: The size of downloaded zips can differ significantly from the reported siz path2 = (0, path_1.resolve)(path2); const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path2, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); if (downloadSpecification.filesToDownload.length === 0) { - core13.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); + core14.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); } else { yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure); - core13.info("Directory structure has been set up for the artifact"); + core14.info("Directory structure has been set up for the artifact"); yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate); yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload); } @@ -120146,7 +120025,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz const response = []; const artifacts = yield downloadHttpClient.listArtifacts(); if (artifacts.count === 0) { - core13.info("Unable to find any artifacts for the associated workflow"); + core14.info("Unable to find any artifacts for the associated workflow"); return response; } if (!path2) { @@ -120158,11 +120037,11 @@ Note: The size of downloaded zips can differ significantly from the reported siz while (downloadedArtifacts < artifacts.count) { const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; downloadedArtifacts += 1; - core13.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); + core14.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl); const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path2, true); if (downloadSpecification.filesToDownload.length === 0) { - core13.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); + core14.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); } else { yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure); yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate); @@ -120394,7 +120273,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -120417,10 +120296,10 @@ var require_retry_helper = __commonJS({ if (isRetryable && !isRetryable(err)) { throw err; } - core13.info(err.message); + core14.info(err.message); } const seconds = this.getSleepAmount(); - core13.info(`Waiting ${seconds} seconds before trying again`); + core14.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } @@ -120500,7 +120379,7 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs2 = __importStar4(require("fs")); @@ -120529,8 +120408,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { dest = dest || path2.join(_getTempDirectory(), crypto.randomUUID()); yield io6.mkdirP(path2.dirname(dest)); - core13.debug(`Downloading ${url}`); - core13.debug(`Destination ${dest}`); + core14.debug(`Downloading ${url}`); + core14.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); @@ -120557,7 +120436,7 @@ var require_tool_cache = __commonJS({ allowRetries: false }); if (auth) { - core13.debug("set auth"); + core14.debug("set auth"); if (headers === void 0) { headers = {}; } @@ -120566,7 +120445,7 @@ var require_tool_cache = __commonJS({ const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core13.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core14.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream.pipeline); @@ -120575,16 +120454,16 @@ var require_tool_cache = __commonJS({ let succeeded = false; try { yield pipeline(readStream, fs2.createWriteStream(dest)); - core13.debug("download complete"); + core14.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { - core13.debug("download failed"); + core14.debug("download failed"); try { yield io6.rmRF(dest); } catch (err) { - core13.debug(`Failed to delete '${dest}'. ${err.message}`); + core14.debug(`Failed to delete '${dest}'. ${err.message}`); } } } @@ -120599,7 +120478,7 @@ var require_tool_cache = __commonJS({ process.chdir(dest); if (_7zPath) { try { - const logLevel = core13.isDebug() ? "-bb1" : "-bb0"; + const logLevel = core14.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, @@ -120649,7 +120528,7 @@ var require_tool_cache = __commonJS({ throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); - core13.debug("Checking tar --version"); + core14.debug("Checking tar --version"); let versionOutput = ""; yield (0, exec_1.exec)("tar --version", [], { ignoreReturnCode: true, @@ -120659,7 +120538,7 @@ var require_tool_cache = __commonJS({ stderr: (data) => versionOutput += data.toString() } }); - core13.debug(versionOutput.trim()); + core14.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { @@ -120667,7 +120546,7 @@ var require_tool_cache = __commonJS({ } else { args = [flags]; } - if (core13.isDebug() && !flags.includes("v")) { + if (core14.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; @@ -120699,7 +120578,7 @@ var require_tool_cache = __commonJS({ args = [flags]; } args.push("-x", "-C", dest, "-f", file); - if (core13.isDebug()) { + if (core14.isDebug()) { args.push("-v"); } const xarPath = yield io6.which("xar", true); @@ -120744,7 +120623,7 @@ var require_tool_cache = __commonJS({ "-Command", pwshCommand ]; - core13.debug(`Using pwsh at path: ${pwshPath}`); + core14.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { const powershellCommand = [ @@ -120764,7 +120643,7 @@ var require_tool_cache = __commonJS({ powershellCommand ]; const powershellPath = yield io6.which("powershell", true); - core13.debug(`Using powershell at path: ${powershellPath}`); + core14.debug(`Using powershell at path: ${powershellPath}`); yield (0, exec_1.exec)(`"${powershellPath}"`, args); } }); @@ -120773,7 +120652,7 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const unzipPath = yield io6.which("unzip", true); const args = [file]; - if (!core13.isDebug()) { + if (!core14.isDebug()) { args.unshift("-q"); } args.unshift("-o"); @@ -120784,8 +120663,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os.arch(); - core13.debug(`Caching tool ${tool} ${version} ${arch}`); - core13.debug(`source dir: ${sourceDir}`); + core14.debug(`Caching tool ${tool} ${version} ${arch}`); + core14.debug(`source dir: ${sourceDir}`); if (!fs2.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } @@ -120803,14 +120682,14 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os.arch(); - core13.debug(`Caching tool ${tool} ${version} ${arch}`); - core13.debug(`source file: ${sourceFile}`); + core14.debug(`Caching tool ${tool} ${version} ${arch}`); + core14.debug(`source file: ${sourceFile}`); if (!fs2.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch); const destPath = path2.join(destFolder, targetFile); - core13.debug(`destination file ${destPath}`); + core14.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch); return destFolder; @@ -120834,12 +120713,12 @@ var require_tool_cache = __commonJS({ if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; const cachePath = path2.join(_getCacheDirectory(), toolName, versionSpec, arch); - core13.debug(`checking cache: ${cachePath}`); + core14.debug(`checking cache: ${cachePath}`); if (fs2.existsSync(cachePath) && fs2.existsSync(`${cachePath}.complete`)) { - core13.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); + core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); toolPath = cachePath; } else { - core13.debug("not found"); + core14.debug("not found"); } } return toolPath; @@ -120870,7 +120749,7 @@ var require_tool_cache = __commonJS({ const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { - core13.debug("set auth"); + core14.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); @@ -120891,7 +120770,7 @@ var require_tool_cache = __commonJS({ try { releases = JSON.parse(versionsRaw); } catch (_a) { - core13.debug("Invalid json"); + core14.debug("Invalid json"); } } return releases; @@ -120917,7 +120796,7 @@ var require_tool_cache = __commonJS({ function _createToolPath(tool, version, arch) { return __awaiter4(this, void 0, void 0, function* () { const folderPath = path2.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); - core13.debug(`destination ${folderPath}`); + core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); yield io6.rmRF(markerPath); @@ -120929,19 +120808,19 @@ var require_tool_cache = __commonJS({ const folderPath = path2.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); const markerPath = `${folderPath}.complete`; fs2.writeFileSync(markerPath, ""); - core13.debug("finished caching tool"); + core14.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { const c = semver8.clean(versionSpec) || ""; - core13.debug(`isExplicit: ${c}`); + core14.debug(`isExplicit: ${c}`); const valid3 = semver8.valid(c) != null; - core13.debug(`explicit? ${valid3}`); + core14.debug(`explicit? ${valid3}`); return valid3; } exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version = ""; - core13.debug(`evaluating ${versions.length} versions`); + core14.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver8.gt(a, b)) { return 1; @@ -120957,9 +120836,9 @@ var require_tool_cache = __commonJS({ } } if (version) { - core13.debug(`matched: ${version}`); + core14.debug(`matched: ${version}`); } else { - core13.debug("match not found"); + core14.debug("match not found"); } return version; } @@ -121568,7 +121447,7 @@ var require_internal_glob_options_helper2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -121580,23 +121459,23 @@ var require_internal_glob_options_helper2 = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core13.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core13.debug(`implicitDescendants '${result.implicitDescendants}'`); + core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.matchDirectories === "boolean") { result.matchDirectories = copy.matchDirectories; - core13.debug(`matchDirectories '${result.matchDirectories}'`); + core14.debug(`matchDirectories '${result.matchDirectories}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } if (typeof copy.excludeHiddenFiles === "boolean") { result.excludeHiddenFiles = copy.excludeHiddenFiles; - core13.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); } } return result; @@ -122280,7 +122159,7 @@ var require_internal_globber2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs2 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); var path2 = __importStar4(require("path")); @@ -122333,7 +122212,7 @@ var require_internal_globber2 = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core13.debug(`Search path '${searchPath}'`); + core14.debug(`Search path '${searchPath}'`); try { yield __await4(fs2.promises.lstat(searchPath)); } catch (err) { @@ -122408,7 +122287,7 @@ var require_internal_globber2 = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core13.debug(`Broken symlink '${item.path}'`); + core14.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -122424,7 +122303,7 @@ var require_internal_globber2 = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -122517,7 +122396,7 @@ var require_internal_hash_files = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.hashFiles = void 0; var crypto = __importStar4(require("crypto")); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs2 = __importStar4(require("fs")); var stream = __importStar4(require("stream")); var util = __importStar4(require("util")); @@ -122526,7 +122405,7 @@ var require_internal_hash_files = __commonJS({ var _a, e_1, _b, _c; var _d; return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core13.info : core13.debug; + const writeDelegate = verbose ? core14.info : core14.debug; let hasMatch = false; const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const result = crypto.createHash("sha256"); @@ -122633,20 +122512,74 @@ var require_glob4 = __commonJS({ }); // src/start-proxy-action-post.ts -var core12 = __toESM(require_core()); +var core13 = __toESM(require_core()); // src/actions-util.ts -var core3 = __toESM(require_core()); +var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts -var core2 = __toESM(require_core()); +var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); var import_del = __toESM(require_del()); -var import_get_folder_size = __toESM(require_get_folder_size()); + +// node_modules/get-folder-size/index.js +var import_node_path = require("node:path"); +async function getFolderSize(itemPath, options) { + return await core(itemPath, options, { errors: true }); +} +getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); +getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); +async function core(rootItemPath, options = {}, returnType = {}) { + const fs2 = options.fs || await import("node:fs/promises"); + let folderSize = 0n; + const foundInos = /* @__PURE__ */ new Set(); + const errors = []; + await processItem(rootItemPath); + async function processItem(itemPath) { + if (options.ignore?.test(itemPath)) return; + const stats = returnType.strict ? await fs2.lstat(itemPath, { bigint: true }) : await fs2.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + if (typeof stats !== "object") return; + if (!foundInos.has(stats.ino)) { + foundInos.add(stats.ino); + folderSize += stats.size; + } + if (stats.isDirectory()) { + const directoryItems = returnType.strict ? await fs2.readdir(itemPath) : await fs2.readdir(itemPath).catch((error2) => errors.push(error2)); + if (typeof directoryItems !== "object") return; + await Promise.all( + directoryItems.map( + (directoryItem) => processItem((0, import_node_path.join)(itemPath, directoryItem)) + ) + ); + } + } + if (!options.bigint) { + if (folderSize > BigInt(Number.MAX_SAFE_INTEGER)) { + const error2 = new RangeError( + "The folder size is too large to return as a Number. You can instruct this package to return a BigInt instead." + ); + if (returnType.strict) { + throw error2; + } + errors.push(error2); + folderSize = Number.MAX_SAFE_INTEGER; + } else { + folderSize = Number(folderSize); + } + } + if (returnType.errors) { + return { + size: folderSize, + errors: errors.length > 0 ? errors : null + }; + } else { + return folderSize; + } +} // node_modules/js-yaml/dist/js-yaml.mjs function isNothing(subject) { @@ -123217,7 +123150,7 @@ var json = failsafe.extend({ float ] }); -var core = json; +var core2 = json; var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); @@ -123431,7 +123364,7 @@ var set = new type("tag:yaml.org,2002:set", { resolve: resolveYamlSet, construct: constructYamlSet }); -var _default = core.extend({ +var _default = core2.extend({ implicit: [ timestamp, merge @@ -125291,7 +125224,7 @@ function checkGitHubVersionInRange(version, logger) { ); } hasBeenWarnedAboutVersion = true; - core2.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); + core3.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); } function apiVersionInRange(version, minimumVersion2, maximumVersion2) { if (!semver.satisfies(version, `>=${minimumVersion2}`)) { @@ -125321,7 +125254,7 @@ function getErrorMessage(error2) { // src/actions-util.ts var pkg = require_package(); var getRequiredInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); if (!value) { throw new ConfigurationError(`Input required and not supplied: ${name}`); } @@ -125336,7 +125269,7 @@ function getActionVersion() { } var persistedInputsKey = "persisted_inputs"; var restoreInputs = function() { - const persistedInputs = core3.getState(persistedInputsKey); + const persistedInputs = core4.getState(persistedInputsKey); if (persistedInputs) { for (const [name, value] of JSON.parse(persistedInputs)) { process.env[name] = value; @@ -125345,7 +125278,7 @@ var restoreInputs = function() { }; // src/api-client.ts -var core4 = __toESM(require_core()); +var core5 = __toESM(require_core()); var githubUtils = __toESM(require_utils4()); var retry = __toESM(require_dist_node15()); var import_console_log_level = __toESM(require_console_log_level()); @@ -125410,7 +125343,7 @@ var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var supportedAnalysisKinds = new Set(Object.values(AnalysisKind)); // src/caching-utils.ts -var core5 = __toESM(require_core()); +var core6 = __toESM(require_core()); // src/feature-flags.ts var semver3 = __toESM(require_semver2()); @@ -125419,14 +125352,14 @@ var semver3 = __toESM(require_semver2()); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts -var core6 = __toESM(require_core()); +var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); var io3 = __toESM(require_io()); // src/logging.ts -var core7 = __toESM(require_core()); +var core8 = __toESM(require_core()); function getActionsLogger() { - return core7; + return core8; } // src/overlay-database-utils.ts @@ -125658,7 +125591,7 @@ async function getConfig(tempDir, logger) { // src/debug-artifacts.ts var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); -var core11 = __toESM(require_core()); +var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); var import_del3 = __toESM(require_del()); @@ -125667,10 +125600,10 @@ var io5 = __toESM(require_io()); var import_del2 = __toESM(require_del()); // src/autobuild.ts -var core10 = __toESM(require_core()); +var core11 = __toESM(require_core()); // src/codeql.ts -var core9 = __toESM(require_core()); +var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); // src/cli-errors.ts @@ -125818,7 +125751,7 @@ var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); // src/tools-download.ts -var core8 = __toESM(require_core()); +var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); @@ -125849,7 +125782,7 @@ async function runWrapper() { const logger = getActionsLogger(); try { restoreInputs(); - const pid = core12.getState("proxy-process-pid"); + const pid = core13.getState("proxy-process-pid"); if (pid) { process.kill(Number(pid)); } @@ -125857,8 +125790,8 @@ async function runWrapper() { getTemporaryDirectory(), logger ); - if (config && config.debugMode || core12.isDebug()) { - const logFilePath = core12.getState("proxy-log-file"); + if (config && config.debugMode || core13.isDebug()) { + const logFilePath = core13.getState("proxy-log-file"); logger.info( "Debug mode is on. Uploading proxy log as Actions debugging artifact..." ); diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index d3d75cad1..27b534a82 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -21915,7 +21915,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core7 = __importStar(require_core()); + var core8 = __importStar(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -21938,10 +21938,10 @@ var require_retry_helper = __commonJS({ if (isRetryable && !isRetryable(err)) { throw err; } - core7.info(err.message); + core8.info(err.message); } const seconds = this.getSleepAmount(); - core7.info(`Waiting ${seconds} seconds before trying again`); + core8.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } @@ -22021,7 +22021,7 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core7 = __importStar(require_core()); + var core8 = __importStar(require_core()); var io3 = __importStar(require_io()); var crypto = __importStar(require("crypto")); var fs = __importStar(require("fs")); @@ -22050,8 +22050,8 @@ var require_tool_cache = __commonJS({ return __awaiter(this, void 0, void 0, function* () { dest = dest || path2.join(_getTempDirectory(), crypto.randomUUID()); yield io3.mkdirP(path2.dirname(dest)); - core7.debug(`Downloading ${url}`); - core7.debug(`Destination ${dest}`); + core8.debug(`Downloading ${url}`); + core8.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); @@ -22078,7 +22078,7 @@ var require_tool_cache = __commonJS({ allowRetries: false }); if (auth) { - core7.debug("set auth"); + core8.debug("set auth"); if (headers === void 0) { headers = {}; } @@ -22087,7 +22087,7 @@ var require_tool_cache = __commonJS({ const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core7.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core8.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream.pipeline); @@ -22096,16 +22096,16 @@ var require_tool_cache = __commonJS({ let succeeded = false; try { yield pipeline(readStream, fs.createWriteStream(dest)); - core7.debug("download complete"); + core8.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { - core7.debug("download failed"); + core8.debug("download failed"); try { yield io3.rmRF(dest); } catch (err) { - core7.debug(`Failed to delete '${dest}'. ${err.message}`); + core8.debug(`Failed to delete '${dest}'. ${err.message}`); } } } @@ -22120,7 +22120,7 @@ var require_tool_cache = __commonJS({ process.chdir(dest); if (_7zPath) { try { - const logLevel = core7.isDebug() ? "-bb1" : "-bb0"; + const logLevel = core8.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, @@ -22170,7 +22170,7 @@ var require_tool_cache = __commonJS({ throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); - core7.debug("Checking tar --version"); + core8.debug("Checking tar --version"); let versionOutput = ""; yield (0, exec_1.exec)("tar --version", [], { ignoreReturnCode: true, @@ -22180,7 +22180,7 @@ var require_tool_cache = __commonJS({ stderr: (data) => versionOutput += data.toString() } }); - core7.debug(versionOutput.trim()); + core8.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { @@ -22188,7 +22188,7 @@ var require_tool_cache = __commonJS({ } else { args = [flags]; } - if (core7.isDebug() && !flags.includes("v")) { + if (core8.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; @@ -22220,7 +22220,7 @@ var require_tool_cache = __commonJS({ args = [flags]; } args.push("-x", "-C", dest, "-f", file); - if (core7.isDebug()) { + if (core8.isDebug()) { args.push("-v"); } const xarPath = yield io3.which("xar", true); @@ -22265,7 +22265,7 @@ var require_tool_cache = __commonJS({ "-Command", pwshCommand ]; - core7.debug(`Using pwsh at path: ${pwshPath}`); + core8.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { const powershellCommand = [ @@ -22285,7 +22285,7 @@ var require_tool_cache = __commonJS({ powershellCommand ]; const powershellPath = yield io3.which("powershell", true); - core7.debug(`Using powershell at path: ${powershellPath}`); + core8.debug(`Using powershell at path: ${powershellPath}`); yield (0, exec_1.exec)(`"${powershellPath}"`, args); } }); @@ -22294,7 +22294,7 @@ var require_tool_cache = __commonJS({ return __awaiter(this, void 0, void 0, function* () { const unzipPath = yield io3.which("unzip", true); const args = [file]; - if (!core7.isDebug()) { + if (!core8.isDebug()) { args.unshift("-q"); } args.unshift("-o"); @@ -22305,8 +22305,8 @@ var require_tool_cache = __commonJS({ return __awaiter(this, void 0, void 0, function* () { version = semver2.clean(version) || version; arch = arch || os.arch(); - core7.debug(`Caching tool ${tool} ${version} ${arch}`); - core7.debug(`source dir: ${sourceDir}`); + core8.debug(`Caching tool ${tool} ${version} ${arch}`); + core8.debug(`source dir: ${sourceDir}`); if (!fs.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } @@ -22324,14 +22324,14 @@ var require_tool_cache = __commonJS({ return __awaiter(this, void 0, void 0, function* () { version = semver2.clean(version) || version; arch = arch || os.arch(); - core7.debug(`Caching tool ${tool} ${version} ${arch}`); - core7.debug(`source file: ${sourceFile}`); + core8.debug(`Caching tool ${tool} ${version} ${arch}`); + core8.debug(`source file: ${sourceFile}`); if (!fs.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch); const destPath = path2.join(destFolder, targetFile); - core7.debug(`destination file ${destPath}`); + core8.debug(`destination file ${destPath}`); yield io3.cp(sourceFile, destPath); _completeToolPath(tool, version, arch); return destFolder; @@ -22355,12 +22355,12 @@ var require_tool_cache = __commonJS({ if (versionSpec) { versionSpec = semver2.clean(versionSpec) || ""; const cachePath = path2.join(_getCacheDirectory(), toolName, versionSpec, arch); - core7.debug(`checking cache: ${cachePath}`); + core8.debug(`checking cache: ${cachePath}`); if (fs.existsSync(cachePath) && fs.existsSync(`${cachePath}.complete`)) { - core7.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); + core8.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); toolPath = cachePath; } else { - core7.debug("not found"); + core8.debug("not found"); } } return toolPath; @@ -22391,7 +22391,7 @@ var require_tool_cache = __commonJS({ const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { - core7.debug("set auth"); + core8.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); @@ -22412,7 +22412,7 @@ var require_tool_cache = __commonJS({ try { releases = JSON.parse(versionsRaw); } catch (_a) { - core7.debug("Invalid json"); + core8.debug("Invalid json"); } } return releases; @@ -22438,7 +22438,7 @@ var require_tool_cache = __commonJS({ function _createToolPath(tool, version, arch) { return __awaiter(this, void 0, void 0, function* () { const folderPath = path2.join(_getCacheDirectory(), tool, semver2.clean(version) || version, arch || ""); - core7.debug(`destination ${folderPath}`); + core8.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io3.rmRF(folderPath); yield io3.rmRF(markerPath); @@ -22450,19 +22450,19 @@ var require_tool_cache = __commonJS({ const folderPath = path2.join(_getCacheDirectory(), tool, semver2.clean(version) || version, arch || ""); const markerPath = `${folderPath}.complete`; fs.writeFileSync(markerPath, ""); - core7.debug("finished caching tool"); + core8.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { const c = semver2.clean(versionSpec) || ""; - core7.debug(`isExplicit: ${c}`); + core8.debug(`isExplicit: ${c}`); const valid = semver2.valid(c) != null; - core7.debug(`explicit? ${valid}`); + core8.debug(`explicit? ${valid}`); return valid; } exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version = ""; - core7.debug(`evaluating ${versions.length} versions`); + core8.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver2.gt(a, b)) { return 1; @@ -22478,9 +22478,9 @@ var require_tool_cache = __commonJS({ } } if (version) { - core7.debug(`matched: ${version}`); + core8.debug(`matched: ${version}`); } else { - core7.debug("match not found"); + core8.debug("match not found"); } return version; } @@ -54772,127 +54772,6 @@ var require_del = __commonJS({ } }); -// node_modules/tiny-each-async/index.js -var require_tiny_each_async = __commonJS({ - "node_modules/tiny-each-async/index.js"(exports2, module2) { - "use strict"; - module2.exports = function eachAsync(arr, parallelLimit, iteratorFn, cb) { - var pending = 0; - var index = 0; - var lastIndex = arr.length - 1; - var called = false; - var limit; - var callback; - var iterate; - if (typeof parallelLimit === "number") { - limit = parallelLimit; - iterate = iteratorFn; - callback = cb || function noop() { - }; - } else { - iterate = parallelLimit; - callback = iteratorFn || function noop() { - }; - limit = arr.length; - } - if (!arr.length) { - return callback(); - } - var iteratorLength = iterate.length; - var shouldCallNextIterator = function shouldCallNextIterator2() { - return !called && pending < limit && index < lastIndex; - }; - var iteratorCallback = function iteratorCallback2(err) { - if (called) { - return; - } - pending--; - if (err || index === lastIndex && !pending) { - called = true; - callback(err); - } else if (shouldCallNextIterator()) { - processIterator(++index); - } - }; - var processIterator = function processIterator2() { - pending++; - var args = iteratorLength === 2 ? [arr[index], iteratorCallback] : [arr[index], index, iteratorCallback]; - iterate.apply(null, args); - if (shouldCallNextIterator()) { - processIterator2(++index); - } - }; - processIterator(); - }; - } -}); - -// node_modules/get-folder-size/index.js -var require_get_folder_size = __commonJS({ - "node_modules/get-folder-size/index.js"(exports2, module2) { - "use strict"; - var fs = require("fs"); - var path2 = require("path"); - var eachAsync = require_tiny_each_async(); - function readSizeRecursive(seen, item, ignoreRegEx, callback) { - let cb; - let ignoreRegExp; - if (!callback) { - cb = ignoreRegEx; - ignoreRegExp = null; - } else { - cb = callback; - ignoreRegExp = ignoreRegEx; - } - fs.lstat(item, function lstat(e, stats) { - let total = !e ? stats.size || 0 : 0; - if (stats) { - if (seen.has(stats.ino)) { - return cb(null, 0); - } - seen.add(stats.ino); - } - if (!e && stats.isDirectory()) { - fs.readdir(item, (err, list) => { - if (err) { - return cb(err); - } - eachAsync( - list, - 5e3, - (dirItem, next) => { - readSizeRecursive( - seen, - path2.join(item, dirItem), - ignoreRegExp, - (error2, size) => { - if (!error2) { - total += size; - } - next(error2); - } - ); - }, - (finalErr) => { - cb(finalErr, total); - } - ); - }); - } else { - if (ignoreRegExp && ignoreRegExp.test(item)) { - total = 0; - } - cb(e, total); - } - }); - } - module2.exports = (...args) => { - args.unshift(/* @__PURE__ */ new Set()); - return readSizeRecursive(...args); - }; - } -}); - // package.json var require_package = __commonJS({ "package.json"(exports2, module2) { @@ -54940,7 +54819,7 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", @@ -55008,22 +54887,76 @@ var require_package = __commonJS({ // src/start-proxy-action.ts var import_child_process = require("child_process"); var path = __toESM(require("path")); -var core6 = __toESM(require_core()); +var core7 = __toESM(require_core()); var toolcache = __toESM(require_tool_cache()); var import_node_forge = __toESM(require_lib2()); // src/actions-util.ts -var core3 = __toESM(require_core()); +var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts -var core2 = __toESM(require_core()); +var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); var import_del = __toESM(require_del()); -var import_get_folder_size = __toESM(require_get_folder_size()); + +// node_modules/get-folder-size/index.js +var import_node_path = require("node:path"); +async function getFolderSize(itemPath, options) { + return await core(itemPath, options, { errors: true }); +} +getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); +getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); +async function core(rootItemPath, options = {}, returnType = {}) { + const fs = options.fs || await import("node:fs/promises"); + let folderSize = 0n; + const foundInos = /* @__PURE__ */ new Set(); + const errors = []; + await processItem(rootItemPath); + async function processItem(itemPath) { + if (options.ignore?.test(itemPath)) return; + const stats = returnType.strict ? await fs.lstat(itemPath, { bigint: true }) : await fs.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + if (typeof stats !== "object") return; + if (!foundInos.has(stats.ino)) { + foundInos.add(stats.ino); + folderSize += stats.size; + } + if (stats.isDirectory()) { + const directoryItems = returnType.strict ? await fs.readdir(itemPath) : await fs.readdir(itemPath).catch((error2) => errors.push(error2)); + if (typeof directoryItems !== "object") return; + await Promise.all( + directoryItems.map( + (directoryItem) => processItem((0, import_node_path.join)(itemPath, directoryItem)) + ) + ); + } + } + if (!options.bigint) { + if (folderSize > BigInt(Number.MAX_SAFE_INTEGER)) { + const error2 = new RangeError( + "The folder size is too large to return as a Number. You can instruct this package to return a BigInt instead." + ); + if (returnType.strict) { + throw error2; + } + errors.push(error2); + folderSize = Number.MAX_SAFE_INTEGER; + } else { + folderSize = Number(folderSize); + } + } + if (returnType.errors) { + return { + size: folderSize, + errors: errors.length > 0 ? errors : null + }; + } else { + return folderSize; + } +} // node_modules/js-yaml/dist/js-yaml.mjs function isNothing(subject) { @@ -55594,7 +55527,7 @@ var json = failsafe.extend({ float ] }); -var core = json; +var core2 = json; var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); @@ -55808,7 +55741,7 @@ var set = new type("tag:yaml.org,2002:set", { resolve: resolveYamlSet, construct: constructYamlSet }); -var _default = core.extend({ +var _default = core2.extend({ implicit: [ timestamp, merge @@ -57639,7 +57572,7 @@ function getErrorMessage(error2) { // src/actions-util.ts var pkg = require_package(); var getOptionalInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); return value.length > 0 ? value : void 0; }; function getTemporaryDirectory() { @@ -57651,17 +57584,17 @@ var persistInputs = function() { const inputEnvironmentVariables = Object.entries(process.env).filter( ([name]) => name.startsWith("INPUT_") ); - core3.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables)); + core4.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables)); }; // src/logging.ts -var core4 = __toESM(require_core()); +var core5 = __toESM(require_core()); function getActionsLogger() { - return core4; + return core5; } // src/start-proxy.ts -var core5 = __toESM(require_core()); +var core6 = __toESM(require_core()); // src/languages.ts var KnownLanguage = /* @__PURE__ */ ((KnownLanguage2) => { @@ -57742,10 +57675,10 @@ function getCredentials(logger, registrySecrets, registriesCredentials, language throw new ConfigurationError("Invalid credentials - must be an object"); } if (isDefined(e.password)) { - core5.setSecret(e.password); + core6.setSecret(e.password); } if (isDefined(e.token)) { - core5.setSecret(e.token); + core6.setSecret(e.token); } if (!isDefined(e.url) && !isDefined(e.host)) { throw new ConfigurationError( @@ -57830,7 +57763,7 @@ async function runWrapper() { const logger = getActionsLogger(); const tempDir = getTemporaryDirectory(); const proxyLogFilePath = path.resolve(tempDir, "proxy.log"); - core6.saveState("proxy-log-file", proxyLogFilePath); + core7.saveState("proxy-log-file", proxyLogFilePath); const credentials = getCredentials( logger, getOptionalInput("registry_secrets"), @@ -57871,7 +57804,7 @@ async function startProxy(binPath, config, logFilePath, logger) { ); subprocess.unref(); if (subprocess.pid) { - core6.saveState("proxy-process-pid", `${subprocess.pid}`); + core7.saveState("proxy-process-pid", `${subprocess.pid}`); } subprocess.on("error", (error2) => { subprocessError = error2; @@ -57890,16 +57823,16 @@ async function startProxy(binPath, config, logFilePath, logger) { throw subprocessError; } logger.info(`Proxy started on ${host}:${port}`); - core6.setOutput("proxy_host", host); - core6.setOutput("proxy_port", port.toString()); - core6.setOutput("proxy_ca_certificate", config.ca.cert); + core7.setOutput("proxy_host", host); + core7.setOutput("proxy_port", port.toString()); + core7.setOutput("proxy_ca_certificate", config.ca.cert); const registry_urls = config.all_credentials.filter((credential) => credential.url !== void 0).map((credential) => ({ type: credential.type, url: credential.url })); - core6.setOutput("proxy_urls", JSON.stringify(registry_urls)); + core7.setOutput("proxy_urls", JSON.stringify(registry_urls)); } catch (error2) { - core6.setFailed(`start-proxy action failed: ${getErrorMessage(error2)}`); + core7.setFailed(`start-proxy action failed: ${getErrorMessage(error2)}`); } } async function getProxyBinaryPath() { diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 928711b52..5d4c3aeb0 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -35659,127 +35659,6 @@ var require_del = __commonJS({ } }); -// node_modules/tiny-each-async/index.js -var require_tiny_each_async = __commonJS({ - "node_modules/tiny-each-async/index.js"(exports2, module2) { - "use strict"; - module2.exports = function eachAsync(arr, parallelLimit, iteratorFn, cb) { - var pending = 0; - var index = 0; - var lastIndex = arr.length - 1; - var called = false; - var limit; - var callback; - var iterate; - if (typeof parallelLimit === "number") { - limit = parallelLimit; - iterate = iteratorFn; - callback = cb || function noop() { - }; - } else { - iterate = parallelLimit; - callback = iteratorFn || function noop() { - }; - limit = arr.length; - } - if (!arr.length) { - return callback(); - } - var iteratorLength = iterate.length; - var shouldCallNextIterator = function shouldCallNextIterator2() { - return !called && pending < limit && index < lastIndex; - }; - var iteratorCallback = function iteratorCallback2(err) { - if (called) { - return; - } - pending--; - if (err || index === lastIndex && !pending) { - called = true; - callback(err); - } else if (shouldCallNextIterator()) { - processIterator(++index); - } - }; - var processIterator = function processIterator2() { - pending++; - var args = iteratorLength === 2 ? [arr[index], iteratorCallback] : [arr[index], index, iteratorCallback]; - iterate.apply(null, args); - if (shouldCallNextIterator()) { - processIterator2(++index); - } - }; - processIterator(); - }; - } -}); - -// node_modules/get-folder-size/index.js -var require_get_folder_size = __commonJS({ - "node_modules/get-folder-size/index.js"(exports2, module2) { - "use strict"; - var fs11 = require("fs"); - var path11 = require("path"); - var eachAsync = require_tiny_each_async(); - function readSizeRecursive(seen, item, ignoreRegEx, callback) { - let cb; - let ignoreRegExp; - if (!callback) { - cb = ignoreRegEx; - ignoreRegExp = null; - } else { - cb = callback; - ignoreRegExp = ignoreRegEx; - } - fs11.lstat(item, function lstat(e, stats) { - let total = !e ? stats.size || 0 : 0; - if (stats) { - if (seen.has(stats.ino)) { - return cb(null, 0); - } - seen.add(stats.ino); - } - if (!e && stats.isDirectory()) { - fs11.readdir(item, (err, list) => { - if (err) { - return cb(err); - } - eachAsync( - list, - 5e3, - (dirItem, next) => { - readSizeRecursive( - seen, - path11.join(item, dirItem), - ignoreRegExp, - (error2, size) => { - if (!error2) { - total += size; - } - next(error2); - } - ); - }, - (finalErr) => { - cb(finalErr, total); - } - ); - }); - } else { - if (ignoreRegExp && ignoreRegExp.test(item)) { - total = 0; - } - cb(e, total); - } - }); - } - module2.exports = (...args) => { - args.unshift(/* @__PURE__ */ new Set()); - return readSizeRecursive(...args); - }; - } -}); - // node_modules/semver/internal/constants.js var require_constants9 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -37735,7 +37614,7 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", @@ -39399,7 +39278,7 @@ var require_internal_glob_options_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core11 = __importStar4(require_core()); + var core12 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -39409,15 +39288,15 @@ var require_internal_glob_options_helper = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core11.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core12.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core11.debug(`implicitDescendants '${result.implicitDescendants}'`); + core12.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core11.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core12.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; @@ -40081,7 +39960,7 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core11 = __importStar4(require_core()); + var core12 = __importStar4(require_core()); var fs11 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); var path11 = __importStar4(require("path")); @@ -40132,7 +40011,7 @@ var require_internal_globber = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core11.debug(`Search path '${searchPath}'`); + core12.debug(`Search path '${searchPath}'`); try { yield __await4(fs11.promises.lstat(searchPath)); } catch (err) { @@ -40204,7 +40083,7 @@ var require_internal_globber = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core11.debug(`Broken symlink '${item.path}'`); + core12.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -40220,7 +40099,7 @@ var require_internal_globber = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core11.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core12.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -41544,7 +41423,7 @@ var require_cacheUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core11 = __importStar4(require_core()); + var core12 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob = __importStar4(require_glob2()); var io6 = __importStar4(require_io()); @@ -41597,7 +41476,7 @@ var require_cacheUtils = __commonJS({ _e = false; const file = _c; const relativeFile = path11.relative(workspace, file).replace(new RegExp(`\\${path11.sep}`, "g"), "/"); - core11.debug(`Matched: ${relativeFile}`); + core12.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { @@ -41627,7 +41506,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); - core11.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + core12.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec2.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, @@ -41638,10 +41517,10 @@ var require_cacheUtils = __commonJS({ } }); } catch (err) { - core11.debug(err.message); + core12.debug(err.message); } versionOutput = versionOutput.trim(); - core11.debug(versionOutput); + core12.debug(versionOutput); return versionOutput; }); } @@ -41649,7 +41528,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); - core11.debug(`zstd version: ${version}`); + core12.debug(`zstd version: ${version}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -76961,7 +76840,7 @@ var require_uploadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core11 = __importStar4(require_core()); + var core12 = __importStar4(require_core()); var storage_blob_1 = require_dist7(); var errors_1 = require_errors2(); var UploadProgress = class { @@ -77003,7 +76882,7 @@ var require_uploadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core11.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + core12.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -77058,14 +76937,14 @@ var require_uploadUtils = __commonJS({ }; try { uploadProgress.startDisplayTimer(); - core11.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + core12.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); if (response._response.status >= 400) { throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); } return response; } catch (error2) { - core11.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); + core12.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); throw error2; } finally { uploadProgress.stopDisplayTimer(); @@ -77136,7 +77015,7 @@ var require_requestUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core11 = __importStar4(require_core()); + var core12 = __importStar4(require_core()); var http_client_1 = require_lib(); var constants_1 = require_constants10(); function isSuccessStatusCode(statusCode) { @@ -77197,9 +77076,9 @@ var require_requestUtils = __commonJS({ isRetryable = isRetryableStatusCode(statusCode); errorMessage = `Cache service responded with ${statusCode}`; } - core11.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core12.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); if (!isRetryable) { - core11.debug(`${name} - Error is not retryable`); + core12.debug(`${name} - Error is not retryable`); break; } yield sleep(delay2); @@ -77304,7 +77183,7 @@ var require_downloadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core11 = __importStar4(require_core()); + var core12 = __importStar4(require_core()); var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); @@ -77342,7 +77221,7 @@ var require_downloadUtils = __commonJS({ this.segmentIndex = this.segmentIndex + 1; this.segmentSize = segmentSize; this.receivedBytes = 0; - core11.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + core12.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); } /** * Sets the number of bytes received for the current segment. @@ -77376,7 +77255,7 @@ var require_downloadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core11.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + core12.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -77426,7 +77305,7 @@ var require_downloadUtils = __commonJS({ })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { downloadResponse.message.destroy(); - core11.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + core12.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); }); yield pipeResponseToStream(downloadResponse, writeStream); const contentLengthHeader = downloadResponse.message.headers["content-length"]; @@ -77437,7 +77316,7 @@ var require_downloadUtils = __commonJS({ throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); } } else { - core11.debug("Unable to validate download, no Content-Length header"); + core12.debug("Unable to validate download, no Content-Length header"); } }); } @@ -77557,7 +77436,7 @@ var require_downloadUtils = __commonJS({ const properties = yield client.getProperties(); const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; if (contentLength < 0) { - core11.debug("Unable to determine content length, downloading file with http-client..."); + core12.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); @@ -77637,7 +77516,7 @@ var require_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core11 = __importStar4(require_core()); + var core12 = __importStar4(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -77657,9 +77536,9 @@ var require_options = __commonJS({ } result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; - core11.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core11.debug(`Upload concurrency: ${result.uploadConcurrency}`); - core11.debug(`Upload chunk size: ${result.uploadChunkSize}`); + core12.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core12.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core12.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } exports2.getUploadOptions = getUploadOptions; @@ -77696,12 +77575,12 @@ var require_options = __commonJS({ if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) { result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; } - core11.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core11.debug(`Download concurrency: ${result.downloadConcurrency}`); - core11.debug(`Request timeout (ms): ${result.timeoutInMs}`); - core11.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); - core11.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); - core11.debug(`Lookup only: ${result.lookupOnly}`); + core12.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core12.debug(`Download concurrency: ${result.downloadConcurrency}`); + core12.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core12.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); + core12.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core12.debug(`Lookup only: ${result.lookupOnly}`); return result; } exports2.getDownloadOptions = getDownloadOptions; @@ -77881,7 +77760,7 @@ var require_cacheHttpClient = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core11 = __importStar4(require_core()); + var core12 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); var fs11 = __importStar4(require("fs")); @@ -77899,7 +77778,7 @@ var require_cacheHttpClient = __commonJS({ throw new Error("Cache Service Url not found, unable to restore cache."); } const url = `${baseUrl}_apis/artifactcache/${resource}`; - core11.debug(`Resource Url: ${url}`); + core12.debug(`Resource Url: ${url}`); return url; } function createAcceptHeader(type2, apiVersion) { @@ -77927,7 +77806,7 @@ var require_cacheHttpClient = __commonJS({ return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { - if (core11.isDebug()) { + if (core12.isDebug()) { yield printCachesListForDiagnostics(keys[0], httpClient, version); } return null; @@ -77940,9 +77819,9 @@ var require_cacheHttpClient = __commonJS({ if (!cacheDownloadUrl) { throw new Error("Cache not found."); } - core11.setSecret(cacheDownloadUrl); - core11.debug(`Cache Result:`); - core11.debug(JSON.stringify(cacheResult)); + core12.setSecret(cacheDownloadUrl); + core12.debug(`Cache Result:`); + core12.debug(JSON.stringify(cacheResult)); return cacheResult; }); } @@ -77957,10 +77836,10 @@ var require_cacheHttpClient = __commonJS({ const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { - core11.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key + core12.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { - core11.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); + core12.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); } } } @@ -78005,7 +77884,7 @@ Other caches with similar key:`); } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter4(this, void 0, void 0, function* () { - core11.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + core12.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) @@ -78027,7 +77906,7 @@ Other caches with similar key:`); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); const parallelUploads = [...new Array(concurrency).keys()]; - core11.debug("Awaiting all uploads"); + core12.debug("Awaiting all uploads"); let offset = 0; try { yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { @@ -78070,16 +77949,16 @@ Other caches with similar key:`); yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); } else { const httpClient = createHttpClient(); - core11.debug("Upload cache"); + core12.debug("Upload cache"); yield uploadFile(httpClient, cacheId, archivePath, options); - core11.debug("Commiting cache"); + core12.debug("Commiting cache"); const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core11.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + core12.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); } - core11.info("Cache saved successfully"); + core12.info("Cache saved successfully"); } }); } @@ -83505,7 +83384,7 @@ var require_cache3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core11 = __importStar4(require_core()); + var core12 = __importStar4(require_core()); var path11 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); @@ -83558,7 +83437,7 @@ var require_cache3 = __commonJS({ function restoreCache3(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core11.debug(`Cache service version: ${cacheServiceVersion}`); + core12.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); switch (cacheServiceVersion) { case "v2": @@ -83574,8 +83453,8 @@ var require_cache3 = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core11.debug("Resolved Keys:"); - core11.debug(JSON.stringify(keys)); + core12.debug("Resolved Keys:"); + core12.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -83593,19 +83472,19 @@ var require_cache3 = __commonJS({ return void 0; } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core11.info("Lookup only - skipping download"); + core12.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } archivePath = path11.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core11.debug(`Archive Path: ${archivePath}`); + core12.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); - if (core11.isDebug()) { + if (core12.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core11.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + core12.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core11.info("Cache restored successfully"); + core12.info("Cache restored successfully"); return cacheEntry.cacheKey; } catch (error2) { const typedError = error2; @@ -83613,16 +83492,16 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core11.error(`Failed to restore: ${error2.message}`); + core12.error(`Failed to restore: ${error2.message}`); } else { - core11.warning(`Failed to restore: ${error2.message}`); + core12.warning(`Failed to restore: ${error2.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core11.debug(`Failed to delete archive: ${error2}`); + core12.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -83633,8 +83512,8 @@ var require_cache3 = __commonJS({ options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core11.debug("Resolved Keys:"); - core11.debug(JSON.stringify(keys)); + core12.debug("Resolved Keys:"); + core12.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -83652,30 +83531,30 @@ var require_cache3 = __commonJS({ }; const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core11.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); + core12.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); return void 0; } const isRestoreKeyMatch = request.key !== response.matchedKey; if (isRestoreKeyMatch) { - core11.info(`Cache hit for restore-key: ${response.matchedKey}`); + core12.info(`Cache hit for restore-key: ${response.matchedKey}`); } else { - core11.info(`Cache hit for: ${response.matchedKey}`); + core12.info(`Cache hit for: ${response.matchedKey}`); } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core11.info("Lookup only - skipping download"); + core12.info("Lookup only - skipping download"); return response.matchedKey; } archivePath = path11.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core11.debug(`Archive path: ${archivePath}`); - core11.debug(`Starting download of archive to: ${archivePath}`); + core12.debug(`Archive path: ${archivePath}`); + core12.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core11.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - if (core11.isDebug()) { + core12.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core12.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core11.info("Cache restored successfully"); + core12.info("Cache restored successfully"); return response.matchedKey; } catch (error2) { const typedError = error2; @@ -83683,9 +83562,9 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core11.error(`Failed to restore: ${error2.message}`); + core12.error(`Failed to restore: ${error2.message}`); } else { - core11.warning(`Failed to restore: ${error2.message}`); + core12.warning(`Failed to restore: ${error2.message}`); } } } finally { @@ -83694,7 +83573,7 @@ var require_cache3 = __commonJS({ yield utils.unlinkFile(archivePath); } } catch (error2) { - core11.debug(`Failed to delete archive: ${error2}`); + core12.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -83703,7 +83582,7 @@ var require_cache3 = __commonJS({ function saveCache3(paths, key, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core11.debug(`Cache service version: ${cacheServiceVersion}`); + core12.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); checkKey(key); switch (cacheServiceVersion) { @@ -83722,26 +83601,26 @@ var require_cache3 = __commonJS({ const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core11.debug("Cache Paths:"); - core11.debug(`${JSON.stringify(cachePaths)}`); + core12.debug("Cache Paths:"); + core12.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path11.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core11.debug(`Archive Path: ${archivePath}`); + core12.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core11.isDebug()) { + if (core12.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const fileSizeLimit = 10 * 1024 * 1024 * 1024; const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core11.debug(`File Size: ${archiveFileSize}`); + core12.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } - core11.debug("Reserving Cache"); + core12.debug("Reserving Cache"); const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { compressionMethod, enableCrossOsArchive, @@ -83754,26 +83633,26 @@ var require_cache3 = __commonJS({ } else { throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); } - core11.debug(`Saving Cache (ID: ${cacheId})`); + core12.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); } catch (error2) { const typedError = error2; if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError.name) { - core11.info(`Failed to save: ${typedError.message}`); + core12.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core11.error(`Failed to save: ${typedError.message}`); + core12.error(`Failed to save: ${typedError.message}`); } else { - core11.warning(`Failed to save: ${typedError.message}`); + core12.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core11.debug(`Failed to delete archive: ${error2}`); + core12.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -83786,26 +83665,26 @@ var require_cache3 = __commonJS({ const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core11.debug("Cache Paths:"); - core11.debug(`${JSON.stringify(cachePaths)}`); + core12.debug("Cache Paths:"); + core12.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path11.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core11.debug(`Archive Path: ${archivePath}`); + core12.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core11.isDebug()) { + if (core12.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core11.debug(`File Size: ${archiveFileSize}`); + core12.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } options.archiveSizeBytes = archiveFileSize; - core11.debug("Reserving Cache"); + core12.debug("Reserving Cache"); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const request = { key, @@ -83819,10 +83698,10 @@ var require_cache3 = __commonJS({ } signedUploadUrl = response.signedUploadUrl; } catch (error2) { - core11.debug(`Failed to reserve cache: ${error2}`); + core12.debug(`Failed to reserve cache: ${error2}`); throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } - core11.debug(`Attempting to upload cache located at: ${archivePath}`); + core12.debug(`Attempting to upload cache located at: ${archivePath}`); yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); const finalizeRequest = { key, @@ -83830,7 +83709,7 @@ var require_cache3 = __commonJS({ sizeBytes: `${archiveFileSize}` }; const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); - core11.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + core12.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); if (!finalizeResponse.ok) { throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); } @@ -83840,19 +83719,19 @@ var require_cache3 = __commonJS({ if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError.name) { - core11.info(`Failed to save: ${typedError.message}`); + core12.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core11.error(`Failed to save: ${typedError.message}`); + core12.error(`Failed to save: ${typedError.message}`); } else { - core11.warning(`Failed to save: ${typedError.message}`); + core12.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core11.debug(`Failed to delete archive: ${error2}`); + core12.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -84060,7 +83939,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core11 = __importStar4(require_core()); + var core12 = __importStar4(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -84083,10 +83962,10 @@ var require_retry_helper = __commonJS({ if (isRetryable && !isRetryable(err)) { throw err; } - core11.info(err.message); + core12.info(err.message); } const seconds = this.getSleepAmount(); - core11.info(`Waiting ${seconds} seconds before trying again`); + core12.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } @@ -84166,7 +84045,7 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core11 = __importStar4(require_core()); + var core12 = __importStar4(require_core()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs11 = __importStar4(require("fs")); @@ -84195,8 +84074,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { dest = dest || path11.join(_getTempDirectory(), crypto.randomUUID()); yield io6.mkdirP(path11.dirname(dest)); - core11.debug(`Downloading ${url}`); - core11.debug(`Destination ${dest}`); + core12.debug(`Downloading ${url}`); + core12.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); @@ -84223,7 +84102,7 @@ var require_tool_cache = __commonJS({ allowRetries: false }); if (auth) { - core11.debug("set auth"); + core12.debug("set auth"); if (headers === void 0) { headers = {}; } @@ -84232,7 +84111,7 @@ var require_tool_cache = __commonJS({ const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core11.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core12.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -84241,16 +84120,16 @@ var require_tool_cache = __commonJS({ let succeeded = false; try { yield pipeline(readStream, fs11.createWriteStream(dest)); - core11.debug("download complete"); + core12.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { - core11.debug("download failed"); + core12.debug("download failed"); try { yield io6.rmRF(dest); } catch (err) { - core11.debug(`Failed to delete '${dest}'. ${err.message}`); + core12.debug(`Failed to delete '${dest}'. ${err.message}`); } } } @@ -84265,7 +84144,7 @@ var require_tool_cache = __commonJS({ process.chdir(dest); if (_7zPath) { try { - const logLevel = core11.isDebug() ? "-bb1" : "-bb0"; + const logLevel = core12.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, @@ -84315,7 +84194,7 @@ var require_tool_cache = __commonJS({ throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); - core11.debug("Checking tar --version"); + core12.debug("Checking tar --version"); let versionOutput = ""; yield (0, exec_1.exec)("tar --version", [], { ignoreReturnCode: true, @@ -84325,7 +84204,7 @@ var require_tool_cache = __commonJS({ stderr: (data) => versionOutput += data.toString() } }); - core11.debug(versionOutput.trim()); + core12.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { @@ -84333,7 +84212,7 @@ var require_tool_cache = __commonJS({ } else { args = [flags]; } - if (core11.isDebug() && !flags.includes("v")) { + if (core12.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; @@ -84365,7 +84244,7 @@ var require_tool_cache = __commonJS({ args = [flags]; } args.push("-x", "-C", dest, "-f", file); - if (core11.isDebug()) { + if (core12.isDebug()) { args.push("-v"); } const xarPath = yield io6.which("xar", true); @@ -84410,7 +84289,7 @@ var require_tool_cache = __commonJS({ "-Command", pwshCommand ]; - core11.debug(`Using pwsh at path: ${pwshPath}`); + core12.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { const powershellCommand = [ @@ -84430,7 +84309,7 @@ var require_tool_cache = __commonJS({ powershellCommand ]; const powershellPath = yield io6.which("powershell", true); - core11.debug(`Using powershell at path: ${powershellPath}`); + core12.debug(`Using powershell at path: ${powershellPath}`); yield (0, exec_1.exec)(`"${powershellPath}"`, args); } }); @@ -84439,7 +84318,7 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const unzipPath = yield io6.which("unzip", true); const args = [file]; - if (!core11.isDebug()) { + if (!core12.isDebug()) { args.unshift("-q"); } args.unshift("-o"); @@ -84450,8 +84329,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os2.arch(); - core11.debug(`Caching tool ${tool} ${version} ${arch2}`); - core11.debug(`source dir: ${sourceDir}`); + core12.debug(`Caching tool ${tool} ${version} ${arch2}`); + core12.debug(`source dir: ${sourceDir}`); if (!fs11.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } @@ -84469,14 +84348,14 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os2.arch(); - core11.debug(`Caching tool ${tool} ${version} ${arch2}`); - core11.debug(`source file: ${sourceFile}`); + core12.debug(`Caching tool ${tool} ${version} ${arch2}`); + core12.debug(`source file: ${sourceFile}`); if (!fs11.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); const destPath = path11.join(destFolder, targetFile); - core11.debug(`destination file ${destPath}`); + core12.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); return destFolder; @@ -84500,12 +84379,12 @@ var require_tool_cache = __commonJS({ if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; const cachePath = path11.join(_getCacheDirectory(), toolName, versionSpec, arch2); - core11.debug(`checking cache: ${cachePath}`); + core12.debug(`checking cache: ${cachePath}`); if (fs11.existsSync(cachePath) && fs11.existsSync(`${cachePath}.complete`)) { - core11.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); + core12.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { - core11.debug("not found"); + core12.debug("not found"); } } return toolPath; @@ -84536,7 +84415,7 @@ var require_tool_cache = __commonJS({ const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { - core11.debug("set auth"); + core12.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); @@ -84557,7 +84436,7 @@ var require_tool_cache = __commonJS({ try { releases = JSON.parse(versionsRaw); } catch (_a) { - core11.debug("Invalid json"); + core12.debug("Invalid json"); } } return releases; @@ -84583,7 +84462,7 @@ var require_tool_cache = __commonJS({ function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { const folderPath = path11.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); - core11.debug(`destination ${folderPath}`); + core12.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); yield io6.rmRF(markerPath); @@ -84595,19 +84474,19 @@ var require_tool_cache = __commonJS({ const folderPath = path11.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs11.writeFileSync(markerPath, ""); - core11.debug("finished caching tool"); + core12.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { const c = semver8.clean(versionSpec) || ""; - core11.debug(`isExplicit: ${c}`); + core12.debug(`isExplicit: ${c}`); const valid3 = semver8.valid(c) != null; - core11.debug(`explicit? ${valid3}`); + core12.debug(`explicit? ${valid3}`); return valid3; } exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version = ""; - core11.debug(`evaluating ${versions.length} versions`); + core12.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver8.gt(a, b)) { return 1; @@ -84623,9 +84502,9 @@ var require_tool_cache = __commonJS({ } } if (version) { - core11.debug(`matched: ${version}`); + core12.debug(`matched: ${version}`); } else { - core11.debug("match not found"); + core12.debug("match not found"); } return version; } @@ -88123,25 +88002,79 @@ module.exports = __toCommonJS(upload_lib_exports); var fs10 = __toESM(require("fs")); var path10 = __toESM(require("path")); var import_zlib = __toESM(require("zlib")); -var core10 = __toESM(require_core()); +var core11 = __toESM(require_core()); var import_file_url = __toESM(require_file_url()); var jsonschema = __toESM(require_lib2()); // src/actions-util.ts var fs = __toESM(require("fs")); var path2 = __toESM(require("path")); -var core3 = __toESM(require_core()); +var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts var path = __toESM(require("path")); -var core2 = __toESM(require_core()); +var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); var import_del = __toESM(require_del()); -var import_get_folder_size = __toESM(require_get_folder_size()); + +// node_modules/get-folder-size/index.js +var import_node_path = require("node:path"); +async function getFolderSize(itemPath, options) { + return await core(itemPath, options, { errors: true }); +} +getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); +getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); +async function core(rootItemPath, options = {}, returnType = {}) { + const fs11 = options.fs || await import("node:fs/promises"); + let folderSize = 0n; + const foundInos = /* @__PURE__ */ new Set(); + const errors = []; + await processItem(rootItemPath); + async function processItem(itemPath) { + if (options.ignore?.test(itemPath)) return; + const stats = returnType.strict ? await fs11.lstat(itemPath, { bigint: true }) : await fs11.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + if (typeof stats !== "object") return; + if (!foundInos.has(stats.ino)) { + foundInos.add(stats.ino); + folderSize += stats.size; + } + if (stats.isDirectory()) { + const directoryItems = returnType.strict ? await fs11.readdir(itemPath) : await fs11.readdir(itemPath).catch((error2) => errors.push(error2)); + if (typeof directoryItems !== "object") return; + await Promise.all( + directoryItems.map( + (directoryItem) => processItem((0, import_node_path.join)(itemPath, directoryItem)) + ) + ); + } + } + if (!options.bigint) { + if (folderSize > BigInt(Number.MAX_SAFE_INTEGER)) { + const error2 = new RangeError( + "The folder size is too large to return as a Number. You can instruct this package to return a BigInt instead." + ); + if (returnType.strict) { + throw error2; + } + errors.push(error2); + folderSize = Number.MAX_SAFE_INTEGER; + } else { + folderSize = Number(folderSize); + } + } + if (returnType.errors) { + return { + size: folderSize, + errors: errors.length > 0 ? errors : null + }; + } else { + return folderSize; + } +} // node_modules/js-yaml/dist/js-yaml.mjs function isNothing(subject) { @@ -88712,7 +88645,7 @@ var json = failsafe.extend({ float ] }); -var core = json; +var core2 = json; var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); @@ -88926,7 +88859,7 @@ var set = new type("tag:yaml.org,2002:set", { resolve: resolveYamlSet, construct: constructYamlSet }); -var _default = core.extend({ +var _default = core2.extend({ implicit: [ timestamp, merge @@ -90905,14 +90838,14 @@ async function asyncSome(array, predicate) { // src/actions-util.ts var pkg = require_package(); var getRequiredInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); if (!value) { throw new ConfigurationError(`Input required and not supplied: ${name}`); } return value; }; var getOptionalInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); return value.length > 0 ? value : void 0; }; function getTemporaryDirectory() { @@ -91032,7 +90965,7 @@ async function runTool(cmd, args = [], opts = {}) { } // src/api-client.ts -var core4 = __toESM(require_core()); +var core5 = __toESM(require_core()); var githubUtils = __toESM(require_utils4()); var retry = __toESM(require_dist_node15()); var import_console_log_level = __toESM(require_console_log_level()); @@ -91137,7 +91070,7 @@ async function getAnalysisKey() { const workflowPath = await getWorkflowRelativePath(); const jobName = getRequiredEnvParam("GITHUB_JOB"); analysisKey = `${workflowPath}:${jobName}`; - core4.exportVariable(analysisKeyEnvVar, analysisKey); + core5.exportVariable(analysisKeyEnvVar, analysisKey); return analysisKey; } function computeAutomationID(analysis_key, environment) { @@ -91170,7 +91103,7 @@ function wrapApiConfigurationError(e) { // src/codeql.ts var fs8 = __toESM(require("fs")); var path8 = __toESM(require("path")); -var core9 = __toESM(require_core()); +var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); // src/cli-errors.ts @@ -91424,7 +91357,7 @@ var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var supportedAnalysisKinds = new Set(Object.values(AnalysisKind)); // src/caching-utils.ts -var core5 = __toESM(require_core()); +var core6 = __toESM(require_core()); // src/diff-informed-analysis-utils.ts var fs3 = __toESM(require("fs")); @@ -91443,13 +91376,13 @@ var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts -var core6 = __toESM(require_core()); +var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; - core6.debug(`Running git command: git ${args.join(" ")}`); + core7.debug(`Running git command: git ${args.join(" ")}`); try { await new toolrunner2.ToolRunner(await io3.which("git", true), args, { silent: true, @@ -91469,7 +91402,7 @@ var runGitCommand = async function(workingDirectory, args, customErrorMessage) { if (stderr.includes("not a git repository")) { reason = "The checkout path provided to the action does not appear to be a git repository."; } - core6.info(`git call failed. ${customErrorMessage} Error: ${reason}`); + core7.info(`git call failed. ${customErrorMessage} Error: ${reason}`); throw error2; } }; @@ -91614,7 +91547,7 @@ async function getRef() { ) !== head; if (hasChangedRef) { const newRef = ref.replace(pull_ref_regex, "refs/pull/$1/head"); - core6.debug( + core7.debug( `No longer on merge commit, rewriting ref from ${ref} to ${newRef}.` ); return newRef; @@ -91640,7 +91573,7 @@ async function isAnalyzingDefaultBranch() { } // src/logging.ts -var core7 = __toESM(require_core()); +var core8 = __toESM(require_core()); function formatDuration(durationMs) { if (durationMs < 1e3) { return `${durationMs}ms`; @@ -92224,7 +92157,7 @@ var fs6 = __toESM(require("fs")); var os = __toESM(require("os")); var path6 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); -var core8 = __toESM(require_core()); +var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); @@ -92278,10 +92211,10 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } } catch (e) { - core8.warning( + core9.warning( `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}` ); - core8.warning(`Falling back to downloading the bundle before extracting.`); + core9.warning(`Falling back to downloading the bundle before extracting.`); await cleanUpGlob(dest, "CodeQL bundle", logger); } const toolsDownloadStart = import_perf_hooks.performance.now(); @@ -93329,12 +93262,12 @@ ${output}` ); } else if (checkVersion && process.env["CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */] !== "true" && !await codeQlVersionAtLeast(codeql, CODEQL_NEXT_MINIMUM_VERSION)) { const result = await codeql.getVersion(); - core9.warning( + core10.warning( `CodeQL CLI version ${result.version} was discontinued on ${GHES_MOST_RECENT_DEPRECATION_DATE} alongside GitHub Enterprise Server ${GHES_VERSION_MOST_RECENTLY_DEPRECATED} and will not be supported by the next minor release of the CodeQL Action. Please update to CodeQL CLI version ${CODEQL_NEXT_MINIMUM_VERSION} or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version. Alternatively, if you want to continue using CodeQL CLI version ${result.version}, you can replace 'github/codeql-action/*@v${getActionVersion().split(".")[0]}' by 'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to continue using this version of the CodeQL Action.` ); - core9.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); + core10.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); } return codeql; } @@ -94692,7 +94625,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo logger.warning( `Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}` ); - core10.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); + core11.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); } return combineSarifFiles(sarifFiles, logger); } @@ -94742,7 +94675,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo logger.warning( `Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage} for CodeQL CLI 2.16.6 and earlier. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}` ); - core10.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); + core11.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); } return combineSarifFiles(sarifFiles, logger); } @@ -94812,13 +94745,13 @@ async function uploadPayload(payload, repositoryNwo, logger, target) { if (isHTTPError(e)) { switch (e.status) { case 403: - core10.warning(e.message || GENERIC_403_MSG); + core11.warning(e.message || GENERIC_403_MSG); break; case 404: - core10.warning(e.message || GENERIC_404_MSG); + core11.warning(e.message || GENERIC_404_MSG); break; default: - core10.warning(e.message); + core11.warning(e.message); break; } } @@ -95164,7 +95097,7 @@ function validateUniqueCategory(sarif, sentinelPrefix = CodeScanningTarget.senti `Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. The easiest fix is to specify a unique value for the \`category\` input. If .runs[].automationDetails.id is specified in the sarif file, that will take precedence over your configured \`category\`. Category: (${id ? id : "none"}) Tool: (${tool ? tool : "none"})` ); } - core10.exportVariable(sentinelEnvVar, sentinelEnvVar); + core11.exportVariable(sentinelEnvVar, sentinelEnvVar); } } function sanitize(str2) { diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index e17f9b23b..a61d42310 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -34336,127 +34336,6 @@ var require_del = __commonJS({ } }); -// node_modules/tiny-each-async/index.js -var require_tiny_each_async = __commonJS({ - "node_modules/tiny-each-async/index.js"(exports2, module2) { - "use strict"; - module2.exports = function eachAsync(arr, parallelLimit, iteratorFn, cb) { - var pending = 0; - var index = 0; - var lastIndex = arr.length - 1; - var called = false; - var limit; - var callback; - var iterate; - if (typeof parallelLimit === "number") { - limit = parallelLimit; - iterate = iteratorFn; - callback = cb || function noop() { - }; - } else { - iterate = parallelLimit; - callback = iteratorFn || function noop() { - }; - limit = arr.length; - } - if (!arr.length) { - return callback(); - } - var iteratorLength = iterate.length; - var shouldCallNextIterator = function shouldCallNextIterator2() { - return !called && pending < limit && index < lastIndex; - }; - var iteratorCallback = function iteratorCallback2(err) { - if (called) { - return; - } - pending--; - if (err || index === lastIndex && !pending) { - called = true; - callback(err); - } else if (shouldCallNextIterator()) { - processIterator(++index); - } - }; - var processIterator = function processIterator2() { - pending++; - var args = iteratorLength === 2 ? [arr[index], iteratorCallback] : [arr[index], index, iteratorCallback]; - iterate.apply(null, args); - if (shouldCallNextIterator()) { - processIterator2(++index); - } - }; - processIterator(); - }; - } -}); - -// node_modules/get-folder-size/index.js -var require_get_folder_size = __commonJS({ - "node_modules/get-folder-size/index.js"(exports2, module2) { - "use strict"; - var fs2 = require("fs"); - var path2 = require("path"); - var eachAsync = require_tiny_each_async(); - function readSizeRecursive(seen, item, ignoreRegEx, callback) { - let cb; - let ignoreRegExp; - if (!callback) { - cb = ignoreRegEx; - ignoreRegExp = null; - } else { - cb = callback; - ignoreRegExp = ignoreRegEx; - } - fs2.lstat(item, function lstat(e, stats) { - let total = !e ? stats.size || 0 : 0; - if (stats) { - if (seen.has(stats.ino)) { - return cb(null, 0); - } - seen.add(stats.ino); - } - if (!e && stats.isDirectory()) { - fs2.readdir(item, (err, list) => { - if (err) { - return cb(err); - } - eachAsync( - list, - 5e3, - (dirItem, next) => { - readSizeRecursive( - seen, - path2.join(item, dirItem), - ignoreRegExp, - (error2, size) => { - if (!error2) { - total += size; - } - next(error2); - } - ); - }, - (finalErr) => { - cb(finalErr, total); - } - ); - }); - } else { - if (ignoreRegExp && ignoreRegExp.test(item)) { - total = 0; - } - cb(e, total); - } - }); - } - module2.exports = (...args) => { - args.unshift(/* @__PURE__ */ new Set()); - return readSizeRecursive(...args); - }; - } -}); - // node_modules/semver/internal/constants.js var require_constants9 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -36412,7 +36291,7 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", @@ -44371,14 +44250,14 @@ var require_retention = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getExpiration = void 0; var generated_1 = require_generated(); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getExpiration(retentionDays) { if (!retentionDays) { return void 0; } const maxRetentionDays = getRetentionDays(); if (maxRetentionDays && maxRetentionDays < retentionDays) { - core13.warning(`Retention days cannot be greater than the maximum allowed retention set within the repository. Using ${maxRetentionDays} instead.`); + core14.warning(`Retention days cannot be greater than the maximum allowed retention set within the repository. Using ${maxRetentionDays} instead.`); retentionDays = maxRetentionDays; } const expirationDate = /* @__PURE__ */ new Date(); @@ -44970,7 +44849,7 @@ var require_util8 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getBackendIdsFromToken = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var config_1 = require_config(); var jwt_decode_1 = __importDefault4(require_jwt_decode_cjs()); var InvalidJwtError = new Error("Failed to get backend IDs: The provided JWT token is invalid and/or missing claims"); @@ -44996,8 +44875,8 @@ var require_util8 = __commonJS({ workflowRunBackendId: scopeParts[1], workflowJobRunBackendId: scopeParts[2] }; - core13.debug(`Workflow Run Backend ID: ${ids.workflowRunBackendId}`); - core13.debug(`Workflow Job Run Backend ID: ${ids.workflowJobRunBackendId}`); + core14.debug(`Workflow Run Backend ID: ${ids.workflowRunBackendId}`); + core14.debug(`Workflow Job Run Backend ID: ${ids.workflowJobRunBackendId}`); return ids; } throw InvalidJwtError; @@ -80190,7 +80069,7 @@ var require_blob_upload = __commonJS({ exports2.uploadZipToBlobStorage = void 0; var storage_blob_1 = require_dist7(); var config_1 = require_config(); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var crypto = __importStar4(require("crypto")); var stream = __importStar4(require("stream")); var errors_1 = require_errors2(); @@ -80216,9 +80095,9 @@ var require_blob_upload = __commonJS({ const bufferSize = (0, config_1.getUploadChunkSize)(); const blobClient = new storage_blob_1.BlobClient(authenticatedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); - core13.debug(`Uploading artifact zip to blob storage with maxConcurrency: ${maxConcurrency}, bufferSize: ${bufferSize}`); + core14.debug(`Uploading artifact zip to blob storage with maxConcurrency: ${maxConcurrency}, bufferSize: ${bufferSize}`); const uploadCallback = (progress) => { - core13.info(`Uploaded bytes ${progress.loadedBytes}`); + core14.info(`Uploaded bytes ${progress.loadedBytes}`); uploadByteCount = progress.loadedBytes; lastProgressTime = Date.now(); }; @@ -80232,7 +80111,7 @@ var require_blob_upload = __commonJS({ const hashStream = crypto.createHash("sha256"); zipUploadStream.pipe(uploadStream); zipUploadStream.pipe(hashStream).setEncoding("hex"); - core13.info("Beginning upload of artifact content to blob storage"); + core14.info("Beginning upload of artifact content to blob storage"); try { yield Promise.race([ blockBlobClient.uploadStream(uploadStream, bufferSize, maxConcurrency, options), @@ -80246,12 +80125,12 @@ var require_blob_upload = __commonJS({ } finally { abortController.abort(); } - core13.info("Finished uploading artifact content to blob storage!"); + core14.info("Finished uploading artifact content to blob storage!"); hashStream.end(); sha256Hash = hashStream.read(); - core13.info(`SHA256 hash of uploaded artifact zip is ${sha256Hash}`); + core14.info(`SHA256 hash of uploaded artifact zip is ${sha256Hash}`); if (uploadByteCount === 0) { - core13.warning(`No data was uploaded to blob storage. Reported upload byte count is 0.`); + core14.warning(`No data was uploaded to blob storage. Reported upload byte count is 0.`); } return { uploadSize: uploadByteCount, @@ -83307,7 +83186,7 @@ var require_BufferList = __commonJS({ this.head = this.tail = null; this.length = 0; }; - BufferList.prototype.join = function join(s) { + BufferList.prototype.join = function join2(s) { if (this.length === 0) return ""; var p = this.head; var ret = "" + p.data; @@ -104310,7 +104189,7 @@ var require_zip2 = __commonJS({ var stream = __importStar4(require("stream")); var promises_1 = require("fs/promises"); var archiver2 = __importStar4(require_archiver()); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var config_1 = require_config(); exports2.DEFAULT_COMPRESSION_LEVEL = 6; var ZipUploadStream = class extends stream.Transform { @@ -104327,7 +104206,7 @@ var require_zip2 = __commonJS({ exports2.ZipUploadStream = ZipUploadStream; function createZipUploadStream(uploadSpecification, compressionLevel = exports2.DEFAULT_COMPRESSION_LEVEL) { return __awaiter4(this, void 0, void 0, function* () { - core13.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); + core14.debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); const zip = archiver2.create("zip", { highWaterMark: (0, config_1.getUploadChunkSize)(), zlib: { level: compressionLevel } @@ -104351,8 +104230,8 @@ var require_zip2 = __commonJS({ } const bufferSize = (0, config_1.getUploadChunkSize)(); const zipUploadStream = new ZipUploadStream(bufferSize); - core13.debug(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`); - core13.debug(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`); + core14.debug(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`); + core14.debug(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`); zip.pipe(zipUploadStream); zip.finalize(); return zipUploadStream; @@ -104360,24 +104239,24 @@ var require_zip2 = __commonJS({ } exports2.createZipUploadStream = createZipUploadStream; var zipErrorCallback = (error2) => { - core13.error("An error has occurred while creating the zip file for upload"); - core13.info(error2); + core14.error("An error has occurred while creating the zip file for upload"); + core14.info(error2); throw new Error("An error has occurred during zip creation for the artifact"); }; var zipWarningCallback = (error2) => { if (error2.code === "ENOENT") { - core13.warning("ENOENT warning during artifact zip creation. No such file or directory"); - core13.info(error2); + core14.warning("ENOENT warning during artifact zip creation. No such file or directory"); + core14.info(error2); } else { - core13.warning(`A non-blocking warning has occurred during artifact zip creation: ${error2.code}`); - core13.info(error2); + core14.warning(`A non-blocking warning has occurred during artifact zip creation: ${error2.code}`); + core14.info(error2); } }; var zipFinishCallback = () => { - core13.debug("Zip stream for upload has finished."); + core14.debug("Zip stream for upload has finished."); }; var zipEndCallback = () => { - core13.debug("Zip stream for upload has ended."); + core14.debug("Zip stream for upload has ended."); }; } }); @@ -104442,7 +104321,7 @@ var require_upload_artifact = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadArtifact = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var retention_1 = require_retention(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); @@ -104489,13 +104368,13 @@ var require_upload_artifact = __commonJS({ value: `sha256:${uploadResult.sha256Hash}` }); } - core13.info(`Finalizing artifact upload`); + core14.info(`Finalizing artifact upload`); const finalizeArtifactResp = yield artifactClient.FinalizeArtifact(finalizeArtifactReq); if (!finalizeArtifactResp.ok) { throw new errors_1.InvalidResponseError("FinalizeArtifact: response from backend was not ok"); } const artifactId = BigInt(finalizeArtifactResp.artifactId); - core13.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`); + core14.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`); return { size: uploadResult.uploadSize, digest: uploadResult.sha256Hash, @@ -111643,7 +111522,7 @@ var require_download_artifact = __commonJS({ var crypto = __importStar4(require("crypto")); var stream = __importStar4(require("stream")); var github2 = __importStar4(require_github2()); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var httpClient = __importStar4(require_lib()); var unzip_stream_1 = __importDefault4(require_unzip()); var user_agent_1 = require_user_agent(); @@ -111679,7 +111558,7 @@ var require_download_artifact = __commonJS({ return yield streamExtractExternal(url, directory); } catch (error2) { retryCount++; - core13.debug(`Failed to download artifact after ${retryCount} retries due to ${error2.message}. Retrying in 5 seconds...`); + core14.debug(`Failed to download artifact after ${retryCount} retries due to ${error2.message}. Retrying in 5 seconds...`); yield new Promise((resolve2) => setTimeout(resolve2, 5e3)); } } @@ -111708,7 +111587,7 @@ var require_download_artifact = __commonJS({ extractStream.on("data", () => { timer.refresh(); }).on("error", (error2) => { - core13.debug(`response.message: Artifact download failed: ${error2.message}`); + core14.debug(`response.message: Artifact download failed: ${error2.message}`); clearTimeout(timer); reject(error2); }).pipe(unzip_stream_1.default.Extract({ path: directory })).on("close", () => { @@ -111716,7 +111595,7 @@ var require_download_artifact = __commonJS({ if (hashStream) { hashStream.end(); sha256Digest = hashStream.read(); - core13.info(`SHA256 digest of downloaded artifact is ${sha256Digest}`); + core14.info(`SHA256 digest of downloaded artifact is ${sha256Digest}`); } resolve2({ sha256Digest: `sha256:${sha256Digest}` }); }).on("error", (error2) => { @@ -111731,7 +111610,7 @@ var require_download_artifact = __commonJS({ const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const api = github2.getOctokit(token); let digestMismatch = false; - core13.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`); + core14.info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`); const { headers, status } = yield api.rest.actions.downloadArtifact({ owner: repositoryOwner, repo: repositoryName, @@ -111748,16 +111627,16 @@ var require_download_artifact = __commonJS({ if (!location) { throw new Error(`Unable to redirect to artifact download url`); } - core13.info(`Redirecting to blob download url: ${scrubQueryParameters(location)}`); + core14.info(`Redirecting to blob download url: ${scrubQueryParameters(location)}`); try { - core13.info(`Starting download of artifact to: ${downloadPath}`); + core14.info(`Starting download of artifact to: ${downloadPath}`); const extractResponse = yield streamExtract(location, downloadPath); - core13.info(`Artifact download completed successfully.`); + core14.info(`Artifact download completed successfully.`); if (options === null || options === void 0 ? void 0 : options.expectedHash) { if ((options === null || options === void 0 ? void 0 : options.expectedHash) !== extractResponse.sha256Digest) { digestMismatch = true; - core13.debug(`Computed digest: ${extractResponse.sha256Digest}`); - core13.debug(`Expected digest: ${options.expectedHash}`); + core14.debug(`Computed digest: ${extractResponse.sha256Digest}`); + core14.debug(`Expected digest: ${options.expectedHash}`); } } } catch (error2) { @@ -111784,7 +111663,7 @@ var require_download_artifact = __commonJS({ Are you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`); } if (artifacts.length > 1) { - core13.warning("Multiple artifacts found, defaulting to first."); + core14.warning("Multiple artifacts found, defaulting to first."); } const signedReq = { workflowRunBackendId: artifacts[0].workflowRunBackendId, @@ -111792,16 +111671,16 @@ Are you trying to download from a different run? Try specifying a github-token w name: artifacts[0].name }; const { signedUrl } = yield artifactClient.GetSignedArtifactURL(signedReq); - core13.info(`Redirecting to blob download url: ${scrubQueryParameters(signedUrl)}`); + core14.info(`Redirecting to blob download url: ${scrubQueryParameters(signedUrl)}`); try { - core13.info(`Starting download of artifact to: ${downloadPath}`); + core14.info(`Starting download of artifact to: ${downloadPath}`); const extractResponse = yield streamExtract(signedUrl, downloadPath); - core13.info(`Artifact download completed successfully.`); + core14.info(`Artifact download completed successfully.`); if (options === null || options === void 0 ? void 0 : options.expectedHash) { if ((options === null || options === void 0 ? void 0 : options.expectedHash) !== extractResponse.sha256Digest) { digestMismatch = true; - core13.debug(`Computed digest: ${extractResponse.sha256Digest}`); - core13.debug(`Expected digest: ${options.expectedHash}`); + core14.debug(`Computed digest: ${extractResponse.sha256Digest}`); + core14.debug(`Expected digest: ${options.expectedHash}`); } } } catch (error2) { @@ -111814,10 +111693,10 @@ Are you trying to download from a different run? Try specifying a github-token w function resolveOrCreateDirectory(downloadPath = (0, config_1.getGitHubWorkspaceDir)()) { return __awaiter4(this, void 0, void 0, function* () { if (!(yield exists(downloadPath))) { - core13.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); + core14.debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); yield promises_1.default.mkdir(downloadPath, { recursive: true }); } else { - core13.debug(`Artifact destination folder already exists: ${downloadPath}`); + core14.debug(`Artifact destination folder already exists: ${downloadPath}`); } return downloadPath; }); @@ -111858,7 +111737,7 @@ var require_retry_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRetryOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var defaultMaxRetryNumber = 5; var defaultExemptStatusCodes = [400, 401, 403, 404, 422]; function getRetryOptions(defaultOptions, retries = defaultMaxRetryNumber, exemptStatusCodes = defaultExemptStatusCodes) { @@ -111873,7 +111752,7 @@ var require_retry_options = __commonJS({ retryOptions.doNotRetry = exemptStatusCodes; } const requestOptions = Object.assign(Object.assign({}, defaultOptions.request), { retries }); - core13.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : "octokit default: [400, 401, 403, 404, 422]"})`); + core14.debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : "octokit default: [400, 401, 403, 404, 422]"})`); return [retryOptions, requestOptions]; } exports2.getRetryOptions = getRetryOptions; @@ -112030,7 +111909,7 @@ var require_get_artifact = __commonJS({ exports2.getArtifactInternal = exports2.getArtifactPublic = void 0; var github_1 = require_github2(); var plugin_retry_1 = require_dist_node25(); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var utils_1 = require_utils13(); var retry_options_1 = require_retry_options(); var plugin_request_log_1 = require_dist_node24(); @@ -112068,7 +111947,7 @@ var require_get_artifact = __commonJS({ let artifact2 = getArtifactResp.data.artifacts[0]; if (getArtifactResp.data.artifacts.length > 1) { artifact2 = getArtifactResp.data.artifacts.sort((a, b) => b.id - a.id)[0]; - core13.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.id})`); + core14.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.id})`); } return { artifact: { @@ -112101,7 +111980,7 @@ var require_get_artifact = __commonJS({ let artifact2 = res.artifacts[0]; if (res.artifacts.length > 1) { artifact2 = res.artifacts.sort((a, b) => Number(b.databaseId) - Number(a.databaseId))[0]; - core13.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.databaseId})`); + core14.debug(`More than one artifact found for a single name, returning newest (id: ${artifact2.databaseId})`); } return { artifact: { @@ -114049,7 +113928,7 @@ var require_requestUtils = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientRequest = exports2.retry = void 0; var utils_1 = require_utils14(); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { return __awaiter4(this, void 0, void 0, function* () { @@ -114076,13 +113955,13 @@ var require_requestUtils = __commonJS({ errorMessage = error2.message; } if (!isRetryable) { - core13.info(`${name} - Error is not retryable`); + core14.info(`${name} - Error is not retryable`); if (response) { (0, utils_1.displayHttpDiagnostics)(response); } break; } - core13.info(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core14.info(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); yield (0, utils_1.sleep)((0, utils_1.getExponentialRetryTimeInMilliseconds)(attempt)); attempt++; } @@ -114166,7 +114045,7 @@ var require_upload_http_client = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadHttpClient = void 0; var fs2 = __importStar4(require("fs")); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var tmp = __importStar4(require_tmp_promise()); var stream = __importStar4(require("stream")); var utils_1 = require_utils14(); @@ -114231,7 +114110,7 @@ var require_upload_http_client = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const FILE_CONCURRENCY = (0, config_variables_1.getUploadFileConcurrency)(); const MAX_CHUNK_SIZE = (0, config_variables_1.getUploadChunkSize)(); - core13.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`); + core14.debug(`File Concurrency: ${FILE_CONCURRENCY}, and Chunk Size: ${MAX_CHUNK_SIZE}`); const parameters = []; let continueOnError = true; if (options) { @@ -114268,15 +114147,15 @@ var require_upload_http_client = __commonJS({ } const startTime = perf_hooks_1.performance.now(); const uploadFileResult = yield this.uploadFileAsync(index, currentFileParameters); - if (core13.isDebug()) { - core13.debug(`File: ${++completedFiles}/${filesToUpload.length}. ${currentFileParameters.file} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish upload`); + if (core14.isDebug()) { + core14.debug(`File: ${++completedFiles}/${filesToUpload.length}. ${currentFileParameters.file} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish upload`); } uploadFileSize += uploadFileResult.successfulUploadSize; totalFileSize += uploadFileResult.totalSize; if (uploadFileResult.isSuccess === false) { failedItemsToReport.push(currentFileParameters.file); if (!continueOnError) { - core13.error(`aborting artifact upload`); + core14.error(`aborting artifact upload`); abortPendingFileUploads = true; } } @@ -114285,7 +114164,7 @@ var require_upload_http_client = __commonJS({ }))); this.statusReporter.stop(); this.uploadHttpManager.disposeAndReplaceAllClients(); - core13.info(`Total size of all the files uploaded is ${uploadFileSize} bytes`); + core14.info(`Total size of all the files uploaded is ${uploadFileSize} bytes`); return { uploadSize: uploadFileSize, totalSize: totalFileSize, @@ -114311,16 +114190,16 @@ var require_upload_http_client = __commonJS({ let uploadFileSize = 0; let isGzip = true; if (!isFIFO && totalFileSize < 65536) { - core13.debug(`${parameters.file} is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size`); + core14.debug(`${parameters.file} is less than 64k in size. Creating a gzip file in-memory to potentially reduce the upload size`); const buffer = yield (0, upload_gzip_1.createGZipFileInBuffer)(parameters.file); let openUploadStream; if (totalFileSize < buffer.byteLength) { - core13.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); + core14.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); openUploadStream = () => fs2.createReadStream(parameters.file); isGzip = false; uploadFileSize = totalFileSize; } else { - core13.debug(`A gzip file created for ${parameters.file} helped with reducing the size of the original file. The file will be uploaded using gzip.`); + core14.debug(`A gzip file created for ${parameters.file} helped with reducing the size of the original file. The file will be uploaded using gzip.`); openUploadStream = () => { const passThrough = new stream.PassThrough(); passThrough.end(buffer); @@ -114332,7 +114211,7 @@ var require_upload_http_client = __commonJS({ if (!result) { isUploadSuccessful = false; failedChunkSizes += uploadFileSize; - core13.warning(`Aborting upload for ${parameters.file} due to failure`); + core14.warning(`Aborting upload for ${parameters.file} due to failure`); } return { isSuccess: isUploadSuccessful, @@ -114341,16 +114220,16 @@ var require_upload_http_client = __commonJS({ }; } else { const tempFile = yield tmp.file(); - core13.debug(`${parameters.file} is greater than 64k in size. Creating a gzip file on-disk ${tempFile.path} to potentially reduce the upload size`); + core14.debug(`${parameters.file} is greater than 64k in size. Creating a gzip file on-disk ${tempFile.path} to potentially reduce the upload size`); uploadFileSize = yield (0, upload_gzip_1.createGZipFileOnDisk)(parameters.file, tempFile.path); let uploadFilePath = tempFile.path; if (!isFIFO && totalFileSize < uploadFileSize) { - core13.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); + core14.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); uploadFileSize = totalFileSize; uploadFilePath = parameters.file; isGzip = false; } else { - core13.debug(`The gzip file created for ${parameters.file} is smaller than the original file. The file will be uploaded using gzip.`); + core14.debug(`The gzip file created for ${parameters.file} is smaller than the original file. The file will be uploaded using gzip.`); } let abortFileUpload = false; while (offset < uploadFileSize) { @@ -114370,7 +114249,7 @@ var require_upload_http_client = __commonJS({ if (!result) { isUploadSuccessful = false; failedChunkSizes += chunkSize; - core13.warning(`Aborting upload for ${parameters.file} due to failure`); + core14.warning(`Aborting upload for ${parameters.file} due to failure`); abortFileUpload = true; } else { if (uploadFileSize > 8388608) { @@ -114378,7 +114257,7 @@ var require_upload_http_client = __commonJS({ } } } - core13.debug(`deleting temporary gzip file ${tempFile.path}`); + core14.debug(`deleting temporary gzip file ${tempFile.path}`); yield tempFile.cleanup(); return { isSuccess: isUploadSuccessful, @@ -114417,7 +114296,7 @@ var require_upload_http_client = __commonJS({ if (response) { (0, utils_1.displayHttpDiagnostics)(response); } - core13.info(`Retry limit has been reached for chunk at offset ${start} to ${resourceUrl}`); + core14.info(`Retry limit has been reached for chunk at offset ${start} to ${resourceUrl}`); return true; } return false; @@ -114425,14 +114304,14 @@ var require_upload_http_client = __commonJS({ const backOff = (retryAfterValue) => __awaiter4(this, void 0, void 0, function* () { this.uploadHttpManager.disposeAndReplaceClient(httpClientIndex); if (retryAfterValue) { - core13.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`); + core14.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the upload`); yield (0, utils_1.sleep)(retryAfterValue); } else { const backoffTime = (0, utils_1.getExponentialRetryTimeInMilliseconds)(retryCount); - core13.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the upload at offset ${start}`); + core14.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the upload at offset ${start}`); yield (0, utils_1.sleep)(backoffTime); } - core13.info(`Finished backoff for retry #${retryCount}, continuing with upload`); + core14.info(`Finished backoff for retry #${retryCount}, continuing with upload`); return; }); while (retryCount <= retryLimit) { @@ -114440,7 +114319,7 @@ var require_upload_http_client = __commonJS({ try { response = yield uploadChunkRequest(); } catch (error2) { - core13.info(`An error has been caught http-client index ${httpClientIndex}, retrying the upload`); + core14.info(`An error has been caught http-client index ${httpClientIndex}, retrying the upload`); console.log(error2); if (incrementAndCheckRetryLimit()) { return false; @@ -114452,13 +114331,13 @@ var require_upload_http_client = __commonJS({ if ((0, utils_1.isSuccessStatusCode)(response.message.statusCode)) { return true; } else if ((0, utils_1.isRetryableStatusCode)(response.message.statusCode)) { - core13.info(`A ${response.message.statusCode} status code has been received, will attempt to retry the upload`); + core14.info(`A ${response.message.statusCode} status code has been received, will attempt to retry the upload`); if (incrementAndCheckRetryLimit(response)) { return false; } (0, utils_1.isThrottledStatusCode)(response.message.statusCode) ? yield backOff((0, utils_1.tryGetRetryAfterValueTimeInMilliseconds)(response.message.headers)) : yield backOff(); } else { - core13.error(`Unexpected response. Unable to upload chunk to ${resourceUrl}`); + core14.error(`Unexpected response. Unable to upload chunk to ${resourceUrl}`); (0, utils_1.displayHttpDiagnostics)(response); return false; } @@ -114476,7 +114355,7 @@ var require_upload_http_client = __commonJS({ resourceUrl.searchParams.append("artifactName", artifactName); const parameters = { Size: size }; const data = JSON.stringify(parameters, null, 2); - core13.debug(`URL is ${resourceUrl.toString()}`); + core14.debug(`URL is ${resourceUrl.toString()}`); const client = this.uploadHttpManager.getClient(0); const headers = (0, utils_1.getUploadHeaders)("application/json", false); const customErrorMessages = /* @__PURE__ */ new Map([ @@ -114489,7 +114368,7 @@ var require_upload_http_client = __commonJS({ return client.patch(resourceUrl.toString(), data, headers); }), customErrorMessages); yield response.readBody(); - core13.debug(`Artifact ${artifactName} has been successfully uploaded, total size in bytes: ${size}`); + core14.debug(`Artifact ${artifactName} has been successfully uploaded, total size in bytes: ${size}`); }); } }; @@ -114558,7 +114437,7 @@ var require_download_http_client = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DownloadHttpClient = void 0; var fs2 = __importStar4(require("fs")); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var zlib = __importStar4(require("zlib")); var utils_1 = require_utils14(); var url_1 = require("url"); @@ -114612,11 +114491,11 @@ var require_download_http_client = __commonJS({ downloadSingleArtifact(downloadItems) { return __awaiter4(this, void 0, void 0, function* () { const DOWNLOAD_CONCURRENCY = (0, config_variables_1.getDownloadFileConcurrency)(); - core13.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`); + core14.debug(`Download file concurrency is set to ${DOWNLOAD_CONCURRENCY}`); const parallelDownloads = [...new Array(DOWNLOAD_CONCURRENCY).keys()]; let currentFile = 0; let downloadedFiles = 0; - core13.info(`Total number of files that will be downloaded: ${downloadItems.length}`); + core14.info(`Total number of files that will be downloaded: ${downloadItems.length}`); this.statusReporter.setTotalNumberOfFilesToProcess(downloadItems.length); this.statusReporter.start(); yield Promise.all(parallelDownloads.map((index) => __awaiter4(this, void 0, void 0, function* () { @@ -114625,8 +114504,8 @@ var require_download_http_client = __commonJS({ currentFile += 1; const startTime = perf_hooks_1.performance.now(); yield this.downloadIndividualFile(index, currentFileToDownload.sourceLocation, currentFileToDownload.targetPath); - if (core13.isDebug()) { - core13.debug(`File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish downloading`); + if (core14.isDebug()) { + core14.debug(`File: ${++downloadedFiles}/${downloadItems.length}. ${currentFileToDownload.targetPath} took ${(perf_hooks_1.performance.now() - startTime).toFixed(3)} milliseconds to finish downloading`); } this.statusReporter.incrementProcessedCount(); } @@ -114664,19 +114543,19 @@ var require_download_http_client = __commonJS({ } else { this.downloadHttpManager.disposeAndReplaceClient(httpClientIndex); if (retryAfterValue) { - core13.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the download`); + core14.info(`Backoff due to too many requests, retry #${retryCount}. Waiting for ${retryAfterValue} milliseconds before continuing the download`); yield (0, utils_1.sleep)(retryAfterValue); } else { const backoffTime = (0, utils_1.getExponentialRetryTimeInMilliseconds)(retryCount); - core13.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the download`); + core14.info(`Exponential backoff for retry #${retryCount}. Waiting for ${backoffTime} milliseconds before continuing the download`); yield (0, utils_1.sleep)(backoffTime); } - core13.info(`Finished backoff for retry #${retryCount}, continuing with download`); + core14.info(`Finished backoff for retry #${retryCount}, continuing with download`); } }); const isAllBytesReceived = (expected, received) => { if (!expected || !received || process.env["ACTIONS_ARTIFACT_SKIP_DOWNLOAD_VALIDATION"]) { - core13.info("Skipping download validation."); + core14.info("Skipping download validation."); return true; } return parseInt(expected) === received; @@ -114697,7 +114576,7 @@ var require_download_http_client = __commonJS({ try { response = yield makeDownloadRequest(); } catch (error2) { - core13.info("An error occurred while attempting to download a file"); + core14.info("An error occurred while attempting to download a file"); console.log(error2); yield backOff(); continue; @@ -114717,7 +114596,7 @@ var require_download_http_client = __commonJS({ } } if (forceRetry || (0, utils_1.isRetryableStatusCode)(response.message.statusCode)) { - core13.info(`A ${response.message.statusCode} response code has been received while attempting to download an artifact`); + core14.info(`A ${response.message.statusCode} response code has been received while attempting to download an artifact`); resetDestinationStream(downloadPath); (0, utils_1.isThrottledStatusCode)(response.message.statusCode) ? yield backOff((0, utils_1.tryGetRetryAfterValueTimeInMilliseconds)(response.message.headers)) : yield backOff(); } else { @@ -114739,29 +114618,29 @@ var require_download_http_client = __commonJS({ if (isGzip) { const gunzip = zlib.createGunzip(); response.message.on("error", (error2) => { - core13.info(`An error occurred while attempting to read the response stream`); + core14.info(`An error occurred while attempting to read the response stream`); gunzip.close(); destinationStream.close(); reject(error2); }).pipe(gunzip).on("error", (error2) => { - core13.info(`An error occurred while attempting to decompress the response stream`); + core14.info(`An error occurred while attempting to decompress the response stream`); destinationStream.close(); reject(error2); }).pipe(destinationStream).on("close", () => { resolve2(); }).on("error", (error2) => { - core13.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); + core14.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); reject(error2); }); } else { response.message.on("error", (error2) => { - core13.info(`An error occurred while attempting to read the response stream`); + core14.info(`An error occurred while attempting to read the response stream`); destinationStream.close(); reject(error2); }).pipe(destinationStream).on("close", () => { resolve2(); }).on("error", (error2) => { - core13.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); + core14.info(`An error occurred while writing a downloaded file to ${destinationStream.path}`); reject(error2); }); } @@ -114900,7 +114779,7 @@ var require_artifact_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultArtifactClient = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var upload_specification_1 = require_upload_specification(); var upload_http_client_1 = require_upload_http_client(); var utils_1 = require_utils14(); @@ -114921,7 +114800,7 @@ var require_artifact_client = __commonJS({ */ uploadArtifact(name, files, rootDirectory, options) { return __awaiter4(this, void 0, void 0, function* () { - core13.info(`Starting artifact upload + core14.info(`Starting artifact upload For more detailed logs during the artifact upload process, enable step-debugging: https://docs.github.com/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging#enabling-step-debug-logging`); (0, path_and_artifact_name_validation_1.checkArtifactName)(name); const uploadSpecification = (0, upload_specification_1.getUploadSpecification)(name, rootDirectory, files); @@ -114933,24 +114812,24 @@ For more detailed logs during the artifact upload process, enable step-debugging }; const uploadHttpClient = new upload_http_client_1.UploadHttpClient(); if (uploadSpecification.length === 0) { - core13.warning(`No files found that can be uploaded`); + core14.warning(`No files found that can be uploaded`); } else { const response = yield uploadHttpClient.createArtifactInFileContainer(name, options); if (!response.fileContainerResourceUrl) { - core13.debug(response.toString()); + core14.debug(response.toString()); throw new Error("No URL provided by the Artifact Service to upload an artifact to"); } - core13.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`); - core13.info(`Container for artifact "${name}" successfully created. Starting upload of file(s)`); + core14.debug(`Upload Resource URL: ${response.fileContainerResourceUrl}`); + core14.info(`Container for artifact "${name}" successfully created. Starting upload of file(s)`); const uploadResult = yield uploadHttpClient.uploadArtifactToFileContainer(response.fileContainerResourceUrl, uploadSpecification, options); - core13.info(`File upload process has finished. Finalizing the artifact upload`); + core14.info(`File upload process has finished. Finalizing the artifact upload`); yield uploadHttpClient.patchArtifactSize(uploadResult.totalSize, name); if (uploadResult.failedItems.length > 0) { - core13.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`); + core14.info(`Upload finished. There were ${uploadResult.failedItems.length} items that failed to upload`); } else { - core13.info(`Artifact has been finalized. All files have been successfully uploaded!`); + core14.info(`Artifact has been finalized. All files have been successfully uploaded!`); } - core13.info(` + core14.info(` The raw size of all the files that were specified for upload is ${uploadResult.totalSize} bytes The size of all the files that were uploaded is ${uploadResult.uploadSize} bytes. This takes into account any gzip compression used to reduce the upload size, time and storage @@ -114984,10 +114863,10 @@ Note: The size of downloaded zips can differ significantly from the reported siz path2 = (0, path_1.resolve)(path2); const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path2, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); if (downloadSpecification.filesToDownload.length === 0) { - core13.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); + core14.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); } else { yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure); - core13.info("Directory structure has been set up for the artifact"); + core14.info("Directory structure has been set up for the artifact"); yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate); yield downloadHttpClient.downloadSingleArtifact(downloadSpecification.filesToDownload); } @@ -115003,7 +114882,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz const response = []; const artifacts = yield downloadHttpClient.listArtifacts(); if (artifacts.count === 0) { - core13.info("Unable to find any artifacts for the associated workflow"); + core14.info("Unable to find any artifacts for the associated workflow"); return response; } if (!path2) { @@ -115015,11 +114894,11 @@ Note: The size of downloaded zips can differ significantly from the reported siz while (downloadedArtifacts < artifacts.count) { const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; downloadedArtifacts += 1; - core13.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); + core14.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl); const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path2, true); if (downloadSpecification.filesToDownload.length === 0) { - core13.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); + core14.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); } else { yield (0, utils_1.createDirectoriesForArtifact)(downloadSpecification.directoryStructure); yield (0, utils_1.createEmptyFilesForArtifact)(downloadSpecification.emptyFilesToCreate); @@ -115081,7 +114960,7 @@ var require_internal_glob_options_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -115091,15 +114970,15 @@ var require_internal_glob_options_helper = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core13.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core13.debug(`implicitDescendants '${result.implicitDescendants}'`); + core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; @@ -115763,7 +115642,7 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs2 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); var path2 = __importStar4(require("path")); @@ -115814,7 +115693,7 @@ var require_internal_globber = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core13.debug(`Search path '${searchPath}'`); + core14.debug(`Search path '${searchPath}'`); try { yield __await4(fs2.promises.lstat(searchPath)); } catch (err) { @@ -115886,7 +115765,7 @@ var require_internal_globber = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core13.debug(`Broken symlink '${item.path}'`); + core14.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -115902,7 +115781,7 @@ var require_internal_globber = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -117226,7 +117105,7 @@ var require_cacheUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob2 = __importStar4(require_glob3()); var io6 = __importStar4(require_io()); @@ -117279,7 +117158,7 @@ var require_cacheUtils = __commonJS({ _e = false; const file = _c; const relativeFile = path2.relative(workspace, file).replace(new RegExp(`\\${path2.sep}`, "g"), "/"); - core13.debug(`Matched: ${relativeFile}`); + core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { @@ -117309,7 +117188,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); - core13.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec2.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, @@ -117320,10 +117199,10 @@ var require_cacheUtils = __commonJS({ } }); } catch (err) { - core13.debug(err.message); + core14.debug(err.message); } versionOutput = versionOutput.trim(); - core13.debug(versionOutput); + core14.debug(versionOutput); return versionOutput; }); } @@ -117331,7 +117210,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); - core13.debug(`zstd version: ${version}`); + core14.debug(`zstd version: ${version}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -117521,7 +117400,7 @@ var require_uploadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var storage_blob_1 = require_dist7(); var errors_1 = require_errors4(); var UploadProgress = class { @@ -117563,7 +117442,7 @@ var require_uploadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core13.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + core14.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -117618,14 +117497,14 @@ var require_uploadUtils = __commonJS({ }; try { uploadProgress.startDisplayTimer(); - core13.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + core14.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); if (response._response.status >= 400) { throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); } return response; } catch (error2) { - core13.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); + core14.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); throw error2; } finally { uploadProgress.stopDisplayTimer(); @@ -117696,7 +117575,7 @@ var require_requestUtils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var constants_1 = require_constants13(); function isSuccessStatusCode(statusCode) { @@ -117757,9 +117636,9 @@ var require_requestUtils2 = __commonJS({ isRetryable = isRetryableStatusCode(statusCode); errorMessage = `Cache service responded with ${statusCode}`; } - core13.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core14.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); if (!isRetryable) { - core13.debug(`${name} - Error is not retryable`); + core14.debug(`${name} - Error is not retryable`); break; } yield sleep(delay); @@ -117864,7 +117743,7 @@ var require_downloadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); @@ -117902,7 +117781,7 @@ var require_downloadUtils = __commonJS({ this.segmentIndex = this.segmentIndex + 1; this.segmentSize = segmentSize; this.receivedBytes = 0; - core13.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + core14.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); } /** * Sets the number of bytes received for the current segment. @@ -117936,7 +117815,7 @@ var require_downloadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core13.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + core14.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -117986,7 +117865,7 @@ var require_downloadUtils = __commonJS({ })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { downloadResponse.message.destroy(); - core13.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + core14.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); }); yield pipeResponseToStream(downloadResponse, writeStream); const contentLengthHeader = downloadResponse.message.headers["content-length"]; @@ -117997,7 +117876,7 @@ var require_downloadUtils = __commonJS({ throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); } } else { - core13.debug("Unable to validate download, no Content-Length header"); + core14.debug("Unable to validate download, no Content-Length header"); } }); } @@ -118117,7 +117996,7 @@ var require_downloadUtils = __commonJS({ const properties = yield client.getProperties(); const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; if (contentLength < 0) { - core13.debug("Unable to determine content length, downloading file with http-client..."); + core14.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); @@ -118197,7 +118076,7 @@ var require_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -118217,9 +118096,9 @@ var require_options = __commonJS({ } result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; - core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core13.debug(`Upload concurrency: ${result.uploadConcurrency}`); - core13.debug(`Upload chunk size: ${result.uploadChunkSize}`); + core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core14.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } exports2.getUploadOptions = getUploadOptions; @@ -118256,12 +118135,12 @@ var require_options = __commonJS({ if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) { result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; } - core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core13.debug(`Download concurrency: ${result.downloadConcurrency}`); - core13.debug(`Request timeout (ms): ${result.timeoutInMs}`); - core13.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); - core13.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); - core13.debug(`Lookup only: ${result.lookupOnly}`); + core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core14.debug(`Download concurrency: ${result.downloadConcurrency}`); + core14.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core14.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); + core14.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core14.debug(`Lookup only: ${result.lookupOnly}`); return result; } exports2.getDownloadOptions = getDownloadOptions; @@ -118441,7 +118320,7 @@ var require_cacheHttpClient = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); var fs2 = __importStar4(require("fs")); @@ -118459,7 +118338,7 @@ var require_cacheHttpClient = __commonJS({ throw new Error("Cache Service Url not found, unable to restore cache."); } const url = `${baseUrl}_apis/artifactcache/${resource}`; - core13.debug(`Resource Url: ${url}`); + core14.debug(`Resource Url: ${url}`); return url; } function createAcceptHeader(type2, apiVersion) { @@ -118487,7 +118366,7 @@ var require_cacheHttpClient = __commonJS({ return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { - if (core13.isDebug()) { + if (core14.isDebug()) { yield printCachesListForDiagnostics(keys[0], httpClient, version); } return null; @@ -118500,9 +118379,9 @@ var require_cacheHttpClient = __commonJS({ if (!cacheDownloadUrl) { throw new Error("Cache not found."); } - core13.setSecret(cacheDownloadUrl); - core13.debug(`Cache Result:`); - core13.debug(JSON.stringify(cacheResult)); + core14.setSecret(cacheDownloadUrl); + core14.debug(`Cache Result:`); + core14.debug(JSON.stringify(cacheResult)); return cacheResult; }); } @@ -118517,10 +118396,10 @@ var require_cacheHttpClient = __commonJS({ const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { - core13.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key + core14.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { - core13.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); + core14.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); } } } @@ -118565,7 +118444,7 @@ Other caches with similar key:`); } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter4(this, void 0, void 0, function* () { - core13.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) @@ -118587,7 +118466,7 @@ Other caches with similar key:`); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); const parallelUploads = [...new Array(concurrency).keys()]; - core13.debug("Awaiting all uploads"); + core14.debug("Awaiting all uploads"); let offset = 0; try { yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { @@ -118630,16 +118509,16 @@ Other caches with similar key:`); yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); } else { const httpClient = createHttpClient(); - core13.debug("Upload cache"); + core14.debug("Upload cache"); yield uploadFile(httpClient, cacheId, archivePath, options); - core13.debug("Commiting cache"); + core14.debug("Commiting cache"); const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + core14.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); } - core13.info("Cache saved successfully"); + core14.info("Cache saved successfully"); } }); } @@ -119839,7 +119718,7 @@ var require_cache3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var path2 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); @@ -119892,7 +119771,7 @@ var require_cache3 = __commonJS({ function restoreCache4(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core13.debug(`Cache service version: ${cacheServiceVersion}`); + core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); switch (cacheServiceVersion) { case "v2": @@ -119908,8 +119787,8 @@ var require_cache3 = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core13.debug("Resolved Keys:"); - core13.debug(JSON.stringify(keys)); + core14.debug("Resolved Keys:"); + core14.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -119927,19 +119806,19 @@ var require_cache3 = __commonJS({ return void 0; } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core13.info("Lookup only - skipping download"); + core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } archivePath = path2.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core13.info("Cache restored successfully"); + core14.info("Cache restored successfully"); return cacheEntry.cacheKey; } catch (error2) { const typedError = error2; @@ -119947,16 +119826,16 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to restore: ${error2.message}`); + core14.error(`Failed to restore: ${error2.message}`); } else { - core13.warning(`Failed to restore: ${error2.message}`); + core14.warning(`Failed to restore: ${error2.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -119967,8 +119846,8 @@ var require_cache3 = __commonJS({ options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core13.debug("Resolved Keys:"); - core13.debug(JSON.stringify(keys)); + core14.debug("Resolved Keys:"); + core14.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -119986,30 +119865,30 @@ var require_cache3 = __commonJS({ }; const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core13.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); + core14.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); return void 0; } const isRestoreKeyMatch = request.key !== response.matchedKey; if (isRestoreKeyMatch) { - core13.info(`Cache hit for restore-key: ${response.matchedKey}`); + core14.info(`Cache hit for restore-key: ${response.matchedKey}`); } else { - core13.info(`Cache hit for: ${response.matchedKey}`); + core14.info(`Cache hit for: ${response.matchedKey}`); } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core13.info("Lookup only - skipping download"); + core14.info("Lookup only - skipping download"); return response.matchedKey; } archivePath = path2.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive path: ${archivePath}`); - core13.debug(`Starting download of archive to: ${archivePath}`); + core14.debug(`Archive path: ${archivePath}`); + core14.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - if (core13.isDebug()) { + core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core13.info("Cache restored successfully"); + core14.info("Cache restored successfully"); return response.matchedKey; } catch (error2) { const typedError = error2; @@ -120017,9 +119896,9 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to restore: ${error2.message}`); + core14.error(`Failed to restore: ${error2.message}`); } else { - core13.warning(`Failed to restore: ${error2.message}`); + core14.warning(`Failed to restore: ${error2.message}`); } } } finally { @@ -120028,7 +119907,7 @@ var require_cache3 = __commonJS({ yield utils.unlinkFile(archivePath); } } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -120037,7 +119916,7 @@ var require_cache3 = __commonJS({ function saveCache4(paths, key, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core13.debug(`Cache service version: ${cacheServiceVersion}`); + core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); checkKey(key); switch (cacheServiceVersion) { @@ -120056,26 +119935,26 @@ var require_cache3 = __commonJS({ const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core13.debug("Cache Paths:"); - core13.debug(`${JSON.stringify(cachePaths)}`); + core14.debug("Cache Paths:"); + core14.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path2.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const fileSizeLimit = 10 * 1024 * 1024 * 1024; const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.debug(`File Size: ${archiveFileSize}`); + core14.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } - core13.debug("Reserving Cache"); + core14.debug("Reserving Cache"); const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { compressionMethod, enableCrossOsArchive, @@ -120088,26 +119967,26 @@ var require_cache3 = __commonJS({ } else { throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); } - core13.debug(`Saving Cache (ID: ${cacheId})`); + core14.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); } catch (error2) { const typedError = error2; if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError2.name) { - core13.info(`Failed to save: ${typedError.message}`); + core14.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to save: ${typedError.message}`); + core14.error(`Failed to save: ${typedError.message}`); } else { - core13.warning(`Failed to save: ${typedError.message}`); + core14.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -120120,26 +119999,26 @@ var require_cache3 = __commonJS({ const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core13.debug("Cache Paths:"); - core13.debug(`${JSON.stringify(cachePaths)}`); + core14.debug("Cache Paths:"); + core14.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path2.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.debug(`File Size: ${archiveFileSize}`); + core14.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } options.archiveSizeBytes = archiveFileSize; - core13.debug("Reserving Cache"); + core14.debug("Reserving Cache"); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const request = { key, @@ -120153,10 +120032,10 @@ var require_cache3 = __commonJS({ } signedUploadUrl = response.signedUploadUrl; } catch (error2) { - core13.debug(`Failed to reserve cache: ${error2}`); + core14.debug(`Failed to reserve cache: ${error2}`); throw new ReserveCacheError2(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } - core13.debug(`Attempting to upload cache located at: ${archivePath}`); + core14.debug(`Attempting to upload cache located at: ${archivePath}`); yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); const finalizeRequest = { key, @@ -120164,7 +120043,7 @@ var require_cache3 = __commonJS({ sizeBytes: `${archiveFileSize}` }; const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); - core13.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); if (!finalizeResponse.ok) { throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); } @@ -120174,19 +120053,19 @@ var require_cache3 = __commonJS({ if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError2.name) { - core13.info(`Failed to save: ${typedError.message}`); + core14.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to save: ${typedError.message}`); + core14.error(`Failed to save: ${typedError.message}`); } else { - core13.warning(`Failed to save: ${typedError.message}`); + core14.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -120394,7 +120273,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -120417,10 +120296,10 @@ var require_retry_helper = __commonJS({ if (isRetryable && !isRetryable(err)) { throw err; } - core13.info(err.message); + core14.info(err.message); } const seconds = this.getSleepAmount(); - core13.info(`Waiting ${seconds} seconds before trying again`); + core14.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } @@ -120500,7 +120379,7 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs2 = __importStar4(require("fs")); @@ -120529,8 +120408,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { dest = dest || path2.join(_getTempDirectory(), crypto.randomUUID()); yield io6.mkdirP(path2.dirname(dest)); - core13.debug(`Downloading ${url}`); - core13.debug(`Destination ${dest}`); + core14.debug(`Downloading ${url}`); + core14.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); @@ -120557,7 +120436,7 @@ var require_tool_cache = __commonJS({ allowRetries: false }); if (auth) { - core13.debug("set auth"); + core14.debug("set auth"); if (headers === void 0) { headers = {}; } @@ -120566,7 +120445,7 @@ var require_tool_cache = __commonJS({ const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core13.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core14.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream.pipeline); @@ -120575,16 +120454,16 @@ var require_tool_cache = __commonJS({ let succeeded = false; try { yield pipeline(readStream, fs2.createWriteStream(dest)); - core13.debug("download complete"); + core14.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { - core13.debug("download failed"); + core14.debug("download failed"); try { yield io6.rmRF(dest); } catch (err) { - core13.debug(`Failed to delete '${dest}'. ${err.message}`); + core14.debug(`Failed to delete '${dest}'. ${err.message}`); } } } @@ -120599,7 +120478,7 @@ var require_tool_cache = __commonJS({ process.chdir(dest); if (_7zPath) { try { - const logLevel = core13.isDebug() ? "-bb1" : "-bb0"; + const logLevel = core14.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, @@ -120649,7 +120528,7 @@ var require_tool_cache = __commonJS({ throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); - core13.debug("Checking tar --version"); + core14.debug("Checking tar --version"); let versionOutput = ""; yield (0, exec_1.exec)("tar --version", [], { ignoreReturnCode: true, @@ -120659,7 +120538,7 @@ var require_tool_cache = __commonJS({ stderr: (data) => versionOutput += data.toString() } }); - core13.debug(versionOutput.trim()); + core14.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { @@ -120667,7 +120546,7 @@ var require_tool_cache = __commonJS({ } else { args = [flags]; } - if (core13.isDebug() && !flags.includes("v")) { + if (core14.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; @@ -120699,7 +120578,7 @@ var require_tool_cache = __commonJS({ args = [flags]; } args.push("-x", "-C", dest, "-f", file); - if (core13.isDebug()) { + if (core14.isDebug()) { args.push("-v"); } const xarPath = yield io6.which("xar", true); @@ -120744,7 +120623,7 @@ var require_tool_cache = __commonJS({ "-Command", pwshCommand ]; - core13.debug(`Using pwsh at path: ${pwshPath}`); + core14.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { const powershellCommand = [ @@ -120764,7 +120643,7 @@ var require_tool_cache = __commonJS({ powershellCommand ]; const powershellPath = yield io6.which("powershell", true); - core13.debug(`Using powershell at path: ${powershellPath}`); + core14.debug(`Using powershell at path: ${powershellPath}`); yield (0, exec_1.exec)(`"${powershellPath}"`, args); } }); @@ -120773,7 +120652,7 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const unzipPath = yield io6.which("unzip", true); const args = [file]; - if (!core13.isDebug()) { + if (!core14.isDebug()) { args.unshift("-q"); } args.unshift("-o"); @@ -120784,8 +120663,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os.arch(); - core13.debug(`Caching tool ${tool} ${version} ${arch}`); - core13.debug(`source dir: ${sourceDir}`); + core14.debug(`Caching tool ${tool} ${version} ${arch}`); + core14.debug(`source dir: ${sourceDir}`); if (!fs2.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } @@ -120803,14 +120682,14 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch = arch || os.arch(); - core13.debug(`Caching tool ${tool} ${version} ${arch}`); - core13.debug(`source file: ${sourceFile}`); + core14.debug(`Caching tool ${tool} ${version} ${arch}`); + core14.debug(`source file: ${sourceFile}`); if (!fs2.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch); const destPath = path2.join(destFolder, targetFile); - core13.debug(`destination file ${destPath}`); + core14.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch); return destFolder; @@ -120834,12 +120713,12 @@ var require_tool_cache = __commonJS({ if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; const cachePath = path2.join(_getCacheDirectory(), toolName, versionSpec, arch); - core13.debug(`checking cache: ${cachePath}`); + core14.debug(`checking cache: ${cachePath}`); if (fs2.existsSync(cachePath) && fs2.existsSync(`${cachePath}.complete`)) { - core13.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); + core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch}`); toolPath = cachePath; } else { - core13.debug("not found"); + core14.debug("not found"); } } return toolPath; @@ -120870,7 +120749,7 @@ var require_tool_cache = __commonJS({ const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { - core13.debug("set auth"); + core14.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); @@ -120891,7 +120770,7 @@ var require_tool_cache = __commonJS({ try { releases = JSON.parse(versionsRaw); } catch (_a) { - core13.debug("Invalid json"); + core14.debug("Invalid json"); } } return releases; @@ -120917,7 +120796,7 @@ var require_tool_cache = __commonJS({ function _createToolPath(tool, version, arch) { return __awaiter4(this, void 0, void 0, function* () { const folderPath = path2.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); - core13.debug(`destination ${folderPath}`); + core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); yield io6.rmRF(markerPath); @@ -120929,19 +120808,19 @@ var require_tool_cache = __commonJS({ const folderPath = path2.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch || ""); const markerPath = `${folderPath}.complete`; fs2.writeFileSync(markerPath, ""); - core13.debug("finished caching tool"); + core14.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { const c = semver8.clean(versionSpec) || ""; - core13.debug(`isExplicit: ${c}`); + core14.debug(`isExplicit: ${c}`); const valid3 = semver8.valid(c) != null; - core13.debug(`explicit? ${valid3}`); + core14.debug(`explicit? ${valid3}`); return valid3; } exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version = ""; - core13.debug(`evaluating ${versions.length} versions`); + core14.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver8.gt(a, b)) { return 1; @@ -120957,9 +120836,9 @@ var require_tool_cache = __commonJS({ } } if (version) { - core13.debug(`matched: ${version}`); + core14.debug(`matched: ${version}`); } else { - core13.debug("match not found"); + core14.debug("match not found"); } return version; } @@ -121568,7 +121447,7 @@ var require_internal_glob_options_helper2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -121580,23 +121459,23 @@ var require_internal_glob_options_helper2 = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core13.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core13.debug(`implicitDescendants '${result.implicitDescendants}'`); + core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.matchDirectories === "boolean") { result.matchDirectories = copy.matchDirectories; - core13.debug(`matchDirectories '${result.matchDirectories}'`); + core14.debug(`matchDirectories '${result.matchDirectories}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } if (typeof copy.excludeHiddenFiles === "boolean") { result.excludeHiddenFiles = copy.excludeHiddenFiles; - core13.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); + core14.debug(`excludeHiddenFiles '${result.excludeHiddenFiles}'`); } } return result; @@ -122280,7 +122159,7 @@ var require_internal_globber2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs2 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); var path2 = __importStar4(require("path")); @@ -122333,7 +122212,7 @@ var require_internal_globber2 = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core13.debug(`Search path '${searchPath}'`); + core14.debug(`Search path '${searchPath}'`); try { yield __await4(fs2.promises.lstat(searchPath)); } catch (err) { @@ -122408,7 +122287,7 @@ var require_internal_globber2 = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core13.debug(`Broken symlink '${item.path}'`); + core14.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -122424,7 +122303,7 @@ var require_internal_globber2 = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -122517,7 +122396,7 @@ var require_internal_hash_files = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.hashFiles = void 0; var crypto = __importStar4(require("crypto")); - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs2 = __importStar4(require("fs")); var stream = __importStar4(require("stream")); var util = __importStar4(require("util")); @@ -122526,7 +122405,7 @@ var require_internal_hash_files = __commonJS({ var _a, e_1, _b, _c; var _d; return __awaiter4(this, void 0, void 0, function* () { - const writeDelegate = verbose ? core13.info : core13.debug; + const writeDelegate = verbose ? core14.info : core14.debug; let hasMatch = false; const githubWorkspace = currentWorkspace ? currentWorkspace : (_d = process.env["GITHUB_WORKSPACE"]) !== null && _d !== void 0 ? _d : process.cwd(); const result = crypto.createHash("sha256"); @@ -122633,20 +122512,74 @@ var require_glob4 = __commonJS({ }); // src/upload-sarif-action-post.ts -var core12 = __toESM(require_core()); +var core13 = __toESM(require_core()); // src/actions-util.ts -var core3 = __toESM(require_core()); +var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts -var core2 = __toESM(require_core()); +var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); var import_del = __toESM(require_del()); -var import_get_folder_size = __toESM(require_get_folder_size()); + +// node_modules/get-folder-size/index.js +var import_node_path = require("node:path"); +async function getFolderSize(itemPath, options) { + return await core(itemPath, options, { errors: true }); +} +getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); +getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); +async function core(rootItemPath, options = {}, returnType = {}) { + const fs2 = options.fs || await import("node:fs/promises"); + let folderSize = 0n; + const foundInos = /* @__PURE__ */ new Set(); + const errors = []; + await processItem(rootItemPath); + async function processItem(itemPath) { + if (options.ignore?.test(itemPath)) return; + const stats = returnType.strict ? await fs2.lstat(itemPath, { bigint: true }) : await fs2.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + if (typeof stats !== "object") return; + if (!foundInos.has(stats.ino)) { + foundInos.add(stats.ino); + folderSize += stats.size; + } + if (stats.isDirectory()) { + const directoryItems = returnType.strict ? await fs2.readdir(itemPath) : await fs2.readdir(itemPath).catch((error2) => errors.push(error2)); + if (typeof directoryItems !== "object") return; + await Promise.all( + directoryItems.map( + (directoryItem) => processItem((0, import_node_path.join)(itemPath, directoryItem)) + ) + ); + } + } + if (!options.bigint) { + if (folderSize > BigInt(Number.MAX_SAFE_INTEGER)) { + const error2 = new RangeError( + "The folder size is too large to return as a Number. You can instruct this package to return a BigInt instead." + ); + if (returnType.strict) { + throw error2; + } + errors.push(error2); + folderSize = Number.MAX_SAFE_INTEGER; + } else { + folderSize = Number(folderSize); + } + } + if (returnType.errors) { + return { + size: folderSize, + errors: errors.length > 0 ? errors : null + }; + } else { + return folderSize; + } +} // node_modules/js-yaml/dist/js-yaml.mjs function isNothing(subject) { @@ -123217,7 +123150,7 @@ var json = failsafe.extend({ float ] }); -var core = json; +var core2 = json; var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); @@ -123431,7 +123364,7 @@ var set = new type("tag:yaml.org,2002:set", { resolve: resolveYamlSet, construct: constructYamlSet }); -var _default = core.extend({ +var _default = core2.extend({ implicit: [ timestamp, merge @@ -125291,7 +125224,7 @@ function checkGitHubVersionInRange(version, logger) { ); } hasBeenWarnedAboutVersion = true; - core2.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); + core3.exportVariable(CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR, true); } function apiVersionInRange(version, minimumVersion2, maximumVersion2) { if (!semver.satisfies(version, `>=${minimumVersion2}`)) { @@ -125321,14 +125254,14 @@ function getErrorMessage(error2) { // src/actions-util.ts var pkg = require_package(); var getRequiredInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); if (!value) { throw new ConfigurationError(`Input required and not supplied: ${name}`); } return value; }; var getOptionalInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); return value.length > 0 ? value : void 0; }; function getTemporaryDirectory() { @@ -125340,7 +125273,7 @@ function getActionVersion() { } var persistedInputsKey = "persisted_inputs"; var restoreInputs = function() { - const persistedInputs = core3.getState(persistedInputsKey); + const persistedInputs = core4.getState(persistedInputsKey); if (persistedInputs) { for (const [name, value] of JSON.parse(persistedInputs)) { process.env[name] = value; @@ -125349,7 +125282,7 @@ var restoreInputs = function() { }; // src/api-client.ts -var core4 = __toESM(require_core()); +var core5 = __toESM(require_core()); var githubUtils = __toESM(require_utils4()); var retry = __toESM(require_dist_node15()); var import_console_log_level = __toESM(require_console_log_level()); @@ -125405,7 +125338,7 @@ var fs = __toESM(require("fs")); var path = __toESM(require("path")); var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); -var core11 = __toESM(require_core()); +var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); var import_del3 = __toESM(require_del()); @@ -125414,10 +125347,10 @@ var io5 = __toESM(require_io()); var import_del2 = __toESM(require_del()); // src/autobuild.ts -var core10 = __toESM(require_core()); +var core11 = __toESM(require_core()); // src/codeql.ts -var core9 = __toESM(require_core()); +var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); // src/cli-errors.ts @@ -125565,7 +125498,7 @@ var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var supportedAnalysisKinds = new Set(Object.values(AnalysisKind)); // src/caching-utils.ts -var core5 = __toESM(require_core()); +var core6 = __toESM(require_core()); // src/feature-flags.ts var semver3 = __toESM(require_semver2()); @@ -125574,21 +125507,21 @@ var semver3 = __toESM(require_semver2()); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts -var core6 = __toESM(require_core()); +var core7 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); var io3 = __toESM(require_io()); // src/logging.ts -var core7 = __toESM(require_core()); +var core8 = __toESM(require_core()); function getActionsLogger() { - return core7; + return core8; } function withGroup(groupName, f) { - core7.startGroup(groupName); + core8.startGroup(groupName); try { return f(); } finally { - core7.endGroup(); + core8.endGroup(); } } @@ -125821,7 +125754,7 @@ var toolcache = __toESM(require_tool_cache()); var semver5 = __toESM(require_semver2()); // src/tools-download.ts -var core8 = __toESM(require_core()); +var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); @@ -125879,7 +125812,7 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV } const uploadSupported = isSafeArtifactUpload(codeQlVersion); if (!uploadSupported) { - core11.info( + core12.info( `Skipping debug artifact upload because the current CLI does not support safe upload. Please upgrade to CLI v${SafeArtifactUploadVersion} or later.` ); return "upload-not-supported"; @@ -125893,7 +125826,7 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV ).sort()) suffix += `-${matrixVal}`; } catch { - core11.info( + core12.info( "Could not parse user-specified `matrix` input into JSON. The debug artifact will not be named with the user's `matrix` input." ); } @@ -125911,7 +125844,7 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV ); return "upload-successful"; } catch (e) { - core11.warning(`Failed to upload debug artifacts: ${e}`); + core12.warning(`Failed to upload debug artifacts: ${e}`); return "upload-failed"; } } @@ -125938,7 +125871,7 @@ async function runWrapper() { checkGitHubVersionInRange(gitHubVersion, logger); if (process.env["CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */] !== "true") { if (gitHubVersion.type === void 0) { - core12.warning( + core13.warning( `Did not upload debug artifacts because cannot determine the GitHub variant running.` ); return; @@ -125955,7 +125888,7 @@ async function runWrapper() { ); } } catch (error2) { - core12.setFailed( + core13.setFailed( `upload-sarif post-action step failed: ${getErrorMessage(error2)}` ); } diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 414601a7a..90d73b080 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -34336,127 +34336,6 @@ var require_del = __commonJS({ } }); -// node_modules/tiny-each-async/index.js -var require_tiny_each_async = __commonJS({ - "node_modules/tiny-each-async/index.js"(exports2, module2) { - "use strict"; - module2.exports = function eachAsync(arr, parallelLimit, iteratorFn, cb) { - var pending = 0; - var index = 0; - var lastIndex = arr.length - 1; - var called = false; - var limit; - var callback; - var iterate; - if (typeof parallelLimit === "number") { - limit = parallelLimit; - iterate = iteratorFn; - callback = cb || function noop() { - }; - } else { - iterate = parallelLimit; - callback = iteratorFn || function noop() { - }; - limit = arr.length; - } - if (!arr.length) { - return callback(); - } - var iteratorLength = iterate.length; - var shouldCallNextIterator = function shouldCallNextIterator2() { - return !called && pending < limit && index < lastIndex; - }; - var iteratorCallback = function iteratorCallback2(err) { - if (called) { - return; - } - pending--; - if (err || index === lastIndex && !pending) { - called = true; - callback(err); - } else if (shouldCallNextIterator()) { - processIterator(++index); - } - }; - var processIterator = function processIterator2() { - pending++; - var args = iteratorLength === 2 ? [arr[index], iteratorCallback] : [arr[index], index, iteratorCallback]; - iterate.apply(null, args); - if (shouldCallNextIterator()) { - processIterator2(++index); - } - }; - processIterator(); - }; - } -}); - -// node_modules/get-folder-size/index.js -var require_get_folder_size = __commonJS({ - "node_modules/get-folder-size/index.js"(exports2, module2) { - "use strict"; - var fs13 = require("fs"); - var path12 = require("path"); - var eachAsync = require_tiny_each_async(); - function readSizeRecursive(seen, item, ignoreRegEx, callback) { - let cb; - let ignoreRegExp; - if (!callback) { - cb = ignoreRegEx; - ignoreRegExp = null; - } else { - cb = callback; - ignoreRegExp = ignoreRegEx; - } - fs13.lstat(item, function lstat(e, stats) { - let total = !e ? stats.size || 0 : 0; - if (stats) { - if (seen.has(stats.ino)) { - return cb(null, 0); - } - seen.add(stats.ino); - } - if (!e && stats.isDirectory()) { - fs13.readdir(item, (err, list) => { - if (err) { - return cb(err); - } - eachAsync( - list, - 5e3, - (dirItem, next) => { - readSizeRecursive( - seen, - path12.join(item, dirItem), - ignoreRegExp, - (error2, size) => { - if (!error2) { - total += size; - } - next(error2); - } - ); - }, - (finalErr) => { - cb(finalErr, total); - } - ); - }); - } else { - if (ignoreRegExp && ignoreRegExp.test(item)) { - total = 0; - } - cb(e, total); - } - }); - } - module2.exports = (...args) => { - args.unshift(/* @__PURE__ */ new Set()); - return readSizeRecursive(...args); - }; - } -}); - // node_modules/semver/internal/constants.js var require_constants9 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { @@ -36412,7 +36291,7 @@ var require_package = __commonJS({ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", jsonschema: "1.4.1", long: "^5.3.2", @@ -38076,7 +37955,7 @@ var require_internal_glob_options_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getOptions(copy) { const result = { followSymbolicLinks: true, @@ -38086,15 +37965,15 @@ var require_internal_glob_options_helper = __commonJS({ if (copy) { if (typeof copy.followSymbolicLinks === "boolean") { result.followSymbolicLinks = copy.followSymbolicLinks; - core13.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); + core14.debug(`followSymbolicLinks '${result.followSymbolicLinks}'`); } if (typeof copy.implicitDescendants === "boolean") { result.implicitDescendants = copy.implicitDescendants; - core13.debug(`implicitDescendants '${result.implicitDescendants}'`); + core14.debug(`implicitDescendants '${result.implicitDescendants}'`); } if (typeof copy.omitBrokenSymbolicLinks === "boolean") { result.omitBrokenSymbolicLinks = copy.omitBrokenSymbolicLinks; - core13.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); + core14.debug(`omitBrokenSymbolicLinks '${result.omitBrokenSymbolicLinks}'`); } } return result; @@ -38758,7 +38637,7 @@ var require_internal_globber = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var fs13 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); var path12 = __importStar4(require("path")); @@ -38809,7 +38688,7 @@ var require_internal_globber = __commonJS({ } const stack = []; for (const searchPath of patternHelper.getSearchPaths(patterns)) { - core13.debug(`Search path '${searchPath}'`); + core14.debug(`Search path '${searchPath}'`); try { yield __await4(fs13.promises.lstat(searchPath)); } catch (err) { @@ -38881,7 +38760,7 @@ var require_internal_globber = __commonJS({ } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { - core13.debug(`Broken symlink '${item.path}'`); + core14.debug(`Broken symlink '${item.path}'`); return void 0; } throw new Error(`No information found for the path '${item.path}'. This may indicate a broken symbolic link.`); @@ -38897,7 +38776,7 @@ var require_internal_globber = __commonJS({ traversalChain.pop(); } if (traversalChain.some((x) => x === realPath)) { - core13.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); + core14.debug(`Symlink cycle detected for path '${item.path}' and realpath '${realPath}'`); return void 0; } traversalChain.push(realPath); @@ -40221,7 +40100,7 @@ var require_cacheUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); var glob = __importStar4(require_glob2()); var io6 = __importStar4(require_io()); @@ -40274,7 +40153,7 @@ var require_cacheUtils = __commonJS({ _e = false; const file = _c; const relativeFile = path12.relative(workspace, file).replace(new RegExp(`\\${path12.sep}`, "g"), "/"); - core13.debug(`Matched: ${relativeFile}`); + core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); } else { @@ -40304,7 +40183,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { let versionOutput = ""; additionalArgs.push("--version"); - core13.debug(`Checking ${app} ${additionalArgs.join(" ")}`); + core14.debug(`Checking ${app} ${additionalArgs.join(" ")}`); try { yield exec2.exec(`${app}`, additionalArgs, { ignoreReturnCode: true, @@ -40315,10 +40194,10 @@ var require_cacheUtils = __commonJS({ } }); } catch (err) { - core13.debug(err.message); + core14.debug(err.message); } versionOutput = versionOutput.trim(); - core13.debug(versionOutput); + core14.debug(versionOutput); return versionOutput; }); } @@ -40326,7 +40205,7 @@ var require_cacheUtils = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const versionOutput = yield getVersion("zstd", ["--quiet"]); const version = semver8.clean(versionOutput); - core13.debug(`zstd version: ${version}`); + core14.debug(`zstd version: ${version}`); if (versionOutput === "") { return constants_1.CompressionMethod.Gzip; } else { @@ -75638,7 +75517,7 @@ var require_uploadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.uploadCacheArchiveSDK = exports2.UploadProgress = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var storage_blob_1 = require_dist7(); var errors_1 = require_errors2(); var UploadProgress = class { @@ -75680,7 +75559,7 @@ var require_uploadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const uploadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core13.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); + core14.info(`Sent ${transferredBytes} of ${this.contentLength} (${percentage}%), ${uploadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -75735,14 +75614,14 @@ var require_uploadUtils = __commonJS({ }; try { uploadProgress.startDisplayTimer(); - core13.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); + core14.debug(`BlobClient: ${blobClient.name}:${blobClient.accountName}:${blobClient.containerName}`); const response = yield blockBlobClient.uploadFile(archivePath, uploadOptions); if (response._response.status >= 400) { throw new errors_1.InvalidResponseError(`uploadCacheArchiveSDK: upload failed with status code ${response._response.status}`); } return response; } catch (error2) { - core13.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); + core14.warning(`uploadCacheArchiveSDK: internal error uploading cache archive: ${error2.message}`); throw error2; } finally { uploadProgress.stopDisplayTimer(); @@ -75813,7 +75692,7 @@ var require_requestUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var constants_1 = require_constants10(); function isSuccessStatusCode(statusCode) { @@ -75874,9 +75753,9 @@ var require_requestUtils = __commonJS({ isRetryable = isRetryableStatusCode(statusCode); errorMessage = `Cache service responded with ${statusCode}`; } - core13.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); + core14.debug(`${name} - Attempt ${attempt} of ${maxAttempts} failed with error: ${errorMessage}`); if (!isRetryable) { - core13.debug(`${name} - Error is not retryable`); + core14.debug(`${name} - Error is not retryable`); break; } yield sleep(delay2); @@ -75981,7 +75860,7 @@ var require_downloadUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.downloadCacheStorageSDK = exports2.downloadCacheHttpClientConcurrent = exports2.downloadCacheHttpClient = exports2.DownloadProgress = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); @@ -76019,7 +75898,7 @@ var require_downloadUtils = __commonJS({ this.segmentIndex = this.segmentIndex + 1; this.segmentSize = segmentSize; this.receivedBytes = 0; - core13.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); + core14.debug(`Downloading segment at offset ${this.segmentOffset} with length ${this.segmentSize}...`); } /** * Sets the number of bytes received for the current segment. @@ -76053,7 +75932,7 @@ var require_downloadUtils = __commonJS({ const percentage = (100 * (transferredBytes / this.contentLength)).toFixed(1); const elapsedTime = Date.now() - this.startTime; const downloadSpeed = (transferredBytes / (1024 * 1024) / (elapsedTime / 1e3)).toFixed(1); - core13.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); + core14.info(`Received ${transferredBytes} of ${this.contentLength} (${percentage}%), ${downloadSpeed} MBs/sec`); if (this.isDone()) { this.displayedComplete = true; } @@ -76103,7 +75982,7 @@ var require_downloadUtils = __commonJS({ })); downloadResponse.message.socket.setTimeout(constants_1.SocketTimeout, () => { downloadResponse.message.destroy(); - core13.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); + core14.debug(`Aborting download, socket timed out after ${constants_1.SocketTimeout} ms`); }); yield pipeResponseToStream(downloadResponse, writeStream); const contentLengthHeader = downloadResponse.message.headers["content-length"]; @@ -76114,7 +75993,7 @@ var require_downloadUtils = __commonJS({ throw new Error(`Incomplete download. Expected file size: ${expectedLength}, actual file size: ${actualLength}`); } } else { - core13.debug("Unable to validate download, no Content-Length header"); + core14.debug("Unable to validate download, no Content-Length header"); } }); } @@ -76234,7 +76113,7 @@ var require_downloadUtils = __commonJS({ const properties = yield client.getProperties(); const contentLength = (_a = properties.contentLength) !== null && _a !== void 0 ? _a : -1; if (contentLength < 0) { - core13.debug("Unable to determine content length, downloading file with http-client..."); + core14.debug("Unable to determine content length, downloading file with http-client..."); yield downloadCacheHttpClient(archiveLocation, archivePath); } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); @@ -76314,7 +76193,7 @@ var require_options = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadOptions = exports2.getUploadOptions = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); function getUploadOptions(copy) { const result = { useAzureSdk: false, @@ -76334,9 +76213,9 @@ var require_options = __commonJS({ } result.uploadConcurrency = !isNaN(Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) ? Math.min(32, Number(process.env["CACHE_UPLOAD_CONCURRENCY"])) : result.uploadConcurrency; result.uploadChunkSize = !isNaN(Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"])) ? Math.min(128 * 1024 * 1024, Number(process.env["CACHE_UPLOAD_CHUNK_SIZE"]) * 1024 * 1024) : result.uploadChunkSize; - core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core13.debug(`Upload concurrency: ${result.uploadConcurrency}`); - core13.debug(`Upload chunk size: ${result.uploadChunkSize}`); + core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core14.debug(`Upload concurrency: ${result.uploadConcurrency}`); + core14.debug(`Upload chunk size: ${result.uploadChunkSize}`); return result; } exports2.getUploadOptions = getUploadOptions; @@ -76373,12 +76252,12 @@ var require_options = __commonJS({ if (segmentDownloadTimeoutMins && !isNaN(Number(segmentDownloadTimeoutMins)) && isFinite(Number(segmentDownloadTimeoutMins))) { result.segmentTimeoutInMs = Number(segmentDownloadTimeoutMins) * 60 * 1e3; } - core13.debug(`Use Azure SDK: ${result.useAzureSdk}`); - core13.debug(`Download concurrency: ${result.downloadConcurrency}`); - core13.debug(`Request timeout (ms): ${result.timeoutInMs}`); - core13.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); - core13.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); - core13.debug(`Lookup only: ${result.lookupOnly}`); + core14.debug(`Use Azure SDK: ${result.useAzureSdk}`); + core14.debug(`Download concurrency: ${result.downloadConcurrency}`); + core14.debug(`Request timeout (ms): ${result.timeoutInMs}`); + core14.debug(`Cache segment download timeout mins env var: ${process.env["SEGMENT_DOWNLOAD_TIMEOUT_MINS"]}`); + core14.debug(`Segment download timeout (ms): ${result.segmentTimeoutInMs}`); + core14.debug(`Lookup only: ${result.lookupOnly}`); return result; } exports2.getDownloadOptions = getDownloadOptions; @@ -76558,7 +76437,7 @@ var require_cacheHttpClient = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.reserveCache = exports2.downloadCache = exports2.getCacheEntry = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); var fs13 = __importStar4(require("fs")); @@ -76576,7 +76455,7 @@ var require_cacheHttpClient = __commonJS({ throw new Error("Cache Service Url not found, unable to restore cache."); } const url = `${baseUrl}_apis/artifactcache/${resource}`; - core13.debug(`Resource Url: ${url}`); + core14.debug(`Resource Url: ${url}`); return url; } function createAcceptHeader(type2, apiVersion) { @@ -76604,7 +76483,7 @@ var require_cacheHttpClient = __commonJS({ return httpClient.getJson(getCacheApiUrl(resource)); })); if (response.statusCode === 204) { - if (core13.isDebug()) { + if (core14.isDebug()) { yield printCachesListForDiagnostics(keys[0], httpClient, version); } return null; @@ -76617,9 +76496,9 @@ var require_cacheHttpClient = __commonJS({ if (!cacheDownloadUrl) { throw new Error("Cache not found."); } - core13.setSecret(cacheDownloadUrl); - core13.debug(`Cache Result:`); - core13.debug(JSON.stringify(cacheResult)); + core14.setSecret(cacheDownloadUrl); + core14.debug(`Cache Result:`); + core14.debug(JSON.stringify(cacheResult)); return cacheResult; }); } @@ -76634,10 +76513,10 @@ var require_cacheHttpClient = __commonJS({ const cacheListResult = response.result; const totalCount = cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.totalCount; if (totalCount && totalCount > 0) { - core13.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key + core14.debug(`No matching cache found for cache key '${key}', version '${version} and scope ${process.env["GITHUB_REF"]}. There exist one or more cache(s) with similar key but they have different version or scope. See more info on cache matching here: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#matching-a-cache-key Other caches with similar key:`); for (const cacheEntry of (cacheListResult === null || cacheListResult === void 0 ? void 0 : cacheListResult.artifactCaches) || []) { - core13.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); + core14.debug(`Cache Key: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheKey}, Cache Version: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.cacheVersion}, Cache Scope: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.scope}, Cache Created: ${cacheEntry === null || cacheEntry === void 0 ? void 0 : cacheEntry.creationTime}`); } } } @@ -76682,7 +76561,7 @@ Other caches with similar key:`); } function uploadChunk(httpClient, resourceUrl, openStream, start, end) { return __awaiter4(this, void 0, void 0, function* () { - core13.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); + core14.debug(`Uploading chunk of size ${end - start + 1} bytes at offset ${start} with content range: ${getContentRange(start, end)}`); const additionalHeaders = { "Content-Type": "application/octet-stream", "Content-Range": getContentRange(start, end) @@ -76704,7 +76583,7 @@ Other caches with similar key:`); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); const parallelUploads = [...new Array(concurrency).keys()]; - core13.debug("Awaiting all uploads"); + core14.debug("Awaiting all uploads"); let offset = 0; try { yield Promise.all(parallelUploads.map(() => __awaiter4(this, void 0, void 0, function* () { @@ -76747,16 +76626,16 @@ Other caches with similar key:`); yield (0, uploadUtils_1.uploadCacheArchiveSDK)(signedUploadURL, archivePath, options); } else { const httpClient = createHttpClient(); - core13.debug("Upload cache"); + core14.debug("Upload cache"); yield uploadFile(httpClient, cacheId, archivePath, options); - core13.debug("Commiting cache"); + core14.debug("Commiting cache"); const cacheSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); + core14.info(`Cache Size: ~${Math.round(cacheSize / (1024 * 1024))} MB (${cacheSize} B)`); const commitCacheResponse = yield commitCache(httpClient, cacheId, cacheSize); if (!(0, requestUtils_1.isSuccessStatusCode)(commitCacheResponse.statusCode)) { throw new Error(`Cache service responded with ${commitCacheResponse.statusCode} during commit cache.`); } - core13.info("Cache saved successfully"); + core14.info("Cache saved successfully"); } }); } @@ -82182,7 +82061,7 @@ var require_cache3 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var path12 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); @@ -82235,7 +82114,7 @@ var require_cache3 = __commonJS({ function restoreCache3(paths, primaryKey, restoreKeys, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core13.debug(`Cache service version: ${cacheServiceVersion}`); + core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); switch (cacheServiceVersion) { case "v2": @@ -82251,8 +82130,8 @@ var require_cache3 = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core13.debug("Resolved Keys:"); - core13.debug(JSON.stringify(keys)); + core14.debug("Resolved Keys:"); + core14.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82270,19 +82149,19 @@ var require_cache3 = __commonJS({ return void 0; } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core13.info("Lookup only - skipping download"); + core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core13.info("Cache restored successfully"); + core14.info("Cache restored successfully"); return cacheEntry.cacheKey; } catch (error2) { const typedError = error2; @@ -82290,16 +82169,16 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to restore: ${error2.message}`); + core14.error(`Failed to restore: ${error2.message}`); } else { - core13.warning(`Failed to restore: ${error2.message}`); + core14.warning(`Failed to restore: ${error2.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82310,8 +82189,8 @@ var require_cache3 = __commonJS({ options = Object.assign(Object.assign({}, options), { useAzureSdk: true }); restoreKeys = restoreKeys || []; const keys = [primaryKey, ...restoreKeys]; - core13.debug("Resolved Keys:"); - core13.debug(JSON.stringify(keys)); + core14.debug("Resolved Keys:"); + core14.debug(JSON.stringify(keys)); if (keys.length > 10) { throw new ValidationError(`Key Validation Error: Keys are limited to a maximum of 10.`); } @@ -82329,30 +82208,30 @@ var require_cache3 = __commonJS({ }; const response = yield twirpClient.GetCacheEntryDownloadURL(request); if (!response.ok) { - core13.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); + core14.debug(`Cache not found for version ${request.version} of keys: ${keys.join(", ")}`); return void 0; } const isRestoreKeyMatch = request.key !== response.matchedKey; if (isRestoreKeyMatch) { - core13.info(`Cache hit for restore-key: ${response.matchedKey}`); + core14.info(`Cache hit for restore-key: ${response.matchedKey}`); } else { - core13.info(`Cache hit for: ${response.matchedKey}`); + core14.info(`Cache hit for: ${response.matchedKey}`); } if (options === null || options === void 0 ? void 0 : options.lookupOnly) { - core13.info("Lookup only - skipping download"); + core14.info("Lookup only - skipping download"); return response.matchedKey; } archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive path: ${archivePath}`); - core13.debug(`Starting download of archive to: ${archivePath}`); + core14.debug(`Archive path: ${archivePath}`); + core14.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); - if (core13.isDebug()) { + core14.info(`Cache Size: ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B)`); + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } yield (0, tar_1.extractTar)(archivePath, compressionMethod); - core13.info("Cache restored successfully"); + core14.info("Cache restored successfully"); return response.matchedKey; } catch (error2) { const typedError = error2; @@ -82360,9 +82239,9 @@ var require_cache3 = __commonJS({ throw error2; } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to restore: ${error2.message}`); + core14.error(`Failed to restore: ${error2.message}`); } else { - core13.warning(`Failed to restore: ${error2.message}`); + core14.warning(`Failed to restore: ${error2.message}`); } } } finally { @@ -82371,7 +82250,7 @@ var require_cache3 = __commonJS({ yield utils.unlinkFile(archivePath); } } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return void 0; @@ -82380,7 +82259,7 @@ var require_cache3 = __commonJS({ function saveCache3(paths, key, options, enableCrossOsArchive = false) { return __awaiter4(this, void 0, void 0, function* () { const cacheServiceVersion = (0, config_1.getCacheServiceVersion)(); - core13.debug(`Cache service version: ${cacheServiceVersion}`); + core14.debug(`Cache service version: ${cacheServiceVersion}`); checkPaths(paths); checkKey(key); switch (cacheServiceVersion) { @@ -82399,26 +82278,26 @@ var require_cache3 = __commonJS({ const compressionMethod = yield utils.getCompressionMethod(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core13.debug("Cache Paths:"); - core13.debug(`${JSON.stringify(cachePaths)}`); + core14.debug("Cache Paths:"); + core14.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path12.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const fileSizeLimit = 10 * 1024 * 1024 * 1024; const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.debug(`File Size: ${archiveFileSize}`); + core14.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > fileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } - core13.debug("Reserving Cache"); + core14.debug("Reserving Cache"); const reserveCacheResponse = yield cacheHttpClient.reserveCache(key, paths, { compressionMethod, enableCrossOsArchive, @@ -82431,26 +82310,26 @@ var require_cache3 = __commonJS({ } else { throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache. More details: ${(_e = reserveCacheResponse === null || reserveCacheResponse === void 0 ? void 0 : reserveCacheResponse.error) === null || _e === void 0 ? void 0 : _e.message}`); } - core13.debug(`Saving Cache (ID: ${cacheId})`); + core14.debug(`Saving Cache (ID: ${cacheId})`); yield cacheHttpClient.saveCache(cacheId, archivePath, "", options); } catch (error2) { const typedError = error2; if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError.name) { - core13.info(`Failed to save: ${typedError.message}`); + core14.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to save: ${typedError.message}`); + core14.error(`Failed to save: ${typedError.message}`); } else { - core13.warning(`Failed to save: ${typedError.message}`); + core14.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -82463,26 +82342,26 @@ var require_cache3 = __commonJS({ const twirpClient = cacheTwirpClient.internalCacheTwirpClient(); let cacheId = -1; const cachePaths = yield utils.resolvePaths(paths); - core13.debug("Cache Paths:"); - core13.debug(`${JSON.stringify(cachePaths)}`); + core14.debug("Cache Paths:"); + core14.debug(`${JSON.stringify(cachePaths)}`); if (cachePaths.length === 0) { throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); const archivePath = path12.join(archiveFolder, utils.getCacheFileName(compressionMethod)); - core13.debug(`Archive Path: ${archivePath}`); + core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); - if (core13.isDebug()) { + if (core14.isDebug()) { yield (0, tar_1.listTar)(archivePath, compressionMethod); } const archiveFileSize = utils.getArchiveFileSizeInBytes(archivePath); - core13.debug(`File Size: ${archiveFileSize}`); + core14.debug(`File Size: ${archiveFileSize}`); if (archiveFileSize > constants_1.CacheFileSizeLimit && !(0, config_1.isGhes)()) { throw new Error(`Cache size of ~${Math.round(archiveFileSize / (1024 * 1024))} MB (${archiveFileSize} B) is over the 10GB limit, not saving cache.`); } options.archiveSizeBytes = archiveFileSize; - core13.debug("Reserving Cache"); + core14.debug("Reserving Cache"); const version = utils.getCacheVersion(paths, compressionMethod, enableCrossOsArchive); const request = { key, @@ -82496,10 +82375,10 @@ var require_cache3 = __commonJS({ } signedUploadUrl = response.signedUploadUrl; } catch (error2) { - core13.debug(`Failed to reserve cache: ${error2}`); + core14.debug(`Failed to reserve cache: ${error2}`); throw new ReserveCacheError(`Unable to reserve cache with key ${key}, another job may be creating this cache.`); } - core13.debug(`Attempting to upload cache located at: ${archivePath}`); + core14.debug(`Attempting to upload cache located at: ${archivePath}`); yield cacheHttpClient.saveCache(cacheId, archivePath, signedUploadUrl, options); const finalizeRequest = { key, @@ -82507,7 +82386,7 @@ var require_cache3 = __commonJS({ sizeBytes: `${archiveFileSize}` }; const finalizeResponse = yield twirpClient.FinalizeCacheEntryUpload(finalizeRequest); - core13.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); + core14.debug(`FinalizeCacheEntryUploadResponse: ${finalizeResponse.ok}`); if (!finalizeResponse.ok) { throw new Error(`Unable to finalize cache with key ${key}, another job may be finalizing this cache.`); } @@ -82517,19 +82396,19 @@ var require_cache3 = __commonJS({ if (typedError.name === ValidationError.name) { throw error2; } else if (typedError.name === ReserveCacheError.name) { - core13.info(`Failed to save: ${typedError.message}`); + core14.info(`Failed to save: ${typedError.message}`); } else { if (typedError instanceof http_client_1.HttpClientError && typeof typedError.statusCode === "number" && typedError.statusCode >= 500) { - core13.error(`Failed to save: ${typedError.message}`); + core14.error(`Failed to save: ${typedError.message}`); } else { - core13.warning(`Failed to save: ${typedError.message}`); + core14.warning(`Failed to save: ${typedError.message}`); } } } finally { try { yield utils.unlinkFile(archivePath); } catch (error2) { - core13.debug(`Failed to delete archive: ${error2}`); + core14.debug(`Failed to delete archive: ${error2}`); } } return cacheId; @@ -84060,7 +83939,7 @@ var require_retry_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.RetryHelper = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var RetryHelper = class { constructor(maxAttempts, minSeconds, maxSeconds) { if (maxAttempts < 1) { @@ -84083,10 +83962,10 @@ var require_retry_helper = __commonJS({ if (isRetryable && !isRetryable(err)) { throw err; } - core13.info(err.message); + core14.info(err.message); } const seconds = this.getSleepAmount(); - core13.info(`Waiting ${seconds} seconds before trying again`); + core14.info(`Waiting ${seconds} seconds before trying again`); yield this.sleep(seconds); attempt++; } @@ -84166,7 +84045,7 @@ var require_tool_cache = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.evaluateVersions = exports2.isExplicitVersion = exports2.findFromManifest = exports2.getManifestFromRepo = exports2.findAllVersions = exports2.find = exports2.cacheFile = exports2.cacheDir = exports2.extractZip = exports2.extractXar = exports2.extractTar = exports2.extract7z = exports2.downloadTool = exports2.HTTPError = void 0; - var core13 = __importStar4(require_core()); + var core14 = __importStar4(require_core()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs13 = __importStar4(require("fs")); @@ -84195,8 +84074,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { dest = dest || path12.join(_getTempDirectory(), crypto.randomUUID()); yield io6.mkdirP(path12.dirname(dest)); - core13.debug(`Downloading ${url}`); - core13.debug(`Destination ${dest}`); + core14.debug(`Downloading ${url}`); + core14.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); @@ -84223,7 +84102,7 @@ var require_tool_cache = __commonJS({ allowRetries: false }); if (auth) { - core13.debug("set auth"); + core14.debug("set auth"); if (headers === void 0) { headers = {}; } @@ -84232,7 +84111,7 @@ var require_tool_cache = __commonJS({ const response = yield http.get(url, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core13.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core14.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -84241,16 +84120,16 @@ var require_tool_cache = __commonJS({ let succeeded = false; try { yield pipeline(readStream, fs13.createWriteStream(dest)); - core13.debug("download complete"); + core14.debug("download complete"); succeeded = true; return dest; } finally { if (!succeeded) { - core13.debug("download failed"); + core14.debug("download failed"); try { yield io6.rmRF(dest); } catch (err) { - core13.debug(`Failed to delete '${dest}'. ${err.message}`); + core14.debug(`Failed to delete '${dest}'. ${err.message}`); } } } @@ -84265,7 +84144,7 @@ var require_tool_cache = __commonJS({ process.chdir(dest); if (_7zPath) { try { - const logLevel = core13.isDebug() ? "-bb1" : "-bb0"; + const logLevel = core14.isDebug() ? "-bb1" : "-bb0"; const args = [ "x", logLevel, @@ -84315,7 +84194,7 @@ var require_tool_cache = __commonJS({ throw new Error("parameter 'file' is required"); } dest = yield _createExtractFolder(dest); - core13.debug("Checking tar --version"); + core14.debug("Checking tar --version"); let versionOutput = ""; yield (0, exec_1.exec)("tar --version", [], { ignoreReturnCode: true, @@ -84325,7 +84204,7 @@ var require_tool_cache = __commonJS({ stderr: (data) => versionOutput += data.toString() } }); - core13.debug(versionOutput.trim()); + core14.debug(versionOutput.trim()); const isGnuTar = versionOutput.toUpperCase().includes("GNU TAR"); let args; if (flags instanceof Array) { @@ -84333,7 +84212,7 @@ var require_tool_cache = __commonJS({ } else { args = [flags]; } - if (core13.isDebug() && !flags.includes("v")) { + if (core14.isDebug() && !flags.includes("v")) { args.push("-v"); } let destArg = dest; @@ -84365,7 +84244,7 @@ var require_tool_cache = __commonJS({ args = [flags]; } args.push("-x", "-C", dest, "-f", file); - if (core13.isDebug()) { + if (core14.isDebug()) { args.push("-v"); } const xarPath = yield io6.which("xar", true); @@ -84410,7 +84289,7 @@ var require_tool_cache = __commonJS({ "-Command", pwshCommand ]; - core13.debug(`Using pwsh at path: ${pwshPath}`); + core14.debug(`Using pwsh at path: ${pwshPath}`); yield (0, exec_1.exec)(`"${pwshPath}"`, args); } else { const powershellCommand = [ @@ -84430,7 +84309,7 @@ var require_tool_cache = __commonJS({ powershellCommand ]; const powershellPath = yield io6.which("powershell", true); - core13.debug(`Using powershell at path: ${powershellPath}`); + core14.debug(`Using powershell at path: ${powershellPath}`); yield (0, exec_1.exec)(`"${powershellPath}"`, args); } }); @@ -84439,7 +84318,7 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { const unzipPath = yield io6.which("unzip", true); const args = [file]; - if (!core13.isDebug()) { + if (!core14.isDebug()) { args.unshift("-q"); } args.unshift("-o"); @@ -84450,8 +84329,8 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os3.arch(); - core13.debug(`Caching tool ${tool} ${version} ${arch2}`); - core13.debug(`source dir: ${sourceDir}`); + core14.debug(`Caching tool ${tool} ${version} ${arch2}`); + core14.debug(`source dir: ${sourceDir}`); if (!fs13.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } @@ -84469,14 +84348,14 @@ var require_tool_cache = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { version = semver8.clean(version) || version; arch2 = arch2 || os3.arch(); - core13.debug(`Caching tool ${tool} ${version} ${arch2}`); - core13.debug(`source file: ${sourceFile}`); + core14.debug(`Caching tool ${tool} ${version} ${arch2}`); + core14.debug(`source file: ${sourceFile}`); if (!fs13.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); const destPath = path12.join(destFolder, targetFile); - core13.debug(`destination file ${destPath}`); + core14.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); return destFolder; @@ -84500,12 +84379,12 @@ var require_tool_cache = __commonJS({ if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; const cachePath = path12.join(_getCacheDirectory(), toolName, versionSpec, arch2); - core13.debug(`checking cache: ${cachePath}`); + core14.debug(`checking cache: ${cachePath}`); if (fs13.existsSync(cachePath) && fs13.existsSync(`${cachePath}.complete`)) { - core13.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); + core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { - core13.debug("not found"); + core14.debug("not found"); } } return toolPath; @@ -84536,7 +84415,7 @@ var require_tool_cache = __commonJS({ const http = new httpm.HttpClient("tool-cache"); const headers = {}; if (auth) { - core13.debug("set auth"); + core14.debug("set auth"); headers.authorization = auth; } const response = yield http.getJson(treeUrl, headers); @@ -84557,7 +84436,7 @@ var require_tool_cache = __commonJS({ try { releases = JSON.parse(versionsRaw); } catch (_a) { - core13.debug("Invalid json"); + core14.debug("Invalid json"); } } return releases; @@ -84583,7 +84462,7 @@ var require_tool_cache = __commonJS({ function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { const folderPath = path12.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); - core13.debug(`destination ${folderPath}`); + core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); yield io6.rmRF(markerPath); @@ -84595,19 +84474,19 @@ var require_tool_cache = __commonJS({ const folderPath = path12.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; fs13.writeFileSync(markerPath, ""); - core13.debug("finished caching tool"); + core14.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { const c = semver8.clean(versionSpec) || ""; - core13.debug(`isExplicit: ${c}`); + core14.debug(`isExplicit: ${c}`); const valid3 = semver8.valid(c) != null; - core13.debug(`explicit? ${valid3}`); + core14.debug(`explicit? ${valid3}`); return valid3; } exports2.isExplicitVersion = isExplicitVersion; function evaluateVersions(versions, versionSpec) { let version = ""; - core13.debug(`evaluating ${versions.length} versions`); + core14.debug(`evaluating ${versions.length} versions`); versions = versions.sort((a, b) => { if (semver8.gt(a, b)) { return 1; @@ -84623,9 +84502,9 @@ var require_tool_cache = __commonJS({ } } if (version) { - core13.debug(`matched: ${version}`); + core14.debug(`matched: ${version}`); } else { - core13.debug("match not found"); + core14.debug("match not found"); } return version; } @@ -88099,19 +87978,19 @@ var require_sarif_schema_2_1_0 = __commonJS({ // src/upload-sarif-action.ts var fs12 = __toESM(require("fs")); -var core12 = __toESM(require_core()); +var core13 = __toESM(require_core()); // src/actions-util.ts var fs = __toESM(require("fs")); var path2 = __toESM(require("path")); -var core3 = __toESM(require_core()); +var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts var path = __toESM(require("path")); -var core2 = __toESM(require_core()); +var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -88252,7 +88131,61 @@ function checkDiskSpace(directoryPath, dependencies = { // src/util.ts var import_del = __toESM(require_del()); -var import_get_folder_size = __toESM(require_get_folder_size()); + +// node_modules/get-folder-size/index.js +var import_node_path2 = require("node:path"); +async function getFolderSize(itemPath, options) { + return await core(itemPath, options, { errors: true }); +} +getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); +getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); +async function core(rootItemPath, options = {}, returnType = {}) { + const fs13 = options.fs || await import("node:fs/promises"); + let folderSize = 0n; + const foundInos = /* @__PURE__ */ new Set(); + const errors = []; + await processItem(rootItemPath); + async function processItem(itemPath) { + if (options.ignore?.test(itemPath)) return; + const stats = returnType.strict ? await fs13.lstat(itemPath, { bigint: true }) : await fs13.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + if (typeof stats !== "object") return; + if (!foundInos.has(stats.ino)) { + foundInos.add(stats.ino); + folderSize += stats.size; + } + if (stats.isDirectory()) { + const directoryItems = returnType.strict ? await fs13.readdir(itemPath) : await fs13.readdir(itemPath).catch((error2) => errors.push(error2)); + if (typeof directoryItems !== "object") return; + await Promise.all( + directoryItems.map( + (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) + ) + ); + } + } + if (!options.bigint) { + if (folderSize > BigInt(Number.MAX_SAFE_INTEGER)) { + const error2 = new RangeError( + "The folder size is too large to return as a Number. You can instruct this package to return a BigInt instead." + ); + if (returnType.strict) { + throw error2; + } + errors.push(error2); + folderSize = Number.MAX_SAFE_INTEGER; + } else { + folderSize = Number(folderSize); + } + } + if (returnType.errors) { + return { + size: folderSize, + errors: errors.length > 0 ? errors : null + }; + } else { + return folderSize; + } +} // node_modules/js-yaml/dist/js-yaml.mjs function isNothing(subject) { @@ -88823,7 +88756,7 @@ var json = failsafe.extend({ float ] }); -var core = json; +var core2 = json; var YAML_DATE_REGEXP = new RegExp( "^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$" ); @@ -89037,7 +88970,7 @@ var set = new type("tag:yaml.org,2002:set", { resolve: resolveYamlSet, construct: constructYamlSet }); -var _default = core.extend({ +var _default = core2.extend({ implicit: [ timestamp, merge @@ -90909,11 +90842,11 @@ function assertNever(value) { throw new ExhaustivityCheckingError(value); } function initializeEnvironment(version) { - core2.exportVariable("CODEQL_ACTION_FEATURE_MULTI_LANGUAGE" /* FEATURE_MULTI_LANGUAGE */, "false"); - core2.exportVariable("CODEQL_ACTION_FEATURE_SANDWICH" /* FEATURE_SANDWICH */, "false"); - core2.exportVariable("CODEQL_ACTION_FEATURE_SARIF_COMBINE" /* FEATURE_SARIF_COMBINE */, "true"); - core2.exportVariable("CODEQL_ACTION_FEATURE_WILL_UPLOAD" /* FEATURE_WILL_UPLOAD */, "true"); - core2.exportVariable("CODEQL_ACTION_VERSION" /* VERSION */, version); + core3.exportVariable("CODEQL_ACTION_FEATURE_MULTI_LANGUAGE" /* FEATURE_MULTI_LANGUAGE */, "false"); + core3.exportVariable("CODEQL_ACTION_FEATURE_SANDWICH" /* FEATURE_SANDWICH */, "false"); + core3.exportVariable("CODEQL_ACTION_FEATURE_SARIF_COMBINE" /* FEATURE_SARIF_COMBINE */, "true"); + core3.exportVariable("CODEQL_ACTION_FEATURE_WILL_UPLOAD" /* FEATURE_WILL_UPLOAD */, "true"); + core3.exportVariable("CODEQL_ACTION_VERSION" /* VERSION */, version); } function getRequiredEnvParam(paramName) { const value = process.env[paramName]; @@ -90994,7 +90927,7 @@ async function checkDiskUsage(logger) { } else { logger.debug(message); } - core2.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true"); + core3.exportVariable("CODEQL_ACTION_HAS_WARNED_ABOUT_DISK_SPACE" /* HAS_WARNED_ABOUT_DISK_SPACE */, "true"); } return { numAvailableBytes: diskUsage.free, @@ -91014,10 +90947,10 @@ function checkActionVersion(version, githubVersion) { semver.coerce(githubVersion.version) ?? "0.0.0", ">=3.11" )) { - core2.error( + core3.error( "CodeQL Action major versions v1 and v2 have been deprecated. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2025-01-10-code-scanning-codeql-action-v2-is-now-deprecated/" ); - core2.exportVariable("CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION" /* LOG_VERSION_DEPRECATION */, "true"); + core3.exportVariable("CODEQL_ACTION_DID_LOG_VERSION_DEPRECATION" /* LOG_VERSION_DEPRECATION */, "true"); } } } @@ -91042,13 +90975,13 @@ async function checkSipEnablement(logger) { if (sipStatusOutput.stdout.includes( "System Integrity Protection status: enabled." )) { - core2.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true"); + core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "true"); return true; } if (sipStatusOutput.stdout.includes( "System Integrity Protection status: disabled." )) { - core2.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false"); + core3.exportVariable("CODEQL_ACTION_IS_SIP_ENABLED" /* IS_SIP_ENABLED */, "false"); return false; } } @@ -91095,14 +91028,14 @@ async function asyncSome(array, predicate) { // src/actions-util.ts var pkg = require_package(); var getRequiredInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); if (!value) { throw new ConfigurationError(`Input required and not supplied: ${name}`); } return value; }; var getOptionalInput = function(name) { - const value = core3.getInput(name); + const value = core4.getInput(name); return value.length > 0 ? value : void 0; }; function getTemporaryDirectory() { @@ -91231,7 +91164,7 @@ var persistInputs = function() { const inputEnvironmentVariables = Object.entries(process.env).filter( ([name]) => name.startsWith("INPUT_") ); - core3.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables)); + core4.saveState(persistedInputsKey, JSON.stringify(inputEnvironmentVariables)); }; var qualityCategoryMapping = { "c#": "csharp", @@ -91259,7 +91192,7 @@ function fixCodeQualityCategory(logger, category) { } // src/api-client.ts -var core4 = __toESM(require_core()); +var core5 = __toESM(require_core()); var githubUtils = __toESM(require_utils4()); var retry = __toESM(require_dist_node15()); var import_console_log_level = __toESM(require_console_log_level()); @@ -91364,7 +91297,7 @@ async function getAnalysisKey() { const workflowPath = await getWorkflowRelativePath(); const jobName = getRequiredEnvParam("GITHUB_JOB"); analysisKey = `${workflowPath}:${jobName}`; - core4.exportVariable(analysisKeyEnvVar, analysisKey); + core5.exportVariable(analysisKeyEnvVar, analysisKey); return analysisKey; } function computeAutomationID(analysis_key, environment) { @@ -91409,13 +91342,13 @@ var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts -var core5 = __toESM(require_core()); +var core6 = __toESM(require_core()); var toolrunner2 = __toESM(require_toolrunner()); var io3 = __toESM(require_io()); var runGitCommand = async function(workingDirectory, args, customErrorMessage) { let stdout = ""; let stderr = ""; - core5.debug(`Running git command: git ${args.join(" ")}`); + core6.debug(`Running git command: git ${args.join(" ")}`); try { await new toolrunner2.ToolRunner(await io3.which("git", true), args, { silent: true, @@ -91435,7 +91368,7 @@ var runGitCommand = async function(workingDirectory, args, customErrorMessage) { if (stderr.includes("not a git repository")) { reason = "The checkout path provided to the action does not appear to be a git repository."; } - core5.info(`git call failed. ${customErrorMessage} Error: ${reason}`); + core6.info(`git call failed. ${customErrorMessage} Error: ${reason}`); throw error2; } }; @@ -91580,7 +91513,7 @@ async function getRef() { ) !== head; if (hasChangedRef) { const newRef = ref.replace(pull_ref_regex, "refs/pull/$1/head"); - core5.debug( + core6.debug( `No longer on merge commit, rewriting ref from ${ref} to ${newRef}.` ); return newRef; @@ -91606,9 +91539,9 @@ async function isAnalyzingDefaultBranch() { } // src/logging.ts -var core6 = __toESM(require_core()); +var core7 = __toESM(require_core()); function getActionsLogger() { - return core6; + return core7; } function formatDuration(durationMs) { if (durationMs < 1e3) { @@ -92118,7 +92051,7 @@ var GitHubFeatureFlags = class { // src/status-report.ts var os = __toESM(require("os")); -var core7 = __toESM(require_core()); +var core8 = __toESM(require_core()); function isFirstPartyAnalysis(actionName) { if (actionName !== "upload-sarif" /* UploadSarif */) { return true; @@ -92137,12 +92070,12 @@ function getActionsStatus(error2, otherFailureCause) { } function setJobStatusIfUnsuccessful(actionStatus) { if (actionStatus === "user-error") { - core7.exportVariable( + core8.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_CONFIGURATION_ERROR" /* ConfigErrorStatus */ ); } else if (actionStatus === "failure" || actionStatus === "aborted") { - core7.exportVariable( + core8.exportVariable( "CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */, process.env["CODEQL_ACTION_JOB_STATUS" /* JOB_STATUS */] ?? "JOB_STATUS_FAILURE" /* FailureStatus */ ); @@ -92161,14 +92094,14 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi let workflowStartedAt = process.env["CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */]; if (workflowStartedAt === void 0) { workflowStartedAt = actionStartedAt.toISOString(); - core7.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt); + core8.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt); } const runnerOs = getRequiredEnvParam("RUNNER_OS"); const codeQlCliVersion = getCachedCodeQlVersion(); const actionRef = process.env["GITHUB_ACTION_REF"] || ""; const testingEnvironment = getTestingEnvironment(); if (testingEnvironment) { - core7.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment); + core8.exportVariable("CODEQL_ACTION_TESTING_ENVIRONMENT" /* TESTING_ENVIRONMENT */, testingEnvironment); } const isSteadyStateDefaultSetupRun = process.env["CODE_SCANNING_IS_STEADY_STATE_DEFAULT_SETUP"] === "true"; const statusReport = { @@ -92246,9 +92179,9 @@ var INCOMPATIBLE_MSG = "CodeQL Action version is incompatible with the code scan async function sendStatusReport(statusReport) { setJobStatusIfUnsuccessful(statusReport.status); const statusReportJSON = JSON.stringify(statusReport); - core7.debug(`Sending status report: ${statusReportJSON}`); + core8.debug(`Sending status report: ${statusReportJSON}`); if (isInTestMode()) { - core7.debug("In test mode. Status reports are not uploaded."); + core8.debug("In test mode. Status reports are not uploaded."); return; } const nwo = getRepositoryNwo(); @@ -92267,26 +92200,26 @@ async function sendStatusReport(statusReport) { switch (e.status) { case 403: if (getWorkflowEventName() === "push" && process.env["GITHUB_ACTOR"] === "dependabot[bot]") { - core7.warning( + core8.warning( `Workflows triggered by Dependabot on the "push" event run with read-only access. Uploading Code Scanning results requires write access. To use Code Scanning with Dependabot, please ensure you are using the "pull_request" event for this workflow and avoid triggering on the "push" event for Dependabot branches. See ${"https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning#scanning-on-push" /* SCANNING_ON_PUSH */} for more information on how to configure these events.` ); } else { - core7.warning(e.message); + core8.warning(e.message); } return; case 404: - core7.warning(e.message); + core8.warning(e.message); return; case 422: if (getRequiredEnvParam("GITHUB_SERVER_URL") !== GITHUB_DOTCOM_URL) { - core7.debug(INCOMPATIBLE_MSG); + core8.debug(INCOMPATIBLE_MSG); } else { - core7.debug(OUT_OF_DATE_MSG); + core8.debug(OUT_OF_DATE_MSG); } return; } } - core7.warning( + core8.warning( `An unexpected error occurred when sending code scanning status report: ${getErrorMessage( e )}` @@ -92298,14 +92231,14 @@ async function sendStatusReport(statusReport) { var fs11 = __toESM(require("fs")); var path11 = __toESM(require("path")); var import_zlib = __toESM(require("zlib")); -var core11 = __toESM(require_core()); +var core12 = __toESM(require_core()); var import_file_url = __toESM(require_file_url()); var jsonschema = __toESM(require_lib2()); // src/codeql.ts var fs9 = __toESM(require("fs")); var path9 = __toESM(require("path")); -var core10 = __toESM(require_core()); +var core11 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); // src/cli-errors.ts @@ -92559,7 +92492,7 @@ var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { var supportedAnalysisKinds = new Set(Object.values(AnalysisKind)); // src/caching-utils.ts -var core8 = __toESM(require_core()); +var core9 = __toESM(require_core()); // src/diff-informed-analysis-utils.ts var fs4 = __toESM(require("fs")); @@ -92906,7 +92839,7 @@ var fs7 = __toESM(require("fs")); var os2 = __toESM(require("os")); var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); -var core9 = __toESM(require_core()); +var core10 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); var toolcache2 = __toESM(require_tool_cache()); var import_follow_redirects = __toESM(require_follow_redirects()); @@ -92960,10 +92893,10 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } } catch (e) { - core9.warning( + core10.warning( `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}` ); - core9.warning(`Falling back to downloading the bundle before extracting.`); + core10.warning(`Falling back to downloading the bundle before extracting.`); await cleanUpGlob(dest, "CodeQL bundle", logger); } const toolsDownloadStart = import_perf_hooks.performance.now(); @@ -94011,12 +93944,12 @@ ${output}` ); } else if (checkVersion && process.env["CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */] !== "true" && !await codeQlVersionAtLeast(codeql, CODEQL_NEXT_MINIMUM_VERSION)) { const result = await codeql.getVersion(); - core10.warning( + core11.warning( `CodeQL CLI version ${result.version} was discontinued on ${GHES_MOST_RECENT_DEPRECATION_DATE} alongside GitHub Enterprise Server ${GHES_VERSION_MOST_RECENTLY_DEPRECATED} and will not be supported by the next minor release of the CodeQL Action. Please update to CodeQL CLI version ${CODEQL_NEXT_MINIMUM_VERSION} or later. For instance, if you have specified a custom version of the CLI using the 'tools' input to the 'init' Action, you can remove this input to use the default version. Alternatively, if you want to continue using CodeQL CLI version ${result.version}, you can replace 'github/codeql-action/*@v${getActionVersion().split(".")[0]}' by 'github/codeql-action/*@v${getActionVersion()}' in your code scanning workflow to continue using this version of the CodeQL Action.` ); - core10.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); + core11.exportVariable("CODEQL_ACTION_SUPPRESS_DEPRECATED_SOON_WARNING" /* SUPPRESS_DEPRECATED_SOON_WARNING */, "true"); } return codeql; } @@ -95374,7 +95307,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo logger.warning( `Uploading multiple SARIF runs with the same category is deprecated ${deprecationWarningMessage}. Please update your workflow to upload a single run per category. ${deprecationMoreInformationMessage}` ); - core11.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); + core12.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); } return combineSarifFiles(sarifFiles, logger); } @@ -95424,7 +95357,7 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo logger.warning( `Uploading multiple CodeQL runs with the same category is deprecated ${deprecationWarningMessage} for CodeQL CLI 2.16.6 and earlier. Please update your CodeQL CLI version or update your workflow to set a distinct category for each CodeQL run. ${deprecationMoreInformationMessage}` ); - core11.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); + core12.exportVariable("CODEQL_MERGE_SARIF_DEPRECATION_WARNING", "true"); } return combineSarifFiles(sarifFiles, logger); } @@ -95489,13 +95422,13 @@ async function uploadPayload(payload, repositoryNwo, logger, target) { if (isHTTPError(e)) { switch (e.status) { case 403: - core11.warning(e.message || GENERIC_403_MSG); + core12.warning(e.message || GENERIC_403_MSG); break; case 404: - core11.warning(e.message || GENERIC_404_MSG); + core12.warning(e.message || GENERIC_404_MSG); break; default: - core11.warning(e.message); + core12.warning(e.message); break; } } @@ -95841,7 +95774,7 @@ function validateUniqueCategory(sarif, sentinelPrefix = CodeScanningTarget.senti `Aborting upload: only one run of the codeql/analyze or codeql/upload-sarif actions is allowed per job per tool/category. The easiest fix is to specify a unique value for the \`category\` input. If .runs[].automationDetails.id is specified in the sarif file, that will take precedence over your configured \`category\`. Category: (${id ? id : "none"}) Tool: (${tool ? tool : "none"})` ); } - core11.exportVariable(sentinelEnvVar, sentinelEnvVar); + core12.exportVariable(sentinelEnvVar, sentinelEnvVar); } } function sanitize(str2) { @@ -95937,7 +95870,7 @@ async function run() { logger, CodeScanningTarget ); - core12.setOutput("sarif-id", uploadResult.sarifID); + core13.setOutput("sarif-id", uploadResult.sarifID); if (fs12.lstatSync(sarifPath).isDirectory()) { const qualitySarifFiles = findSarifFilesInDir( sarifPath, @@ -95955,7 +95888,7 @@ async function run() { } } if (isInTestMode()) { - core12.debug("In test mode. Waiting for processing is disabled."); + core13.debug("In test mode. Waiting for processing is disabled."); } else if (getRequiredInput("wait-for-processing") === "true") { await waitForProcessing( getRepositoryNwo(), @@ -95967,7 +95900,7 @@ async function run() { } catch (unwrappedError) { const error2 = isThirdPartyAnalysis("upload-sarif" /* UploadSarif */) && unwrappedError instanceof InvalidSarifUploadError ? new ConfigurationError(unwrappedError.message) : wrapError(unwrappedError); const message = error2.message; - core12.setFailed(message); + core13.setFailed(message); const errorStatusReportBase = await createStatusReportBase( "upload-sarif" /* UploadSarif */, getActionsStatus(error2), @@ -95988,7 +95921,7 @@ async function runWrapper() { try { await run(); } catch (error2) { - core12.setFailed( + core13.setFailed( `codeql/upload-sarif action failed: ${getErrorMessage(error2)}` ); } diff --git a/package-lock.json b/package-lock.json index a3e0e24f2..70692f17b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", "jsonschema": "1.4.1", "long": "^5.3.2", @@ -6041,10 +6041,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/gar": { - "version": "1.0.4", - "license": "MIT" - }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -6067,14 +6063,15 @@ } }, "node_modules/get-folder-size": { - "version": "2.0.1", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/get-folder-size/-/get-folder-size-5.0.0.tgz", + "integrity": "sha512-+fgtvbL83tSDypEK+T411GDBQVQtxv+qtQgbV+HVa/TYubqDhNd5ghH/D6cOHY9iC5/88GtOZB7WI8PXy2A3bg==", "license": "MIT", - "dependencies": { - "gar": "^1.0.4", - "tiny-each-async": "2.0.3" - }, "bin": { - "get-folder-size": "bin/get-folder-size" + "get-folder-size": "bin/get-folder-size.js" + }, + "engines": { + "node": ">=18.11.0" } }, "node_modules/get-intrinsic": { @@ -8689,10 +8686,6 @@ "node": ">=4" } }, - "node_modules/tiny-each-async": { - "version": "2.0.3", - "license": "MIT" - }, "node_modules/tinyglobby": { "version": "0.2.12", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.12.tgz", diff --git a/package.json b/package.json index 06ad3fdf4..2308ac300 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", "follow-redirects": "^1.15.11", - "get-folder-size": "^2.0.1", + "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", "jsonschema": "1.4.1", "long": "^5.3.2", diff --git a/src/util.ts b/src/util.ts index 1467cc9c2..ef024ffde 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,7 +1,6 @@ import * as fs from "fs"; import * as os from "os"; import * as path from "path"; -import { promisify } from "util"; import * as core from "@actions/core"; import * as exec from "@actions/exec/lib/exec"; @@ -831,7 +830,8 @@ export async function tryGetFolderBytes( quiet: boolean = false, ): Promise { try { - return await promisify(getFolderSize)(cacheDir); + // tolerate some errors since we're only estimating the size + return await getFolderSize.loose(cacheDir); } catch (e) { if (!quiet || logger.isDebug()) { logger.warning( From 943116bc89e6ca41d83a0bd71d59f764de3b0fec Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Fri, 29 Aug 2025 19:17:34 +0100 Subject: [PATCH 3/4] Use `url.pathToFileURL` instead of `file-url` --- lib/analyze-action-post.js | 1 - lib/analyze-action.js | 765 ++++++++++++------------ lib/autobuild-action.js | 1 - lib/init-action-post.js | 959 +++++++++++++++--------------- lib/init-action.js | 1 - lib/resolve-environment-action.js | 1 - lib/start-proxy-action-post.js | 1 - lib/start-proxy-action.js | 1 - lib/upload-lib.js | 765 ++++++++++++------------ lib/upload-sarif-action-post.js | 1 - lib/upload-sarif-action.js | 765 ++++++++++++------------ package-lock.json | 8 - package.json | 1 - src/upload-lib.ts | 4 +- 14 files changed, 1575 insertions(+), 1699 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 34bb97bb1..a1b0f6ac2 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 20f118bbc..936357be7 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -283,8 +283,8 @@ var require_proxy = __commonJS({ return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } var DecodedURL = class extends URL { - constructor(url, base) { - super(url, base); + constructor(url2, base) { + super(url2, base); this._decodedUsername = decodeURIComponent(super.username); this._decodedPassword = decodeURIComponent(super.password); } @@ -957,65 +957,65 @@ var require_util = __commonJS({ function isBlobLike(object) { return Blob2 && object instanceof Blob2 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); } - function buildURL(url, queryParams) { - if (url.includes("?") || url.includes("#")) { + function buildURL(url2, queryParams) { + if (url2.includes("?") || url2.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify(queryParams); if (stringified) { - url += "?" + stringified; + url2 += "?" + stringified; } - return url; + return url2; } - function parseURL(url) { - if (typeof url === "string") { - url = new URL(url); - if (!/^https?:/.test(url.origin || url.protocol)) { + function parseURL(url2) { + if (typeof url2 === "string") { + url2 = new URL(url2); + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url; + return url2; } - if (!url || typeof url !== "object") { + if (!url2 || typeof url2 !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (!/^https?:/.test(url.origin || url.protocol)) { + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { + if (!(url2 instanceof URL)) { + if (url2.port != null && url2.port !== "" && !Number.isFinite(parseInt(url2.port))) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - if (url.path != null && typeof url.path !== "string") { + if (url2.path != null && typeof url2.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } - if (url.pathname != null && typeof url.pathname !== "string") { + if (url2.pathname != null && typeof url2.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - if (url.hostname != null && typeof url.hostname !== "string") { + if (url2.hostname != null && typeof url2.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } - if (url.origin != null && typeof url.origin !== "string") { + if (url2.origin != null && typeof url2.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path16 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; + let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; + let path16 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } if (path16 && !path16.startsWith("/")) { path16 = `/${path16}`; } - url = new URL(origin + path16); + url2 = new URL(origin + path16); } - return url; + return url2; } - function parseOrigin(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) { + function parseOrigin(url2) { + url2 = parseURL(url2); + if (url2.pathname !== "/" || url2.search || url2.hash) { throw new InvalidArgumentError("invalid url"); } - return url; + return url2; } function getHostname(host) { if (host[0] === "[") { @@ -3666,8 +3666,8 @@ var require_util2 = __commonJS({ return request.urlList[request.urlList.length - 1]; } function requestBadPort(request) { - const url = requestCurrentURL(request); - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + const url2 = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url2) && badPortsSet.has(url2.port)) { return "blocked"; } return "allowed"; @@ -3881,30 +3881,30 @@ var require_util2 = __commonJS({ return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } - function stripURLForReferrer(url, originOnly) { - assert(url instanceof URL); - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { + function stripURLForReferrer(url2, originOnly) { + assert(url2 instanceof URL); + if (url2.protocol === "file:" || url2.protocol === "about:" || url2.protocol === "blank:") { return "no-referrer"; } - url.username = ""; - url.password = ""; - url.hash = ""; + url2.username = ""; + url2.password = ""; + url2.hash = ""; if (originOnly) { - url.pathname = ""; - url.search = ""; + url2.pathname = ""; + url2.search = ""; } - return url; + return url2; } - function isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) { + function isURLPotentiallyTrustworthy(url2) { + if (!(url2 instanceof URL)) { return false; } - if (url.href === "about:blank" || url.href === "about:srcdoc") { + if (url2.href === "about:blank" || url2.href === "about:srcdoc") { return true; } - if (url.protocol === "data:") return true; - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url.origin); + if (url2.protocol === "data:") return true; + if (url2.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url2.origin); function isOriginPotentiallyTrustworthy(origin) { if (origin == null || origin === "null") return false; const originAsURL = new URL(origin); @@ -4174,20 +4174,20 @@ var require_util2 = __commonJS({ byteLength += chunk.length; } } - function urlIsLocal(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsLocal(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } - function urlHasHttpsScheme(url) { - if (typeof url === "string") { - return url.startsWith("https:"); + function urlHasHttpsScheme(url2) { + if (typeof url2 === "string") { + return url2.startsWith("https:"); } - return url.protocol === "https:"; + return url2.protocol === "https:"; } - function urlIsHttpHttpsScheme(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsHttpHttpsScheme(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "http:" || protocol === "https:"; } var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); @@ -4672,12 +4672,12 @@ var require_dataURL = __commonJS({ } return { mimeType: mimeTypeRecord, body }; } - function URLSerializer(url, excludeFragment = false) { + function URLSerializer(url2, excludeFragment = false) { if (!excludeFragment) { - return url.href; + return url2.href; } - const href = url.href; - const hashLength = url.hash.length; + const href = url2.href; + const hashLength = url2.hash.length; return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } function collectASequenceOfCodePoints(condition, input, position) { @@ -6984,7 +6984,7 @@ var require_client = __commonJS({ * @param {string|URL} url * @param {import('../types/client').Client.Options} options */ - constructor(url, { + constructor(url2, { interceptors, maxHeaderSize, headersTimeout, @@ -7090,7 +7090,7 @@ var require_client = __commonJS({ }); } this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; - this[kUrl] = util.parseOrigin(url); + this[kUrl] = util.parseOrigin(url2); this[kConnector] = connect2; this[kSocket] = null; this[kPipelining] = pipelining != null ? pipelining : 1; @@ -10556,10 +10556,10 @@ var require_mock_utils = __commonJS({ }; } function checkNetConnect(netConnect, origin) { - const url = new URL(origin); + const url2 = new URL(origin); if (netConnect === true) { return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url2.host))) { return true; } return false; @@ -12001,16 +12001,16 @@ var require_response = __commonJS({ return responseObject; } // Creates a redirect Response that redirects to url with status status. - static redirect(url, status = 302) { + static redirect(url2, status = 302) { const relevantRealm = { settingsObject: {} }; webidl.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); status = webidl.converters["unsigned short"](status); let parsedURL; try { - parsedURL = new URL(url, getGlobalOrigin()); + parsedURL = new URL(url2, getGlobalOrigin()); } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url), { + throw Object.assign(new TypeError("Failed to parse URL from " + url2), { cause: err }); } @@ -12054,11 +12054,11 @@ var require_response = __commonJS({ get url() { webidl.brandCheck(this, _Response); const urlList = this[kState].urlList; - const url = urlList[urlList.length - 1] ?? null; - if (url === null) { + const url2 = urlList[urlList.length - 1] ?? null; + if (url2 === null) { return ""; } - return URLSerializer(url, true); + return URLSerializer(url2, true); } // Returns whether response was obtained through a redirect. get redirected() { @@ -13850,12 +13850,12 @@ var require_fetch = __commonJS({ } return response; async function dispatch({ body }) { - const url = requestCurrentURL(request); + const url2 = requestCurrentURL(request); const agent = fetchParams.controller.dispatcher; return new Promise((resolve8, reject) => agent.dispatch( { - path: url.pathname + url.search, - origin: url.origin, + path: url2.pathname + url2.search, + origin: url2.origin, method: request.method, body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, @@ -16335,9 +16335,9 @@ var require_connection = __commonJS({ crypto = require("crypto"); } catch { } - function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { - const requestURL = url; - requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { + const requestURL = url2; + requestURL.protocol = url2.protocol === "ws:" ? "http:" : "https:"; const request = makeRequest({ urlList: [requestURL], serviceWorkers: "none", @@ -16788,7 +16788,7 @@ var require_websocket = __commonJS({ * @param {string} url * @param {string|string[]} protocols */ - constructor(url, protocols = []) { + constructor(url2, protocols = []) { super(); webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); if (!experimentalWarned) { @@ -16798,12 +16798,12 @@ var require_websocket = __commonJS({ }); } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); protocols = options.protocols; const baseURL = getGlobalOrigin(); let urlRecord; try { - urlRecord = new URL(url, baseURL); + urlRecord = new URL(url2, baseURL); } catch (e) { throw new DOMException2(e, "SyntaxError"); } @@ -17198,12 +17198,12 @@ var require_undici = __commonJS({ module2.exports.buildConnector = buildConnector; module2.exports.errors = errors; function makeDispatcher(fn) { - return (url, opts, handler) => { + return (url2, opts, handler) => { if (typeof opts === "function") { handler = opts; opts = null; } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { + if (!url2 || typeof url2 !== "string" && typeof url2 !== "object" && !(url2 instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { @@ -17217,12 +17217,12 @@ var require_undici = __commonJS({ if (!opts.path.startsWith("/")) { path16 = `/${path16}`; } - url = new URL(util.parseOrigin(url).origin + path16); + url2 = new URL(util.parseOrigin(url2).origin + path16); } else { if (!opts) { - opts = typeof url === "object" ? url : {}; + opts = typeof url2 === "object" ? url2 : {}; } - url = util.parseURL(url); + url2 = util.parseURL(url2); } const { agent, dispatcher = getGlobalDispatcher() } = opts; if (agent) { @@ -17230,8 +17230,8 @@ var require_undici = __commonJS({ } return fn.call(dispatcher, { ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, + origin: url2.origin, + path: url2.search ? `${url2.pathname}${url2.search}` : url2.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler); }; @@ -19957,8 +19957,8 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url, opts) => __awaiter4(this, void 0, void 0, function* () { - return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + const proxyFetch = (url2, opts) => __awaiter4(this, void 0, void 0, function* () { + return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; } @@ -20215,8 +20215,8 @@ var require_dist_node2 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -20234,13 +20234,13 @@ var require_dist_node2 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -20251,8 +20251,8 @@ var require_dist_node2 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -20427,7 +20427,7 @@ var require_dist_node2 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -20438,7 +20438,7 @@ var require_dist_node2 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -20455,7 +20455,7 @@ var require_dist_node2 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -20714,7 +20714,7 @@ var require_dist_node5 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -20734,7 +20734,7 @@ var require_dist_node5 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -20755,7 +20755,7 @@ var require_dist_node5 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -20766,7 +20766,7 @@ var require_dist_node5 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -20778,7 +20778,7 @@ var require_dist_node5 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -20791,7 +20791,7 @@ var require_dist_node5 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -20955,8 +20955,8 @@ var require_dist_node6 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -20974,13 +20974,13 @@ var require_dist_node6 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -20991,8 +20991,8 @@ var require_dist_node6 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -21167,7 +21167,7 @@ var require_dist_node6 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -21178,7 +21178,7 @@ var require_dist_node6 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -21195,7 +21195,7 @@ var require_dist_node6 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -21362,7 +21362,7 @@ var require_dist_node8 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -21382,7 +21382,7 @@ var require_dist_node8 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -21403,7 +21403,7 @@ var require_dist_node8 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -21414,7 +21414,7 @@ var require_dist_node8 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -21426,7 +21426,7 @@ var require_dist_node8 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -21439,7 +21439,7 @@ var require_dist_node8 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -23907,11 +23907,11 @@ var require_dist_node12 = __commonJS({ for (const [scope, endpoints] of Object.entries(endpoints_default)) { for (const [methodName, endpoint] of Object.entries(endpoints)) { const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); + const [method, url2] = route.split(/ /); const endpointDefaults = Object.assign( { method, - url + url: url2 }, defaults ); @@ -24105,23 +24105,23 @@ var require_dist_node13 = __commonJS({ const requestMethod = typeof route === "function" ? route : octokit.request; const method = options.method; const headers = options.headers; - let url = options.url; + let url2 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url) + if (!url2) return { done: true }; try { - const response = await requestMethod({ method, url, headers }); + const response = await requestMethod({ method, url: url2, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match( + url2 = ((normalizedResponse.headers.link || "").match( /<([^<>]+)>;\s*rel="next"/ ) || [])[1]; return { value: normalizedResponse }; } catch (error2) { if (error2.status !== 409) throw error2; - url = ""; + url2 = ""; return { value: { status: 200, @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", @@ -41100,16 +41099,16 @@ var require_sanitizer = __commonJS({ if (typeof value !== "string" || value === null || value === "") { return value; } - const url = new URL(value); - if (!url.search) { + const url2 = new URL(value); + if (!url2.search) { return value; } - for (const [key] of url.searchParams) { + for (const [key] of url2.searchParams) { if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); + url2.searchParams.set(key, RedactedString); } } - return url.toString(); + return url2.toString(); } sanitizeHeaders(obj) { const sanitized = {}; @@ -41198,8 +41197,8 @@ var require_redirectPolicy = __commonJS({ const { request, status, headers } = response; const locationHeader = headers.get("location"); if (locationHeader && (status === 300 || status === 301 && allowedRedirect.includes(request.method) || status === 302 && allowedRedirect.includes(request.method) || status === 303 && request.method === "POST" || status === 307) && currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); + const url2 = new URL(locationHeader, request.url); + request.url = url2.toString(); if (status === 303) { request.method = "GET"; request.headers.delete("Content-Length"); @@ -43403,9 +43402,9 @@ var require_helpers2 = __commonJS({ } } exports2.json = json2; - function req(url, opts = {}) { - const href = typeof url === "string" ? url : url.href; - const req2 = (href.startsWith("https:") ? https2 : http).request(url, opts); + function req(url2, opts = {}) { + const href = typeof url2 === "string" ? url2 : url2.href; + const req2 = (href.startsWith("https:") ? https2 : http).request(url2, opts); const promise = new Promise((resolve8, reject) => { req2.once("response", resolve8).once("error", reject).end(); }); @@ -43885,11 +43884,11 @@ var require_dist4 = __commonJS({ const protocol = opts.secureEndpoint ? "https:" : "http:"; const hostname = req.getHeader("host") || "localhost"; const base = `${protocol}//${hostname}`; - const url = new url_1.URL(req.path, base); + const url2 = new url_1.URL(req.path, base); if (opts.port !== 80) { - url.port = String(opts.port); + url2.port = String(opts.port); } - req.path = String(url); + req.path = String(url2); const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; if (proxy.username || proxy.password) { const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; @@ -44060,8 +44059,8 @@ var require_proxyPolicy = __commonJS({ if (request.agent) { return; } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (request.tlsSettings) { log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); } @@ -44708,17 +44707,17 @@ var require_nodeHttpClient = __commonJS({ } makeRequest(request, abortController, body) { var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (isInsecure && !request.allowInsecureConnection) { throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); } const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); const options = { agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, + hostname: url2.hostname, + path: `${url2.pathname}${url2.search}`, + port: url2.port, method: request.method, headers: request.headers.toJSON({ preserveCase: true }) }; @@ -48097,14 +48096,14 @@ var require_urlHelpers = __commonJS({ } return result; } - function isAbsoluteUrl(url) { - return url.includes("://"); + function isAbsoluteUrl(url2) { + return url2.includes("://"); } - function appendPath(url, pathToAppend) { + function appendPath(url2, pathToAppend) { if (!pathToAppend) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); let newPath = parsedUrl.pathname; if (!newPath.endsWith("/")) { newPath = `${newPath}/`; @@ -48195,11 +48194,11 @@ var require_urlHelpers = __commonJS({ } return result; } - function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { + function appendQueryParams(url2, queryParams, sequenceParams, noOverwrite = false) { if (queryParams.size === 0) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const combinedParams = simpleParseQueryParams(parsedUrl.search); for (const [name, value] of queryParams) { const existingValue = combinedParams.get(name); @@ -48310,9 +48309,9 @@ var require_serviceClient = __commonJS({ if (!endpoint) { throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); } - const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const url2 = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); const request = (0, core_rest_pipeline_1.createPipelineRequest)({ - url + url: url2 }); request.method = operationSpec.httpMethod; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); @@ -52263,8 +52262,8 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + function escapeURLPath(url3) { + const urlParsed = new URL(url3); let path16 = urlParsed.pathname; path16 = path16 || "/"; path16 = escape(path16); @@ -52351,15 +52350,15 @@ var require_dist7 = __commonJS({ function escape(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } - function appendToURLPath(url2, name) { - const urlParsed = new URL(url2); + function appendToURLPath(url3, name) { + const urlParsed = new URL(url3); let path16 = urlParsed.pathname; path16 = path16 ? path16.endsWith("/") ? `${path16}${name}` : `${path16}/${name}` : name; urlParsed.pathname = path16; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url3, name, value) { + const urlParsed = new URL(url3); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -52378,34 +52377,34 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { + function getURLParameter(url3, name) { var _a; - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url3, host) { + const urlParsed = new URL(url3); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } - function getURLPathAndQuery(url2) { - const urlParsed = new URL(url2); + function getURLPathAndQuery(url3) { + const urlParsed = new URL(url3); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -52417,8 +52416,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url3) { + let queryString = new URL(url3).search; if (!queryString) { return {}; } @@ -52439,8 +52438,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url3, queryParts) { + const urlParsed = new URL(url3); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -52506,8 +52505,8 @@ var require_dist7 = __commonJS({ function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url3) { + const parsedUrl = new URL(url3); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -62445,7 +62444,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + var url2 = { parameterPath: "url", mapper: { serializedName: "url", @@ -64121,7 +64120,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64151,7 +64150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64178,7 +64177,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64208,7 +64207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; maxPageSize, include ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64236,7 +64235,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp3 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64265,7 +64264,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64292,7 +64291,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body, queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -64325,7 +64324,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp5, where ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64513,7 +64512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64539,7 +64538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64562,7 +64561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64591,7 +64590,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp6 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64632,7 +64631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64660,7 +64659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64693,7 +64692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp8 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64721,7 +64720,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp9 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64754,7 +64753,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp4, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -64788,7 +64787,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; where, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64814,7 +64813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64845,7 +64844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64875,7 +64874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64905,7 +64904,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64935,7 +64934,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64971,7 +64970,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, include1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65003,7 +65002,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; include1, delimiter ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65029,7 +65028,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65293,7 +65292,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65331,7 +65330,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65367,7 +65366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, blobDeleteType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65396,7 +65395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65418,7 +65417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65442,7 +65441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65476,7 +65475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65501,7 +65500,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65523,7 +65522,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65546,7 +65545,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65579,7 +65578,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65609,7 +65608,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65638,7 +65637,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65667,7 +65666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65697,7 +65696,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65726,7 +65725,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65759,7 +65758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65801,7 +65800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65849,7 +65848,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp15, copyId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65881,7 +65880,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp16 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65911,7 +65910,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65949,7 +65948,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp17 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -65989,7 +65988,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66018,7 +66017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -66152,7 +66151,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66201,7 +66200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66244,7 +66243,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66282,7 +66281,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66336,7 +66335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp20 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66373,7 +66372,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp20, prevsnapshot ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66403,7 +66402,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66436,7 +66435,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66466,7 +66465,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66547,7 +66546,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66593,7 +66592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66633,7 +66632,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66678,7 +66677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66798,7 +66797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66849,7 +66848,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66908,7 +66907,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66945,7 +66944,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66983,7 +66982,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: blocks, queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -67038,7 +67037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp25, listType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67056,9 +67055,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The parameter options */ - constructor(url2, options) { + constructor(url3, options) { var _a, _b; - if (url2 === void 0) { + if (url3 === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -67073,7 +67072,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; userAgentPrefix }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); super(optionsWithDefaults); - this.url = url2; + this.url = url3; this.version = options.version || "2024-11-04"; this.service = new ServiceImpl(this); this.container = new ContainerImpl(this); @@ -67098,9 +67097,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url3, pipeline) { + this.url = escapeURLPath(url3); + this.accountName = getAccountNameFromUrl(url3); this.pipeline = pipeline; this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); @@ -70358,16 +70357,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; + let url3; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -70379,7 +70378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -70388,7 +70387,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -70396,7 +70395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); @@ -71244,17 +71243,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var AppendBlobClient = class _AppendBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -71263,7 +71262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71272,7 +71271,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71280,7 +71279,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -71459,17 +71458,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var BlockBlobClient = class _BlockBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -71481,7 +71480,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71490,7 +71489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71498,7 +71497,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -72006,17 +72005,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var PageBlobClient = class _PageBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -72025,7 +72024,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -72034,7 +72033,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -72042,7 +72041,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -72913,13 +72912,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url3; let credential; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -72931,23 +72930,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url3; let credential; let tier2; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrTier; tier2 = tierOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; tier2 = credentialOrTier; options = tierOrOptions; @@ -72960,10 +72959,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); }); }); } @@ -73086,7 +73085,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -73095,8 +73094,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path16 = getURLPath(url2); + const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); + const path16 = getURLPath(url3); if (path16 && path16 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -73200,16 +73199,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -73217,7 +73216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -73226,7 +73225,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -73234,7 +73233,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url3, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } @@ -74683,7 +74682,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -74692,7 +74691,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(new AnonymousCredential(), options); } - super(url2, pipeline); + super(url3, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -76454,9 +76453,9 @@ var require_cacheHttpClient = __commonJS({ if (!baseUrl) { throw new Error("Cache Service Url not found, unable to restore cache."); } - const url = `${baseUrl}_apis/artifactcache/${resource}`; - core15.debug(`Resource Url: ${url}`); - return url; + const url2 = `${baseUrl}_apis/artifactcache/${resource}`; + core15.debug(`Resource Url: ${url2}`); + return url2; } function createAcceptHeader(type2, apiVersion) { return `${type2};api-version=${apiVersion}`; @@ -81550,18 +81549,18 @@ var require_util10 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.maskSecretUrls = exports2.maskSigUrl = void 0; var core_1 = require_core(); - function maskSigUrl(url) { - if (!url) + function maskSigUrl(url2) { + if (!url2) return; try { - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const signature = parsedUrl.searchParams.get("sig"); if (signature) { (0, core_1.setSecret)(signature); (0, core_1.setSecret)(encodeURIComponent(signature)); } } catch (error2) { - (0, core_1.debug)(`Failed to parse URL: ${url} ${error2 instanceof Error ? error2.message : String(error2)}`); + (0, core_1.debug)(`Failed to parse URL: ${url2} ${error2 instanceof Error ? error2.message : String(error2)}`); } } exports2.maskSigUrl = maskSigUrl; @@ -81647,14 +81646,14 @@ var require_cacheTwirpClient = __commonJS({ // JSON generated client. request(service, method, contentType, data) { return __awaiter4(this, void 0, void 0, function* () { - const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url}`); + const url2 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url2}`); const headers = { "Content-Type": contentType }; try { const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { - return this.httpClient.post(url, JSON.stringify(data), headers); + return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; } catch (error2) { @@ -82747,18 +82746,18 @@ var require_tool_cache = __commonJS({ var IS_WINDOWS = process.platform === "win32"; var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; - function downloadTool2(url, dest, auth, headers) { + function downloadTool2(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { dest = dest || path16.join(_getTempDirectory(), crypto.randomUUID()); yield io7.mkdirP(path16.dirname(dest)); - core15.debug(`Downloading ${url}`); + core15.debug(`Downloading ${url2}`); core15.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); return yield retryHelper.execute(() => __awaiter4(this, void 0, void 0, function* () { - return yield downloadToolAttempt(url, dest || "", auth, headers); + return yield downloadToolAttempt(url2, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { @@ -82770,7 +82769,7 @@ var require_tool_cache = __commonJS({ }); } exports2.downloadTool = downloadTool2; - function downloadToolAttempt(url, dest, auth, headers) { + function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { if (fs17.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); @@ -82785,10 +82784,10 @@ var require_tool_cache = __commonJS({ } headers.authorization = auth; } - const response = yield http.get(url, headers); + const response = yield http.get(url2, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core15.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core15.debug(`Failed to download from "${url2}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -83264,8 +83263,8 @@ var require_debug2 = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports2, module2) { - var url = require("url"); - var URL2 = url.URL; + var url2 = require("url"); + var URL2 = url2.URL; var http = require("http"); var https2 = require("https"); var Writable = require("stream").Writable; @@ -83517,7 +83516,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : ( + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( // When making a request to a proxy, […] // a client MUST send the target URI in absolute-form […]. this._options.path @@ -83585,7 +83584,7 @@ var require_follow_redirects = __commonJS({ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); var currentUrlParts = parseUrl(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost })); + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl = resolveUrl(location, currentUrl); debug3("redirecting to", redirectUrl.href); this._isRedirect = true; @@ -83663,7 +83662,7 @@ var require_follow_redirects = __commonJS({ if (useNativeURL) { parsed = new URL2(input); } else { - parsed = validateUrl(url.parse(input)); + parsed = validateUrl(url2.parse(input)); if (!isString(parsed.protocol)) { throw new InvalidUrlError({ input }); } @@ -83671,7 +83670,7 @@ var require_follow_redirects = __commonJS({ return parsed; } function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl(url.resolve(base, relative2)); + return useNativeURL ? new URL2(relative2, base) : parseUrl(url2.resolve(base, relative2)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -84854,32 +84853,6 @@ var require_glob3 = __commonJS({ } }); -// node_modules/file-url/index.js -var require_file_url = __commonJS({ - "node_modules/file-url/index.js"(exports2, module2) { - "use strict"; - var path16 = require("path"); - module2.exports = (filePath, options) => { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - options = { - resolve: true, - ...options - }; - let pathName = filePath; - if (options.resolve) { - pathName = path16.resolve(filePath); - } - pathName = pathName.replace(/\\/g, "/"); - if (pathName[0] !== "/") { - pathName = `/${pathName}`; - } - return encodeURI(`file://${pathName}`).replace(/[?#]/g, encodeURIComponent); - }; - } -}); - // node_modules/jsonschema/lib/helpers.js var require_helpers3 = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { @@ -92118,25 +92091,25 @@ function parseGitHubUrl(inputUrl) { if (!inputUrl.startsWith("http://") && !inputUrl.startsWith("https://")) { throw new ConfigurationError(`"${originalUrl}" is not a http or https URL`); } - let url; + let url2; try { - url = new URL(inputUrl); + url2 = new URL(inputUrl); } catch { throw new ConfigurationError(`"${originalUrl}" is not a valid URL`); } - if (url.hostname === "github.com" || url.hostname === "api.github.com") { + if (url2.hostname === "github.com" || url2.hostname === "api.github.com") { return GITHUB_DOTCOM_URL; } - if (url.pathname.indexOf("/api/v3") !== -1) { - url.pathname = url.pathname.substring(0, url.pathname.indexOf("/api/v3")); + if (url2.pathname.indexOf("/api/v3") !== -1) { + url2.pathname = url2.pathname.substring(0, url2.pathname.indexOf("/api/v3")); } - if (url.hostname.startsWith("api.")) { - url.hostname = url.hostname.substring(4); + if (url2.hostname.startsWith("api.")) { + url2.hostname = url2.hostname.substring(4); } - if (!url.pathname.endsWith("/")) { - url.pathname = `${url.pathname}/`; + if (!url2.pathname.endsWith("/")) { + url2.pathname = `${url2.pathname}/`; } - return url.toString(); + return url2.toString(); } var ExhaustivityCheckingError = class extends Error { constructor(expectedExhaustiveValue) { @@ -94480,10 +94453,10 @@ function writeToolcacheMarkerFile(extractedPath, logger) { fs8.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } -function sanitizeUrlForStatusReport(url) { +function sanitizeUrlForStatusReport(url2) { return ["github/codeql-action", "dsp-testing/codeql-cli-nightlies"].some( - (repo) => url.startsWith(`https://github.com/${repo}/releases/download/`) - ) ? url : "sanitized-value"; + (repo) => url2.startsWith(`https://github.com/${repo}/releases/download/`) + ) ? url2 : "sanitized-value"; } // src/setup-codeql.ts @@ -94574,16 +94547,16 @@ function tryGetBundleVersionFromTagName(tagName, logger) { } return match[1]; } -function tryGetTagNameFromUrl(url, logger) { - const matches = [...url.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; +function tryGetTagNameFromUrl(url2, logger) { + const matches = [...url2.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; if (matches.length === 0) { - logger.debug(`Could not determine tag name for URL ${url}.`); + logger.debug(`Could not determine tag name for URL ${url2}.`); return void 0; } const match = matches[matches.length - 1]; if (match === null || match.length !== 2) { logger.debug( - `Could not determine tag name for URL ${url}. Matched ${JSON.stringify( + `Could not determine tag name for URL ${url2}. Matched ${JSON.stringify( match )}.` ); @@ -94659,13 +94632,13 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } let cliVersion2; let tagName; - let url; + let url2; if (forceShippedTools) { cliVersion2 = cliVersion; tagName = bundleVersion; } else if (toolsInput !== void 0) { tagName = tryGetTagNameFromUrl(toolsInput, logger); - url = toolsInput; + url2 = toolsInput; if (tagName) { const bundleVersion3 = tryGetBundleVersionFromTagName(tagName, logger); if (bundleVersion3 && semver7.valid(bundleVersion3)) { @@ -94677,9 +94650,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian tagName = defaultCliVersion.tagName; } const bundleVersion2 = tagName && tryGetBundleVersionFromTagName(tagName, logger); - const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url ?? "unknown"; + const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url2 ?? "unknown"; logger.debug( - `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url ?? "unspecified"}.` + `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url2 ?? "unspecified"}.` ); let codeqlFolder; if (cliVersion2) { @@ -94761,32 +94734,32 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } } let compressionMethod; - if (!url) { + if (!url2) { compressionMethod = cliVersion2 !== void 0 && await useZstdBundle(cliVersion2, tarSupportsZstd) ? "zstd" : "gzip"; - url = await getCodeQLBundleDownloadURL( + url2 = await getCodeQLBundleDownloadURL( tagName, apiDetails, compressionMethod, logger ); } else { - const method = inferCompressionMethod(url); + const method = inferCompressionMethod(url2); if (method === void 0) { throw new ConfigurationError( - `Could not infer compression method from URL ${url}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` + `Could not infer compression method from URL ${url2}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` ); } compressionMethod = method; } if (cliVersion2) { - logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url} .`); + logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url2} .`); } else { - logger.info(`Using CodeQL CLI sourced from ${url} .`); + logger.info(`Using CodeQL CLI sourced from ${url2} .`); } return { bundleVersion: tagName && tryGetBundleVersionFromTagName(tagName, logger), cliVersion: cliVersion2, - codeqlURL: url, + codeqlURL: url2, compressionMethod, sourceType: "download", toolsVersion: cliVersion2 ?? humanReadableVersion @@ -96496,9 +96469,9 @@ async function sendStatusReport(statusReport) { // src/upload-lib.ts var fs15 = __toESM(require("fs")); var path14 = __toESM(require("path")); +var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core13 = __toESM(require_core()); -var import_file_url = __toESM(require_file_url()); var jsonschema = __toESM(require_lib2()); // src/fingerprints.ts @@ -98074,7 +98047,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features const sarifPayload = JSON.stringify(sarif); logger.debug(`Compressing serialized SARIF`); const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64"); - const checkoutURI = (0, import_file_url.default)(checkoutPath); + const checkoutURI = url.pathToFileURL(checkoutPath).href; const payload = buildPayload( await getCommitOid(checkoutPath), await getRef(), diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index ea7cbdbc3..83691a20e 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/init-action-post.js b/lib/init-action-post.js index d013d7b12..e2c783654 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -283,8 +283,8 @@ var require_proxy = __commonJS({ return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } var DecodedURL = class extends URL { - constructor(url, base) { - super(url, base); + constructor(url2, base) { + super(url2, base); this._decodedUsername = decodeURIComponent(super.username); this._decodedPassword = decodeURIComponent(super.password); } @@ -957,65 +957,65 @@ var require_util = __commonJS({ function isBlobLike(object) { return Blob2 && object instanceof Blob2 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); } - function buildURL(url, queryParams) { - if (url.includes("?") || url.includes("#")) { + function buildURL(url2, queryParams) { + if (url2.includes("?") || url2.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify(queryParams); if (stringified) { - url += "?" + stringified; + url2 += "?" + stringified; } - return url; + return url2; } - function parseURL(url) { - if (typeof url === "string") { - url = new URL(url); - if (!/^https?:/.test(url.origin || url.protocol)) { + function parseURL(url2) { + if (typeof url2 === "string") { + url2 = new URL(url2); + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url; + return url2; } - if (!url || typeof url !== "object") { + if (!url2 || typeof url2 !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (!/^https?:/.test(url.origin || url.protocol)) { + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { + if (!(url2 instanceof URL)) { + if (url2.port != null && url2.port !== "" && !Number.isFinite(parseInt(url2.port))) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - if (url.path != null && typeof url.path !== "string") { + if (url2.path != null && typeof url2.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } - if (url.pathname != null && typeof url.pathname !== "string") { + if (url2.pathname != null && typeof url2.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - if (url.hostname != null && typeof url.hostname !== "string") { + if (url2.hostname != null && typeof url2.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } - if (url.origin != null && typeof url.origin !== "string") { + if (url2.origin != null && typeof url2.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path15 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; + let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; + let path15 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } if (path15 && !path15.startsWith("/")) { path15 = `/${path15}`; } - url = new URL(origin + path15); + url2 = new URL(origin + path15); } - return url; + return url2; } - function parseOrigin(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) { + function parseOrigin(url2) { + url2 = parseURL(url2); + if (url2.pathname !== "/" || url2.search || url2.hash) { throw new InvalidArgumentError("invalid url"); } - return url; + return url2; } function getHostname(host) { if (host[0] === "[") { @@ -3666,8 +3666,8 @@ var require_util2 = __commonJS({ return request.urlList[request.urlList.length - 1]; } function requestBadPort(request) { - const url = requestCurrentURL(request); - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + const url2 = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url2) && badPortsSet.has(url2.port)) { return "blocked"; } return "allowed"; @@ -3881,30 +3881,30 @@ var require_util2 = __commonJS({ return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } - function stripURLForReferrer(url, originOnly) { - assert(url instanceof URL); - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { + function stripURLForReferrer(url2, originOnly) { + assert(url2 instanceof URL); + if (url2.protocol === "file:" || url2.protocol === "about:" || url2.protocol === "blank:") { return "no-referrer"; } - url.username = ""; - url.password = ""; - url.hash = ""; + url2.username = ""; + url2.password = ""; + url2.hash = ""; if (originOnly) { - url.pathname = ""; - url.search = ""; + url2.pathname = ""; + url2.search = ""; } - return url; + return url2; } - function isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) { + function isURLPotentiallyTrustworthy(url2) { + if (!(url2 instanceof URL)) { return false; } - if (url.href === "about:blank" || url.href === "about:srcdoc") { + if (url2.href === "about:blank" || url2.href === "about:srcdoc") { return true; } - if (url.protocol === "data:") return true; - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url.origin); + if (url2.protocol === "data:") return true; + if (url2.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url2.origin); function isOriginPotentiallyTrustworthy(origin) { if (origin == null || origin === "null") return false; const originAsURL = new URL(origin); @@ -4174,20 +4174,20 @@ var require_util2 = __commonJS({ byteLength += chunk.length; } } - function urlIsLocal(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsLocal(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } - function urlHasHttpsScheme(url) { - if (typeof url === "string") { - return url.startsWith("https:"); + function urlHasHttpsScheme(url2) { + if (typeof url2 === "string") { + return url2.startsWith("https:"); } - return url.protocol === "https:"; + return url2.protocol === "https:"; } - function urlIsHttpHttpsScheme(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsHttpHttpsScheme(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "http:" || protocol === "https:"; } var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); @@ -4672,12 +4672,12 @@ var require_dataURL = __commonJS({ } return { mimeType: mimeTypeRecord, body }; } - function URLSerializer(url, excludeFragment = false) { + function URLSerializer(url2, excludeFragment = false) { if (!excludeFragment) { - return url.href; + return url2.href; } - const href = url.href; - const hashLength = url.hash.length; + const href = url2.href; + const hashLength = url2.hash.length; return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } function collectASequenceOfCodePoints(condition, input, position) { @@ -6984,7 +6984,7 @@ var require_client = __commonJS({ * @param {string|URL} url * @param {import('../types/client').Client.Options} options */ - constructor(url, { + constructor(url2, { interceptors, maxHeaderSize, headersTimeout, @@ -7090,7 +7090,7 @@ var require_client = __commonJS({ }); } this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; - this[kUrl] = util.parseOrigin(url); + this[kUrl] = util.parseOrigin(url2); this[kConnector] = connect2; this[kSocket] = null; this[kPipelining] = pipelining != null ? pipelining : 1; @@ -10556,10 +10556,10 @@ var require_mock_utils = __commonJS({ }; } function checkNetConnect(netConnect, origin) { - const url = new URL(origin); + const url2 = new URL(origin); if (netConnect === true) { return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url2.host))) { return true; } return false; @@ -12001,16 +12001,16 @@ var require_response = __commonJS({ return responseObject; } // Creates a redirect Response that redirects to url with status status. - static redirect(url, status = 302) { + static redirect(url2, status = 302) { const relevantRealm = { settingsObject: {} }; webidl.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); status = webidl.converters["unsigned short"](status); let parsedURL; try { - parsedURL = new URL(url, getGlobalOrigin()); + parsedURL = new URL(url2, getGlobalOrigin()); } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url), { + throw Object.assign(new TypeError("Failed to parse URL from " + url2), { cause: err }); } @@ -12054,11 +12054,11 @@ var require_response = __commonJS({ get url() { webidl.brandCheck(this, _Response); const urlList = this[kState].urlList; - const url = urlList[urlList.length - 1] ?? null; - if (url === null) { + const url2 = urlList[urlList.length - 1] ?? null; + if (url2 === null) { return ""; } - return URLSerializer(url, true); + return URLSerializer(url2, true); } // Returns whether response was obtained through a redirect. get redirected() { @@ -13850,12 +13850,12 @@ var require_fetch = __commonJS({ } return response; async function dispatch({ body }) { - const url = requestCurrentURL(request); + const url2 = requestCurrentURL(request); const agent = fetchParams.controller.dispatcher; return new Promise((resolve8, reject) => agent.dispatch( { - path: url.pathname + url.search, - origin: url.origin, + path: url2.pathname + url2.search, + origin: url2.origin, method: request.method, body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, @@ -16335,9 +16335,9 @@ var require_connection = __commonJS({ crypto = require("crypto"); } catch { } - function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { - const requestURL = url; - requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { + const requestURL = url2; + requestURL.protocol = url2.protocol === "ws:" ? "http:" : "https:"; const request = makeRequest({ urlList: [requestURL], serviceWorkers: "none", @@ -16788,7 +16788,7 @@ var require_websocket = __commonJS({ * @param {string} url * @param {string|string[]} protocols */ - constructor(url, protocols = []) { + constructor(url2, protocols = []) { super(); webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); if (!experimentalWarned) { @@ -16798,12 +16798,12 @@ var require_websocket = __commonJS({ }); } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); protocols = options.protocols; const baseURL = getGlobalOrigin(); let urlRecord; try { - urlRecord = new URL(url, baseURL); + urlRecord = new URL(url2, baseURL); } catch (e) { throw new DOMException2(e, "SyntaxError"); } @@ -17198,12 +17198,12 @@ var require_undici = __commonJS({ module2.exports.buildConnector = buildConnector; module2.exports.errors = errors; function makeDispatcher(fn) { - return (url, opts, handler) => { + return (url2, opts, handler) => { if (typeof opts === "function") { handler = opts; opts = null; } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { + if (!url2 || typeof url2 !== "string" && typeof url2 !== "object" && !(url2 instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { @@ -17217,12 +17217,12 @@ var require_undici = __commonJS({ if (!opts.path.startsWith("/")) { path15 = `/${path15}`; } - url = new URL(util.parseOrigin(url).origin + path15); + url2 = new URL(util.parseOrigin(url2).origin + path15); } else { if (!opts) { - opts = typeof url === "object" ? url : {}; + opts = typeof url2 === "object" ? url2 : {}; } - url = util.parseURL(url); + url2 = util.parseURL(url2); } const { agent, dispatcher = getGlobalDispatcher() } = opts; if (agent) { @@ -17230,8 +17230,8 @@ var require_undici = __commonJS({ } return fn.call(dispatcher, { ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, + origin: url2.origin, + path: url2.search ? `${url2.pathname}${url2.search}` : url2.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler); }; @@ -19957,8 +19957,8 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url, opts) => __awaiter4(this, void 0, void 0, function* () { - return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + const proxyFetch = (url2, opts) => __awaiter4(this, void 0, void 0, function* () { + return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; } @@ -20215,8 +20215,8 @@ var require_dist_node2 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -20234,13 +20234,13 @@ var require_dist_node2 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -20251,8 +20251,8 @@ var require_dist_node2 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -20427,7 +20427,7 @@ var require_dist_node2 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -20438,7 +20438,7 @@ var require_dist_node2 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -20455,7 +20455,7 @@ var require_dist_node2 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -20714,7 +20714,7 @@ var require_dist_node5 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -20734,7 +20734,7 @@ var require_dist_node5 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -20755,7 +20755,7 @@ var require_dist_node5 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -20766,7 +20766,7 @@ var require_dist_node5 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -20778,7 +20778,7 @@ var require_dist_node5 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -20791,7 +20791,7 @@ var require_dist_node5 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -20955,8 +20955,8 @@ var require_dist_node6 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -20974,13 +20974,13 @@ var require_dist_node6 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -20991,8 +20991,8 @@ var require_dist_node6 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -21167,7 +21167,7 @@ var require_dist_node6 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -21178,7 +21178,7 @@ var require_dist_node6 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -21195,7 +21195,7 @@ var require_dist_node6 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -21362,7 +21362,7 @@ var require_dist_node8 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -21382,7 +21382,7 @@ var require_dist_node8 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -21403,7 +21403,7 @@ var require_dist_node8 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -21414,7 +21414,7 @@ var require_dist_node8 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -21426,7 +21426,7 @@ var require_dist_node8 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -21439,7 +21439,7 @@ var require_dist_node8 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -23907,11 +23907,11 @@ var require_dist_node12 = __commonJS({ for (const [scope, endpoints] of Object.entries(endpoints_default)) { for (const [methodName, endpoint] of Object.entries(endpoints)) { const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); + const [method, url2] = route.split(/ /); const endpointDefaults = Object.assign( { method, - url + url: url2 }, defaults ); @@ -24105,23 +24105,23 @@ var require_dist_node13 = __commonJS({ const requestMethod = typeof route === "function" ? route : octokit.request; const method = options.method; const headers = options.headers; - let url = options.url; + let url2 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url) + if (!url2) return { done: true }; try { - const response = await requestMethod({ method, url, headers }); + const response = await requestMethod({ method, url: url2, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match( + url2 = ((normalizedResponse.headers.link || "").match( /<([^<>]+)>;\s*rel="next"/ ) || [])[1]; return { value: normalizedResponse }; } catch (error2) { if (error2.status !== 409) throw error2; - url = ""; + url2 = ""; return { value: { status: 200, @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", @@ -41100,16 +41099,16 @@ var require_sanitizer = __commonJS({ if (typeof value !== "string" || value === null || value === "") { return value; } - const url = new URL(value); - if (!url.search) { + const url2 = new URL(value); + if (!url2.search) { return value; } - for (const [key] of url.searchParams) { + for (const [key] of url2.searchParams) { if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); + url2.searchParams.set(key, RedactedString); } } - return url.toString(); + return url2.toString(); } sanitizeHeaders(obj) { const sanitized = {}; @@ -41198,8 +41197,8 @@ var require_redirectPolicy = __commonJS({ const { request, status, headers } = response; const locationHeader = headers.get("location"); if (locationHeader && (status === 300 || status === 301 && allowedRedirect.includes(request.method) || status === 302 && allowedRedirect.includes(request.method) || status === 303 && request.method === "POST" || status === 307) && currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); + const url2 = new URL(locationHeader, request.url); + request.url = url2.toString(); if (status === 303) { request.method = "GET"; request.headers.delete("Content-Length"); @@ -43403,9 +43402,9 @@ var require_helpers2 = __commonJS({ } } exports2.json = json2; - function req(url, opts = {}) { - const href = typeof url === "string" ? url : url.href; - const req2 = (href.startsWith("https:") ? https2 : http).request(url, opts); + function req(url2, opts = {}) { + const href = typeof url2 === "string" ? url2 : url2.href; + const req2 = (href.startsWith("https:") ? https2 : http).request(url2, opts); const promise = new Promise((resolve8, reject) => { req2.once("response", resolve8).once("error", reject).end(); }); @@ -43885,11 +43884,11 @@ var require_dist4 = __commonJS({ const protocol = opts.secureEndpoint ? "https:" : "http:"; const hostname = req.getHeader("host") || "localhost"; const base = `${protocol}//${hostname}`; - const url = new url_1.URL(req.path, base); + const url2 = new url_1.URL(req.path, base); if (opts.port !== 80) { - url.port = String(opts.port); + url2.port = String(opts.port); } - req.path = String(url); + req.path = String(url2); const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; if (proxy.username || proxy.password) { const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; @@ -44060,8 +44059,8 @@ var require_proxyPolicy = __commonJS({ if (request.agent) { return; } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (request.tlsSettings) { log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); } @@ -44708,17 +44707,17 @@ var require_nodeHttpClient = __commonJS({ } makeRequest(request, abortController, body) { var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (isInsecure && !request.allowInsecureConnection) { throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); } const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); const options = { agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, + hostname: url2.hostname, + path: `${url2.pathname}${url2.search}`, + port: url2.port, method: request.method, headers: request.headers.toJSON({ preserveCase: true }) }; @@ -48097,14 +48096,14 @@ var require_urlHelpers = __commonJS({ } return result; } - function isAbsoluteUrl(url) { - return url.includes("://"); + function isAbsoluteUrl(url2) { + return url2.includes("://"); } - function appendPath(url, pathToAppend) { + function appendPath(url2, pathToAppend) { if (!pathToAppend) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); let newPath = parsedUrl.pathname; if (!newPath.endsWith("/")) { newPath = `${newPath}/`; @@ -48195,11 +48194,11 @@ var require_urlHelpers = __commonJS({ } return result; } - function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { + function appendQueryParams(url2, queryParams, sequenceParams, noOverwrite = false) { if (queryParams.size === 0) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const combinedParams = simpleParseQueryParams(parsedUrl.search); for (const [name, value] of queryParams) { const existingValue = combinedParams.get(name); @@ -48310,9 +48309,9 @@ var require_serviceClient = __commonJS({ if (!endpoint) { throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); } - const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const url2 = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); const request = (0, core_rest_pipeline_1.createPipelineRequest)({ - url + url: url2 }); request.method = operationSpec.httpMethod; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); @@ -52263,8 +52262,8 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + function escapeURLPath(url3) { + const urlParsed = new URL(url3); let path15 = urlParsed.pathname; path15 = path15 || "/"; path15 = escape(path15); @@ -52351,15 +52350,15 @@ var require_dist7 = __commonJS({ function escape(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } - function appendToURLPath(url2, name) { - const urlParsed = new URL(url2); + function appendToURLPath(url3, name) { + const urlParsed = new URL(url3); let path15 = urlParsed.pathname; path15 = path15 ? path15.endsWith("/") ? `${path15}${name}` : `${path15}/${name}` : name; urlParsed.pathname = path15; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url3, name, value) { + const urlParsed = new URL(url3); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -52378,34 +52377,34 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { + function getURLParameter(url3, name) { var _a; - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url3, host) { + const urlParsed = new URL(url3); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } - function getURLPathAndQuery(url2) { - const urlParsed = new URL(url2); + function getURLPathAndQuery(url3) { + const urlParsed = new URL(url3); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -52417,8 +52416,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url3) { + let queryString = new URL(url3).search; if (!queryString) { return {}; } @@ -52439,8 +52438,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url3, queryParts) { + const urlParsed = new URL(url3); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -52506,8 +52505,8 @@ var require_dist7 = __commonJS({ function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url3) { + const parsedUrl = new URL(url3); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -62445,7 +62444,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + var url2 = { parameterPath: "url", mapper: { serializedName: "url", @@ -64121,7 +64120,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64151,7 +64150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64178,7 +64177,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64208,7 +64207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; maxPageSize, include ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64236,7 +64235,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp3 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64265,7 +64264,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64292,7 +64291,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body, queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -64325,7 +64324,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp5, where ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64513,7 +64512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64539,7 +64538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64562,7 +64561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64591,7 +64590,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp6 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64632,7 +64631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64660,7 +64659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64693,7 +64692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp8 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64721,7 +64720,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp9 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64754,7 +64753,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp4, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -64788,7 +64787,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; where, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64814,7 +64813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64845,7 +64844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64875,7 +64874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64905,7 +64904,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64935,7 +64934,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64971,7 +64970,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, include1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65003,7 +65002,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; include1, delimiter ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65029,7 +65028,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65293,7 +65292,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65331,7 +65330,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65367,7 +65366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, blobDeleteType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65396,7 +65395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65418,7 +65417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65442,7 +65441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65476,7 +65475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65501,7 +65500,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65523,7 +65522,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65546,7 +65545,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65579,7 +65578,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65609,7 +65608,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65638,7 +65637,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65667,7 +65666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65697,7 +65696,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65726,7 +65725,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65759,7 +65758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65801,7 +65800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65849,7 +65848,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp15, copyId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65881,7 +65880,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp16 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65911,7 +65910,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65949,7 +65948,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp17 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -65989,7 +65988,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66018,7 +66017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -66152,7 +66151,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66201,7 +66200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66244,7 +66243,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66282,7 +66281,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66336,7 +66335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp20 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66373,7 +66372,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp20, prevsnapshot ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66403,7 +66402,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66436,7 +66435,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66466,7 +66465,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66547,7 +66546,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66593,7 +66592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66633,7 +66632,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66678,7 +66677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66798,7 +66797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66849,7 +66848,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66908,7 +66907,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66945,7 +66944,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66983,7 +66982,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: blocks, queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -67038,7 +67037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp25, listType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67056,9 +67055,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The parameter options */ - constructor(url2, options) { + constructor(url3, options) { var _a, _b; - if (url2 === void 0) { + if (url3 === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -67073,7 +67072,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; userAgentPrefix }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); super(optionsWithDefaults); - this.url = url2; + this.url = url3; this.version = options.version || "2024-11-04"; this.service = new ServiceImpl(this); this.container = new ContainerImpl(this); @@ -67098,9 +67097,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url3, pipeline) { + this.url = escapeURLPath(url3); + this.accountName = getAccountNameFromUrl(url3); this.pipeline = pipeline; this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); @@ -70358,16 +70357,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; + let url3; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -70379,7 +70378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -70388,7 +70387,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -70396,7 +70395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); @@ -71244,17 +71243,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var AppendBlobClient = class _AppendBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -71263,7 +71262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71272,7 +71271,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71280,7 +71279,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -71459,17 +71458,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var BlockBlobClient = class _BlockBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -71481,7 +71480,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71490,7 +71489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71498,7 +71497,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -72006,17 +72005,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var PageBlobClient = class _PageBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -72025,7 +72024,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -72034,7 +72033,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -72042,7 +72041,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -72913,13 +72912,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url3; let credential; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -72931,23 +72930,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url3; let credential; let tier2; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrTier; tier2 = tierOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; tier2 = credentialOrTier; options = tierOrOptions; @@ -72960,10 +72959,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); }); }); } @@ -73086,7 +73085,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -73095,8 +73094,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path15 = getURLPath(url2); + const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); + const path15 = getURLPath(url3); if (path15 && path15 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -73200,16 +73199,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -73217,7 +73216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -73226,7 +73225,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -73234,7 +73233,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url3, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } @@ -74683,7 +74682,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -74692,7 +74691,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(new AnonymousCredential(), options); } - super(url2, pipeline); + super(url3, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -76454,9 +76453,9 @@ var require_cacheHttpClient = __commonJS({ if (!baseUrl) { throw new Error("Cache Service Url not found, unable to restore cache."); } - const url = `${baseUrl}_apis/artifactcache/${resource}`; - core18.debug(`Resource Url: ${url}`); - return url; + const url2 = `${baseUrl}_apis/artifactcache/${resource}`; + core18.debug(`Resource Url: ${url2}`); + return url2; } function createAcceptHeader(type2, apiVersion) { return `${type2};api-version=${apiVersion}`; @@ -81550,18 +81549,18 @@ var require_util10 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.maskSecretUrls = exports2.maskSigUrl = void 0; var core_1 = require_core(); - function maskSigUrl(url) { - if (!url) + function maskSigUrl(url2) { + if (!url2) return; try { - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const signature = parsedUrl.searchParams.get("sig"); if (signature) { (0, core_1.setSecret)(signature); (0, core_1.setSecret)(encodeURIComponent(signature)); } } catch (error2) { - (0, core_1.debug)(`Failed to parse URL: ${url} ${error2 instanceof Error ? error2.message : String(error2)}`); + (0, core_1.debug)(`Failed to parse URL: ${url2} ${error2 instanceof Error ? error2.message : String(error2)}`); } } exports2.maskSigUrl = maskSigUrl; @@ -81647,14 +81646,14 @@ var require_cacheTwirpClient = __commonJS({ // JSON generated client. request(service, method, contentType, data) { return __awaiter4(this, void 0, void 0, function* () { - const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url}`); + const url2 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url2}`); const headers = { "Content-Type": contentType }; try { const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { - return this.httpClient.post(url, JSON.stringify(data), headers); + return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; } catch (error2) { @@ -82747,18 +82746,18 @@ var require_tool_cache = __commonJS({ var IS_WINDOWS = process.platform === "win32"; var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; - function downloadTool2(url, dest, auth, headers) { + function downloadTool2(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { dest = dest || path15.join(_getTempDirectory(), crypto.randomUUID()); yield io7.mkdirP(path15.dirname(dest)); - core18.debug(`Downloading ${url}`); + core18.debug(`Downloading ${url2}`); core18.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); return yield retryHelper.execute(() => __awaiter4(this, void 0, void 0, function* () { - return yield downloadToolAttempt(url, dest || "", auth, headers); + return yield downloadToolAttempt(url2, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { @@ -82770,7 +82769,7 @@ var require_tool_cache = __commonJS({ }); } exports2.downloadTool = downloadTool2; - function downloadToolAttempt(url, dest, auth, headers) { + function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { if (fs17.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); @@ -82785,10 +82784,10 @@ var require_tool_cache = __commonJS({ } headers.authorization = auth; } - const response = yield http.get(url, headers); + const response = yield http.get(url2, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core18.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core18.debug(`Failed to download from "${url2}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -83264,8 +83263,8 @@ var require_debug2 = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports2, module2) { - var url = require("url"); - var URL2 = url.URL; + var url2 = require("url"); + var URL2 = url2.URL; var http = require("http"); var https2 = require("https"); var Writable = require("stream").Writable; @@ -83517,7 +83516,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : ( + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( // When making a request to a proxy, […] // a client MUST send the target URI in absolute-form […]. this._options.path @@ -83585,7 +83584,7 @@ var require_follow_redirects = __commonJS({ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); var currentUrlParts = parseUrl(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost })); + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl = resolveUrl(location, currentUrl); debug3("redirecting to", redirectUrl.href); this._isRedirect = true; @@ -83663,7 +83662,7 @@ var require_follow_redirects = __commonJS({ if (useNativeURL) { parsed = new URL2(input); } else { - parsed = validateUrl(url.parse(input)); + parsed = validateUrl(url2.parse(input)); if (!isString(parsed.protocol)) { throw new InvalidUrlError({ input }); } @@ -83671,7 +83670,7 @@ var require_follow_redirects = __commonJS({ return parsed; } function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl(url.resolve(base, relative2)); + return useNativeURL ? new URL2(relative2, base) : parseUrl(url2.resolve(base, relative2)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -86166,14 +86165,14 @@ var require_artifact_twirp_client2 = __commonJS({ // JSON generated client. request(service, method, contentType, data) { return __awaiter4(this, void 0, void 0, function* () { - const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url}`); + const url2 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url2}`); const headers = { "Content-Type": contentType }; try { const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { - return this.httpClient.post(url, JSON.stringify(data), headers); + return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; } catch (error2) { @@ -111044,10 +111043,10 @@ var require_dist_node16 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, - url + url: url2 } : { url: method }, options); @@ -111064,13 +111063,13 @@ var require_dist_node16 = __commonJS({ mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map((preview) => preview.replace(/-preview/, "")); return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -111081,8 +111080,8 @@ var require_dist_node16 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/^\W+|\W+$/g, "").split(/,/); } - function extractUrlVariableNames(url) { - const matches = url.match(urlVariableRegex); + function extractUrlVariableNames(url2) { + const matches = url2.match(urlVariableRegex); if (!matches) { return []; } @@ -111214,14 +111213,14 @@ var require_dist_node16 = __commonJS({ } function parse(options) { let method = options.method.toUpperCase(); - let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); + let url2 = (options.url || "/").replace(/:([a-z]\w+)/g, "{$1}"); let headers = Object.assign({}, options.headers); let body; let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); - const urlVariableNames = extractUrlVariableNames(url); - url = parseUrl(url).expand(parameters); - if (!/^http/.test(url)) { - url = options.baseUrl + url; + const urlVariableNames = extractUrlVariableNames(url2); + url2 = parseUrl(url2).expand(parameters); + if (!/^http/.test(url2)) { + url2 = options.baseUrl + url2; } const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -111239,7 +111238,7 @@ var require_dist_node16 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -111259,7 +111258,7 @@ var require_dist_node16 = __commonJS({ } return Object.assign({ method, - url, + url: url2, headers }, typeof body !== "undefined" ? { body @@ -111701,8 +111700,8 @@ var require_url_state_machine = __commonJS({ function isSpecialScheme(scheme) { return specialSchemes[scheme] !== void 0; } - function isSpecial(url) { - return isSpecialScheme(url.scheme); + function isSpecial(url2) { + return isSpecialScheme(url2.scheme); } function defaultPort(scheme) { return specialSchemes[scheme]; @@ -112024,38 +112023,38 @@ var require_url_state_machine = __commonJS({ } return host; } - function trimControlChars(url) { - return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); + function trimControlChars(url2) { + return url2.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); } - function trimTabAndNewline(url) { - return url.replace(/\u0009|\u000A|\u000D/g, ""); + function trimTabAndNewline(url2) { + return url2.replace(/\u0009|\u000A|\u000D/g, ""); } - function shortenPath(url) { - const path15 = url.path; + function shortenPath(url2) { + const path15 = url2.path; if (path15.length === 0) { return; } - if (url.scheme === "file" && path15.length === 1 && isNormalizedWindowsDriveLetter(path15[0])) { + if (url2.scheme === "file" && path15.length === 1 && isNormalizedWindowsDriveLetter(path15[0])) { return; } path15.pop(); } - function includesCredentials(url) { - return url.username !== "" || url.password !== ""; + function includesCredentials(url2) { + return url2.username !== "" || url2.password !== ""; } - function cannotHaveAUsernamePasswordPort(url) { - return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; + function cannotHaveAUsernamePasswordPort(url2) { + return url2.host === null || url2.host === "" || url2.cannotBeABaseURL || url2.scheme === "file"; } function isNormalizedWindowsDriveLetter(string) { return /^[A-Za-z]:$/.test(string); } - function URLStateMachine(input, base, encodingOverride, url, stateOverride) { + function URLStateMachine(input, base, encodingOverride, url2, stateOverride) { this.pointer = 0; this.input = input; this.base = base || null; this.encodingOverride = encodingOverride || "utf-8"; this.stateOverride = stateOverride; - this.url = url; + this.url = url2; this.failure = false; this.parseError = false; if (!this.url) { @@ -112608,36 +112607,36 @@ var require_url_state_machine = __commonJS({ } return true; }; - function serializeURL(url, excludeFragment) { - let output = url.scheme + ":"; - if (url.host !== null) { + function serializeURL(url2, excludeFragment) { + let output = url2.scheme + ":"; + if (url2.host !== null) { output += "//"; - if (url.username !== "" || url.password !== "") { - output += url.username; - if (url.password !== "") { - output += ":" + url.password; + if (url2.username !== "" || url2.password !== "") { + output += url2.username; + if (url2.password !== "") { + output += ":" + url2.password; } output += "@"; } - output += serializeHost(url.host); - if (url.port !== null) { - output += ":" + url.port; + output += serializeHost(url2.host); + if (url2.port !== null) { + output += ":" + url2.port; } - } else if (url.host === null && url.scheme === "file") { + } else if (url2.host === null && url2.scheme === "file") { output += "//"; } - if (url.cannotBeABaseURL) { - output += url.path[0]; + if (url2.cannotBeABaseURL) { + output += url2.path[0]; } else { - for (const string of url.path) { + for (const string of url2.path) { output += "/" + string; } } - if (url.query !== null) { - output += "?" + url.query; + if (url2.query !== null) { + output += "?" + url2.query; } - if (!excludeFragment && url.fragment !== null) { - output += "#" + url.fragment; + if (!excludeFragment && url2.fragment !== null) { + output += "#" + url2.fragment; } return output; } @@ -112650,11 +112649,11 @@ var require_url_state_machine = __commonJS({ return result; } module2.exports.serializeURL = serializeURL; - module2.exports.serializeURLOrigin = function(url) { - switch (url.scheme) { + module2.exports.serializeURLOrigin = function(url2) { + switch (url2.scheme) { case "blob": try { - return module2.exports.serializeURLOrigin(module2.exports.parseURL(url.path[0])); + return module2.exports.serializeURLOrigin(module2.exports.parseURL(url2.path[0])); } catch (e) { return "null"; } @@ -112665,9 +112664,9 @@ var require_url_state_machine = __commonJS({ case "ws": case "wss": return serializeOrigin({ - scheme: url.scheme, - host: url.host, - port: url.port + scheme: url2.scheme, + host: url2.host, + port: url2.port }); case "file": return "file://"; @@ -112685,18 +112684,18 @@ var require_url_state_machine = __commonJS({ } return usm.url; }; - module2.exports.setTheUsername = function(url, username) { - url.username = ""; + module2.exports.setTheUsername = function(url2, username) { + url2.username = ""; const decoded = punycode.ucs2.decode(username); for (let i = 0; i < decoded.length; ++i) { - url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + url2.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); } }; - module2.exports.setThePassword = function(url, password) { - url.password = ""; + module2.exports.setThePassword = function(url2, password) { + url2.password = ""; const decoded = punycode.ucs2.decode(password); for (let i = 0; i < decoded.length; ++i) { - url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); + url2.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); } }; module2.exports.serializeHost = serializeHost; @@ -112720,7 +112719,7 @@ var require_URL_impl = __commonJS({ var usm = require_url_state_machine(); exports2.implementation = class URLImpl { constructor(constructorArgs) { - const url = constructorArgs[0]; + const url2 = constructorArgs[0]; const base = constructorArgs[1]; let parsedBase = null; if (base !== void 0) { @@ -112729,7 +112728,7 @@ var require_URL_impl = __commonJS({ throw new TypeError("Invalid base URL"); } } - const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase }); + const parsedURL = usm.basicURLParse(url2, { baseURL: parsedBase }); if (parsedURL === "failure") { throw new TypeError("Invalid URL"); } @@ -112773,14 +112772,14 @@ var require_URL_impl = __commonJS({ usm.setThePassword(this._url, v); } get host() { - const url = this._url; - if (url.host === null) { + const url2 = this._url; + if (url2.host === null) { return ""; } - if (url.port === null) { - return usm.serializeHost(url.host); + if (url2.port === null) { + return usm.serializeHost(url2.host); } - return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port); + return usm.serializeHost(url2.host) + ":" + usm.serializeInteger(url2.port); } set host(v) { if (this._url.cannotBeABaseURL) { @@ -112839,14 +112838,14 @@ var require_URL_impl = __commonJS({ return "?" + this._url.query; } set search(v) { - const url = this._url; + const url2 = this._url; if (v === "") { - url.query = null; + url2.query = null; return; } const input = v[0] === "?" ? v.substring(1) : v; - url.query = ""; - usm.basicURLParse(input, { url, stateOverride: "query" }); + url2.query = ""; + usm.basicURLParse(input, { url: url2, stateOverride: "query" }); } get hash() { if (this._url.fragment === null || this._url.fragment === "") { @@ -112878,7 +112877,7 @@ var require_URL = __commonJS({ var utils = require_utils12(); var Impl = require_URL_impl(); var impl = utils.implSymbol; - function URL2(url) { + function URL2(url2) { if (!this || this[impl] || !(this instanceof URL2)) { throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); } @@ -114060,13 +114059,13 @@ var require_lib4 = __commonJS({ const dest = new URL$1(destination).hostname; return orig === dest || orig[orig.length - dest.length - 1] === "." && orig.endsWith(dest); }; - function fetch(url, opts) { + function fetch(url2, opts) { if (!fetch.Promise) { throw new Error("native promise missing, set fetch.Promise to your favorite alternative"); } Body.Promise = fetch.Promise; return new fetch.Promise(function(resolve8, reject) { - const request = new Request(url, opts); + const request = new Request(url2, opts); const options = getNodeRequestOptions(request); const send = (options.protocol === "https:" ? https2 : http).request; const signal = request.signal; @@ -114326,7 +114325,7 @@ var require_dist_node18 = __commonJS({ } let headers = {}; let status; - let url; + let url2; const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch; return fetch(requestOptions.url, Object.assign( { @@ -114339,7 +114338,7 @@ var require_dist_node18 = __commonJS({ // see https://github.com/octokit/types.ts/pull/264 requestOptions.request )).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -114358,7 +114357,7 @@ var require_dist_node18 = __commonJS({ } throw new requestError.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -114369,7 +114368,7 @@ var require_dist_node18 = __commonJS({ if (status === 304) { throw new requestError.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -114381,7 +114380,7 @@ var require_dist_node18 = __commonJS({ const data = await getResponseData(response); const error2 = new requestError.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -114394,7 +114393,7 @@ var require_dist_node18 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -115743,10 +115742,10 @@ var require_dist_node22 = __commonJS({ for (const [scope, endpoints] of Object.entries(endpointsMap)) { for (const [methodName, endpoint] of Object.entries(endpoints)) { const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); + const [method, url2] = route.split(/ /); const endpointDefaults = Object.assign({ method, - url + url: url2 }, defaults); if (!newMethods[scope]) { newMethods[scope] = {}; @@ -115886,27 +115885,27 @@ var require_dist_node23 = __commonJS({ const requestMethod = typeof route === "function" ? route : octokit.request; const method = options.method; const headers = options.headers; - let url = options.url; + let url2 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url) return { + if (!url2) return { done: true }; try { const response = await requestMethod({ method, - url, + url: url2, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; + url2 = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1]; return { value: normalizedResponse }; } catch (error2) { if (error2.status !== 409) throw error2; - url = ""; + url2 = ""; return { value: { status: 200, @@ -118014,8 +118013,8 @@ var require_download_artifact = __commonJS({ var generated_1 = require_generated(); var util_1 = require_util11(); var errors_1 = require_errors3(); - var scrubQueryParameters = (url) => { - const parsed = new URL(url); + var scrubQueryParameters = (url2) => { + const parsed = new URL(url2); parsed.search = ""; return parsed.toString(); }; @@ -118033,12 +118032,12 @@ var require_download_artifact = __commonJS({ } }); } - function streamExtract(url, directory) { + function streamExtract(url2, directory) { return __awaiter4(this, void 0, void 0, function* () { let retryCount = 0; while (retryCount < 5) { try { - return yield streamExtractExternal(url, directory); + return yield streamExtractExternal(url2, directory); } catch (error2) { retryCount++; core18.debug(`Failed to download artifact after ${retryCount} retries due to ${error2.message}. Retrying in 5 seconds...`); @@ -118048,10 +118047,10 @@ var require_download_artifact = __commonJS({ throw new Error(`Artifact download failed after ${retryCount} retries.`); }); } - function streamExtractExternal(url, directory) { + function streamExtractExternal(url2, directory) { return __awaiter4(this, void 0, void 0, function* () { const client = new httpClient.HttpClient((0, user_agent_1.getUserAgentString)()); - const response = yield client.get(url); + const response = yield client.get(url2); if (response.message.statusCode !== 200) { throw new Error(`Unexpected HTTP response from blob storage: ${response.message.statusCode} ${response.message.statusMessage}`); } @@ -122511,32 +122510,6 @@ var require_glob4 = __commonJS({ } }); -// node_modules/file-url/index.js -var require_file_url = __commonJS({ - "node_modules/file-url/index.js"(exports2, module2) { - "use strict"; - var path15 = require("path"); - module2.exports = (filePath, options) => { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - options = { - resolve: true, - ...options - }; - let pathName = filePath; - if (options.resolve) { - pathName = path15.resolve(filePath); - } - pathName = pathName.replace(/\\/g, "/"); - if (pathName[0] !== "/") { - pathName = `/${pathName}`; - } - return encodeURI(`file://${pathName}`).replace(/[?#]/g, encodeURIComponent); - }; - } -}); - // node_modules/jsonschema/lib/helpers.js var require_helpers3 = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { @@ -129572,25 +129545,25 @@ function parseGitHubUrl(inputUrl) { if (!inputUrl.startsWith("http://") && !inputUrl.startsWith("https://")) { throw new ConfigurationError(`"${originalUrl}" is not a http or https URL`); } - let url; + let url2; try { - url = new URL(inputUrl); + url2 = new URL(inputUrl); } catch { throw new ConfigurationError(`"${originalUrl}" is not a valid URL`); } - if (url.hostname === "github.com" || url.hostname === "api.github.com") { + if (url2.hostname === "github.com" || url2.hostname === "api.github.com") { return GITHUB_DOTCOM_URL; } - if (url.pathname.indexOf("/api/v3") !== -1) { - url.pathname = url.pathname.substring(0, url.pathname.indexOf("/api/v3")); + if (url2.pathname.indexOf("/api/v3") !== -1) { + url2.pathname = url2.pathname.substring(0, url2.pathname.indexOf("/api/v3")); } - if (url.hostname.startsWith("api.")) { - url.hostname = url.hostname.substring(4); + if (url2.hostname.startsWith("api.")) { + url2.hostname = url2.hostname.substring(4); } - if (!url.pathname.endsWith("/")) { - url.pathname = `${url.pathname}/`; + if (!url2.pathname.endsWith("/")) { + url2.pathname = `${url2.pathname}/`; } - return url.toString(); + return url2.toString(); } var CODEQL_ACTION_WARNED_ABOUT_VERSION_ENV_VAR = "CODEQL_ACTION_WARNED_ABOUT_VERSION"; var hasBeenWarnedAboutVersion = false; @@ -131636,10 +131609,10 @@ function writeToolcacheMarkerFile(extractedPath, logger) { fs8.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } -function sanitizeUrlForStatusReport(url) { +function sanitizeUrlForStatusReport(url2) { return ["github/codeql-action", "dsp-testing/codeql-cli-nightlies"].some( - (repo) => url.startsWith(`https://github.com/${repo}/releases/download/`) - ) ? url : "sanitized-value"; + (repo) => url2.startsWith(`https://github.com/${repo}/releases/download/`) + ) ? url2 : "sanitized-value"; } // src/setup-codeql.ts @@ -131730,16 +131703,16 @@ function tryGetBundleVersionFromTagName(tagName, logger) { } return match[1]; } -function tryGetTagNameFromUrl(url, logger) { - const matches = [...url.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; +function tryGetTagNameFromUrl(url2, logger) { + const matches = [...url2.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; if (matches.length === 0) { - logger.debug(`Could not determine tag name for URL ${url}.`); + logger.debug(`Could not determine tag name for URL ${url2}.`); return void 0; } const match = matches[matches.length - 1]; if (match === null || match.length !== 2) { logger.debug( - `Could not determine tag name for URL ${url}. Matched ${JSON.stringify( + `Could not determine tag name for URL ${url2}. Matched ${JSON.stringify( match )}.` ); @@ -131815,13 +131788,13 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } let cliVersion2; let tagName; - let url; + let url2; if (forceShippedTools) { cliVersion2 = cliVersion; tagName = bundleVersion; } else if (toolsInput !== void 0) { tagName = tryGetTagNameFromUrl(toolsInput, logger); - url = toolsInput; + url2 = toolsInput; if (tagName) { const bundleVersion3 = tryGetBundleVersionFromTagName(tagName, logger); if (bundleVersion3 && semver7.valid(bundleVersion3)) { @@ -131833,9 +131806,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian tagName = defaultCliVersion.tagName; } const bundleVersion2 = tagName && tryGetBundleVersionFromTagName(tagName, logger); - const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url ?? "unknown"; + const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url2 ?? "unknown"; logger.debug( - `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url ?? "unspecified"}.` + `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url2 ?? "unspecified"}.` ); let codeqlFolder; if (cliVersion2) { @@ -131917,32 +131890,32 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } } let compressionMethod; - if (!url) { + if (!url2) { compressionMethod = cliVersion2 !== void 0 && await useZstdBundle(cliVersion2, tarSupportsZstd) ? "zstd" : "gzip"; - url = await getCodeQLBundleDownloadURL( + url2 = await getCodeQLBundleDownloadURL( tagName, apiDetails, compressionMethod, logger ); } else { - const method = inferCompressionMethod(url); + const method = inferCompressionMethod(url2); if (method === void 0) { throw new ConfigurationError( - `Could not infer compression method from URL ${url}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` + `Could not infer compression method from URL ${url2}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` ); } compressionMethod = method; } if (cliVersion2) { - logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url} .`); + logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url2} .`); } else { - logger.info(`Using CodeQL CLI sourced from ${url} .`); + logger.info(`Using CodeQL CLI sourced from ${url2} .`); } return { bundleVersion: tagName && tryGetBundleVersionFromTagName(tagName, logger), cliVersion: cliVersion2, - codeqlURL: url, + codeqlURL: url2, compressionMethod, sourceType: "download", toolsVersion: cliVersion2 ?? humanReadableVersion @@ -133161,9 +133134,9 @@ async function sendStatusReport(statusReport) { // src/upload-lib.ts var fs14 = __toESM(require("fs")); var path13 = __toESM(require("path")); +var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core14 = __toESM(require_core()); -var import_file_url = __toESM(require_file_url()); var jsonschema = __toESM(require_lib5()); // src/fingerprints.ts @@ -134739,7 +134712,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features const sarifPayload = JSON.stringify(sarif); logger.debug(`Compressing serialized SARIF`); const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64"); - const checkoutURI = (0, import_file_url.default)(checkoutPath); + const checkoutURI = url.pathToFileURL(checkoutPath).href; const payload = buildPayload( await getCommitOid(checkoutPath), await getRef(), diff --git a/lib/init-action.js b/lib/init-action.js index b0e4427f4..a5d822e2c 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index f5d5d6ce8..a9c1568a8 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index 8fdf4c705..ea13dc356 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index 27b534a82..3d8c3109f 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -54817,7 +54817,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 5d4c3aeb0..4e00b0d09 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -283,8 +283,8 @@ var require_proxy = __commonJS({ return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } var DecodedURL = class extends URL { - constructor(url, base) { - super(url, base); + constructor(url2, base) { + super(url2, base); this._decodedUsername = decodeURIComponent(super.username); this._decodedPassword = decodeURIComponent(super.password); } @@ -957,65 +957,65 @@ var require_util = __commonJS({ function isBlobLike(object) { return Blob2 && object instanceof Blob2 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); } - function buildURL(url, queryParams) { - if (url.includes("?") || url.includes("#")) { + function buildURL(url2, queryParams) { + if (url2.includes("?") || url2.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify(queryParams); if (stringified) { - url += "?" + stringified; + url2 += "?" + stringified; } - return url; + return url2; } - function parseURL(url) { - if (typeof url === "string") { - url = new URL(url); - if (!/^https?:/.test(url.origin || url.protocol)) { + function parseURL(url2) { + if (typeof url2 === "string") { + url2 = new URL(url2); + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url; + return url2; } - if (!url || typeof url !== "object") { + if (!url2 || typeof url2 !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (!/^https?:/.test(url.origin || url.protocol)) { + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { + if (!(url2 instanceof URL)) { + if (url2.port != null && url2.port !== "" && !Number.isFinite(parseInt(url2.port))) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - if (url.path != null && typeof url.path !== "string") { + if (url2.path != null && typeof url2.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } - if (url.pathname != null && typeof url.pathname !== "string") { + if (url2.pathname != null && typeof url2.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - if (url.hostname != null && typeof url.hostname !== "string") { + if (url2.hostname != null && typeof url2.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } - if (url.origin != null && typeof url.origin !== "string") { + if (url2.origin != null && typeof url2.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path11 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; + let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; + let path11 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } if (path11 && !path11.startsWith("/")) { path11 = `/${path11}`; } - url = new URL(origin + path11); + url2 = new URL(origin + path11); } - return url; + return url2; } - function parseOrigin(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) { + function parseOrigin(url2) { + url2 = parseURL(url2); + if (url2.pathname !== "/" || url2.search || url2.hash) { throw new InvalidArgumentError("invalid url"); } - return url; + return url2; } function getHostname(host) { if (host[0] === "[") { @@ -3666,8 +3666,8 @@ var require_util2 = __commonJS({ return request.urlList[request.urlList.length - 1]; } function requestBadPort(request) { - const url = requestCurrentURL(request); - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + const url2 = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url2) && badPortsSet.has(url2.port)) { return "blocked"; } return "allowed"; @@ -3881,30 +3881,30 @@ var require_util2 = __commonJS({ return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } - function stripURLForReferrer(url, originOnly) { - assert(url instanceof URL); - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { + function stripURLForReferrer(url2, originOnly) { + assert(url2 instanceof URL); + if (url2.protocol === "file:" || url2.protocol === "about:" || url2.protocol === "blank:") { return "no-referrer"; } - url.username = ""; - url.password = ""; - url.hash = ""; + url2.username = ""; + url2.password = ""; + url2.hash = ""; if (originOnly) { - url.pathname = ""; - url.search = ""; + url2.pathname = ""; + url2.search = ""; } - return url; + return url2; } - function isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) { + function isURLPotentiallyTrustworthy(url2) { + if (!(url2 instanceof URL)) { return false; } - if (url.href === "about:blank" || url.href === "about:srcdoc") { + if (url2.href === "about:blank" || url2.href === "about:srcdoc") { return true; } - if (url.protocol === "data:") return true; - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url.origin); + if (url2.protocol === "data:") return true; + if (url2.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url2.origin); function isOriginPotentiallyTrustworthy(origin) { if (origin == null || origin === "null") return false; const originAsURL = new URL(origin); @@ -4174,20 +4174,20 @@ var require_util2 = __commonJS({ byteLength += chunk.length; } } - function urlIsLocal(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsLocal(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } - function urlHasHttpsScheme(url) { - if (typeof url === "string") { - return url.startsWith("https:"); + function urlHasHttpsScheme(url2) { + if (typeof url2 === "string") { + return url2.startsWith("https:"); } - return url.protocol === "https:"; + return url2.protocol === "https:"; } - function urlIsHttpHttpsScheme(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsHttpHttpsScheme(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "http:" || protocol === "https:"; } var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); @@ -4672,12 +4672,12 @@ var require_dataURL = __commonJS({ } return { mimeType: mimeTypeRecord, body }; } - function URLSerializer(url, excludeFragment = false) { + function URLSerializer(url2, excludeFragment = false) { if (!excludeFragment) { - return url.href; + return url2.href; } - const href = url.href; - const hashLength = url.hash.length; + const href = url2.href; + const hashLength = url2.hash.length; return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } function collectASequenceOfCodePoints(condition, input, position) { @@ -6984,7 +6984,7 @@ var require_client = __commonJS({ * @param {string|URL} url * @param {import('../types/client').Client.Options} options */ - constructor(url, { + constructor(url2, { interceptors, maxHeaderSize, headersTimeout, @@ -7090,7 +7090,7 @@ var require_client = __commonJS({ }); } this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; - this[kUrl] = util.parseOrigin(url); + this[kUrl] = util.parseOrigin(url2); this[kConnector] = connect2; this[kSocket] = null; this[kPipelining] = pipelining != null ? pipelining : 1; @@ -10556,10 +10556,10 @@ var require_mock_utils = __commonJS({ }; } function checkNetConnect(netConnect, origin) { - const url = new URL(origin); + const url2 = new URL(origin); if (netConnect === true) { return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url2.host))) { return true; } return false; @@ -12001,16 +12001,16 @@ var require_response = __commonJS({ return responseObject; } // Creates a redirect Response that redirects to url with status status. - static redirect(url, status = 302) { + static redirect(url2, status = 302) { const relevantRealm = { settingsObject: {} }; webidl.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); status = webidl.converters["unsigned short"](status); let parsedURL; try { - parsedURL = new URL(url, getGlobalOrigin()); + parsedURL = new URL(url2, getGlobalOrigin()); } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url), { + throw Object.assign(new TypeError("Failed to parse URL from " + url2), { cause: err }); } @@ -12054,11 +12054,11 @@ var require_response = __commonJS({ get url() { webidl.brandCheck(this, _Response); const urlList = this[kState].urlList; - const url = urlList[urlList.length - 1] ?? null; - if (url === null) { + const url2 = urlList[urlList.length - 1] ?? null; + if (url2 === null) { return ""; } - return URLSerializer(url, true); + return URLSerializer(url2, true); } // Returns whether response was obtained through a redirect. get redirected() { @@ -13850,12 +13850,12 @@ var require_fetch = __commonJS({ } return response; async function dispatch({ body }) { - const url = requestCurrentURL(request); + const url2 = requestCurrentURL(request); const agent = fetchParams.controller.dispatcher; return new Promise((resolve6, reject) => agent.dispatch( { - path: url.pathname + url.search, - origin: url.origin, + path: url2.pathname + url2.search, + origin: url2.origin, method: request.method, body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, @@ -16335,9 +16335,9 @@ var require_connection = __commonJS({ crypto = require("crypto"); } catch { } - function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { - const requestURL = url; - requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { + const requestURL = url2; + requestURL.protocol = url2.protocol === "ws:" ? "http:" : "https:"; const request = makeRequest({ urlList: [requestURL], serviceWorkers: "none", @@ -16788,7 +16788,7 @@ var require_websocket = __commonJS({ * @param {string} url * @param {string|string[]} protocols */ - constructor(url, protocols = []) { + constructor(url2, protocols = []) { super(); webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); if (!experimentalWarned) { @@ -16798,12 +16798,12 @@ var require_websocket = __commonJS({ }); } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); protocols = options.protocols; const baseURL = getGlobalOrigin(); let urlRecord; try { - urlRecord = new URL(url, baseURL); + urlRecord = new URL(url2, baseURL); } catch (e) { throw new DOMException2(e, "SyntaxError"); } @@ -17198,12 +17198,12 @@ var require_undici = __commonJS({ module2.exports.buildConnector = buildConnector; module2.exports.errors = errors; function makeDispatcher(fn) { - return (url, opts, handler) => { + return (url2, opts, handler) => { if (typeof opts === "function") { handler = opts; opts = null; } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { + if (!url2 || typeof url2 !== "string" && typeof url2 !== "object" && !(url2 instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { @@ -17217,12 +17217,12 @@ var require_undici = __commonJS({ if (!opts.path.startsWith("/")) { path11 = `/${path11}`; } - url = new URL(util.parseOrigin(url).origin + path11); + url2 = new URL(util.parseOrigin(url2).origin + path11); } else { if (!opts) { - opts = typeof url === "object" ? url : {}; + opts = typeof url2 === "object" ? url2 : {}; } - url = util.parseURL(url); + url2 = util.parseURL(url2); } const { agent, dispatcher = getGlobalDispatcher() } = opts; if (agent) { @@ -17230,8 +17230,8 @@ var require_undici = __commonJS({ } return fn.call(dispatcher, { ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, + origin: url2.origin, + path: url2.search ? `${url2.pathname}${url2.search}` : url2.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler); }; @@ -19816,32 +19816,6 @@ Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); } }); -// node_modules/file-url/index.js -var require_file_url = __commonJS({ - "node_modules/file-url/index.js"(exports2, module2) { - "use strict"; - var path11 = require("path"); - module2.exports = (filePath, options) => { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - options = { - resolve: true, - ...options - }; - let pathName = filePath; - if (options.resolve) { - pathName = path11.resolve(filePath); - } - pathName = pathName.replace(/\\/g, "/"); - if (pathName[0] !== "/") { - pathName = `/${pathName}`; - } - return encodeURI(`file://${pathName}`).replace(/[?#]/g, encodeURIComponent); - }; - } -}); - // node_modules/jsonschema/lib/helpers.js var require_helpers = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { @@ -21280,8 +21254,8 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url, opts) => __awaiter4(this, void 0, void 0, function* () { - return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + const proxyFetch = (url2, opts) => __awaiter4(this, void 0, void 0, function* () { + return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; } @@ -21538,8 +21512,8 @@ var require_dist_node2 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -21557,13 +21531,13 @@ var require_dist_node2 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -21574,8 +21548,8 @@ var require_dist_node2 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -21750,7 +21724,7 @@ var require_dist_node2 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -21761,7 +21735,7 @@ var require_dist_node2 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -21778,7 +21752,7 @@ var require_dist_node2 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -22037,7 +22011,7 @@ var require_dist_node5 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -22057,7 +22031,7 @@ var require_dist_node5 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -22078,7 +22052,7 @@ var require_dist_node5 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -22089,7 +22063,7 @@ var require_dist_node5 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -22101,7 +22075,7 @@ var require_dist_node5 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -22114,7 +22088,7 @@ var require_dist_node5 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -22278,8 +22252,8 @@ var require_dist_node6 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -22297,13 +22271,13 @@ var require_dist_node6 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -22314,8 +22288,8 @@ var require_dist_node6 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -22490,7 +22464,7 @@ var require_dist_node6 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -22501,7 +22475,7 @@ var require_dist_node6 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -22518,7 +22492,7 @@ var require_dist_node6 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -22685,7 +22659,7 @@ var require_dist_node8 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -22705,7 +22679,7 @@ var require_dist_node8 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -22726,7 +22700,7 @@ var require_dist_node8 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -22737,7 +22711,7 @@ var require_dist_node8 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -22749,7 +22723,7 @@ var require_dist_node8 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -22762,7 +22736,7 @@ var require_dist_node8 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -25230,11 +25204,11 @@ var require_dist_node12 = __commonJS({ for (const [scope, endpoints] of Object.entries(endpoints_default)) { for (const [methodName, endpoint] of Object.entries(endpoints)) { const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); + const [method, url2] = route.split(/ /); const endpointDefaults = Object.assign( { method, - url + url: url2 }, defaults ); @@ -25428,23 +25402,23 @@ var require_dist_node13 = __commonJS({ const requestMethod = typeof route === "function" ? route : octokit.request; const method = options.method; const headers = options.headers; - let url = options.url; + let url2 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url) + if (!url2) return { done: true }; try { - const response = await requestMethod({ method, url, headers }); + const response = await requestMethod({ method, url: url2, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match( + url2 = ((normalizedResponse.headers.link || "").match( /<([^<>]+)>;\s*rel="next"/ ) || [])[1]; return { value: normalizedResponse }; } catch (error2) { if (error2.status !== 409) throw error2; - url = ""; + url2 = ""; return { value: { status: 200, @@ -37612,7 +37586,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", @@ -42423,16 +42396,16 @@ var require_sanitizer = __commonJS({ if (typeof value !== "string" || value === null || value === "") { return value; } - const url = new URL(value); - if (!url.search) { + const url2 = new URL(value); + if (!url2.search) { return value; } - for (const [key] of url.searchParams) { + for (const [key] of url2.searchParams) { if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); + url2.searchParams.set(key, RedactedString); } } - return url.toString(); + return url2.toString(); } sanitizeHeaders(obj) { const sanitized = {}; @@ -42521,8 +42494,8 @@ var require_redirectPolicy = __commonJS({ const { request, status, headers } = response; const locationHeader = headers.get("location"); if (locationHeader && (status === 300 || status === 301 && allowedRedirect.includes(request.method) || status === 302 && allowedRedirect.includes(request.method) || status === 303 && request.method === "POST" || status === 307) && currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); + const url2 = new URL(locationHeader, request.url); + request.url = url2.toString(); if (status === 303) { request.method = "GET"; request.headers.delete("Content-Length"); @@ -44726,9 +44699,9 @@ var require_helpers3 = __commonJS({ } } exports2.json = json2; - function req(url, opts = {}) { - const href = typeof url === "string" ? url : url.href; - const req2 = (href.startsWith("https:") ? https2 : http).request(url, opts); + function req(url2, opts = {}) { + const href = typeof url2 === "string" ? url2 : url2.href; + const req2 = (href.startsWith("https:") ? https2 : http).request(url2, opts); const promise = new Promise((resolve6, reject) => { req2.once("response", resolve6).once("error", reject).end(); }); @@ -45208,11 +45181,11 @@ var require_dist4 = __commonJS({ const protocol = opts.secureEndpoint ? "https:" : "http:"; const hostname = req.getHeader("host") || "localhost"; const base = `${protocol}//${hostname}`; - const url = new url_1.URL(req.path, base); + const url2 = new url_1.URL(req.path, base); if (opts.port !== 80) { - url.port = String(opts.port); + url2.port = String(opts.port); } - req.path = String(url); + req.path = String(url2); const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; if (proxy.username || proxy.password) { const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; @@ -45383,8 +45356,8 @@ var require_proxyPolicy = __commonJS({ if (request.agent) { return; } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (request.tlsSettings) { log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); } @@ -46031,17 +46004,17 @@ var require_nodeHttpClient = __commonJS({ } makeRequest(request, abortController, body) { var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (isInsecure && !request.allowInsecureConnection) { throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); } const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); const options = { agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, + hostname: url2.hostname, + path: `${url2.pathname}${url2.search}`, + port: url2.port, method: request.method, headers: request.headers.toJSON({ preserveCase: true }) }; @@ -49420,14 +49393,14 @@ var require_urlHelpers = __commonJS({ } return result; } - function isAbsoluteUrl(url) { - return url.includes("://"); + function isAbsoluteUrl(url2) { + return url2.includes("://"); } - function appendPath(url, pathToAppend) { + function appendPath(url2, pathToAppend) { if (!pathToAppend) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); let newPath = parsedUrl.pathname; if (!newPath.endsWith("/")) { newPath = `${newPath}/`; @@ -49518,11 +49491,11 @@ var require_urlHelpers = __commonJS({ } return result; } - function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { + function appendQueryParams(url2, queryParams, sequenceParams, noOverwrite = false) { if (queryParams.size === 0) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const combinedParams = simpleParseQueryParams(parsedUrl.search); for (const [name, value] of queryParams) { const existingValue = combinedParams.get(name); @@ -49633,9 +49606,9 @@ var require_serviceClient = __commonJS({ if (!endpoint) { throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); } - const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const url2 = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); const request = (0, core_rest_pipeline_1.createPipelineRequest)({ - url + url: url2 }); request.method = operationSpec.httpMethod; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); @@ -53586,8 +53559,8 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + function escapeURLPath(url3) { + const urlParsed = new URL(url3); let path11 = urlParsed.pathname; path11 = path11 || "/"; path11 = escape(path11); @@ -53674,15 +53647,15 @@ var require_dist7 = __commonJS({ function escape(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } - function appendToURLPath(url2, name) { - const urlParsed = new URL(url2); + function appendToURLPath(url3, name) { + const urlParsed = new URL(url3); let path11 = urlParsed.pathname; path11 = path11 ? path11.endsWith("/") ? `${path11}${name}` : `${path11}/${name}` : name; urlParsed.pathname = path11; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url3, name, value) { + const urlParsed = new URL(url3); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -53701,34 +53674,34 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { + function getURLParameter(url3, name) { var _a; - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url3, host) { + const urlParsed = new URL(url3); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } - function getURLPathAndQuery(url2) { - const urlParsed = new URL(url2); + function getURLPathAndQuery(url3) { + const urlParsed = new URL(url3); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -53740,8 +53713,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url3) { + let queryString = new URL(url3).search; if (!queryString) { return {}; } @@ -53762,8 +53735,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url3, queryParts) { + const urlParsed = new URL(url3); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -53829,8 +53802,8 @@ var require_dist7 = __commonJS({ function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url3) { + const parsedUrl = new URL(url3); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -63768,7 +63741,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + var url2 = { parameterPath: "url", mapper: { serializedName: "url", @@ -65444,7 +65417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -65474,7 +65447,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65501,7 +65474,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65531,7 +65504,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; maxPageSize, include ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65559,7 +65532,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp3 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -65588,7 +65561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65615,7 +65588,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body, queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -65648,7 +65621,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp5, where ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65836,7 +65809,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65862,7 +65835,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65885,7 +65858,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65914,7 +65887,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp6 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65955,7 +65928,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65983,7 +65956,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -66016,7 +65989,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp8 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66044,7 +66017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp9 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66077,7 +66050,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp4, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -66111,7 +66084,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; where, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66137,7 +66110,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66168,7 +66141,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66198,7 +66171,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66228,7 +66201,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66258,7 +66231,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66294,7 +66267,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, include1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66326,7 +66299,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; include1, delimiter ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66352,7 +66325,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66616,7 +66589,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66654,7 +66627,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66690,7 +66663,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, blobDeleteType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66719,7 +66692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66741,7 +66714,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66765,7 +66738,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66799,7 +66772,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66824,7 +66797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66846,7 +66819,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66869,7 +66842,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66902,7 +66875,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66932,7 +66905,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66961,7 +66934,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66990,7 +66963,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67020,7 +66993,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67049,7 +67022,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67082,7 +67055,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67124,7 +67097,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67172,7 +67145,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp15, copyId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67204,7 +67177,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp16 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67234,7 +67207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67272,7 +67245,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp17 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -67312,7 +67285,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67341,7 +67314,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -67475,7 +67448,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67524,7 +67497,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67567,7 +67540,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67605,7 +67578,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67659,7 +67632,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp20 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67696,7 +67669,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp20, prevsnapshot ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67726,7 +67699,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67759,7 +67732,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67789,7 +67762,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67870,7 +67843,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67916,7 +67889,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67956,7 +67929,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68001,7 +67974,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68121,7 +68094,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68172,7 +68145,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68231,7 +68204,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68268,7 +68241,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68306,7 +68279,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: blocks, queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -68361,7 +68334,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp25, listType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -68379,9 +68352,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The parameter options */ - constructor(url2, options) { + constructor(url3, options) { var _a, _b; - if (url2 === void 0) { + if (url3 === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -68396,7 +68369,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; userAgentPrefix }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); super(optionsWithDefaults); - this.url = url2; + this.url = url3; this.version = options.version || "2024-11-04"; this.service = new ServiceImpl(this); this.container = new ContainerImpl(this); @@ -68421,9 +68394,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url3, pipeline) { + this.url = escapeURLPath(url3); + this.accountName = getAccountNameFromUrl(url3); this.pipeline = pipeline; this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); @@ -71681,16 +71654,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; + let url3; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -71702,7 +71675,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71711,7 +71684,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71719,7 +71692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); @@ -72567,17 +72540,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var AppendBlobClient = class _AppendBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -72586,7 +72559,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -72595,7 +72568,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -72603,7 +72576,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -72782,17 +72755,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var BlockBlobClient = class _BlockBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -72804,7 +72777,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -72813,7 +72786,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -72821,7 +72794,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -73329,17 +73302,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var PageBlobClient = class _PageBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -73348,7 +73321,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -73357,7 +73330,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -73365,7 +73338,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -74236,13 +74209,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url3; let credential; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -74254,23 +74227,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url3; let credential; let tier2; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrTier; tier2 = tierOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; tier2 = credentialOrTier; options = tierOrOptions; @@ -74283,10 +74256,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); }); }); } @@ -74409,7 +74382,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -74418,8 +74391,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path11 = getURLPath(url2); + const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); + const path11 = getURLPath(url3); if (path11 && path11 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -74523,16 +74496,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -74540,7 +74513,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -74549,7 +74522,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -74557,7 +74530,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url3, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } @@ -76006,7 +75979,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -76015,7 +75988,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(new AnonymousCredential(), options); } - super(url2, pipeline); + super(url3, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -77777,9 +77750,9 @@ var require_cacheHttpClient = __commonJS({ if (!baseUrl) { throw new Error("Cache Service Url not found, unable to restore cache."); } - const url = `${baseUrl}_apis/artifactcache/${resource}`; - core12.debug(`Resource Url: ${url}`); - return url; + const url2 = `${baseUrl}_apis/artifactcache/${resource}`; + core12.debug(`Resource Url: ${url2}`); + return url2; } function createAcceptHeader(type2, apiVersion) { return `${type2};api-version=${apiVersion}`; @@ -82873,18 +82846,18 @@ var require_util10 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.maskSecretUrls = exports2.maskSigUrl = void 0; var core_1 = require_core(); - function maskSigUrl(url) { - if (!url) + function maskSigUrl(url2) { + if (!url2) return; try { - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const signature = parsedUrl.searchParams.get("sig"); if (signature) { (0, core_1.setSecret)(signature); (0, core_1.setSecret)(encodeURIComponent(signature)); } } catch (error2) { - (0, core_1.debug)(`Failed to parse URL: ${url} ${error2 instanceof Error ? error2.message : String(error2)}`); + (0, core_1.debug)(`Failed to parse URL: ${url2} ${error2 instanceof Error ? error2.message : String(error2)}`); } } exports2.maskSigUrl = maskSigUrl; @@ -82970,14 +82943,14 @@ var require_cacheTwirpClient = __commonJS({ // JSON generated client. request(service, method, contentType, data) { return __awaiter4(this, void 0, void 0, function* () { - const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url}`); + const url2 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url2}`); const headers = { "Content-Type": contentType }; try { const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { - return this.httpClient.post(url, JSON.stringify(data), headers); + return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; } catch (error2) { @@ -84070,18 +84043,18 @@ var require_tool_cache = __commonJS({ var IS_WINDOWS = process.platform === "win32"; var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; - function downloadTool2(url, dest, auth, headers) { + function downloadTool2(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { dest = dest || path11.join(_getTempDirectory(), crypto.randomUUID()); yield io6.mkdirP(path11.dirname(dest)); - core12.debug(`Downloading ${url}`); + core12.debug(`Downloading ${url2}`); core12.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); return yield retryHelper.execute(() => __awaiter4(this, void 0, void 0, function* () { - return yield downloadToolAttempt(url, dest || "", auth, headers); + return yield downloadToolAttempt(url2, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { @@ -84093,7 +84066,7 @@ var require_tool_cache = __commonJS({ }); } exports2.downloadTool = downloadTool2; - function downloadToolAttempt(url, dest, auth, headers) { + function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { if (fs11.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); @@ -84108,10 +84081,10 @@ var require_tool_cache = __commonJS({ } headers.authorization = auth; } - const response = yield http.get(url, headers); + const response = yield http.get(url2, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core12.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core12.debug(`Failed to download from "${url2}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -84587,8 +84560,8 @@ var require_debug2 = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports2, module2) { - var url = require("url"); - var URL2 = url.URL; + var url2 = require("url"); + var URL2 = url2.URL; var http = require("http"); var https2 = require("https"); var Writable = require("stream").Writable; @@ -84840,7 +84813,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : ( + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( // When making a request to a proxy, […] // a client MUST send the target URI in absolute-form […]. this._options.path @@ -84908,7 +84881,7 @@ var require_follow_redirects = __commonJS({ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); var currentUrlParts = parseUrl(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost })); + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl = resolveUrl(location, currentUrl); debug2("redirecting to", redirectUrl.href); this._isRedirect = true; @@ -84986,7 +84959,7 @@ var require_follow_redirects = __commonJS({ if (useNativeURL) { parsed = new URL2(input); } else { - parsed = validateUrl(url.parse(input)); + parsed = validateUrl(url2.parse(input)); if (!isString(parsed.protocol)) { throw new InvalidUrlError({ input }); } @@ -84994,7 +84967,7 @@ var require_follow_redirects = __commonJS({ return parsed; } function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl(url.resolve(base, relative2)); + return useNativeURL ? new URL2(relative2, base) : parseUrl(url2.resolve(base, relative2)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -88001,9 +87974,9 @@ __export(upload_lib_exports, { module.exports = __toCommonJS(upload_lib_exports); var fs10 = __toESM(require("fs")); var path10 = __toESM(require("path")); +var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core11 = __toESM(require_core()); -var import_file_url = __toESM(require_file_url()); var jsonschema = __toESM(require_lib2()); // src/actions-util.ts @@ -90701,25 +90674,25 @@ function parseGitHubUrl(inputUrl) { if (!inputUrl.startsWith("http://") && !inputUrl.startsWith("https://")) { throw new ConfigurationError(`"${originalUrl}" is not a http or https URL`); } - let url; + let url2; try { - url = new URL(inputUrl); + url2 = new URL(inputUrl); } catch { throw new ConfigurationError(`"${originalUrl}" is not a valid URL`); } - if (url.hostname === "github.com" || url.hostname === "api.github.com") { + if (url2.hostname === "github.com" || url2.hostname === "api.github.com") { return GITHUB_DOTCOM_URL; } - if (url.pathname.indexOf("/api/v3") !== -1) { - url.pathname = url.pathname.substring(0, url.pathname.indexOf("/api/v3")); + if (url2.pathname.indexOf("/api/v3") !== -1) { + url2.pathname = url2.pathname.substring(0, url2.pathname.indexOf("/api/v3")); } - if (url.hostname.startsWith("api.")) { - url.hostname = url.hostname.substring(4); + if (url2.hostname.startsWith("api.")) { + url2.hostname = url2.hostname.substring(4); } - if (!url.pathname.endsWith("/")) { - url.pathname = `${url.pathname}/`; + if (!url2.pathname.endsWith("/")) { + url2.pathname = `${url2.pathname}/`; } - return url.toString(); + return url2.toString(); } var ExhaustivityCheckingError = class extends Error { constructor(expectedExhaustiveValue) { @@ -92300,10 +92273,10 @@ function writeToolcacheMarkerFile(extractedPath, logger) { fs6.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } -function sanitizeUrlForStatusReport(url) { +function sanitizeUrlForStatusReport(url2) { return ["github/codeql-action", "dsp-testing/codeql-cli-nightlies"].some( - (repo) => url.startsWith(`https://github.com/${repo}/releases/download/`) - ) ? url : "sanitized-value"; + (repo) => url2.startsWith(`https://github.com/${repo}/releases/download/`) + ) ? url2 : "sanitized-value"; } // src/setup-codeql.ts @@ -92394,16 +92367,16 @@ function tryGetBundleVersionFromTagName(tagName, logger) { } return match[1]; } -function tryGetTagNameFromUrl(url, logger) { - const matches = [...url.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; +function tryGetTagNameFromUrl(url2, logger) { + const matches = [...url2.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; if (matches.length === 0) { - logger.debug(`Could not determine tag name for URL ${url}.`); + logger.debug(`Could not determine tag name for URL ${url2}.`); return void 0; } const match = matches[matches.length - 1]; if (match === null || match.length !== 2) { logger.debug( - `Could not determine tag name for URL ${url}. Matched ${JSON.stringify( + `Could not determine tag name for URL ${url2}. Matched ${JSON.stringify( match )}.` ); @@ -92479,13 +92452,13 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } let cliVersion2; let tagName; - let url; + let url2; if (forceShippedTools) { cliVersion2 = cliVersion; tagName = bundleVersion; } else if (toolsInput !== void 0) { tagName = tryGetTagNameFromUrl(toolsInput, logger); - url = toolsInput; + url2 = toolsInput; if (tagName) { const bundleVersion3 = tryGetBundleVersionFromTagName(tagName, logger); if (bundleVersion3 && semver7.valid(bundleVersion3)) { @@ -92497,9 +92470,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian tagName = defaultCliVersion.tagName; } const bundleVersion2 = tagName && tryGetBundleVersionFromTagName(tagName, logger); - const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url ?? "unknown"; + const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url2 ?? "unknown"; logger.debug( - `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url ?? "unspecified"}.` + `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url2 ?? "unspecified"}.` ); let codeqlFolder; if (cliVersion2) { @@ -92581,32 +92554,32 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } } let compressionMethod; - if (!url) { + if (!url2) { compressionMethod = cliVersion2 !== void 0 && await useZstdBundle(cliVersion2, tarSupportsZstd) ? "zstd" : "gzip"; - url = await getCodeQLBundleDownloadURL( + url2 = await getCodeQLBundleDownloadURL( tagName, apiDetails, compressionMethod, logger ); } else { - const method = inferCompressionMethod(url); + const method = inferCompressionMethod(url2); if (method === void 0) { throw new ConfigurationError( - `Could not infer compression method from URL ${url}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` + `Could not infer compression method from URL ${url2}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` ); } compressionMethod = method; } if (cliVersion2) { - logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url} .`); + logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url2} .`); } else { - logger.info(`Using CodeQL CLI sourced from ${url} .`); + logger.info(`Using CodeQL CLI sourced from ${url2} .`); } return { bundleVersion: tagName && tryGetBundleVersionFromTagName(tagName, logger), cliVersion: cliVersion2, - codeqlURL: url, + codeqlURL: url2, compressionMethod, sourceType: "download", toolsVersion: cliVersion2 ?? humanReadableVersion @@ -94950,7 +94923,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features const sarifPayload = JSON.stringify(sarif); logger.debug(`Compressing serialized SARIF`); const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64"); - const checkoutURI = (0, import_file_url.default)(checkoutPath); + const checkoutURI = url.pathToFileURL(checkoutPath).href; const payload = buildPayload( await getCommitOid(checkoutPath), await getRef(), diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index a61d42310..3b799ba74 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 90d73b080..3fb37f3e4 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -283,8 +283,8 @@ var require_proxy = __commonJS({ return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); } var DecodedURL = class extends URL { - constructor(url, base) { - super(url, base); + constructor(url2, base) { + super(url2, base); this._decodedUsername = decodeURIComponent(super.username); this._decodedPassword = decodeURIComponent(super.password); } @@ -957,65 +957,65 @@ var require_util = __commonJS({ function isBlobLike(object) { return Blob2 && object instanceof Blob2 || object && typeof object === "object" && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && /^(Blob|File)$/.test(object[Symbol.toStringTag]); } - function buildURL(url, queryParams) { - if (url.includes("?") || url.includes("#")) { + function buildURL(url2, queryParams) { + if (url2.includes("?") || url2.includes("#")) { throw new Error('Query params cannot be passed when url already contains "?" or "#".'); } const stringified = stringify(queryParams); if (stringified) { - url += "?" + stringified; + url2 += "?" + stringified; } - return url; + return url2; } - function parseURL(url) { - if (typeof url === "string") { - url = new URL(url); - if (!/^https?:/.test(url.origin || url.protocol)) { + function parseURL(url2) { + if (typeof url2 === "string") { + url2 = new URL(url2); + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - return url; + return url2; } - if (!url || typeof url !== "object") { + if (!url2 || typeof url2 !== "object") { throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); } - if (!/^https?:/.test(url.origin || url.protocol)) { + if (!/^https?:/.test(url2.origin || url2.protocol)) { throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); } - if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && !Number.isFinite(parseInt(url.port))) { + if (!(url2 instanceof URL)) { + if (url2.port != null && url2.port !== "" && !Number.isFinite(parseInt(url2.port))) { throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); } - if (url.path != null && typeof url.path !== "string") { + if (url2.path != null && typeof url2.path !== "string") { throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); } - if (url.pathname != null && typeof url.pathname !== "string") { + if (url2.pathname != null && typeof url2.pathname !== "string") { throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); } - if (url.hostname != null && typeof url.hostname !== "string") { + if (url2.hostname != null && typeof url2.hostname !== "string") { throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); } - if (url.origin != null && typeof url.origin !== "string") { + if (url2.origin != null && typeof url2.origin !== "string") { throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); } - const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; - let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path12 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; + let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; + let path12 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } if (path12 && !path12.startsWith("/")) { path12 = `/${path12}`; } - url = new URL(origin + path12); + url2 = new URL(origin + path12); } - return url; + return url2; } - function parseOrigin(url) { - url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) { + function parseOrigin(url2) { + url2 = parseURL(url2); + if (url2.pathname !== "/" || url2.search || url2.hash) { throw new InvalidArgumentError("invalid url"); } - return url; + return url2; } function getHostname(host) { if (host[0] === "[") { @@ -3666,8 +3666,8 @@ var require_util2 = __commonJS({ return request.urlList[request.urlList.length - 1]; } function requestBadPort(request) { - const url = requestCurrentURL(request); - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { + const url2 = requestCurrentURL(request); + if (urlIsHttpHttpsScheme(url2) && badPortsSet.has(url2.port)) { return "blocked"; } return "allowed"; @@ -3881,30 +3881,30 @@ var require_util2 = __commonJS({ return isNonPotentiallyTrustWorthy ? "no-referrer" : referrerOrigin; } } - function stripURLForReferrer(url, originOnly) { - assert(url instanceof URL); - if (url.protocol === "file:" || url.protocol === "about:" || url.protocol === "blank:") { + function stripURLForReferrer(url2, originOnly) { + assert(url2 instanceof URL); + if (url2.protocol === "file:" || url2.protocol === "about:" || url2.protocol === "blank:") { return "no-referrer"; } - url.username = ""; - url.password = ""; - url.hash = ""; + url2.username = ""; + url2.password = ""; + url2.hash = ""; if (originOnly) { - url.pathname = ""; - url.search = ""; + url2.pathname = ""; + url2.search = ""; } - return url; + return url2; } - function isURLPotentiallyTrustworthy(url) { - if (!(url instanceof URL)) { + function isURLPotentiallyTrustworthy(url2) { + if (!(url2 instanceof URL)) { return false; } - if (url.href === "about:blank" || url.href === "about:srcdoc") { + if (url2.href === "about:blank" || url2.href === "about:srcdoc") { return true; } - if (url.protocol === "data:") return true; - if (url.protocol === "file:") return true; - return isOriginPotentiallyTrustworthy(url.origin); + if (url2.protocol === "data:") return true; + if (url2.protocol === "file:") return true; + return isOriginPotentiallyTrustworthy(url2.origin); function isOriginPotentiallyTrustworthy(origin) { if (origin == null || origin === "null") return false; const originAsURL = new URL(origin); @@ -4174,20 +4174,20 @@ var require_util2 = __commonJS({ byteLength += chunk.length; } } - function urlIsLocal(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsLocal(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "about:" || protocol === "blob:" || protocol === "data:"; } - function urlHasHttpsScheme(url) { - if (typeof url === "string") { - return url.startsWith("https:"); + function urlHasHttpsScheme(url2) { + if (typeof url2 === "string") { + return url2.startsWith("https:"); } - return url.protocol === "https:"; + return url2.protocol === "https:"; } - function urlIsHttpHttpsScheme(url) { - assert("protocol" in url); - const protocol = url.protocol; + function urlIsHttpHttpsScheme(url2) { + assert("protocol" in url2); + const protocol = url2.protocol; return protocol === "http:" || protocol === "https:"; } var hasOwn = Object.hasOwn || ((dict, key) => Object.prototype.hasOwnProperty.call(dict, key)); @@ -4672,12 +4672,12 @@ var require_dataURL = __commonJS({ } return { mimeType: mimeTypeRecord, body }; } - function URLSerializer(url, excludeFragment = false) { + function URLSerializer(url2, excludeFragment = false) { if (!excludeFragment) { - return url.href; + return url2.href; } - const href = url.href; - const hashLength = url.hash.length; + const href = url2.href; + const hashLength = url2.hash.length; return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } function collectASequenceOfCodePoints(condition, input, position) { @@ -6984,7 +6984,7 @@ var require_client = __commonJS({ * @param {string|URL} url * @param {import('../types/client').Client.Options} options */ - constructor(url, { + constructor(url2, { interceptors, maxHeaderSize, headersTimeout, @@ -7090,7 +7090,7 @@ var require_client = __commonJS({ }); } this[kInterceptors] = interceptors && interceptors.Client && Array.isArray(interceptors.Client) ? interceptors.Client : [createRedirectInterceptor({ maxRedirections })]; - this[kUrl] = util.parseOrigin(url); + this[kUrl] = util.parseOrigin(url2); this[kConnector] = connect2; this[kSocket] = null; this[kPipelining] = pipelining != null ? pipelining : 1; @@ -10556,10 +10556,10 @@ var require_mock_utils = __commonJS({ }; } function checkNetConnect(netConnect, origin) { - const url = new URL(origin); + const url2 = new URL(origin); if (netConnect === true) { return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { + } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url2.host))) { return true; } return false; @@ -12001,16 +12001,16 @@ var require_response = __commonJS({ return responseObject; } // Creates a redirect Response that redirects to url with status status. - static redirect(url, status = 302) { + static redirect(url2, status = 302) { const relevantRealm = { settingsObject: {} }; webidl.argumentLengthCheck(arguments, 1, { header: "Response.redirect" }); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); status = webidl.converters["unsigned short"](status); let parsedURL; try { - parsedURL = new URL(url, getGlobalOrigin()); + parsedURL = new URL(url2, getGlobalOrigin()); } catch (err) { - throw Object.assign(new TypeError("Failed to parse URL from " + url), { + throw Object.assign(new TypeError("Failed to parse URL from " + url2), { cause: err }); } @@ -12054,11 +12054,11 @@ var require_response = __commonJS({ get url() { webidl.brandCheck(this, _Response); const urlList = this[kState].urlList; - const url = urlList[urlList.length - 1] ?? null; - if (url === null) { + const url2 = urlList[urlList.length - 1] ?? null; + if (url2 === null) { return ""; } - return URLSerializer(url, true); + return URLSerializer(url2, true); } // Returns whether response was obtained through a redirect. get redirected() { @@ -13850,12 +13850,12 @@ var require_fetch = __commonJS({ } return response; async function dispatch({ body }) { - const url = requestCurrentURL(request); + const url2 = requestCurrentURL(request); const agent = fetchParams.controller.dispatcher; return new Promise((resolve6, reject) => agent.dispatch( { - path: url.pathname + url.search, - origin: url.origin, + path: url2.pathname + url2.search, + origin: url2.origin, method: request.method, body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, @@ -16335,9 +16335,9 @@ var require_connection = __commonJS({ crypto = require("crypto"); } catch { } - function establishWebSocketConnection(url, protocols, ws, onEstablish, options) { - const requestURL = url; - requestURL.protocol = url.protocol === "ws:" ? "http:" : "https:"; + function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { + const requestURL = url2; + requestURL.protocol = url2.protocol === "ws:" ? "http:" : "https:"; const request = makeRequest({ urlList: [requestURL], serviceWorkers: "none", @@ -16788,7 +16788,7 @@ var require_websocket = __commonJS({ * @param {string} url * @param {string|string[]} protocols */ - constructor(url, protocols = []) { + constructor(url2, protocols = []) { super(); webidl.argumentLengthCheck(arguments, 1, { header: "WebSocket constructor" }); if (!experimentalWarned) { @@ -16798,12 +16798,12 @@ var require_websocket = __commonJS({ }); } const options = webidl.converters["DOMString or sequence or WebSocketInit"](protocols); - url = webidl.converters.USVString(url); + url2 = webidl.converters.USVString(url2); protocols = options.protocols; const baseURL = getGlobalOrigin(); let urlRecord; try { - urlRecord = new URL(url, baseURL); + urlRecord = new URL(url2, baseURL); } catch (e) { throw new DOMException2(e, "SyntaxError"); } @@ -17198,12 +17198,12 @@ var require_undici = __commonJS({ module2.exports.buildConnector = buildConnector; module2.exports.errors = errors; function makeDispatcher(fn) { - return (url, opts, handler) => { + return (url2, opts, handler) => { if (typeof opts === "function") { handler = opts; opts = null; } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { + if (!url2 || typeof url2 !== "string" && typeof url2 !== "object" && !(url2 instanceof URL)) { throw new InvalidArgumentError("invalid url"); } if (opts != null && typeof opts !== "object") { @@ -17217,12 +17217,12 @@ var require_undici = __commonJS({ if (!opts.path.startsWith("/")) { path12 = `/${path12}`; } - url = new URL(util.parseOrigin(url).origin + path12); + url2 = new URL(util.parseOrigin(url2).origin + path12); } else { if (!opts) { - opts = typeof url === "object" ? url : {}; + opts = typeof url2 === "object" ? url2 : {}; } - url = util.parseURL(url); + url2 = util.parseURL(url2); } const { agent, dispatcher = getGlobalDispatcher() } = opts; if (agent) { @@ -17230,8 +17230,8 @@ var require_undici = __commonJS({ } return fn.call(dispatcher, { ...opts, - origin: url.origin, - path: url.search ? `${url.pathname}${url.search}` : url.pathname, + origin: url2.origin, + path: url2.search ? `${url2.pathname}${url2.search}` : url2.pathname, method: opts.method || (opts.body ? "PUT" : "GET") }, handler); }; @@ -19957,8 +19957,8 @@ var require_utils3 = __commonJS({ exports2.getProxyAgentDispatcher = getProxyAgentDispatcher; function getProxyFetch(destinationUrl) { const httpDispatcher = getProxyAgentDispatcher(destinationUrl); - const proxyFetch = (url, opts) => __awaiter4(this, void 0, void 0, function* () { - return (0, undici_1.fetch)(url, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); + const proxyFetch = (url2, opts) => __awaiter4(this, void 0, void 0, function* () { + return (0, undici_1.fetch)(url2, Object.assign(Object.assign({}, opts), { dispatcher: httpDispatcher })); }); return proxyFetch; } @@ -20215,8 +20215,8 @@ var require_dist_node2 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -20234,13 +20234,13 @@ var require_dist_node2 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -20251,8 +20251,8 @@ var require_dist_node2 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -20427,7 +20427,7 @@ var require_dist_node2 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -20438,7 +20438,7 @@ var require_dist_node2 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -20455,7 +20455,7 @@ var require_dist_node2 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -20714,7 +20714,7 @@ var require_dist_node5 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -20734,7 +20734,7 @@ var require_dist_node5 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -20755,7 +20755,7 @@ var require_dist_node5 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -20766,7 +20766,7 @@ var require_dist_node5 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -20778,7 +20778,7 @@ var require_dist_node5 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -20791,7 +20791,7 @@ var require_dist_node5 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -20955,8 +20955,8 @@ var require_dist_node6 = __commonJS({ } function merge2(defaults, route, options) { if (typeof route === "string") { - let [method, url] = route.split(" "); - options = Object.assign(url ? { method, url } : { url: method }, options); + let [method, url2] = route.split(" "); + options = Object.assign(url2 ? { method, url: url2 } : { url: method }, options); } else { options = Object.assign({}, route); } @@ -20974,13 +20974,13 @@ var require_dist_node6 = __commonJS({ } return mergedOptions; } - function addQueryParameters(url, parameters) { - const separator = /\?/.test(url) ? "&" : "?"; + function addQueryParameters(url2, parameters) { + const separator = /\?/.test(url2) ? "&" : "?"; const names = Object.keys(parameters); if (names.length === 0) { - return url; + return url2; } - return url + separator + names.map((name) => { + return url2 + separator + names.map((name) => { if (name === "q") { return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+"); } @@ -20991,8 +20991,8 @@ var require_dist_node6 = __commonJS({ function removeNonChars(variableName) { return variableName.replace(/(?:^\W+)|(?:(? urlVariableNames.includes(option)).concat("baseUrl"); const remainingParameters = omit(parameters, omittedParameters); @@ -21167,7 +21167,7 @@ var require_dist_node6 = __commonJS({ ) ).join(","); } - if (url.endsWith("/graphql")) { + if (url2.endsWith("/graphql")) { if (options.mediaType.previews?.length) { const previewsFromAcceptHeader = headers.accept.match(/(? { @@ -21178,7 +21178,7 @@ var require_dist_node6 = __commonJS({ } } if (["GET", "HEAD"].includes(method)) { - url = addQueryParameters(url, remainingParameters); + url2 = addQueryParameters(url2, remainingParameters); } else { if ("data" in remainingParameters) { body = remainingParameters.data; @@ -21195,7 +21195,7 @@ var require_dist_node6 = __commonJS({ body = ""; } return Object.assign( - { method, url, headers }, + { method, url: url2, headers }, typeof body !== "undefined" ? { body } : null, options.request ? { request: options.request } : null ); @@ -21362,7 +21362,7 @@ var require_dist_node8 = __commonJS({ } let headers = {}; let status; - let url; + let url2; let { fetch } = globalThis; if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) { fetch = requestOptions.request.fetch; @@ -21382,7 +21382,7 @@ var require_dist_node8 = __commonJS({ // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }).then(async (response) => { - url = response.url; + url2 = response.url; status = response.status; for (const keyAndValue of response.headers) { headers[keyAndValue[0]] = keyAndValue[1]; @@ -21403,7 +21403,7 @@ var require_dist_node8 = __commonJS({ } throw new import_request_error.RequestError(response.statusText, status, { response: { - url, + url: url2, status, headers, data: void 0 @@ -21414,7 +21414,7 @@ var require_dist_node8 = __commonJS({ if (status === 304) { throw new import_request_error.RequestError("Not modified", status, { response: { - url, + url: url2, status, headers, data: await getResponseData(response) @@ -21426,7 +21426,7 @@ var require_dist_node8 = __commonJS({ const data = await getResponseData(response); const error2 = new import_request_error.RequestError(toErrorMessage(data), status, { response: { - url, + url: url2, status, headers, data @@ -21439,7 +21439,7 @@ var require_dist_node8 = __commonJS({ }).then((data) => { return { status, - url, + url: url2, headers, data }; @@ -23907,11 +23907,11 @@ var require_dist_node12 = __commonJS({ for (const [scope, endpoints] of Object.entries(endpoints_default)) { for (const [methodName, endpoint] of Object.entries(endpoints)) { const [route, defaults, decorations] = endpoint; - const [method, url] = route.split(/ /); + const [method, url2] = route.split(/ /); const endpointDefaults = Object.assign( { method, - url + url: url2 }, defaults ); @@ -24105,23 +24105,23 @@ var require_dist_node13 = __commonJS({ const requestMethod = typeof route === "function" ? route : octokit.request; const method = options.method; const headers = options.headers; - let url = options.url; + let url2 = options.url; return { [Symbol.asyncIterator]: () => ({ async next() { - if (!url) + if (!url2) return { done: true }; try { - const response = await requestMethod({ method, url, headers }); + const response = await requestMethod({ method, url: url2, headers }); const normalizedResponse = normalizePaginatedListResponse(response); - url = ((normalizedResponse.headers.link || "").match( + url2 = ((normalizedResponse.headers.link || "").match( /<([^<>]+)>;\s*rel="next"/ ) || [])[1]; return { value: normalizedResponse }; } catch (error2) { if (error2.status !== 409) throw error2; - url = ""; + url2 = ""; return { value: { status: 200, @@ -36289,7 +36289,6 @@ var require_package = __commonJS({ "console-log-level": "^1.4.1", del: "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", @@ -41100,16 +41099,16 @@ var require_sanitizer = __commonJS({ if (typeof value !== "string" || value === null || value === "") { return value; } - const url = new URL(value); - if (!url.search) { + const url2 = new URL(value); + if (!url2.search) { return value; } - for (const [key] of url.searchParams) { + for (const [key] of url2.searchParams) { if (!this.allowedQueryParameters.has(key.toLowerCase())) { - url.searchParams.set(key, RedactedString); + url2.searchParams.set(key, RedactedString); } } - return url.toString(); + return url2.toString(); } sanitizeHeaders(obj) { const sanitized = {}; @@ -41198,8 +41197,8 @@ var require_redirectPolicy = __commonJS({ const { request, status, headers } = response; const locationHeader = headers.get("location"); if (locationHeader && (status === 300 || status === 301 && allowedRedirect.includes(request.method) || status === 302 && allowedRedirect.includes(request.method) || status === 303 && request.method === "POST" || status === 307) && currentRetries < maxRetries) { - const url = new URL(locationHeader, request.url); - request.url = url.toString(); + const url2 = new URL(locationHeader, request.url); + request.url = url2.toString(); if (status === 303) { request.method = "GET"; request.headers.delete("Content-Length"); @@ -43403,9 +43402,9 @@ var require_helpers2 = __commonJS({ } } exports2.json = json2; - function req(url, opts = {}) { - const href = typeof url === "string" ? url : url.href; - const req2 = (href.startsWith("https:") ? https2 : http).request(url, opts); + function req(url2, opts = {}) { + const href = typeof url2 === "string" ? url2 : url2.href; + const req2 = (href.startsWith("https:") ? https2 : http).request(url2, opts); const promise = new Promise((resolve6, reject) => { req2.once("response", resolve6).once("error", reject).end(); }); @@ -43885,11 +43884,11 @@ var require_dist4 = __commonJS({ const protocol = opts.secureEndpoint ? "https:" : "http:"; const hostname = req.getHeader("host") || "localhost"; const base = `${protocol}//${hostname}`; - const url = new url_1.URL(req.path, base); + const url2 = new url_1.URL(req.path, base); if (opts.port !== 80) { - url.port = String(opts.port); + url2.port = String(opts.port); } - req.path = String(url); + req.path = String(url2); const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; if (proxy.username || proxy.password) { const auth = `${decodeURIComponent(proxy.username)}:${decodeURIComponent(proxy.password)}`; @@ -44060,8 +44059,8 @@ var require_proxyPolicy = __commonJS({ if (request.agent) { return; } - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (request.tlsSettings) { log_js_1.logger.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored."); } @@ -44708,17 +44707,17 @@ var require_nodeHttpClient = __commonJS({ } makeRequest(request, abortController, body) { var _a; - const url = new URL(request.url); - const isInsecure = url.protocol !== "https:"; + const url2 = new URL(request.url); + const isInsecure = url2.protocol !== "https:"; if (isInsecure && !request.allowInsecureConnection) { throw new Error(`Cannot connect to ${request.url} while allowInsecureConnection is false.`); } const agent = (_a = request.agent) !== null && _a !== void 0 ? _a : this.getOrCreateAgent(request, isInsecure); const options = { agent, - hostname: url.hostname, - path: `${url.pathname}${url.search}`, - port: url.port, + hostname: url2.hostname, + path: `${url2.pathname}${url2.search}`, + port: url2.port, method: request.method, headers: request.headers.toJSON({ preserveCase: true }) }; @@ -48097,14 +48096,14 @@ var require_urlHelpers = __commonJS({ } return result; } - function isAbsoluteUrl(url) { - return url.includes("://"); + function isAbsoluteUrl(url2) { + return url2.includes("://"); } - function appendPath(url, pathToAppend) { + function appendPath(url2, pathToAppend) { if (!pathToAppend) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); let newPath = parsedUrl.pathname; if (!newPath.endsWith("/")) { newPath = `${newPath}/`; @@ -48195,11 +48194,11 @@ var require_urlHelpers = __commonJS({ } return result; } - function appendQueryParams(url, queryParams, sequenceParams, noOverwrite = false) { + function appendQueryParams(url2, queryParams, sequenceParams, noOverwrite = false) { if (queryParams.size === 0) { - return url; + return url2; } - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const combinedParams = simpleParseQueryParams(parsedUrl.search); for (const [name, value] of queryParams) { const existingValue = combinedParams.get(name); @@ -48310,9 +48309,9 @@ var require_serviceClient = __commonJS({ if (!endpoint) { throw new Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use."); } - const url = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); + const url2 = (0, urlHelpers_js_1.getRequestUrl)(endpoint, operationSpec, operationArguments, this); const request = (0, core_rest_pipeline_1.createPipelineRequest)({ - url + url: url2 }); request.method = operationSpec.httpMethod; const operationInfo = (0, operationHelpers_js_1.getOperationRequestInfo)(request); @@ -52263,8 +52262,8 @@ var require_dist7 = __commonJS({ "11103", "11104" ]; - function escapeURLPath(url2) { - const urlParsed = new URL(url2); + function escapeURLPath(url3) { + const urlParsed = new URL(url3); let path12 = urlParsed.pathname; path12 = path12 || "/"; path12 = escape(path12); @@ -52351,15 +52350,15 @@ var require_dist7 = __commonJS({ function escape(text) { return encodeURIComponent(text).replace(/%2F/g, "/").replace(/'/g, "%27").replace(/\+/g, "%20").replace(/%25/g, "%"); } - function appendToURLPath(url2, name) { - const urlParsed = new URL(url2); + function appendToURLPath(url3, name) { + const urlParsed = new URL(url3); let path12 = urlParsed.pathname; path12 = path12 ? path12.endsWith("/") ? `${path12}${name}` : `${path12}/${name}` : name; urlParsed.pathname = path12; return urlParsed.toString(); } - function setURLParameter(url2, name, value) { - const urlParsed = new URL(url2); + function setURLParameter(url3, name, value) { + const urlParsed = new URL(url3); const encodedName = encodeURIComponent(name); const encodedValue = value ? encodeURIComponent(value) : void 0; const searchString = urlParsed.search === "" ? "?" : urlParsed.search; @@ -52378,34 +52377,34 @@ var require_dist7 = __commonJS({ urlParsed.search = searchPieces.length ? `?${searchPieces.join("&")}` : ""; return urlParsed.toString(); } - function getURLParameter(url2, name) { + function getURLParameter(url3, name) { var _a; - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return (_a = urlParsed.searchParams.get(name)) !== null && _a !== void 0 ? _a : void 0; } - function setURLHost(url2, host) { - const urlParsed = new URL(url2); + function setURLHost(url3, host) { + const urlParsed = new URL(url3); urlParsed.hostname = host; return urlParsed.toString(); } - function getURLPath(url2) { + function getURLPath(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.pathname; } catch (e) { return void 0; } } - function getURLScheme(url2) { + function getURLScheme(url3) { try { - const urlParsed = new URL(url2); + const urlParsed = new URL(url3); return urlParsed.protocol.endsWith(":") ? urlParsed.protocol.slice(0, -1) : urlParsed.protocol; } catch (e) { return void 0; } } - function getURLPathAndQuery(url2) { - const urlParsed = new URL(url2); + function getURLPathAndQuery(url3) { + const urlParsed = new URL(url3); const pathString = urlParsed.pathname; if (!pathString) { throw new RangeError("Invalid url without valid path."); @@ -52417,8 +52416,8 @@ var require_dist7 = __commonJS({ } return `${pathString}${queryString}`; } - function getURLQueries(url2) { - let queryString = new URL(url2).search; + function getURLQueries(url3) { + let queryString = new URL(url3).search; if (!queryString) { return {}; } @@ -52439,8 +52438,8 @@ var require_dist7 = __commonJS({ } return queries; } - function appendToURLQuery(url2, queryParts) { - const urlParsed = new URL(url2); + function appendToURLQuery(url3, queryParts) { + const urlParsed = new URL(url3); let query = urlParsed.search; if (query) { query += "&" + queryParts; @@ -52506,8 +52505,8 @@ var require_dist7 = __commonJS({ function iEqual(str1, str2) { return str1.toLocaleLowerCase() === str2.toLocaleLowerCase(); } - function getAccountNameFromUrl(url2) { - const parsedUrl = new URL(url2); + function getAccountNameFromUrl(url3) { + const parsedUrl = new URL(url3); let accountName; try { if (parsedUrl.hostname.split(".")[1] === "blob") { @@ -62445,7 +62444,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } }; - var url = { + var url2 = { parameterPath: "url", mapper: { serializedName: "url", @@ -64121,7 +64120,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64151,7 +64150,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp, timeoutInSeconds ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64178,7 +64177,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64208,7 +64207,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; maxPageSize, include ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64236,7 +64235,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, comp3 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64265,7 +64264,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64292,7 +64291,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body, queryParameters: [timeoutInSeconds, comp4], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -64325,7 +64324,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp5, where ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64513,7 +64512,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64539,7 +64538,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64562,7 +64561,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, restype2], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64591,7 +64590,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp6 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64632,7 +64631,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64660,7 +64659,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp7 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -64693,7 +64692,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp8 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64721,7 +64720,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp9 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64754,7 +64753,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp4, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ accept, version, @@ -64788,7 +64787,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; where, restype2 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64814,7 +64813,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64845,7 +64844,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64875,7 +64874,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64905,7 +64904,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64935,7 +64934,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, comp10 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -64971,7 +64970,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; restype2, include1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65003,7 +65002,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; include1, delimiter ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65029,7 +65028,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65293,7 +65292,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65331,7 +65330,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, versionId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65367,7 +65366,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, blobDeleteType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65396,7 +65395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp8], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65418,7 +65417,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp11], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65442,7 +65441,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65476,7 +65475,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65501,7 +65500,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp12], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65523,7 +65522,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp13], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65546,7 +65545,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp6], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65579,7 +65578,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65609,7 +65608,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65638,7 +65637,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65667,7 +65666,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65697,7 +65696,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp10], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65726,7 +65725,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp14], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65759,7 +65758,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65801,7 +65800,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65849,7 +65848,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp15, copyId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65881,7 +65880,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp16 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65911,7 +65910,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; timeoutInSeconds, restype1 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -65949,7 +65948,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp17 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -65989,7 +65988,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66018,7 +66017,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; versionId, comp18 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -66152,7 +66151,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66201,7 +66200,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66244,7 +66243,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66282,7 +66281,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp19], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66336,7 +66335,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; snapshot, comp20 ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66373,7 +66372,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp20, prevsnapshot ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66403,7 +66402,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66436,7 +66435,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [comp, timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66466,7 +66465,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp21], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66547,7 +66546,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66593,7 +66592,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66633,7 +66632,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp22], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66678,7 +66677,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds, comp23], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66798,7 +66797,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: body1, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66849,7 +66848,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } }, queryParameters: [timeoutInSeconds], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66908,7 +66907,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66945,7 +66944,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp24, blockId ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -66983,7 +66982,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }, requestBody: blocks, queryParameters: [timeoutInSeconds, comp25], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ contentType, accept, @@ -67038,7 +67037,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; comp25, listType ], - urlParameters: [url], + urlParameters: [url2], headerParameters: [ version, requestId, @@ -67056,9 +67055,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * operation. * @param options The parameter options */ - constructor(url2, options) { + constructor(url3, options) { var _a, _b; - if (url2 === void 0) { + if (url3 === void 0) { throw new Error("'url' cannot be null"); } if (!options) { @@ -67073,7 +67072,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; userAgentPrefix }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "{url}" }); super(optionsWithDefaults); - this.url = url2; + this.url = url3; this.version = options.version || "2024-11-04"; this.service = new ServiceImpl(this); this.container = new ContainerImpl(this); @@ -67098,9 +67097,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; * @param url - url to resource * @param pipeline - request policy pipeline. */ - constructor(url2, pipeline) { - this.url = escapeURLPath(url2); - this.accountName = getAccountNameFromUrl(url2); + constructor(url3, pipeline) { + this.url = escapeURLPath(url3); + this.accountName = getAccountNameFromUrl(url3); this.pipeline = pipeline; this.storageClientContext = new StorageContextClient(this.url, getCoreClientOptions(pipeline)); this.isHttps = iEqual(getURLScheme(this.url) || "", "https"); @@ -70358,16 +70357,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { options = options || {}; let pipeline; - let url2; + let url3; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -70379,7 +70378,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -70388,7 +70387,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -70396,7 +70395,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); ({ blobName: this._name, containerName: this._containerName } = this.getBlobAndContainerNamesFromUrl()); this.blobContext = this.storageClientContext.blob; this._snapshot = getURLParameter(this.url, URLConstants.Parameters.SNAPSHOT); @@ -71244,17 +71243,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var AppendBlobClient = class _AppendBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -71263,7 +71262,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71272,7 +71271,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71280,7 +71279,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.appendBlobContext = this.storageClientContext.appendBlob; } /** @@ -71459,17 +71458,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var BlockBlobClient = class _BlockBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; if (blobNameOrOptions && typeof blobNameOrOptions !== "string") { options = blobNameOrOptions; } @@ -71481,7 +71480,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -71490,7 +71489,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -71498,7 +71497,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.blockBlobContext = this.storageClientContext.blockBlob; this._blobContext = this.storageClientContext.blob; } @@ -72006,17 +72005,17 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; var PageBlobClient = class _PageBlobClient extends BlobClient { constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, blobNameOrOptions, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; options = blobNameOrOptions; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string" && blobNameOrOptions && typeof blobNameOrOptions === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -72025,7 +72024,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -72034,7 +72033,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)), encodeURIComponent(blobName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -72042,7 +72041,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName and blobName parameters"); } - super(url2, pipeline); + super(url3, pipeline); this.pageBlobContext = this.storageClientContext.pageBlob; } /** @@ -72913,13 +72912,13 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } } async deleteBlob(urlOrBlobClient, credentialOrOptions, options) { - let url2; + let url3; let credential; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrOptions instanceof StorageSharedKeyCredential || credentialOrOptions instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrOptions))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; options = credentialOrOptions; } else { @@ -72931,23 +72930,23 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchDeleteRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("delete"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).delete(updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).delete(updatedOptions); }); }); } async setBlobAccessTier(urlOrBlobClient, credentialOrTier, tierOrOptions, options) { - let url2; + let url3; let credential; let tier2; if (typeof urlOrBlobClient === "string" && (coreUtil.isNode && credentialOrTier instanceof StorageSharedKeyCredential || credentialOrTier instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrTier))) { - url2 = urlOrBlobClient; + url3 = urlOrBlobClient; credential = credentialOrTier; tier2 = tierOrOptions; } else if (urlOrBlobClient instanceof BlobClient) { - url2 = urlOrBlobClient.url; + url3 = urlOrBlobClient.url; credential = urlOrBlobClient.credential; tier2 = credentialOrTier; options = tierOrOptions; @@ -72960,10 +72959,10 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return tracingClient.withSpan("BatchSetTierRequest-addSubRequest", options, async (updatedOptions) => { this.setBatchType("setAccessTier"); await this.addSubRequestInternal({ - url: url2, + url: url3, credential }, async () => { - await new BlobClient(url2, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); + await new BlobClient(url3, this.batchRequest.createPipeline(credential)).setAccessTier(tier2, updatedOptions); }); }); } @@ -73086,7 +73085,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; }; } var BlobBatchClient = class { - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -73095,8 +73094,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(credentialOrPipeline, options); } - const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path12 = getURLPath(url2); + const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); + const path12 = getURLPath(url3); if (path12 && path12 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { @@ -73200,16 +73199,16 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } constructor(urlOrConnectionString, credentialOrPipelineOrContainerName, options) { let pipeline; - let url2; + let url3; options = options || {}; if (isPipelineLike(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = credentialOrPipelineOrContainerName; } else if (coreUtil.isNode && credentialOrPipelineOrContainerName instanceof StorageSharedKeyCredential || credentialOrPipelineOrContainerName instanceof AnonymousCredential || coreAuth.isTokenCredential(credentialOrPipelineOrContainerName)) { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(credentialOrPipelineOrContainerName, options); } else if (!credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName !== "string") { - url2 = urlOrConnectionString; + url3 = urlOrConnectionString; pipeline = newPipeline(new AnonymousCredential(), options); } else if (credentialOrPipelineOrContainerName && typeof credentialOrPipelineOrContainerName === "string") { const containerName = credentialOrPipelineOrContainerName; @@ -73217,7 +73216,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (extractedCreds.kind === "AccountConnString") { if (coreUtil.isNode) { const sharedKeyCredential = new StorageSharedKeyCredential(extractedCreds.accountName, extractedCreds.accountKey); - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)); if (!options.proxyOptions) { options.proxyOptions = coreRestPipeline.getDefaultProxySettings(extractedCreds.proxyUri); } @@ -73226,7 +73225,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Account connection string is only supported in Node.js environment"); } } else if (extractedCreds.kind === "SASConnString") { - url2 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; + url3 = appendToURLPath(extractedCreds.url, encodeURIComponent(containerName)) + "?" + extractedCreds.accountSas; pipeline = newPipeline(new AnonymousCredential(), options); } else { throw new Error("Connection string must be either an Account connection string or a SAS connection string"); @@ -73234,7 +73233,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { throw new Error("Expecting non-empty strings for containerName parameter"); } - super(url2, pipeline); + super(url3, pipeline); this._containerName = this.getContainerNameFromUrl(); this.containerContext = this.storageClientContext.container; } @@ -74683,7 +74682,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; throw new Error("Connection string must be either an Account connection string or a SAS connection string"); } } - constructor(url2, credentialOrPipeline, options) { + constructor(url3, credentialOrPipeline, options) { let pipeline; if (isPipelineLike(credentialOrPipeline)) { pipeline = credentialOrPipeline; @@ -74692,7 +74691,7 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; } else { pipeline = newPipeline(new AnonymousCredential(), options); } - super(url2, pipeline); + super(url3, pipeline); this.serviceContext = this.storageClientContext.service; } /** @@ -76454,9 +76453,9 @@ var require_cacheHttpClient = __commonJS({ if (!baseUrl) { throw new Error("Cache Service Url not found, unable to restore cache."); } - const url = `${baseUrl}_apis/artifactcache/${resource}`; - core14.debug(`Resource Url: ${url}`); - return url; + const url2 = `${baseUrl}_apis/artifactcache/${resource}`; + core14.debug(`Resource Url: ${url2}`); + return url2; } function createAcceptHeader(type2, apiVersion) { return `${type2};api-version=${apiVersion}`; @@ -81550,18 +81549,18 @@ var require_util10 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.maskSecretUrls = exports2.maskSigUrl = void 0; var core_1 = require_core(); - function maskSigUrl(url) { - if (!url) + function maskSigUrl(url2) { + if (!url2) return; try { - const parsedUrl = new URL(url); + const parsedUrl = new URL(url2); const signature = parsedUrl.searchParams.get("sig"); if (signature) { (0, core_1.setSecret)(signature); (0, core_1.setSecret)(encodeURIComponent(signature)); } } catch (error2) { - (0, core_1.debug)(`Failed to parse URL: ${url} ${error2 instanceof Error ? error2.message : String(error2)}`); + (0, core_1.debug)(`Failed to parse URL: ${url2} ${error2 instanceof Error ? error2.message : String(error2)}`); } } exports2.maskSigUrl = maskSigUrl; @@ -81647,14 +81646,14 @@ var require_cacheTwirpClient = __commonJS({ // JSON generated client. request(service, method, contentType, data) { return __awaiter4(this, void 0, void 0, function* () { - const url = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - (0, core_1.debug)(`[Request] ${method} ${url}`); + const url2 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; + (0, core_1.debug)(`[Request] ${method} ${url2}`); const headers = { "Content-Type": contentType }; try { const { body } = yield this.retryableRequest(() => __awaiter4(this, void 0, void 0, function* () { - return this.httpClient.post(url, JSON.stringify(data), headers); + return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body; } catch (error2) { @@ -82417,32 +82416,6 @@ var require_cache3 = __commonJS({ } }); -// node_modules/file-url/index.js -var require_file_url = __commonJS({ - "node_modules/file-url/index.js"(exports2, module2) { - "use strict"; - var path12 = require("path"); - module2.exports = (filePath, options) => { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - options = { - resolve: true, - ...options - }; - let pathName = filePath; - if (options.resolve) { - pathName = path12.resolve(filePath); - } - pathName = pathName.replace(/\\/g, "/"); - if (pathName[0] !== "/") { - pathName = `/${pathName}`; - } - return encodeURI(`file://${pathName}`).replace(/[?#]/g, encodeURIComponent); - }; - } -}); - // node_modules/jsonschema/lib/helpers.js var require_helpers3 = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { @@ -84070,18 +84043,18 @@ var require_tool_cache = __commonJS({ var IS_WINDOWS = process.platform === "win32"; var IS_MAC = process.platform === "darwin"; var userAgent = "actions/tool-cache"; - function downloadTool2(url, dest, auth, headers) { + function downloadTool2(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { dest = dest || path12.join(_getTempDirectory(), crypto.randomUUID()); yield io6.mkdirP(path12.dirname(dest)); - core14.debug(`Downloading ${url}`); + core14.debug(`Downloading ${url2}`); core14.debug(`Destination ${dest}`); const maxAttempts = 3; const minSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MIN_SECONDS", 10); const maxSeconds = _getGlobal("TEST_DOWNLOAD_TOOL_RETRY_MAX_SECONDS", 20); const retryHelper = new retry_helper_1.RetryHelper(maxAttempts, minSeconds, maxSeconds); return yield retryHelper.execute(() => __awaiter4(this, void 0, void 0, function* () { - return yield downloadToolAttempt(url, dest || "", auth, headers); + return yield downloadToolAttempt(url2, dest || "", auth, headers); }), (err) => { if (err instanceof HTTPError && err.httpStatusCode) { if (err.httpStatusCode < 500 && err.httpStatusCode !== 408 && err.httpStatusCode !== 429) { @@ -84093,7 +84066,7 @@ var require_tool_cache = __commonJS({ }); } exports2.downloadTool = downloadTool2; - function downloadToolAttempt(url, dest, auth, headers) { + function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { if (fs13.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); @@ -84108,10 +84081,10 @@ var require_tool_cache = __commonJS({ } headers.authorization = auth; } - const response = yield http.get(url, headers); + const response = yield http.get(url2, headers); if (response.message.statusCode !== 200) { const err = new HTTPError(response.message.statusCode); - core14.debug(`Failed to download from "${url}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); + core14.debug(`Failed to download from "${url2}". Code(${response.message.statusCode}) Message(${response.message.statusMessage})`); throw err; } const pipeline = util.promisify(stream2.pipeline); @@ -84587,8 +84560,8 @@ var require_debug2 = __commonJS({ // node_modules/follow-redirects/index.js var require_follow_redirects = __commonJS({ "node_modules/follow-redirects/index.js"(exports2, module2) { - var url = require("url"); - var URL2 = url.URL; + var url2 = require("url"); + var URL2 = url2.URL; var http = require("http"); var https2 = require("https"); var Writable = require("stream").Writable; @@ -84840,7 +84813,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.on(event, eventHandlers[event]); } - this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : ( + this._currentUrl = /^\//.test(this._options.path) ? url2.format(this._options) : ( // When making a request to a proxy, […] // a client MUST send the target URI in absolute-form […]. this._options.path @@ -84908,7 +84881,7 @@ var require_follow_redirects = __commonJS({ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers); var currentUrlParts = parseUrl(this._currentUrl); var currentHost = currentHostHeader || currentUrlParts.host; - var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost })); + var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url2.format(Object.assign(currentUrlParts, { host: currentHost })); var redirectUrl = resolveUrl(location, currentUrl); debug4("redirecting to", redirectUrl.href); this._isRedirect = true; @@ -84986,7 +84959,7 @@ var require_follow_redirects = __commonJS({ if (useNativeURL) { parsed = new URL2(input); } else { - parsed = validateUrl(url.parse(input)); + parsed = validateUrl(url2.parse(input)); if (!isString(parsed.protocol)) { throw new InvalidUrlError({ input }); } @@ -84994,7 +84967,7 @@ var require_follow_redirects = __commonJS({ return parsed; } function resolveUrl(relative2, base) { - return useNativeURL ? new URL2(relative2, base) : parseUrl(url.resolve(base, relative2)); + return useNativeURL ? new URL2(relative2, base) : parseUrl(url2.resolve(base, relative2)); } function validateUrl(input) { if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) { @@ -90812,25 +90785,25 @@ function parseGitHubUrl(inputUrl) { if (!inputUrl.startsWith("http://") && !inputUrl.startsWith("https://")) { throw new ConfigurationError(`"${originalUrl}" is not a http or https URL`); } - let url; + let url2; try { - url = new URL(inputUrl); + url2 = new URL(inputUrl); } catch { throw new ConfigurationError(`"${originalUrl}" is not a valid URL`); } - if (url.hostname === "github.com" || url.hostname === "api.github.com") { + if (url2.hostname === "github.com" || url2.hostname === "api.github.com") { return GITHUB_DOTCOM_URL; } - if (url.pathname.indexOf("/api/v3") !== -1) { - url.pathname = url.pathname.substring(0, url.pathname.indexOf("/api/v3")); + if (url2.pathname.indexOf("/api/v3") !== -1) { + url2.pathname = url2.pathname.substring(0, url2.pathname.indexOf("/api/v3")); } - if (url.hostname.startsWith("api.")) { - url.hostname = url.hostname.substring(4); + if (url2.hostname.startsWith("api.")) { + url2.hostname = url2.hostname.substring(4); } - if (!url.pathname.endsWith("/")) { - url.pathname = `${url.pathname}/`; + if (!url2.pathname.endsWith("/")) { + url2.pathname = `${url2.pathname}/`; } - return url.toString(); + return url2.toString(); } var ExhaustivityCheckingError = class extends Error { constructor(expectedExhaustiveValue) { @@ -92230,9 +92203,9 @@ async function sendStatusReport(statusReport) { // src/upload-lib.ts var fs11 = __toESM(require("fs")); var path11 = __toESM(require("path")); +var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core12 = __toESM(require_core()); -var import_file_url = __toESM(require_file_url()); var jsonschema = __toESM(require_lib2()); // src/codeql.ts @@ -92982,10 +92955,10 @@ function writeToolcacheMarkerFile(extractedPath, logger) { fs7.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } -function sanitizeUrlForStatusReport(url) { +function sanitizeUrlForStatusReport(url2) { return ["github/codeql-action", "dsp-testing/codeql-cli-nightlies"].some( - (repo) => url.startsWith(`https://github.com/${repo}/releases/download/`) - ) ? url : "sanitized-value"; + (repo) => url2.startsWith(`https://github.com/${repo}/releases/download/`) + ) ? url2 : "sanitized-value"; } // src/setup-codeql.ts @@ -93076,16 +93049,16 @@ function tryGetBundleVersionFromTagName(tagName, logger) { } return match[1]; } -function tryGetTagNameFromUrl(url, logger) { - const matches = [...url.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; +function tryGetTagNameFromUrl(url2, logger) { + const matches = [...url2.matchAll(/\/(codeql-bundle-[^/]*)\//g)]; if (matches.length === 0) { - logger.debug(`Could not determine tag name for URL ${url}.`); + logger.debug(`Could not determine tag name for URL ${url2}.`); return void 0; } const match = matches[matches.length - 1]; if (match === null || match.length !== 2) { logger.debug( - `Could not determine tag name for URL ${url}. Matched ${JSON.stringify( + `Could not determine tag name for URL ${url2}. Matched ${JSON.stringify( match )}.` ); @@ -93161,13 +93134,13 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } let cliVersion2; let tagName; - let url; + let url2; if (forceShippedTools) { cliVersion2 = cliVersion; tagName = bundleVersion; } else if (toolsInput !== void 0) { tagName = tryGetTagNameFromUrl(toolsInput, logger); - url = toolsInput; + url2 = toolsInput; if (tagName) { const bundleVersion3 = tryGetBundleVersionFromTagName(tagName, logger); if (bundleVersion3 && semver7.valid(bundleVersion3)) { @@ -93179,9 +93152,9 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian tagName = defaultCliVersion.tagName; } const bundleVersion2 = tagName && tryGetBundleVersionFromTagName(tagName, logger); - const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url ?? "unknown"; + const humanReadableVersion = cliVersion2 ?? (bundleVersion2 && convertToSemVer(bundleVersion2, logger)) ?? tagName ?? url2 ?? "unknown"; logger.debug( - `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url ?? "unspecified"}.` + `Attempting to obtain CodeQL tools. CLI version: ${cliVersion2 ?? "unknown"}, bundle tag name: ${tagName ?? "unknown"}, URL: ${url2 ?? "unspecified"}.` ); let codeqlFolder; if (cliVersion2) { @@ -93263,32 +93236,32 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, apiDetails, varian } } let compressionMethod; - if (!url) { + if (!url2) { compressionMethod = cliVersion2 !== void 0 && await useZstdBundle(cliVersion2, tarSupportsZstd) ? "zstd" : "gzip"; - url = await getCodeQLBundleDownloadURL( + url2 = await getCodeQLBundleDownloadURL( tagName, apiDetails, compressionMethod, logger ); } else { - const method = inferCompressionMethod(url); + const method = inferCompressionMethod(url2); if (method === void 0) { throw new ConfigurationError( - `Could not infer compression method from URL ${url}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` + `Could not infer compression method from URL ${url2}. Please specify a URL ending in '.tar.gz' or '.tar.zst'.` ); } compressionMethod = method; } if (cliVersion2) { - logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url} .`); + logger.info(`Using CodeQL CLI version ${cliVersion2} sourced from ${url2} .`); } else { - logger.info(`Using CodeQL CLI sourced from ${url} .`); + logger.info(`Using CodeQL CLI sourced from ${url2} .`); } return { bundleVersion: tagName && tryGetBundleVersionFromTagName(tagName, logger), cliVersion: cliVersion2, - codeqlURL: url, + codeqlURL: url2, compressionMethod, sourceType: "download", toolsVersion: cliVersion2 ?? humanReadableVersion @@ -95627,7 +95600,7 @@ async function uploadSpecifiedFiles(sarifPaths, checkoutPath, category, features const sarifPayload = JSON.stringify(sarif); logger.debug(`Compressing serialized SARIF`); const zippedSarif = import_zlib.default.gzipSync(sarifPayload).toString("base64"); - const checkoutURI = (0, import_file_url.default)(checkoutPath); + const checkoutURI = url.pathToFileURL(checkoutPath).href; const payload = buildPayload( await getCommitOid(checkoutPath), await getRef(), diff --git a/package-lock.json b/package-lock.json index 70692f17b..a11d49614 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26,7 +26,6 @@ "console-log-level": "^1.4.1", "del": "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", @@ -5897,13 +5896,6 @@ "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", "dev": true }, - "node_modules/file-url": { - "version": "3.0.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/fill-range": { "version": "7.1.1", "license": "MIT", diff --git a/package.json b/package.json index 2308ac300..6e7cc4ece 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "console-log-level": "^1.4.1", "del": "^6.1.1", "fast-deep-equal": "^3.1.3", - "file-url": "^3.0.0", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", "js-yaml": "^4.1.0", diff --git a/src/upload-lib.ts b/src/upload-lib.ts index 9f4a9f103..e87dad839 100644 --- a/src/upload-lib.ts +++ b/src/upload-lib.ts @@ -1,10 +1,10 @@ import * as fs from "fs"; import * as path from "path"; +import * as url from "url"; import zlib from "zlib"; import * as core from "@actions/core"; import { OctokitResponse } from "@octokit/types"; -import fileUrl from "file-url"; import * as jsonschema from "jsonschema"; import * as actionsUtil from "./actions-util"; @@ -728,7 +728,7 @@ export async function uploadSpecifiedFiles( const sarifPayload = JSON.stringify(sarif); logger.debug(`Compressing serialized SARIF`); const zippedSarif = zlib.gzipSync(sarifPayload).toString("base64"); - const checkoutURI = fileUrl(checkoutPath); + const checkoutURI = url.pathToFileURL(checkoutPath).href; const payload = buildPayload( await gitUtils.getCommitOid(checkoutPath), From 09839488db4b4e5670ec7758f026af4bf43cc815 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Fri, 29 Aug 2025 19:22:46 +0100 Subject: [PATCH 4/4] Update `del` --- .github/dependabot.yml | 3 - eslint.config.mjs | 2 +- lib/analyze-action-post.js | 11661 ++++----------------------- lib/analyze-action.js | 7247 ++++++----------- lib/autobuild-action.js | 10724 ++----------------------- lib/init-action-post.js | 8797 +++++++++------------ lib/init-action.js | 7206 ++++++----------- lib/resolve-environment-action.js | 10724 ++----------------------- lib/start-proxy-action-post.js | 11661 ++++----------------------- lib/start-proxy-action.js | 9860 +---------------------- lib/upload-lib.js | 7084 ++++++----------- lib/upload-sarif-action-post.js | 11677 ++++------------------------ lib/upload-sarif-action.js | 7100 ++++++----------- package-lock.json | 213 +- package.json | 2 +- src/analyze.ts | 4 +- src/codeql.test.ts | 6 +- src/debug-artifacts.ts | 4 +- src/util.ts | 8 +- 19 files changed, 19881 insertions(+), 84102 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index b6a833b8e..82313bc87 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,9 +11,6 @@ updates: # There is a type incompatibility issue between v0.0.9 and our other dependencies. - dependency-name: "@octokit/plugin-retry" versions: ["~6.0.0"] - # v7 requires ESM - - dependency-name: "del" - versions: ["^7.0.0"] # This is broken due to the way configuration files have changed. # This might be fixed when we move to eslint v9. - dependency-name: "eslint-plugin-import" diff --git a/eslint.config.mjs b/eslint.config.mjs index 6bd669df8..fb4bc87ec 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -76,7 +76,7 @@ export default [ typescript: {}, }, - "import/ignore": ["sinon", "uuid", "@octokit/plugin-retry", "get-folder-size"], + "import/ignore": ["sinon", "uuid", "@octokit/plugin-retry", "del", "get-folder-size"], }, rules: { diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index a1b0f6ac2..693b7c7c6 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -24525,9819 +24525,8 @@ var require_github = __commonJS({ } }); -// node_modules/array-union/index.js -var require_array_union = __commonJS({ - "node_modules/array-union/index.js"(exports2, module2) { - "use strict"; - module2.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; - }; - } -}); - -// node_modules/merge2/index.js -var require_merge2 = __commonJS({ - "node_modules/merge2/index.js"(exports2, module2) { - "use strict"; - var Stream = require("stream"); - var PassThrough = Stream.PassThrough; - var slice = Array.prototype.slice; - module2.exports = merge2; - function merge2() { - const streamsQueue = []; - const args = slice.call(arguments); - let merging = false; - let options = args[args.length - 1]; - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop(); - } else { - options = {}; - } - const doEnd = options.end !== false; - const doPipeError = options.pipeError === true; - if (options.objectMode == null) { - options.objectMode = true; - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024; - } - const mergedStream = PassThrough(options); - function addStream() { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)); - } - mergeStream(); - return this; - } - function mergeStream() { - if (merging) { - return; - } - merging = true; - let streams = streamsQueue.shift(); - if (!streams) { - process.nextTick(endStream); - return; - } - if (!Array.isArray(streams)) { - streams = [streams]; - } - let pipesCount = streams.length + 1; - function next() { - if (--pipesCount > 0) { - return; - } - merging = false; - mergeStream(); - } - function pipe(stream) { - function onend() { - stream.removeListener("merge2UnpipeEnd", onend); - stream.removeListener("end", onend); - if (doPipeError) { - stream.removeListener("error", onerror); - } - next(); - } - function onerror(err) { - mergedStream.emit("error", err); - } - if (stream._readableState.endEmitted) { - return next(); - } - stream.on("merge2UnpipeEnd", onend); - stream.on("end", onend); - if (doPipeError) { - stream.on("error", onerror); - } - stream.pipe(mergedStream, { end: false }); - stream.resume(); - } - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]); - } - next(); - } - function endStream() { - merging = false; - mergedStream.emit("queueDrain"); - if (doEnd) { - mergedStream.end(); - } - } - mergedStream.setMaxListeners(0); - mergedStream.add = addStream; - mergedStream.on("unpipe", function(stream) { - stream.emit("merge2UnpipeEnd"); - }); - if (args.length) { - addStream.apply(null, args); - } - return mergedStream; - } - function pauseStreams(streams, options) { - if (!Array.isArray(streams)) { - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)); - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error("Only readable stream can be merged."); - } - streams.pause(); - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options); - } - } - return streams; - } - } -}); - -// node_modules/fast-glob/out/utils/array.js -var require_array = __commonJS({ - "node_modules/fast-glob/out/utils/array.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.splitWhen = exports2.flatten = void 0; - function flatten(items) { - return items.reduce((collection, item) => [].concat(collection, item), []); - } - exports2.flatten = flatten; - function splitWhen(items, predicate) { - const result = [[]]; - let groupIndex = 0; - for (const item of items) { - if (predicate(item)) { - groupIndex++; - result[groupIndex] = []; - } else { - result[groupIndex].push(item); - } - } - return result; - } - exports2.splitWhen = splitWhen; - } -}); - -// node_modules/fast-glob/out/utils/errno.js -var require_errno = __commonJS({ - "node_modules/fast-glob/out/utils/errno.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEnoentCodeError = void 0; - function isEnoentCodeError(error2) { - return error2.code === "ENOENT"; - } - exports2.isEnoentCodeError = isEnoentCodeError; - } -}); - -// node_modules/fast-glob/out/utils/fs.js -var require_fs = __commonJS({ - "node_modules/fast-glob/out/utils/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports2.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/fast-glob/out/utils/path.js -var require_path = __commonJS({ - "node_modules/fast-glob/out/utils/path.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0; - var os = require("os"); - var path6 = require("path"); - var IS_WINDOWS_PLATFORM = os.platform() === "win32"; - var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; - var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; - var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; - var DOS_DEVICE_PATH_RE = /^\\\\([.?])/; - var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; - function unixify(filepath) { - return filepath.replace(/\\/g, "/"); - } - exports2.unixify = unixify; - function makeAbsolute(cwd, filepath) { - return path6.resolve(cwd, filepath); - } - exports2.makeAbsolute = makeAbsolute; - function removeLeadingDotSegment(entry) { - if (entry.charAt(0) === ".") { - const secondCharactery = entry.charAt(1); - if (secondCharactery === "/" || secondCharactery === "\\") { - return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); - } - } - return entry; - } - exports2.removeLeadingDotSegment = removeLeadingDotSegment; - exports2.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; - function escapeWindowsPath(pattern) { - return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports2.escapeWindowsPath = escapeWindowsPath; - function escapePosixPath(pattern) { - return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports2.escapePosixPath = escapePosixPath; - exports2.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; - function convertWindowsPathToPattern(filepath) { - return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/"); - } - exports2.convertWindowsPathToPattern = convertWindowsPathToPattern; - function convertPosixPathToPattern(filepath) { - return escapePosixPath(filepath); - } - exports2.convertPosixPathToPattern = convertPosixPathToPattern; - } -}); - -// node_modules/is-extglob/index.js -var require_is_extglob = __commonJS({ - "node_modules/is-extglob/index.js"(exports2, module2) { - module2.exports = function isExtglob(str2) { - if (typeof str2 !== "string" || str2 === "") { - return false; - } - var match; - while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str2)) { - if (match[2]) return true; - str2 = str2.slice(match.index + match[0].length); - } - return false; - }; - } -}); - -// node_modules/is-glob/index.js -var require_is_glob = __commonJS({ - "node_modules/is-glob/index.js"(exports2, module2) { - var isExtglob = require_is_extglob(); - var chars = { "{": "}", "(": ")", "[": "]" }; - var strictCheck = function(str2) { - if (str2[0] === "!") { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str2.length) { - if (str2[index] === "*") { - return true; - } - if (str2[index + 1] === "?" && /[\].+)]/.test(str2[index])) { - return true; - } - if (closeSquareIndex !== -1 && str2[index] === "[" && str2[index + 1] !== "]") { - if (closeSquareIndex < index) { - closeSquareIndex = str2.indexOf("]", index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - if (closeCurlyIndex !== -1 && str2[index] === "{" && str2[index + 1] !== "}") { - closeCurlyIndex = str2.indexOf("}", index); - if (closeCurlyIndex > index) { - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - if (closeParenIndex !== -1 && str2[index] === "(" && str2[index + 1] === "?" && /[:!=]/.test(str2[index + 2]) && str2[index + 3] !== ")") { - closeParenIndex = str2.indexOf(")", index); - if (closeParenIndex > index) { - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - if (pipeIndex !== -1 && str2[index] === "(" && str2[index + 1] !== "|") { - if (pipeIndex < index) { - pipeIndex = str2.indexOf("|", index); - } - if (pipeIndex !== -1 && str2[pipeIndex + 1] !== ")") { - closeParenIndex = str2.indexOf(")", pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str2.indexOf("\\", pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - if (str2[index] === "\\") { - var open = str2[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str2.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str2[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - var relaxedCheck = function(str2) { - if (str2[0] === "!") { - return true; - } - var index = 0; - while (index < str2.length) { - if (/[*?{}()[\]]/.test(str2[index])) { - return true; - } - if (str2[index] === "\\") { - var open = str2[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str2.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str2[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - module2.exports = function isGlob(str2, options) { - if (typeof str2 !== "string" || str2 === "") { - return false; - } - if (isExtglob(str2)) { - return true; - } - var check = strictCheck; - if (options && options.strict === false) { - check = relaxedCheck; - } - return check(str2); - }; - } -}); - -// node_modules/glob-parent/index.js -var require_glob_parent = __commonJS({ - "node_modules/glob-parent/index.js"(exports2, module2) { - "use strict"; - var isGlob = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str2, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); - } - if (enclosure.test(str2)) { - str2 += slash; - } - str2 += "a"; - do { - str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); - return str2.replace(escaped, "$1"); - }; - } -}); - -// node_modules/braces/lib/utils.js -var require_utils5 = __commonJS({ - "node_modules/braces/lib/utils.js"(exports2) { - "use strict"; - exports2.isInteger = (num) => { - if (typeof num === "number") { - return Number.isInteger(num); - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isInteger(Number(num)); - } - return false; - }; - exports2.find = (node, type2) => node.nodes.find((node2) => node2.type === type2); - exports2.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports2.isInteger(min) || !exports2.isInteger(max)) return false; - return (Number(max) - Number(min)) / Number(step) >= limit; - }; - exports2.escapeNode = (block, n = 0, type2) => { - const node = block.nodes[n]; - if (!node) return; - if (type2 && node.type === type2 || node.type === "open" || node.type === "close") { - if (node.escaped !== true) { - node.value = "\\" + node.value; - node.escaped = true; - } - } - }; - exports2.encloseBrace = (node) => { - if (node.type !== "brace") return false; - if (node.commas >> 0 + node.ranges >> 0 === 0) { - node.invalid = true; - return true; - } - return false; - }; - exports2.isInvalidBrace = (block) => { - if (block.type !== "brace") return false; - if (block.invalid === true || block.dollar) return true; - if (block.commas >> 0 + block.ranges >> 0 === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; - }; - exports2.isOpenOrClose = (node) => { - if (node.type === "open" || node.type === "close") { - return true; - } - return node.open === true || node.close === true; - }; - exports2.reduce = (nodes) => nodes.reduce((acc, node) => { - if (node.type === "text") acc.push(node.value); - if (node.type === "range") node.type = "text"; - return acc; - }, []); - exports2.flatten = (...args) => { - const result = []; - const flat = (arr) => { - for (let i = 0; i < arr.length; i++) { - const ele = arr[i]; - if (Array.isArray(ele)) { - flat(ele); - continue; - } - if (ele !== void 0) { - result.push(ele); - } - } - return result; - }; - flat(args); - return result; - }; - } -}); - -// node_modules/braces/lib/stringify.js -var require_stringify = __commonJS({ - "node_modules/braces/lib/stringify.js"(exports2, module2) { - "use strict"; - var utils = require_utils5(); - module2.exports = (ast, options = {}) => { - const stringify = (node, parent = {}) => { - const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ""; - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return "\\" + node.value; - } - return node.value; - } - if (node.value) { - return node.value; - } - if (node.nodes) { - for (const child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - return stringify(ast); - }; - } -}); - -// node_modules/is-number/index.js -var require_is_number = __commonJS({ - "node_modules/is-number/index.js"(exports2, module2) { - "use strict"; - module2.exports = function(num) { - if (typeof num === "number") { - return num - num === 0; - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; - }; - } -}); - -// node_modules/to-regex-range/index.js -var require_to_regex_range = __commonJS({ - "node_modules/to-regex-range/index.js"(exports2, module2) { - "use strict"; - var isNumber = require_is_number(); - var toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError("toRegexRange: expected the first argument to be a number"); - } - if (max === void 0 || min === max) { - return String(min); - } - if (isNumber(max) === false) { - throw new TypeError("toRegexRange: expected the second argument to be a number."); - } - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === "boolean") { - opts.relaxZeros = opts.strictZeros === false; - } - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap; - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - let a = Math.min(min, max); - let b = Math.max(min, max); - if (Math.abs(a - b) === 1) { - let result = min + "|" + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && positives.length + negatives.length > 1) { - state.result = `(?:${state.result})`; - } - toRegexRange.cache[cacheKey] = state; - return state.result; - }; - function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, "-", false, options) || []; - let onlyPositive = filterPatterns(pos, neg, "", false, options) || []; - let intersected = filterPatterns(neg, pos, "-?", true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join("|"); - } - function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - let stop = countNines(min, nines); - let stops = /* @__PURE__ */ new Set([max]); - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - stop = countZeros(max + 1, zeros) - 1; - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - stops = [...stops]; - stops.sort(compare); - return stops; - } - function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ""; - let count = 0; - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - if (startDigit === stopDigit) { - pattern += startDigit; - } else if (startDigit !== "0" || stopDigit !== "9") { - pattern += toCharacterClass(startDigit, stopDigit, options); - } else { - count++; - } - } - if (count) { - pattern += options.shorthand === true ? "\\d" : "[0-9]"; - } - return { pattern, count: [count], digits }; - } - function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - for (let i = 0; i < ranges.length; i++) { - let max2 = ranges[i]; - let obj = rangeToPattern(String(start), String(max2), options); - let zeros = ""; - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max2 + 1; - continue; - } - if (tok.isPadded) { - zeros = padZeros(max2, tok, options); - } - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max2 + 1; - prev = obj; - } - return tokens; - } - function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - for (let ele of arr) { - let { string } = ele; - if (!intersection && !contains(comparison, "string", string)) { - result.push(prefix + string); - } - if (intersection && contains(comparison, "string", string)) { - result.push(prefix + string); - } - } - return result; - } - function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; - } - function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; - } - function contains(arr, key, val2) { - return arr.some((ele) => ele[key] === val2); - } - function countNines(min, len) { - return Number(String(min).slice(0, -len) + "9".repeat(len)); - } - function countZeros(integer, zeros) { - return integer - integer % Math.pow(10, zeros); - } - function toQuantifier(digits) { - let [start = 0, stop = ""] = digits; - if (stop || start > 1) { - return `{${start + (stop ? "," + stop : "")}}`; - } - return ""; - } - function toCharacterClass(a, b, options) { - return `[${a}${b - a === 1 ? "" : "-"}${b}]`; - } - function hasPadding(str2) { - return /^-?(0+)\d/.test(str2); - } - function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - switch (diff) { - case 0: - return ""; - case 1: - return relax ? "0?" : "0"; - case 2: - return relax ? "0{0,2}" : "00"; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } - } - toRegexRange.cache = {}; - toRegexRange.clearCache = () => toRegexRange.cache = {}; - module2.exports = toRegexRange; - } -}); - -// node_modules/fill-range/index.js -var require_fill_range = __commonJS({ - "node_modules/fill-range/index.js"(exports2, module2) { - "use strict"; - var util = require("util"); - var toRegexRange = require_to_regex_range(); - var isObject2 = (val2) => val2 !== null && typeof val2 === "object" && !Array.isArray(val2); - var transform = (toNumber) => { - return (value) => toNumber === true ? Number(value) : String(value); - }; - var isValidValue = (value) => { - return typeof value === "number" || typeof value === "string" && value !== ""; - }; - var isNumber = (num) => Number.isInteger(+num); - var zeros = (input) => { - let value = `${input}`; - let index = -1; - if (value[0] === "-") value = value.slice(1); - if (value === "0") return false; - while (value[++index] === "0") ; - return index > 0; - }; - var stringify = (start, end, options) => { - if (typeof start === "string" || typeof end === "string") { - return true; - } - return options.stringify === true; - }; - var pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === "-" ? "-" : ""; - if (dash) input = input.slice(1); - input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); - } - if (toNumber === false) { - return String(input); - } - return input; - }; - var toMaxLen = (input, maxLength) => { - let negative = input[0] === "-" ? "-" : ""; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = "0" + input; - return negative ? "-" + input : input; - }; - var toSequence = (parts, options, maxLen) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - let prefix = options.capture ? "" : "?:"; - let positives = ""; - let negatives = ""; - let result; - if (parts.positives.length) { - positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|"); - } - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`; - } - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - if (options.wrap) { - return `(${prefix}${result})`; - } - return result; - }; - var toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - let start = String.fromCharCode(a); - if (a === b) return start; - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; - }; - var toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? "" : "?:"; - return wrap ? `(${prefix}${start.join("|")})` : start.join("|"); - } - return toRegexRange(start, end, options); - }; - var rangeError = (...args) => { - return new RangeError("Invalid range arguments: " + util.inspect(...args)); - }; - var invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - }; - var invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; - }; - var fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - if (a === 0) a = 0; - if (b === 0) b = 0; - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - let parts = { negatives: [], positives: [] }; - let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: false, ...options }); - } - return range; - }; - var fillLetters = (start, end, step = 1, options = {}) => { - if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) { - return invalidRange(start, end, options); - } - let format = options.transform || ((val2) => String.fromCharCode(val2)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - return range; - }; - var fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - if (typeof step === "function") { - return fill(start, end, 1, { transform: step }); - } - if (isObject2(step)) { - return fill(start, end, 0, step); - } - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - if (!isNumber(step)) { - if (step != null && !isObject2(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); - }; - module2.exports = fill; - } -}); - -// node_modules/braces/lib/compile.js -var require_compile = __commonJS({ - "node_modules/braces/lib/compile.js"(exports2, module2) { - "use strict"; - var fill = require_fill_range(); - var utils = require_utils5(); - var compile = (ast, options = {}) => { - const walk = (node, parent = {}) => { - const invalidBlock = utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - const invalid = invalidBlock === true || invalidNode === true; - const prefix = options.escapeInvalid === true ? "\\" : ""; - let output = ""; - if (node.isOpen === true) { - return prefix + node.value; - } - if (node.isClose === true) { - console.log("node.isClose", prefix, node.value); - return prefix + node.value; - } - if (node.type === "open") { - return invalid ? prefix + node.value : "("; - } - if (node.type === "close") { - return invalid ? prefix + node.value : ")"; - } - if (node.type === "comma") { - return node.prev.type === "comma" ? "" : invalid ? node.value : "|"; - } - if (node.value) { - return node.value; - } - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - if (node.nodes) { - for (const child of node.nodes) { - output += walk(child, node); - } - } - return output; - }; - return walk(ast); - }; - module2.exports = compile; - } -}); - -// node_modules/braces/lib/expand.js -var require_expand = __commonJS({ - "node_modules/braces/lib/expand.js"(exports2, module2) { - "use strict"; - var fill = require_fill_range(); - var stringify = require_stringify(); - var utils = require_utils5(); - var append = (queue = "", stash = "", enclose = false) => { - const result = []; - queue = [].concat(queue); - stash = [].concat(stash); - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash; - } - for (const item of queue) { - if (Array.isArray(item)) { - for (const value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === "string") ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); - } - } - } - return utils.flatten(result); - }; - var expand = (ast, options = {}) => { - const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit; - const walk = (node, parent = {}) => { - node.queue = []; - let p = parent; - let q = parent.queue; - while (p.type !== "brace" && p.type !== "root" && p.parent) { - p = p.parent; - q = p.queue; - } - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ["{}"])); - return; - } - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); - } - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - const enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - while (block.type !== "brace" && block.type !== "root" && block.parent) { - block = block.parent; - queue = block.queue; - } - for (let i = 0; i < node.nodes.length; i++) { - const child = node.nodes[i]; - if (child.type === "comma" && node.type === "brace") { - if (i === 1) queue.push(""); - queue.push(""); - continue; - } - if (child.type === "close") { - q.push(append(q.pop(), queue, enclose)); - continue; - } - if (child.value && child.type !== "open") { - queue.push(append(queue.pop(), child.value)); - continue; - } - if (child.nodes) { - walk(child, node); - } - } - return queue; - }; - return utils.flatten(walk(ast)); - }; - module2.exports = expand; - } -}); - -// node_modules/braces/lib/constants.js -var require_constants6 = __commonJS({ - "node_modules/braces/lib/constants.js"(exports2, module2) { - "use strict"; - module2.exports = { - MAX_LENGTH: 1e4, - // Digits - CHAR_0: "0", - /* 0 */ - CHAR_9: "9", - /* 9 */ - // Alphabet chars. - CHAR_UPPERCASE_A: "A", - /* A */ - CHAR_LOWERCASE_A: "a", - /* a */ - CHAR_UPPERCASE_Z: "Z", - /* Z */ - CHAR_LOWERCASE_Z: "z", - /* z */ - CHAR_LEFT_PARENTHESES: "(", - /* ( */ - CHAR_RIGHT_PARENTHESES: ")", - /* ) */ - CHAR_ASTERISK: "*", - /* * */ - // Non-alphabetic chars. - CHAR_AMPERSAND: "&", - /* & */ - CHAR_AT: "@", - /* @ */ - CHAR_BACKSLASH: "\\", - /* \ */ - CHAR_BACKTICK: "`", - /* ` */ - CHAR_CARRIAGE_RETURN: "\r", - /* \r */ - CHAR_CIRCUMFLEX_ACCENT: "^", - /* ^ */ - CHAR_COLON: ":", - /* : */ - CHAR_COMMA: ",", - /* , */ - CHAR_DOLLAR: "$", - /* . */ - CHAR_DOT: ".", - /* . */ - CHAR_DOUBLE_QUOTE: '"', - /* " */ - CHAR_EQUAL: "=", - /* = */ - CHAR_EXCLAMATION_MARK: "!", - /* ! */ - CHAR_FORM_FEED: "\f", - /* \f */ - CHAR_FORWARD_SLASH: "/", - /* / */ - CHAR_HASH: "#", - /* # */ - CHAR_HYPHEN_MINUS: "-", - /* - */ - CHAR_LEFT_ANGLE_BRACKET: "<", - /* < */ - CHAR_LEFT_CURLY_BRACE: "{", - /* { */ - CHAR_LEFT_SQUARE_BRACKET: "[", - /* [ */ - CHAR_LINE_FEED: "\n", - /* \n */ - CHAR_NO_BREAK_SPACE: "\xA0", - /* \u00A0 */ - CHAR_PERCENT: "%", - /* % */ - CHAR_PLUS: "+", - /* + */ - CHAR_QUESTION_MARK: "?", - /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: ">", - /* > */ - CHAR_RIGHT_CURLY_BRACE: "}", - /* } */ - CHAR_RIGHT_SQUARE_BRACKET: "]", - /* ] */ - CHAR_SEMICOLON: ";", - /* ; */ - CHAR_SINGLE_QUOTE: "'", - /* ' */ - CHAR_SPACE: " ", - /* */ - CHAR_TAB: " ", - /* \t */ - CHAR_UNDERSCORE: "_", - /* _ */ - CHAR_VERTICAL_LINE: "|", - /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF" - /* \uFEFF */ - }; - } -}); - -// node_modules/braces/lib/parse.js -var require_parse2 = __commonJS({ - "node_modules/braces/lib/parse.js"(exports2, module2) { - "use strict"; - var stringify = require_stringify(); - var { - MAX_LENGTH, - CHAR_BACKSLASH, - /* \ */ - CHAR_BACKTICK, - /* ` */ - CHAR_COMMA: CHAR_COMMA2, - /* , */ - CHAR_DOT, - /* . */ - CHAR_LEFT_PARENTHESES, - /* ( */ - CHAR_RIGHT_PARENTHESES, - /* ) */ - CHAR_LEFT_CURLY_BRACE, - /* { */ - CHAR_RIGHT_CURLY_BRACE, - /* } */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, - /* [ */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2, - /* ] */ - CHAR_DOUBLE_QUOTE: CHAR_DOUBLE_QUOTE2, - /* " */ - CHAR_SINGLE_QUOTE: CHAR_SINGLE_QUOTE2, - /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE - } = require_constants6(); - var parse = (input, options = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - const opts = options || {}; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - const ast = { type: "root", input, nodes: [] }; - const stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - const length = input.length; - let index = 0; - let depth = 0; - let value; - const advance = () => input[index++]; - const push = (node) => { - if (node.type === "text" && prev.type === "dot") { - prev.type = "text"; - } - if (prev && prev.type === "text" && node.type === "text") { - prev.value += node.value; - return; - } - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - push({ type: "bos" }); - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - if (value === CHAR_BACKSLASH) { - push({ type: "text", value: (options.keepEscaping ? value : "") + advance() }); - continue; - } - if (value === CHAR_RIGHT_SQUARE_BRACKET2) { - push({ type: "text", value: "\\" + value }); - continue; - } - if (value === CHAR_LEFT_SQUARE_BRACKET2) { - brackets++; - let next; - while (index < length && (next = advance())) { - value += next; - if (next === CHAR_LEFT_SQUARE_BRACKET2) { - brackets++; - continue; - } - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { - brackets--; - if (brackets === 0) { - break; - } - } - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: "paren", nodes: [] }); - stack.push(block); - push({ type: "text", value }); - continue; - } - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== "paren") { - push({ type: "text", value }); - continue; - } - block = stack.pop(); - push({ type: "text", value }); - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_DOUBLE_QUOTE2 || value === CHAR_SINGLE_QUOTE2 || value === CHAR_BACKTICK) { - const open = value; - let next; - if (options.keepQuotes !== true) { - value = ""; - } - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - value += next; - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true; - const brace = { - type: "brace", - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - block = push(brace); - stack.push(block); - push({ type: "open", value }); - continue; - } - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== "brace") { - push({ type: "text", value }); - continue; - } - const type2 = "close"; - block = stack.pop(); - block.close = true; - push({ type: type2, value }); - depth--; - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_COMMA2 && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - const open = block.nodes.shift(); - block.nodes = [open, { type: "text", value: stringify(block) }]; - } - push({ type: "comma", value }); - block.commas++; - continue; - } - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - const siblings = block.nodes; - if (depth === 0 || siblings.length === 0) { - push({ type: "text", value }); - continue; - } - if (prev.type === "dot") { - block.range = []; - prev.value += value; - prev.type = "range"; - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = "text"; - continue; - } - block.ranges++; - block.args = []; - continue; - } - if (prev.type === "range") { - siblings.pop(); - const before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - push({ type: "dot", value }); - continue; - } - push({ type: "text", value }); - } - do { - block = stack.pop(); - if (block.type !== "root") { - block.nodes.forEach((node) => { - if (!node.nodes) { - if (node.type === "open") node.isOpen = true; - if (node.type === "close") node.isClose = true; - if (!node.nodes) node.type = "text"; - node.invalid = true; - } - }); - const parent = stack[stack.length - 1]; - const index2 = parent.nodes.indexOf(block); - parent.nodes.splice(index2, 1, ...block.nodes); - } - } while (stack.length > 0); - push({ type: "eos" }); - return ast; - }; - module2.exports = parse; - } -}); - -// node_modules/braces/index.js -var require_braces = __commonJS({ - "node_modules/braces/index.js"(exports2, module2) { - "use strict"; - var stringify = require_stringify(); - var compile = require_compile(); - var expand = require_expand(); - var parse = require_parse2(); - var braces = (input, options = {}) => { - let output = []; - if (Array.isArray(input)) { - for (const pattern of input) { - const result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; - }; - braces.parse = (input, options = {}) => parse(input, options); - braces.stringify = (input, options = {}) => { - if (typeof input === "string") { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); - }; - braces.compile = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - return compile(input, options); - }; - braces.expand = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - let result = expand(input, options); - if (options.noempty === true) { - result = result.filter(Boolean); - } - if (options.nodupes === true) { - result = [...new Set(result)]; - } - return result; - }; - braces.create = (input, options = {}) => { - if (input === "" || input.length < 3) { - return [input]; - } - return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); - }; - module2.exports = braces; - } -}); - -// node_modules/picomatch/lib/constants.js -var require_constants7 = __commonJS({ - "node_modules/picomatch/lib/constants.js"(exports2, module2) { - "use strict"; - var path6 = require("path"); - var WIN_SLASH = "\\\\/"; - var WIN_NO_SLASH = `[^${WIN_SLASH}]`; - var DOT_LITERAL = "\\."; - var PLUS_LITERAL = "\\+"; - var QMARK_LITERAL = "\\?"; - var SLASH_LITERAL = "\\/"; - var ONE_CHAR = "(?=.)"; - var QMARK = "[^/]"; - var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; - var START_ANCHOR = `(?:^|${SLASH_LITERAL})`; - var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; - var NO_DOT = `(?!${DOT_LITERAL})`; - var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; - var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; - var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; - var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; - var STAR = `${QMARK}*?`; - var POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR - }; - var WINDOWS_CHARS = { - ...POSIX_CHARS, - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` - }; - var POSIX_REGEX_SOURCE = { - alnum: "a-zA-Z0-9", - alpha: "a-zA-Z", - ascii: "\\x00-\\x7F", - blank: " \\t", - cntrl: "\\x00-\\x1F\\x7F", - digit: "0-9", - graph: "\\x21-\\x7E", - lower: "a-z", - print: "\\x20-\\x7E ", - punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", - space: " \\t\\r\\n\\v\\f", - upper: "A-Z", - word: "A-Za-z0-9_", - xdigit: "A-Fa-f0-9" - }; - module2.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - "***": "*", - "**/**": "**", - "**/**/**": "**" - }, - // Digits - CHAR_0: 48, - /* 0 */ - CHAR_9: 57, - /* 9 */ - // Alphabet chars. - CHAR_UPPERCASE_A: 65, - /* A */ - CHAR_LOWERCASE_A: 97, - /* a */ - CHAR_UPPERCASE_Z: 90, - /* Z */ - CHAR_LOWERCASE_Z: 122, - /* z */ - CHAR_LEFT_PARENTHESES: 40, - /* ( */ - CHAR_RIGHT_PARENTHESES: 41, - /* ) */ - CHAR_ASTERISK: 42, - /* * */ - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, - /* & */ - CHAR_AT: 64, - /* @ */ - CHAR_BACKWARD_SLASH: 92, - /* \ */ - CHAR_CARRIAGE_RETURN: 13, - /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, - /* ^ */ - CHAR_COLON: 58, - /* : */ - CHAR_COMMA: 44, - /* , */ - CHAR_DOT: 46, - /* . */ - CHAR_DOUBLE_QUOTE: 34, - /* " */ - CHAR_EQUAL: 61, - /* = */ - CHAR_EXCLAMATION_MARK: 33, - /* ! */ - CHAR_FORM_FEED: 12, - /* \f */ - CHAR_FORWARD_SLASH: 47, - /* / */ - CHAR_GRAVE_ACCENT: 96, - /* ` */ - CHAR_HASH: 35, - /* # */ - CHAR_HYPHEN_MINUS: 45, - /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, - /* < */ - CHAR_LEFT_CURLY_BRACE: 123, - /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, - /* [ */ - CHAR_LINE_FEED: 10, - /* \n */ - CHAR_NO_BREAK_SPACE: 160, - /* \u00A0 */ - CHAR_PERCENT: 37, - /* % */ - CHAR_PLUS: 43, - /* + */ - CHAR_QUESTION_MARK: 63, - /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, - /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, - /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, - /* ] */ - CHAR_SEMICOLON: 59, - /* ; */ - CHAR_SINGLE_QUOTE: 39, - /* ' */ - CHAR_SPACE: 32, - /* */ - CHAR_TAB: 9, - /* \t */ - CHAR_UNDERSCORE: 95, - /* _ */ - CHAR_VERTICAL_LINE: 124, - /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, - /* \uFEFF */ - SEP: path6.sep, - /** - * Create EXTGLOB_CHARS - */ - extglobChars(chars) { - return { - "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` }, - "?": { type: "qmark", open: "(?:", close: ")?" }, - "+": { type: "plus", open: "(?:", close: ")+" }, - "*": { type: "star", open: "(?:", close: ")*" }, - "@": { type: "at", open: "(?:", close: ")" } - }; - }, - /** - * Create GLOB_CHARS - */ - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } - }; - } -}); - -// node_modules/picomatch/lib/utils.js -var require_utils6 = __commonJS({ - "node_modules/picomatch/lib/utils.js"(exports2) { - "use strict"; - var path6 = require("path"); - var win32 = process.platform === "win32"; - var { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL - } = require_constants7(); - exports2.isObject = (val2) => val2 !== null && typeof val2 === "object" && !Array.isArray(val2); - exports2.hasRegexChars = (str2) => REGEX_SPECIAL_CHARS.test(str2); - exports2.isRegexChar = (str2) => str2.length === 1 && exports2.hasRegexChars(str2); - exports2.escapeRegex = (str2) => str2.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); - exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/"); - exports2.removeBackslashes = (str2) => { - return str2.replace(REGEX_REMOVE_BACKSLASH, (match) => { - return match === "\\" ? "" : match; - }); - }; - exports2.supportsLookbehinds = () => { - const segs = process.version.slice(1).split(".").map(Number); - if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) { - return true; - } - return false; - }; - exports2.isWindows = (options) => { - if (options && typeof options.windows === "boolean") { - return options.windows; - } - return win32 === true || path6.sep === "\\"; - }; - exports2.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === "\\") return exports2.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; - }; - exports2.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith("./")) { - output = output.slice(2); - state.prefix = "./"; - } - return output; - }; - exports2.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? "" : "^"; - const append = options.contains ? "" : "$"; - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; - }; - } -}); - -// node_modules/picomatch/lib/scan.js -var require_scan = __commonJS({ - "node_modules/picomatch/lib/scan.js"(exports2, module2) { - "use strict"; - var utils = require_utils6(); - var { - CHAR_ASTERISK: CHAR_ASTERISK2, - /* * */ - CHAR_AT, - /* @ */ - CHAR_BACKWARD_SLASH, - /* \ */ - CHAR_COMMA: CHAR_COMMA2, - /* , */ - CHAR_DOT, - /* . */ - CHAR_EXCLAMATION_MARK, - /* ! */ - CHAR_FORWARD_SLASH, - /* / */ - CHAR_LEFT_CURLY_BRACE, - /* { */ - CHAR_LEFT_PARENTHESES, - /* ( */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, - /* [ */ - CHAR_PLUS, - /* + */ - CHAR_QUESTION_MARK, - /* ? */ - CHAR_RIGHT_CURLY_BRACE, - /* } */ - CHAR_RIGHT_PARENTHESES, - /* ) */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2 - /* ] */ - } = require_constants7(); - var isPathSeparator = (code) => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; - }; - var depth = (token) => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } - }; - var scan = (input, options) => { - const opts = options || {}; - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - let str2 = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: "", depth: 0, isGlob: false }; - const eos = () => index >= length; - const peek = () => str2.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str2.charCodeAt(++index); - }; - while (index < length) { - code = advance(); - let next; - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA2) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: "", depth: 0, isGlob: false }; - if (finished === true) continue; - if (prev === CHAR_DOT && index === start + 1) { - start += 2; - continue; - } - lastIndex = index + 1; - continue; - } - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_LEFT_SQUARE_BRACKET2) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - if (isGlob === true) { - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - let base = str2; - let prefix = ""; - let glob2 = ""; - if (start > 0) { - prefix = str2.slice(0, start); - str2 = str2.slice(start); - lastIndex -= start; - } - if (base && isGlob === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob2 = str2.slice(lastIndex); - } else if (isGlob === true) { - base = ""; - glob2 = str2; - } else { - base = str2; - } - if (base && base !== "" && base !== "/" && base !== str2) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - if (opts.unescape === true) { - if (glob2) glob2 = utils.removeBackslashes(glob2); - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - const state = { - prefix, - input, - start, - base, - glob: glob2, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== "") { - parts.push(value); - } - prevIndex = i; - } - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - state.slashes = slashes; - state.parts = parts; - } - return state; - }; - module2.exports = scan; - } -}); - -// node_modules/picomatch/lib/parse.js -var require_parse3 = __commonJS({ - "node_modules/picomatch/lib/parse.js"(exports2, module2) { - "use strict"; - var constants = require_constants7(); - var utils = require_utils6(); - var { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS - } = constants; - var expandRange = (args, options) => { - if (typeof options.expandRange === "function") { - return options.expandRange(...args, options); - } - args.sort(); - const value = `[${args.join("-")}]`; - try { - new RegExp(value); - } catch (ex) { - return args.map((v) => utils.escapeRegex(v)).join(".."); - } - return value; - }; - var syntaxError = (type2, char) => { - return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; - }; - var parse = (input, options) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - input = REPLACEMENTS[input] || input; - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - const bos = { type: "bos", value: "", output: opts.prepend || "" }; - const tokens = [bos]; - const capture = opts.capture ? "" : "?:"; - const win32 = utils.isWindows(options); - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - const globstar = (opts2) => { - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const nodot = opts.dot ? "" : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - if (opts.capture) { - star = `(${star})`; - } - if (typeof opts.noext === "boolean") { - opts.noextglob = opts.noext; - } - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: "", - output: "", - prefix: "", - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - input = utils.removePrefix(input, state); - len = input.length; - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ""; - const remaining = () => input.slice(state.index + 1); - const consume = (value2 = "", num = 0) => { - state.consumed += value2; - state.index += num; - }; - const append = (token) => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - const negate = () => { - let count = 1; - while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { - advance(); - state.start++; - count++; - } - if (count % 2 === 0) { - return false; - } - state.negated = true; - state.start++; - return true; - }; - const increment = (type2) => { - state[type2]++; - stack.push(type2); - }; - const decrement = (type2) => { - state[type2]--; - stack.pop(); - }; - const push = (tok) => { - if (prev.type === "globstar") { - const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); - const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); - if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = "star"; - prev.value = "*"; - prev.output = star; - state.output += prev.output; - } - } - if (extglobs.length && tok.type !== "paren") { - extglobs[extglobs.length - 1].inner += tok.value; - } - if (tok.value || tok.output) append(tok); - if (prev && prev.type === "text" && tok.type === "text") { - prev.value += tok.value; - prev.output = (prev.output || "") + tok.value; - return; - } - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - const extglobOpen = (type2, value2) => { - const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? "(" : "") + token.open; - increment("parens"); - push({ type: type2, value: value2, output: state.output ? "" : ONE_CHAR }); - push({ type: "paren", extglob: true, value: advance(), output }); - extglobs.push(token); - }; - const extglobClose = (token) => { - let output = token.close + (opts.capture ? ")" : ""); - let rest; - if (token.type === "negate") { - let extglobStar = star; - if (token.inner && token.inner.length > 1 && token.inner.includes("/")) { - extglobStar = globstar(opts); - } - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - const expression = parse(rest, { ...options, fastpaths: false }).output; - output = token.close = `)${expression})${extglobStar})`; - } - if (token.prev.type === "bos") { - state.negatedExtglob = true; - } - } - push({ type: "paren", extglob: true, value, output }); - decrement("parens"); - }; - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === "\\") { - backslashes = true; - return m; - } - if (first === "?") { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ""); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); - } - return QMARK.repeat(chars.length); - } - if (first === ".") { - return DOT_LITERAL.repeat(chars.length); - } - if (first === "*") { - if (esc) { - return esc + first + (rest ? star : ""); - } - return star; - } - return esc ? m : `\\${m}`; - }); - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ""); - } else { - output = output.replace(/\\+/g, (m) => { - return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; - }); - } - } - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - state.output = utils.wrapOutput(output, state, options); - return state; - } - while (!eos()) { - value = advance(); - if (value === "\0") { - continue; - } - if (value === "\\") { - const next = peek(); - if (next === "/" && opts.bash !== true) { - continue; - } - if (next === "." || next === ";") { - continue; - } - if (!next) { - value += "\\"; - push({ type: "text", value }); - continue; - } - const match = /^\\+/.exec(remaining()); - let slashes = 0; - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += "\\"; - } - } - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - if (state.brackets === 0) { - push({ type: "text", value }); - continue; - } - } - if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { - if (opts.posix !== false && value === ":") { - const inner = prev.value.slice(1); - if (inner.includes("[")) { - prev.posix = true; - if (inner.includes(":")) { - const idx = prev.value.lastIndexOf("["); - const pre = prev.value.slice(0, idx); - const rest2 = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest2]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") { - value = `\\${value}`; - } - if (value === "]" && (prev.value === "[" || prev.value === "[^")) { - value = `\\${value}`; - } - if (opts.posix === true && value === "!" && prev.value === "[") { - value = "^"; - } - prev.value += value; - append({ value }); - continue; - } - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: "text", value }); - } - continue; - } - if (value === "(") { - increment("parens"); - push({ type: "paren", value }); - continue; - } - if (value === ")") { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "(")); - } - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - push({ type: "paren", value, output: state.parens ? ")" : "\\)" }); - decrement("parens"); - continue; - } - if (value === "[") { - if (opts.nobracket === true || !remaining().includes("]")) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("closing", "]")); - } - value = `\\${value}`; - } else { - increment("brackets"); - } - push({ type: "bracket", value }); - continue; - } - if (value === "]") { - if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { - push({ type: "text", value, output: `\\${value}` }); - continue; - } - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "[")); - } - push({ type: "text", value, output: `\\${value}` }); - continue; - } - decrement("brackets"); - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) { - value = `/${value}`; - } - prev.value += value; - append({ value }); - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - if (value === "{" && opts.nobrace !== true) { - increment("braces"); - const open = { - type: "brace", - value, - output: "(", - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - braces.push(open); - push(open); - continue; - } - if (value === "}") { - const brace = braces[braces.length - 1]; - if (opts.nobrace === true || !brace) { - push({ type: "text", value, output: value }); - continue; - } - let output = ")"; - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === "brace") { - break; - } - if (arr[i].type !== "dots") { - range.unshift(arr[i].value); - } - } - output = expandRange(range, opts); - state.backtrack = true; - } - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = "\\{"; - value = output = "\\}"; - state.output = out; - for (const t of toks) { - state.output += t.output || t.value; - } - } - push({ type: "brace", value, output }); - decrement("braces"); - braces.pop(); - continue; - } - if (value === "|") { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: "text", value }); - continue; - } - if (value === ",") { - let output = value; - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === "braces") { - brace.comma = true; - output = "|"; - } - push({ type: "comma", value, output }); - continue; - } - if (value === "/") { - if (prev.type === "dot" && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ""; - state.output = ""; - tokens.pop(); - prev = bos; - continue; - } - push({ type: "slash", value, output: SLASH_LITERAL }); - continue; - } - if (value === ".") { - if (state.braces > 0 && prev.type === "dot") { - if (prev.value === ".") prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = "dots"; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { - push({ type: "text", value, output: DOT_LITERAL }); - continue; - } - push({ type: "dot", value, output: DOT_LITERAL }); - continue; - } - if (value === "?") { - const isGroup = prev && prev.value === "("; - if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("qmark", value); - continue; - } - if (prev && prev.type === "paren") { - const next = peek(); - let output = value; - if (next === "<" && !utils.supportsLookbehinds()) { - throw new Error("Node.js v10 or higher is required for regex lookbehinds"); - } - if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) { - output = `\\${value}`; - } - push({ type: "text", value, output }); - continue; - } - if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { - push({ type: "qmark", value, output: QMARK_NO_DOT }); - continue; - } - push({ type: "qmark", value, output: QMARK }); - continue; - } - if (value === "!") { - if (opts.noextglob !== true && peek() === "(") { - if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { - extglobOpen("negate", value); - continue; - } - } - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - if (value === "+") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("plus", value); - continue; - } - if (prev && prev.value === "(" || opts.regex === false) { - push({ type: "plus", value, output: PLUS_LITERAL }); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { - push({ type: "plus", value }); - continue; - } - push({ type: "plus", value: PLUS_LITERAL }); - continue; - } - if (value === "@") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - push({ type: "at", extglob: true, value, output: "" }); - continue; - } - push({ type: "text", value }); - continue; - } - if (value !== "*") { - if (value === "$" || value === "^") { - value = `\\${value}`; - } - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - push({ type: "text", value }); - continue; - } - if (prev && (prev.type === "globstar" || prev.star === true)) { - prev.type = "star"; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen("star", value); - continue; - } - if (prev.type === "star") { - if (opts.noglobstar === true) { - consume(value); - continue; - } - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === "slash" || prior.type === "bos"; - const afterStar = before && (before.type === "star" || before.type === "globstar"); - if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { - push({ type: "star", value, output: "" }); - continue; - } - const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); - const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); - if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { - push({ type: "star", value, output: "" }); - continue; - } - while (rest.slice(0, 3) === "/**") { - const after = input[state.index + 4]; - if (after && after !== "/") { - break; - } - rest = rest.slice(3); - consume("/**", 3); - } - if (prior.type === "bos" && eos()) { - prev.type = "globstar"; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { - const end = rest[1] !== void 0 ? "|$" : ""; - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - state.output += prior.output + prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - if (prior.type === "bos" && rest[0] === "/") { - prev.type = "globstar"; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - state.output = state.output.slice(0, -prev.output.length); - prev.type = "globstar"; - prev.output = globstar(opts); - prev.value += value; - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - const token = { type: "star", value, output: star }; - if (opts.bash === true) { - token.output = ".*?"; - if (prev.type === "bos" || prev.type === "slash") { - token.output = nodot + token.output; - } - push(token); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { - token.output = value; - push(token); - continue; - } - if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { - if (prev.type === "dot") { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - } else { - state.output += nodot; - prev.output += nodot; - } - if (peek() !== "*") { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - push(token); - } - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]")); - state.output = utils.escapeLast(state.output, "["); - decrement("brackets"); - } - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")")); - state.output = utils.escapeLast(state.output, "("); - decrement("parens"); - } - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}")); - state.output = utils.escapeLast(state.output, "{"); - decrement("braces"); - } - if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) { - push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); - } - if (state.backtrack === true) { - state.output = ""; - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - if (token.suffix) { - state.output += token.suffix; - } - } - } - return state; - }; - parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? "" : "?:"; - const state = { negated: false, prefix: "" }; - let star = opts.bash === true ? ".*?" : STAR; - if (opts.capture) { - star = `(${star})`; - } - const globstar = (opts2) => { - if (opts2.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const create3 = (str2) => { - switch (str2) { - case "*": - return `${nodot}${ONE_CHAR}${star}`; - case ".*": - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*.*": - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*/*": - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - case "**": - return nodot + globstar(opts); - case "**/*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - case "**/*.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "**/.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - default: { - const match = /^(.*?)\.(\w+)$/.exec(str2); - if (!match) return; - const source2 = create3(match[1]); - if (!source2) return; - return source2 + DOT_LITERAL + match[2]; - } - } - }; - const output = utils.removePrefix(input, state); - let source = create3(output); - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - return source; - }; - module2.exports = parse; - } -}); - -// node_modules/picomatch/lib/picomatch.js -var require_picomatch = __commonJS({ - "node_modules/picomatch/lib/picomatch.js"(exports2, module2) { - "use strict"; - var path6 = require("path"); - var scan = require_scan(); - var parse = require_parse3(); - var utils = require_utils6(); - var constants = require_constants7(); - var isObject2 = (val2) => val2 && typeof val2 === "object" && !Array.isArray(val2); - var picomatch = (glob2, options, returnState = false) => { - if (Array.isArray(glob2)) { - const fns = glob2.map((input) => picomatch(input, options, returnState)); - const arrayMatcher = (str2) => { - for (const isMatch of fns) { - const state2 = isMatch(str2); - if (state2) return state2; - } - return false; - }; - return arrayMatcher; - } - const isState = isObject2(glob2) && glob2.tokens && glob2.input; - if (glob2 === "" || typeof glob2 !== "string" && !isState) { - throw new TypeError("Expected pattern to be a non-empty string"); - } - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState ? picomatch.compileRe(glob2, options) : picomatch.makeRe(glob2, options, false, true); - const state = regex.state; - delete regex.state; - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob: glob2, posix }); - const result = { glob: glob2, state, regex, posix, input, output, match, isMatch }; - if (typeof opts.onResult === "function") { - opts.onResult(result); - } - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - if (isIgnored(input)) { - if (typeof opts.onIgnore === "function") { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - if (typeof opts.onMatch === "function") { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - if (returnState) { - matcher.state = state; - } - return matcher; - }; - picomatch.test = (input, regex, options, { glob: glob2, posix } = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected input to be a string"); - } - if (input === "") { - return { isMatch: false, output: "" }; - } - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob2; - let output = match && format ? format(input) : input; - if (match === false) { - output = format ? format(input) : input; - match = output === glob2; - } - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - return { isMatch: Boolean(match), match, output }; - }; - picomatch.matchBase = (input, glob2, options, posix = utils.isWindows(options)) => { - const regex = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options); - return regex.test(path6.basename(input)); - }; - picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); - picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); - }; - picomatch.scan = (input, options) => scan(input, options); - picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - const opts = options || {}; - const prepend = opts.contains ? "" : "^"; - const append = opts.contains ? "" : "$"; - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - return regex; - }; - picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== "string") { - throw new TypeError("Expected a non-empty string"); - } - let parsed = { negated: false, fastpaths: true }; - if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) { - parsed.output = parse.fastpaths(input, options); - } - if (!parsed.output) { - parsed = parse(input, options); - } - return picomatch.compileRe(parsed, options, returnOutput, returnState); - }; - picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } - }; - picomatch.constants = constants; - module2.exports = picomatch; - } -}); - -// node_modules/picomatch/index.js -var require_picomatch2 = __commonJS({ - "node_modules/picomatch/index.js"(exports2, module2) { - "use strict"; - module2.exports = require_picomatch(); - } -}); - -// node_modules/micromatch/index.js -var require_micromatch = __commonJS({ - "node_modules/micromatch/index.js"(exports2, module2) { - "use strict"; - var util = require("util"); - var braces = require_braces(); - var picomatch = require_picomatch2(); - var utils = require_utils6(); - var isEmptyString = (v) => v === "" || v === "./"; - var hasBraces = (v) => { - const index = v.indexOf("{"); - return index > -1 && v.indexOf("}", index) > -1; - }; - var micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - let omit = /* @__PURE__ */ new Set(); - let keep = /* @__PURE__ */ new Set(); - let items = /* @__PURE__ */ new Set(); - let negatives = 0; - let onResult = (state) => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) negatives++; - for (let item of list) { - let matched = isMatch(item, true); - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) continue; - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter((item) => !omit.has(item)); - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(", ")}"`); - } - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns; - } - } - return matches; - }; - micromatch.match = micromatch; - micromatch.matcher = (pattern, options) => picomatch(pattern, options); - micromatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); - micromatch.any = micromatch.isMatch; - micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = /* @__PURE__ */ new Set(); - let items = []; - let onResult = (state) => { - if (options.onResult) options.onResult(state); - items.push(state.output); - }; - let matches = new Set(micromatch(list, patterns, { ...options, onResult })); - for (let item of items) { - if (!matches.has(item)) { - result.add(item); - } - } - return [...result]; - }; - micromatch.contains = (str2, pattern, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str2)}"`); - } - if (Array.isArray(pattern)) { - return pattern.some((p) => micromatch.contains(str2, p, options)); - } - if (typeof pattern === "string") { - if (isEmptyString(str2) || isEmptyString(pattern)) { - return false; - } - if (str2.includes(pattern) || str2.startsWith("./") && str2.slice(2).includes(pattern)) { - return true; - } - } - return micromatch.isMatch(str2, pattern, { ...options, contains: true }); - }; - micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError("Expected the first argument to be an object"); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) res[key] = obj[key]; - return res; - }; - micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some((item) => isMatch(item))) { - return true; - } - } - return false; - }; - micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every((item) => isMatch(item))) { - return false; - } - } - return true; - }; - micromatch.all = (str2, patterns, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str2)}"`); - } - return [].concat(patterns).every((p) => picomatch(p, options)(str2)); - }; - micromatch.capture = (glob2, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob2), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - if (match) { - return match.slice(1).map((v) => v === void 0 ? "" : v); - } - }; - micromatch.makeRe = (...args) => picomatch.makeRe(...args); - micromatch.scan = (...args) => picomatch.scan(...args); - micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str2 of braces(String(pattern), options)) { - res.push(picomatch.parse(str2, options)); - } - } - return res; - }; - micromatch.braces = (pattern, options) => { - if (typeof pattern !== "string") throw new TypeError("Expected a string"); - if (options && options.nobrace === true || !hasBraces(pattern)) { - return [pattern]; - } - return braces(pattern, options); - }; - micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== "string") throw new TypeError("Expected a string"); - return micromatch.braces(pattern, { ...options, expand: true }); - }; - micromatch.hasBraces = hasBraces; - module2.exports = micromatch; - } -}); - -// node_modules/fast-glob/out/utils/pattern.js -var require_pattern = __commonJS({ - "node_modules/fast-glob/out/utils/pattern.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; - var path6 = require("path"); - var globParent = require_glob_parent(); - var micromatch = require_micromatch(); - var GLOBSTAR = "**"; - var ESCAPE_SYMBOL = "\\"; - var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; - var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; - var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; - var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; - var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; - var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; - function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); - } - exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern(pattern, options = {}) { - if (pattern === "") { - return false; - } - if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { - return true; - } - if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.braceExpansion !== false && hasBraceExpansion(pattern)) { - return true; - } - return false; - } - exports2.isDynamicPattern = isDynamicPattern; - function hasBraceExpansion(pattern) { - const openingBraceIndex = pattern.indexOf("{"); - if (openingBraceIndex === -1) { - return false; - } - const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1); - if (closingBraceIndex === -1) { - return false; - } - const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); - return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); - } - function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; - } - exports2.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports2.isNegativePattern = isNegativePattern; - function isPositivePattern(pattern) { - return !isNegativePattern(pattern); - } - exports2.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); - } - exports2.getNegativePatterns = getNegativePatterns; - function getPositivePatterns(patterns) { - return patterns.filter(isPositivePattern); - } - exports2.getPositivePatterns = getPositivePatterns; - function getPatternsInsideCurrentDirectory(patterns) { - return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); - } - exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; - function getPatternsOutsideCurrentDirectory(patterns) { - return patterns.filter(isPatternRelatedToParentDirectory); - } - exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; - function isPatternRelatedToParentDirectory(pattern) { - return pattern.startsWith("..") || pattern.startsWith("./.."); - } - exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; - function getBaseDirectory(pattern) { - return globParent(pattern, { flipBackslashes: false }); - } - exports2.getBaseDirectory = getBaseDirectory; - function hasGlobStar(pattern) { - return pattern.includes(GLOBSTAR); - } - exports2.hasGlobStar = hasGlobStar; - function endsWithSlashGlobStar(pattern) { - return pattern.endsWith("/" + GLOBSTAR); - } - exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; - function isAffectDepthOfReadingPattern(pattern) { - const basename = path6.basename(pattern); - return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); - } - exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; - function expandPatternsWithBraceExpansion(patterns) { - return patterns.reduce((collection, pattern) => { - return collection.concat(expandBraceExpansion(pattern)); - }, []); - } - exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; - function expandBraceExpansion(pattern) { - const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true }); - patterns.sort((a, b) => a.length - b.length); - return patterns.filter((pattern2) => pattern2 !== ""); - } - exports2.expandBraceExpansion = expandBraceExpansion; - function getPatternParts(pattern, options) { - let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); - if (parts.length === 0) { - parts = [pattern]; - } - if (parts[0].startsWith("/")) { - parts[0] = parts[0].slice(1); - parts.unshift(""); - } - return parts; - } - exports2.getPatternParts = getPatternParts; - function makeRe(pattern, options) { - return micromatch.makeRe(pattern, options); - } - exports2.makeRe = makeRe; - function convertPatternsToRe(patterns, options) { - return patterns.map((pattern) => makeRe(pattern, options)); - } - exports2.convertPatternsToRe = convertPatternsToRe; - function matchAny(entry, patternsRe) { - return patternsRe.some((patternRe) => patternRe.test(entry)); - } - exports2.matchAny = matchAny; - function removeDuplicateSlashes(pattern) { - return pattern.replace(DOUBLE_SLASH_RE, "/"); - } - exports2.removeDuplicateSlashes = removeDuplicateSlashes; - function partitionAbsoluteAndRelative(patterns) { - const absolute = []; - const relative = []; - for (const pattern of patterns) { - if (isAbsolute2(pattern)) { - absolute.push(pattern); - } else { - relative.push(pattern); - } - } - return [absolute, relative]; - } - exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; - function isAbsolute2(pattern) { - return path6.isAbsolute(pattern); - } - exports2.isAbsolute = isAbsolute2; - } -}); - -// node_modules/fast-glob/out/utils/stream.js -var require_stream = __commonJS({ - "node_modules/fast-glob/out/utils/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.merge = void 0; - var merge2 = require_merge2(); - function merge3(streams) { - const mergedStream = merge2(streams); - streams.forEach((stream) => { - stream.once("error", (error2) => mergedStream.emit("error", error2)); - }); - mergedStream.once("close", () => propagateCloseEventToSources(streams)); - mergedStream.once("end", () => propagateCloseEventToSources(streams)); - return mergedStream; - } - exports2.merge = merge3; - function propagateCloseEventToSources(streams) { - streams.forEach((stream) => stream.emit("close")); - } - } -}); - -// node_modules/fast-glob/out/utils/string.js -var require_string = __commonJS({ - "node_modules/fast-glob/out/utils/string.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEmpty = exports2.isString = void 0; - function isString(input) { - return typeof input === "string"; - } - exports2.isString = isString; - function isEmpty(input) { - return input === ""; - } - exports2.isEmpty = isEmpty; - } -}); - -// node_modules/fast-glob/out/utils/index.js -var require_utils7 = __commonJS({ - "node_modules/fast-glob/out/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0; - var array = require_array(); - exports2.array = array; - var errno = require_errno(); - exports2.errno = errno; - var fs7 = require_fs(); - exports2.fs = fs7; - var path6 = require_path(); - exports2.path = path6; - var pattern = require_pattern(); - exports2.pattern = pattern; - var stream = require_stream(); - exports2.stream = stream; - var string = require_string(); - exports2.string = string; - } -}); - -// node_modules/fast-glob/out/managers/tasks.js -var require_tasks = __commonJS({ - "node_modules/fast-glob/out/managers/tasks.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0; - var utils = require_utils7(); - function generate(input, settings) { - const patterns = processPatterns(input, settings); - const ignore = processPatterns(settings.ignore, settings); - const positivePatterns = getPositivePatterns(patterns); - const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); - const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); - const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); - const staticTasks = convertPatternsToTasks( - staticPatterns, - negativePatterns, - /* dynamic */ - false - ); - const dynamicTasks = convertPatternsToTasks( - dynamicPatterns, - negativePatterns, - /* dynamic */ - true - ); - return staticTasks.concat(dynamicTasks); - } - exports2.generate = generate; - function processPatterns(input, settings) { - let patterns = input; - if (settings.braceExpansion) { - patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); - } - if (settings.baseNameMatch) { - patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`); - } - return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); - } - function convertPatternsToTasks(positive, negative, dynamic) { - const tasks = []; - const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); - const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); - const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); - const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); - tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); - if ("." in insideCurrentDirectoryGroup) { - tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)); - } else { - tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); - } - return tasks; - } - exports2.convertPatternsToTasks = convertPatternsToTasks; - function getPositivePatterns(patterns) { - return utils.pattern.getPositivePatterns(patterns); - } - exports2.getPositivePatterns = getPositivePatterns; - function getNegativePatternsAsPositive(patterns, ignore) { - const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); - const positive = negative.map(utils.pattern.convertToPositivePattern); - return positive; - } - exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive; - function groupPatternsByBaseDirectory(patterns) { - const group = {}; - return patterns.reduce((collection, pattern) => { - const base = utils.pattern.getBaseDirectory(pattern); - if (base in collection) { - collection[base].push(pattern); - } else { - collection[base] = [pattern]; - } - return collection; - }, group); - } - exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; - function convertPatternGroupsToTasks(positive, negative, dynamic) { - return Object.keys(positive).map((base) => { - return convertPatternGroupToTask(base, positive[base], negative, dynamic); - }); - } - exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks; - function convertPatternGroupToTask(base, positive, negative, dynamic) { - return { - dynamic, - positive, - negative, - base, - patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) - }; - } - exports2.convertPatternGroupToTask = convertPatternGroupToTask; - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/async.js -var require_async = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.read = void 0; - function read(path6, settings, callback) { - settings.fs.lstat(path6, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path6, (statError, stat) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - callFailureCallback(callback, statError); - return; - } - callSuccessCallback(callback, lstat); - return; - } - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - callSuccessCallback(callback, stat); - }); - }); - } - exports2.read = read; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/sync.js -var require_sync = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.read = void 0; - function read(path6, settings) { - const lstat = settings.fs.lstatSync(path6); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path6); - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - return stat; - } catch (error2) { - if (!settings.throwErrorOnBrokenSymbolicLink) { - return lstat; - } - throw error2; - } - } - exports2.read = read; - } -}); - -// node_modules/@nodelib/fs.stat/out/adapters/fs.js -var require_fs2 = __commonJS({ - "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs7 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs7.lstat, - stat: fs7.stat, - lstatSync: fs7.lstatSync, - statSync: fs7.statSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports2.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports2.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.stat/out/settings.js -var require_settings = __commonJS({ - "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fs7 = require_fs2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs7.createFileSystemAdapter(this._options.fs); - this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.stat/out/index.js -var require_out = __commonJS({ - "node_modules/@nodelib/fs.stat/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.statSync = exports2.stat = exports2.Settings = void 0; - var async = require_async(); - var sync = require_sync(); - var settings_1 = require_settings(); - exports2.Settings = settings_1.default; - function stat(path6, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path6, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path6, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.stat = stat; - function statSync(path6, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path6, settings); - } - exports2.statSync = statSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/queue-microtask/index.js -var require_queue_microtask = __commonJS({ - "node_modules/queue-microtask/index.js"(exports2, module2) { - var promise; - module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { - throw err; - }, 0)); - } -}); - -// node_modules/run-parallel/index.js -var require_run_parallel = __commonJS({ - "node_modules/run-parallel/index.js"(exports2, module2) { - module2.exports = runParallel; - var queueMicrotask2 = require_queue_microtask(); - function runParallel(tasks, cb) { - let results, pending, keys; - let isSync = true; - if (Array.isArray(tasks)) { - results = []; - pending = tasks.length; - } else { - keys = Object.keys(tasks); - results = {}; - pending = keys.length; - } - function done(err) { - function end() { - if (cb) cb(err, results); - cb = null; - } - if (isSync) queueMicrotask2(end); - else end(); - } - function each(i, err, result) { - results[i] = result; - if (--pending === 0 || err) { - done(err); - } - } - if (!pending) { - done(null); - } else if (keys) { - keys.forEach(function(key) { - tasks[key](function(err, result) { - each(key, err, result); - }); - }); - } else { - tasks.forEach(function(task, i) { - task(function(err, result) { - each(i, err, result); - }); - }); - } - isSync = false; - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/constants.js -var require_constants8 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; - var NODE_PROCESS_VERSION_PARTS = process.versions.node.split("."); - if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) { - throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); - } - var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); - var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); - var SUPPORTED_MAJOR_VERSION = 10; - var SUPPORTED_MINOR_VERSION = 10; - var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; - var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; - exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/fs.js -var require_fs3 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports2.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/index.js -var require_utils8 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fs = void 0; - var fs7 = require_fs3(); - exports2.fs = fs7; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/common.js -var require_common = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.joinPathSegments = void 0; - function joinPathSegments(a, b, separator) { - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports2.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/async.js -var require_async2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; - var fsStat = require_out(); - var rpl = require_run_parallel(); - var constants_1 = require_constants8(); - var utils = require_utils8(); - var common2 = require_common(); - function read(directory, settings, callback) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - readdirWithFileTypes(directory, settings, callback); - return; - } - readdir(directory, settings, callback); - } - exports2.read = read; - function readdirWithFileTypes(directory, settings, callback) { - settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const entries = dirents.map((dirent) => ({ - dirent, - name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - })); - if (!settings.followSymbolicLinks) { - callSuccessCallback(callback, entries); - return; - } - const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); - rpl(tasks, (rplError, rplEntries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, rplEntries); - }); - }); - } - exports2.readdirWithFileTypes = readdirWithFileTypes; - function makeRplTaskEntry(entry, settings) { - return (done) => { - if (!entry.dirent.isSymbolicLink()) { - done(null, entry); - return; - } - settings.fs.stat(entry.path, (statError, stats) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - done(statError); - return; - } - done(null, entry); - return; - } - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - done(null, entry); - }); - }; - } - function readdir(directory, settings, callback) { - settings.fs.readdir(directory, (readdirError, names) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const tasks = names.map((name) => { - const path6 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path6, settings.fsStatSettings, (error2, stats) => { - if (error2 !== null) { - done(error2); - return; - } - const entry = { - name, - path: path6, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - done(null, entry); - }); - }; - }); - rpl(tasks, (rplError, entries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, entries); - }); - }); - } - exports2.readdir = readdir; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/sync.js -var require_sync2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; - var fsStat = require_out(); - var constants_1 = require_constants8(); - var utils = require_utils8(); - var common2 = require_common(); - function read(directory, settings) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings); - } - return readdir(directory, settings); - } - exports2.read = read; - function readdirWithFileTypes(directory, settings) { - const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); - return dirents.map((dirent) => { - const entry = { - dirent, - name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - }; - if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { - try { - const stats = settings.fs.statSync(entry.path); - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - } catch (error2) { - if (settings.throwErrorOnBrokenSymbolicLink) { - throw error2; - } - } - } - return entry; - }); - } - exports2.readdirWithFileTypes = readdirWithFileTypes; - function readdir(directory, settings) { - const names = settings.fs.readdirSync(directory); - return names.map((name) => { - const entryPath = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - const stats = fsStat.statSync(entryPath, settings.fsStatSettings); - const entry = { - name, - path: entryPath, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - return entry; - }); - } - exports2.readdir = readdir; - } -}); - -// node_modules/@nodelib/fs.scandir/out/adapters/fs.js -var require_fs4 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs7 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs7.lstat, - stat: fs7.stat, - lstatSync: fs7.lstatSync, - statSync: fs7.statSync, - readdir: fs7.readdir, - readdirSync: fs7.readdirSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports2.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports2.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.scandir/out/settings.js -var require_settings2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path6 = require("path"); - var fsStat = require_out(); - var fs7 = require_fs4(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs7.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path6.sep); - this.stats = this._getValue(this._options.stats, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - this.fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this.followSymbolicLinks, - fs: this.fs, - throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.scandir/out/index.js -var require_out2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Settings = exports2.scandirSync = exports2.scandir = void 0; - var async = require_async2(); - var sync = require_sync2(); - var settings_1 = require_settings2(); - exports2.Settings = settings_1.default; - function scandir(path6, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path6, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path6, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.scandir = scandir; - function scandirSync(path6, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path6, settings); - } - exports2.scandirSync = scandirSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/reusify/reusify.js -var require_reusify = __commonJS({ - "node_modules/reusify/reusify.js"(exports2, module2) { - "use strict"; - function reusify(Constructor) { - var head = new Constructor(); - var tail = head; - function get() { - var current = head; - if (current.next) { - head = current.next; - } else { - head = new Constructor(); - tail = head; - } - current.next = null; - return current; - } - function release(obj) { - tail.next = obj; - tail = obj; - } - return { - get, - release - }; - } - module2.exports = reusify; - } -}); - -// node_modules/fastq/queue.js -var require_queue = __commonJS({ - "node_modules/fastq/queue.js"(exports2, module2) { - "use strict"; - var reusify = require_reusify(); - function fastqueue(context2, worker, concurrency) { - if (typeof context2 === "function") { - concurrency = worker; - worker = context2; - context2 = null; - } - var cache = reusify(Task); - var queueHead = null; - var queueTail = null; - var _running = 0; - var self2 = { - push, - drain: noop, - saturated: noop, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop, - kill, - killAndDrain - }; - return self2; - function running() { - return _running; - } - function pause() { - self2.paused = true; - } - function length() { - var current = queueHead; - var counter = 0; - while (current) { - current = current.next; - counter++; - } - return counter; - } - function getQueue() { - var current = queueHead; - var tasks = []; - while (current) { - tasks.push(current.value); - current = current.next; - } - return tasks; - } - function resume() { - if (!self2.paused) return; - self2.paused = false; - for (var i = 0; i < self2.concurrency; i++) { - _running++; - release(); - } - } - function idle() { - return _running === 0 && self2.length() === 0; - } - function push(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release; - current.value = value; - current.callback = done || noop; - if (_running === self2.concurrency || self2.paused) { - if (queueTail) { - queueTail.next = current; - queueTail = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context2, current.value, current.worked); - } - } - function unshift(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release; - current.value = value; - current.callback = done || noop; - if (_running === self2.concurrency || self2.paused) { - if (queueHead) { - current.next = queueHead; - queueHead = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context2, current.value, current.worked); - } - } - function release(holder) { - if (holder) { - cache.release(holder); - } - var next = queueHead; - if (next) { - if (!self2.paused) { - if (queueTail === queueHead) { - queueTail = null; - } - queueHead = next.next; - next.next = null; - worker.call(context2, next.value, next.worked); - if (queueTail === null) { - self2.empty(); - } - } else { - _running--; - } - } else if (--_running === 0) { - self2.drain(); - } - } - function kill() { - queueHead = null; - queueTail = null; - self2.drain = noop; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self2.drain(); - self2.drain = noop; - } - } - function noop() { - } - function Task() { - this.value = null; - this.callback = noop; - this.next = null; - this.release = noop; - this.context = null; - var self2 = this; - this.worked = function worked(err, result) { - var callback = self2.callback; - self2.value = null; - self2.callback = noop; - callback.call(self2.context, err, result); - self2.release(self2); - }; - } - module2.exports = fastqueue; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/common.js -var require_common2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0; - function isFatalError(settings, error2) { - if (settings.errorFilter === null) { - return true; - } - return !settings.errorFilter(error2); - } - exports2.isFatalError = isFatalError; - function isAppliedFilter(filter, value) { - return filter === null || filter(value); - } - exports2.isAppliedFilter = isAppliedFilter; - function replacePathSegmentSeparator(filepath, separator) { - return filepath.split(/[/\\]/).join(separator); - } - exports2.replacePathSegmentSeparator = replacePathSegmentSeparator; - function joinPathSegments(a, b, separator) { - if (a === "") { - return b; - } - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports2.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/reader.js -var require_reader = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var common2 = require_common2(); - var Reader = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._root = common2.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); - } - }; - exports2.default = Reader; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/async.js -var require_async3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var events_1 = require("events"); - var fsScandir = require_out2(); - var fastq = require_queue(); - var common2 = require_common2(); - var reader_1 = require_reader(); - var AsyncReader = class extends reader_1.default { - constructor(_root, _settings) { - super(_root, _settings); - this._settings = _settings; - this._scandir = fsScandir.scandir; - this._emitter = new events_1.EventEmitter(); - this._queue = fastq(this._worker.bind(this), this._settings.concurrency); - this._isFatalError = false; - this._isDestroyed = false; - this._queue.drain = () => { - if (!this._isFatalError) { - this._emitter.emit("end"); - } - }; - } - read() { - this._isFatalError = false; - this._isDestroyed = false; - setImmediate(() => { - this._pushToQueue(this._root, this._settings.basePath); - }); - return this._emitter; - } - get isDestroyed() { - return this._isDestroyed; - } - destroy() { - if (this._isDestroyed) { - throw new Error("The reader is already destroyed"); - } - this._isDestroyed = true; - this._queue.killAndDrain(); - } - onEntry(callback) { - this._emitter.on("entry", callback); - } - onError(callback) { - this._emitter.once("error", callback); - } - onEnd(callback) { - this._emitter.once("end", callback); - } - _pushToQueue(directory, base) { - const queueItem = { directory, base }; - this._queue.push(queueItem, (error2) => { - if (error2 !== null) { - this._handleError(error2); - } - }); - } - _worker(item, done) { - this._scandir(item.directory, this._settings.fsScandirSettings, (error2, entries) => { - if (error2 !== null) { - done(error2, void 0); - return; - } - for (const entry of entries) { - this._handleEntry(entry, item.base); - } - done(null, void 0); - }); - } - _handleError(error2) { - if (this._isDestroyed || !common2.isFatalError(this._settings, error2)) { - return; - } - this._isFatalError = true; - this._isDestroyed = true; - this._emitter.emit("error", error2); - } - _handleEntry(entry, base) { - if (this._isDestroyed || this._isFatalError) { - return; - } - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { - this._emitEntry(entry); - } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _emitEntry(entry) { - this._emitter.emit("entry", entry); - } - }; - exports2.default = AsyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/async.js -var require_async4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var async_1 = require_async3(); - var AsyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._storage = []; - } - read(callback) { - this._reader.onError((error2) => { - callFailureCallback(callback, error2); - }); - this._reader.onEntry((entry) => { - this._storage.push(entry); - }); - this._reader.onEnd(() => { - callSuccessCallback(callback, this._storage); - }); - this._reader.read(); - } - }; - exports2.default = AsyncProvider; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, entries) { - callback(null, entries); - } - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/stream.js -var require_stream2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var async_1 = require_async3(); - var StreamProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._stream = new stream_1.Readable({ - objectMode: true, - read: () => { - }, - destroy: () => { - if (!this._reader.isDestroyed) { - this._reader.destroy(); - } - } - }); - } - read() { - this._reader.onError((error2) => { - this._stream.emit("error", error2); - }); - this._reader.onEntry((entry) => { - this._stream.push(entry); - }); - this._reader.onEnd(() => { - this._stream.push(null); - }); - this._reader.read(); - return this._stream; - } - }; - exports2.default = StreamProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/sync.js -var require_sync3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsScandir = require_out2(); - var common2 = require_common2(); - var reader_1 = require_reader(); - var SyncReader = class extends reader_1.default { - constructor() { - super(...arguments); - this._scandir = fsScandir.scandirSync; - this._storage = []; - this._queue = /* @__PURE__ */ new Set(); - } - read() { - this._pushToQueue(this._root, this._settings.basePath); - this._handleQueue(); - return this._storage; - } - _pushToQueue(directory, base) { - this._queue.add({ directory, base }); - } - _handleQueue() { - for (const item of this._queue.values()) { - this._handleDirectory(item.directory, item.base); - } - } - _handleDirectory(directory, base) { - try { - const entries = this._scandir(directory, this._settings.fsScandirSettings); - for (const entry of entries) { - this._handleEntry(entry, base); - } - } catch (error2) { - this._handleError(error2); - } - } - _handleError(error2) { - if (!common2.isFatalError(this._settings, error2)) { - return; - } - throw error2; - } - _handleEntry(entry, base) { - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { - this._pushToStorage(entry); - } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _pushToStorage(entry) { - this._storage.push(entry); - } - }; - exports2.default = SyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/sync.js -var require_sync4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var sync_1 = require_sync3(); - var SyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new sync_1.default(this._root, this._settings); - } - read() { - return this._reader.read(); - } - }; - exports2.default = SyncProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/settings.js -var require_settings3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path6 = require("path"); - var fsScandir = require_out2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.basePath = this._getValue(this._options.basePath, void 0); - this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); - this.deepFilter = this._getValue(this._options.deepFilter, null); - this.entryFilter = this._getValue(this._options.entryFilter, null); - this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path6.sep); - this.fsScandirSettings = new fsScandir.Settings({ - followSymbolicLinks: this._options.followSymbolicLinks, - fs: this._options.fs, - pathSegmentSeparator: this._options.pathSegmentSeparator, - stats: this._options.stats, - throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.walk/out/index.js -var require_out3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0; - var async_1 = require_async4(); - var stream_1 = require_stream2(); - var sync_1 = require_sync4(); - var settings_1 = require_settings3(); - exports2.Settings = settings_1.default; - function walk(directory, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); - return; - } - new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); - } - exports2.walk = walk; - function walkSync(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new sync_1.default(directory, settings); - return provider.read(); - } - exports2.walkSync = walkSync; - function walkStream(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new stream_1.default(directory, settings); - return provider.read(); - } - exports2.walkStream = walkStream; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/fast-glob/out/readers/reader.js -var require_reader2 = __commonJS({ - "node_modules/fast-glob/out/readers/reader.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path6 = require("path"); - var fsStat = require_out(); - var utils = require_utils7(); - var Reader = class { - constructor(_settings) { - this._settings = _settings; - this._fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this._settings.followSymbolicLinks, - fs: this._settings.fs, - throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks - }); - } - _getFullEntryPath(filepath) { - return path6.resolve(this._settings.cwd, filepath); - } - _makeEntry(stats, pattern) { - const entry = { - name: pattern, - path: pattern, - dirent: utils.fs.createDirentFromStats(pattern, stats) - }; - if (this._settings.stats) { - entry.stats = stats; - } - return entry; - } - _isFatalError(error2) { - return !utils.errno.isEnoentCodeError(error2) && !this._settings.suppressErrors; - } - }; - exports2.default = Reader; - } -}); - -// node_modules/fast-glob/out/readers/stream.js -var require_stream3 = __commonJS({ - "node_modules/fast-glob/out/readers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderStream = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkStream = fsWalk.walkStream; - this._stat = fsStat.stat; - } - dynamic(root, options) { - return this._walkStream(root, options); - } - static(patterns, options) { - const filepaths = patterns.map(this._getFullEntryPath, this); - const stream = new stream_1.PassThrough({ objectMode: true }); - stream._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream.push(entry); - } - if (index === filepaths.length - 1) { - stream.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream.write(i); - } - return stream; - } - _getEntry(filepath, pattern, options) { - return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error2) => { - if (options.errorFilter(error2)) { - return null; - } - throw error2; - }); - } - _getStat(filepath) { - return new Promise((resolve5, reject) => { - this._stat(filepath, this._fsStatSettings, (error2, stats) => { - return error2 === null ? resolve5(stats) : reject(error2); - }); - }); - } - }; - exports2.default = ReaderStream; - } -}); - -// node_modules/fast-glob/out/readers/async.js -var require_async5 = __commonJS({ - "node_modules/fast-glob/out/readers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var stream_1 = require_stream3(); - var ReaderAsync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkAsync = fsWalk.walk; - this._readerStream = new stream_1.default(this._settings); - } - dynamic(root, options) { - return new Promise((resolve5, reject) => { - this._walkAsync(root, options, (error2, entries) => { - if (error2 === null) { - resolve5(entries); - } else { - reject(error2); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream = this._readerStream.static(patterns, options); - return new Promise((resolve5, reject) => { - stream.once("error", reject); - stream.on("data", (entry) => entries.push(entry)); - stream.once("end", () => resolve5(entries)); - }); - } - }; - exports2.default = ReaderAsync; - } -}); - -// node_modules/fast-glob/out/providers/matchers/matcher.js -var require_matcher = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var Matcher = class { - constructor(_patterns, _settings, _micromatchOptions) { - this._patterns = _patterns; - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this._storage = []; - this._fillStorage(); - } - _fillStorage() { - for (const pattern of this._patterns) { - const segments = this._getPatternSegments(pattern); - const sections = this._splitSegmentsIntoSections(segments); - this._storage.push({ - complete: sections.length <= 1, - pattern, - segments, - sections - }); - } - } - _getPatternSegments(pattern) { - const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); - return parts.map((part) => { - const dynamic = utils.pattern.isDynamicPattern(part, this._settings); - if (!dynamic) { - return { - dynamic: false, - pattern: part - }; - } - return { - dynamic: true, - pattern: part, - patternRe: utils.pattern.makeRe(part, this._micromatchOptions) - }; - }); - } - _splitSegmentsIntoSections(segments) { - return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); - } - }; - exports2.default = Matcher; - } -}); - -// node_modules/fast-glob/out/providers/matchers/partial.js -var require_partial = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var matcher_1 = require_matcher(); - var PartialMatcher = class extends matcher_1.default { - match(filepath) { - const parts = filepath.split("/"); - const levels = parts.length; - const patterns = this._storage.filter((info5) => !info5.complete || info5.segments.length > levels); - for (const pattern of patterns) { - const section = pattern.sections[0]; - if (!pattern.complete && levels > section.length) { - return true; - } - const match = parts.every((part, index) => { - const segment = pattern.segments[index]; - if (segment.dynamic && segment.patternRe.test(part)) { - return true; - } - if (!segment.dynamic && segment.pattern === part) { - return true; - } - return false; - }); - if (match) { - return true; - } - } - return false; - } - }; - exports2.default = PartialMatcher; - } -}); - -// node_modules/fast-glob/out/providers/filters/deep.js -var require_deep = __commonJS({ - "node_modules/fast-glob/out/providers/filters/deep.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var partial_1 = require_partial(); - var DeepFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - } - getFilter(basePath, positive, negative) { - const matcher = this._getMatcher(positive); - const negativeRe = this._getNegativePatternsRe(negative); - return (entry) => this._filter(basePath, entry, matcher, negativeRe); - } - _getMatcher(patterns) { - return new partial_1.default(patterns, this._settings, this._micromatchOptions); - } - _getNegativePatternsRe(patterns) { - const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); - return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); - } - _filter(basePath, entry, matcher, negativeRe) { - if (this._isSkippedByDeep(basePath, entry.path)) { - return false; - } - if (this._isSkippedSymbolicLink(entry)) { - return false; - } - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._isSkippedByPositivePatterns(filepath, matcher)) { - return false; - } - return this._isSkippedByNegativePatterns(filepath, negativeRe); - } - _isSkippedByDeep(basePath, entryPath) { - if (this._settings.deep === Infinity) { - return false; - } - return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; - } - _getEntryLevel(basePath, entryPath) { - const entryPathDepth = entryPath.split("/").length; - if (basePath === "") { - return entryPathDepth; - } - const basePathDepth = basePath.split("/").length; - return entryPathDepth - basePathDepth; - } - _isSkippedSymbolicLink(entry) { - return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); - } - _isSkippedByPositivePatterns(entryPath, matcher) { - return !this._settings.baseNameMatch && !matcher.match(entryPath); - } - _isSkippedByNegativePatterns(entryPath, patternsRe) { - return !utils.pattern.matchAny(entryPath, patternsRe); - } - }; - exports2.default = DeepFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/entry.js -var require_entry = __commonJS({ - "node_modules/fast-glob/out/providers/filters/entry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var EntryFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this.index = /* @__PURE__ */ new Map(); - } - getFilter(positive, negative) { - const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); - const patterns = { - positive: { - all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) - }, - negative: { - absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), - relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) - } - }; - return (entry) => this._filter(entry, patterns); - } - _filter(entry, patterns) { - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._settings.unique && this._isDuplicateEntry(filepath)) { - return false; - } - if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { - return false; - } - const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); - if (this._settings.unique && isMatched) { - this._createIndexRecord(filepath); - } - return isMatched; - } - _isDuplicateEntry(filepath) { - return this.index.has(filepath); - } - _createIndexRecord(filepath) { - this.index.set(filepath, void 0); - } - _onlyFileFilter(entry) { - return this._settings.onlyFiles && !entry.dirent.isFile(); - } - _onlyDirectoryFilter(entry) { - return this._settings.onlyDirectories && !entry.dirent.isDirectory(); - } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { - return utils.pattern.matchAny(filepath + "/", patternsRe); - } - return isMatched; - } - }; - exports2.default = EntryFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/error.js -var require_error = __commonJS({ - "node_modules/fast-glob/out/providers/filters/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var ErrorFilter = class { - constructor(_settings) { - this._settings = _settings; - } - getFilter() { - return (error2) => this._isNonFatalError(error2); - } - _isNonFatalError(error2) { - return utils.errno.isEnoentCodeError(error2) || this._settings.suppressErrors; - } - }; - exports2.default = ErrorFilter; - } -}); - -// node_modules/fast-glob/out/providers/transformers/entry.js -var require_entry2 = __commonJS({ - "node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var EntryTransformer = class { - constructor(_settings) { - this._settings = _settings; - } - getTransformer() { - return (entry) => this._transform(entry); - } - _transform(entry) { - let filepath = entry.path; - if (this._settings.absolute) { - filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); - filepath = utils.path.unixify(filepath); - } - if (this._settings.markDirectories && entry.dirent.isDirectory()) { - filepath += "/"; - } - if (!this._settings.objectMode) { - return filepath; - } - return Object.assign(Object.assign({}, entry), { path: filepath }); - } - }; - exports2.default = EntryTransformer; - } -}); - -// node_modules/fast-glob/out/providers/provider.js -var require_provider = __commonJS({ - "node_modules/fast-glob/out/providers/provider.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path6 = require("path"); - var deep_1 = require_deep(); - var entry_1 = require_entry(); - var error_1 = require_error(); - var entry_2 = require_entry2(); - var Provider = class { - constructor(_settings) { - this._settings = _settings; - this.errorFilter = new error_1.default(this._settings); - this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); - this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); - this.entryTransformer = new entry_2.default(this._settings); - } - _getRootDirectory(task) { - return path6.resolve(this._settings.cwd, task.base); - } - _getReaderOptions(task) { - const basePath = task.base === "." ? "" : task.base; - return { - basePath, - pathSegmentSeparator: "/", - concurrency: this._settings.concurrency, - deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), - entryFilter: this.entryFilter.getFilter(task.positive, task.negative), - errorFilter: this.errorFilter.getFilter(), - followSymbolicLinks: this._settings.followSymbolicLinks, - fs: this._settings.fs, - stats: this._settings.stats, - throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, - transform: this.entryTransformer.getTransformer() - }; - } - _getMicromatchOptions() { - return { - dot: this._settings.dot, - matchBase: this._settings.baseNameMatch, - nobrace: !this._settings.braceExpansion, - nocase: !this._settings.caseSensitiveMatch, - noext: !this._settings.extglob, - noglobstar: !this._settings.globstar, - posix: true, - strictSlashes: false - }; - } - }; - exports2.default = Provider; - } -}); - -// node_modules/fast-glob/out/providers/async.js -var require_async6 = __commonJS({ - "node_modules/fast-glob/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var async_1 = require_async5(); - var provider_1 = require_provider(); - var ProviderAsync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new async_1.default(this._settings); - } - async read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = await this.api(root, task, options); - return entries.map((entry) => options.transform(entry)); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderAsync; - } -}); - -// node_modules/fast-glob/out/providers/stream.js -var require_stream4 = __commonJS({ - "node_modules/fast-glob/out/providers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var stream_2 = require_stream3(); - var provider_1 = require_provider(); - var ProviderStream = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new stream_2.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const source = this.api(root, task, options); - const destination = new stream_1.Readable({ objectMode: true, read: () => { - } }); - source.once("error", (error2) => destination.emit("error", error2)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")); - destination.once("close", () => source.destroy()); - return destination; - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderStream; - } -}); - -// node_modules/fast-glob/out/readers/sync.js -var require_sync5 = __commonJS({ - "node_modules/fast-glob/out/readers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderSync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkSync = fsWalk.walkSync; - this._statSync = fsStat.statSync; - } - dynamic(root, options) { - return this._walkSync(root, options); - } - static(patterns, options) { - const entries = []; - for (const pattern of patterns) { - const filepath = this._getFullEntryPath(pattern); - const entry = this._getEntry(filepath, pattern, options); - if (entry === null || !options.entryFilter(entry)) { - continue; - } - entries.push(entry); - } - return entries; - } - _getEntry(filepath, pattern, options) { - try { - const stats = this._getStat(filepath); - return this._makeEntry(stats, pattern); - } catch (error2) { - if (options.errorFilter(error2)) { - return null; - } - throw error2; - } - } - _getStat(filepath) { - return this._statSync(filepath, this._fsStatSettings); - } - }; - exports2.default = ReaderSync; - } -}); - -// node_modules/fast-glob/out/providers/sync.js -var require_sync6 = __commonJS({ - "node_modules/fast-glob/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var sync_1 = require_sync5(); - var provider_1 = require_provider(); - var ProviderSync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new sync_1.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = this.api(root, task, options); - return entries.map(options.transform); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderSync; - } -}); - -// node_modules/fast-glob/out/settings.js -var require_settings4 = __commonJS({ - "node_modules/fast-glob/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs7 = require("fs"); - var os = require("os"); - var CPU_COUNT = Math.max(os.cpus().length, 1); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs7.lstat, - lstatSync: fs7.lstatSync, - stat: fs7.stat, - statSync: fs7.statSync, - readdir: fs7.readdir, - readdirSync: fs7.readdirSync - }; - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.absolute = this._getValue(this._options.absolute, false); - this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); - this.braceExpansion = this._getValue(this._options.braceExpansion, true); - this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); - this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); - this.cwd = this._getValue(this._options.cwd, process.cwd()); - this.deep = this._getValue(this._options.deep, Infinity); - this.dot = this._getValue(this._options.dot, false); - this.extglob = this._getValue(this._options.extglob, true); - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); - this.fs = this._getFileSystemMethods(this._options.fs); - this.globstar = this._getValue(this._options.globstar, true); - this.ignore = this._getValue(this._options.ignore, []); - this.markDirectories = this._getValue(this._options.markDirectories, false); - this.objectMode = this._getValue(this._options.objectMode, false); - this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); - this.onlyFiles = this._getValue(this._options.onlyFiles, true); - this.stats = this._getValue(this._options.stats, false); - this.suppressErrors = this._getValue(this._options.suppressErrors, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); - this.unique = this._getValue(this._options.unique, true); - if (this.onlyDirectories) { - this.onlyFiles = false; - } - if (this.stats) { - this.objectMode = true; - } - this.ignore = [].concat(this.ignore); - } - _getValue(option, value) { - return option === void 0 ? value : option; - } - _getFileSystemMethods(methods = {}) { - return Object.assign(Object.assign({}, exports2.DEFAULT_FILE_SYSTEM_ADAPTER), methods); - } - }; - exports2.default = Settings; - } -}); - -// node_modules/fast-glob/out/index.js -var require_out4 = __commonJS({ - "node_modules/fast-glob/out/index.js"(exports2, module2) { - "use strict"; - var taskManager = require_tasks(); - var async_1 = require_async6(); - var stream_1 = require_stream4(); - var sync_1 = require_sync6(); - var settings_1 = require_settings4(); - var utils = require_utils7(); - async function FastGlob(source, options) { - assertPatternsInput(source); - const works = getWorks(source, async_1.default, options); - const result = await Promise.all(works); - return utils.array.flatten(result); - } - (function(FastGlob2) { - FastGlob2.glob = FastGlob2; - FastGlob2.globSync = sync; - FastGlob2.globStream = stream; - FastGlob2.async = FastGlob2; - function sync(source, options) { - assertPatternsInput(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream(source, options) { - assertPatternsInput(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream; - function generateTasks(source, options) { - assertPatternsInput(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern; - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPathToPattern(source); - } - FastGlob2.convertPathToPattern = convertPathToPattern; - let posix; - (function(posix2) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapePosixPath(source); - } - posix2.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertPosixPathToPattern(source); - } - posix2.convertPathToPattern = convertPathToPattern2; - })(posix = FastGlob2.posix || (FastGlob2.posix = {})); - let win32; - (function(win322) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapeWindowsPath(source); - } - win322.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertWindowsPathToPattern(source); - } - win322.convertPathToPattern = convertPathToPattern2; - })(win32 = FastGlob2.win32 || (FastGlob2.win32 = {})); - })(FastGlob || (FastGlob = {})); - function getWorks(source, _Provider, options) { - const patterns = [].concat(source); - const settings = new settings_1.default(options); - const tasks = taskManager.generate(patterns, settings); - const provider = new _Provider(settings); - return tasks.map(provider.read, provider); - } - function assertPatternsInput(input) { - const source = [].concat(input); - const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); - if (!isValidSource) { - throw new TypeError("Patterns must be a string (non empty) or an array of strings"); - } - } - module2.exports = FastGlob; - } -}); - -// node_modules/path-type/index.js -var require_path_type = __commonJS({ - "node_modules/path-type/index.js"(exports2) { - "use strict"; - var { promisify } = require("util"); - var fs7 = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify(fs7[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - return fs7[fsStatType](filePath)[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - exports2.isFile = isType.bind(null, "stat", "isFile"); - exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// node_modules/dir-glob/index.js -var require_dir_glob = __commonJS({ - "node_modules/dir-glob/index.js"(exports2, module2) { - "use strict"; - var path6 = require("path"); - var pathType = require_path_type(); - var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; - var getPath = (filepath, cwd) => { - const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; - return path6.isAbsolute(pth) ? pth : path6.join(cwd, pth); - }; - var addExtensions = (file, extensions) => { - if (path6.extname(file)) { - return `**/${file}`; - } - return `**/${file}.${getExtensions(extensions)}`; - }; - var getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - if (options.files && options.extensions) { - return options.files.map((x) => path6.posix.join(directory, addExtensions(x, options.extensions))); - } - if (options.files) { - return options.files.map((x) => path6.posix.join(directory, `**/${x}`)); - } - if (options.extensions) { - return [path6.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - return [path6.posix.join(directory, "**")]; - }; - module2.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = await Promise.all([].concat(input).map(async (x) => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - return [].concat.apply([], globs); - }; - module2.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - return [].concat.apply([], globs); - }; - } -}); - -// node_modules/ignore/index.js -var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports2, module2) { - function makeArray(subject) { - return Array.isArray(subject) ? subject : [subject]; - } - var EMPTY = ""; - var SPACE = " "; - var ESCAPE = "\\"; - var REGEX_TEST_BLANK_LINE = /^\s+$/; - var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; - var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; - var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; - var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; - var SLASH = "/"; - var TMP_KEY_IGNORE = "node-ignore"; - if (typeof Symbol !== "undefined") { - TMP_KEY_IGNORE = Symbol.for("node-ignore"); - } - var KEY_IGNORE = TMP_KEY_IGNORE; - var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); - var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; - var RETURN_FALSE = () => false; - var sanitizeRange = (range) => range.replace( - REGEX_REGEXP_RANGE, - (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY - ); - var cleanRangeBackSlash = (slashes) => { - const { length } = slashes; - return slashes.slice(0, length - length % 2); - }; - var REPLACERS = [ - [ - // remove BOM - // TODO: - // Other similar zero-width characters? - /^\uFEFF/, - () => EMPTY - ], - // > Trailing spaces are ignored unless they are quoted with backslash ("\") - [ - // (a\ ) -> (a ) - // (a ) -> (a) - // (a \ ) -> (a ) - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY - ], - // replace (\ ) with ' ' - [ - /\\\s/g, - () => SPACE - ], - // Escape metacharacters - // which is written down by users but means special for regular expressions. - // > There are 12 characters with special meanings: - // > - the backslash \, - // > - the caret ^, - // > - the dollar sign $, - // > - the period or dot ., - // > - the vertical bar or pipe symbol |, - // > - the question mark ?, - // > - the asterisk or star *, - // > - the plus sign +, - // > - the opening parenthesis (, - // > - the closing parenthesis ), - // > - and the opening square bracket [, - // > - the opening curly brace {, - // > These special characters are often called "metacharacters". - [ - /[\\$.|*+(){^]/g, - (match) => `\\${match}` - ], - [ - // > a question mark (?) matches a single character - /(?!\\)\?/g, - () => "[^/]" - ], - // leading slash - [ - // > A leading slash matches the beginning of the pathname. - // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". - // A leading slash matches the beginning of the pathname - /^\//, - () => "^" - ], - // replace special metacharacter slash after the leading slash - [ - /\//g, - () => "\\/" - ], - [ - // > A leading "**" followed by a slash means match in all directories. - // > For example, "**/foo" matches file or directory "foo" anywhere, - // > the same as pattern "foo". - // > "**/foo/bar" matches file or directory "bar" anywhere that is directly - // > under directory "foo". - // Notice that the '*'s have been replaced as '\\*' - /^\^*\\\*\\\*\\\//, - // '**/foo' <-> 'foo' - () => "^(?:.*\\/)?" - ], - // starting - [ - // there will be no leading '/' - // (which has been replaced by section "leading slash") - // If starts with '**', adding a '^' to the regular expression also works - /^(?=[^^])/, - function startingReplacer() { - return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; - } - ], - // two globstars - [ - // Use lookahead assertions so that we could match more than one `'/**'` - /\\\/\\\*\\\*(?=\\\/|$)/g, - // Zero, one or several directories - // should not use '*', or it will be replaced by the next replacer - // Check if it is not the last `'/**'` - (_2, index, str2) => index + 6 < str2.length ? "(?:\\/[^\\/]+)*" : "\\/.+" - ], - // normal intermediate wildcards - [ - // Never replace escaped '*' - // ignore rule '\*' will match the path '*' - // 'abc.*/' -> go - // 'abc.*' -> skip this rule, - // coz trailing single wildcard will be handed by [trailing wildcard] - /(^|[^\\]+)(\\\*)+(?=.+)/g, - // '*.js' matches '.js' - // '*.js' doesn't match 'abc' - (_2, p1, p2) => { - const unescaped = p2.replace(/\\\*/g, "[^\\/]*"); - return p1 + unescaped; - } - ], - [ - // unescape, revert step 3 except for back slash - // For example, if a user escape a '\\*', - // after step 3, the result will be '\\\\\\*' - /\\\\\\(?=[$.|*+(){^])/g, - () => ESCAPE - ], - [ - // '\\\\' -> '\\' - /\\\\/g, - () => ESCAPE - ], - [ - // > The range notation, e.g. [a-zA-Z], - // > can be used to match one of the characters in a range. - // `\` is escaped by step 3 - /(\\)?\[([^\]/]*?)(\\*)($|\])/g, - (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" - ], - // ending - [ - // 'js' will not match 'js.' - // 'ab' will not match 'abc' - /(?:[^*])$/, - // WTF! - // https://git-scm.com/docs/gitignore - // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) - // which re-fixes #24, #38 - // > If there is a separator at the end of the pattern then the pattern - // > will only match directories, otherwise the pattern can match both - // > files and directories. - // 'js*' will not match 'a.js' - // 'js/' will not match 'a.js' - // 'js' will match 'a.js' and 'a.js/' - (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_2, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } - ] - ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; - } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); - }; - var isString = (subject) => typeof subject === "string"; - var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); - var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; - this.pattern = pattern; - this.negative = negative; - this.regex = regex; - } - }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; - let negative = false; - if (pattern.indexOf("!") === 0) { - negative = true; - pattern = pattern.substr(1); - } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); - return new IgnoreRule( - origin, - pattern, - negative, - regex - ); - }; - var throwError2 = (message, Ctor) => { - throw new Ctor(message); - }; - var checkPath = (path6, originalPath, doThrow) => { - if (!isString(path6)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path6) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path6)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; - }; - var isNotRelative = (path6) => REGEX_TEST_INVALID_PATH.test(path6); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define2(this, KEY_IGNORE, true); - this._rules = []; - this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); - } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); - } - _addPattern(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); - this._added = true; - return; - } - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignoreCase); - this._added = true; - this._rules.push(rule); - } - } - // @param {Array | string | Ignore} pattern - add(pattern) { - this._added = false; - makeArray( - isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { - this._initCache(); - } - return this; - } - // legacy - addPattern(pattern) { - return this.add(pattern); - } - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - _testOne(path6, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path6); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; - } - // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { - const path6 = originalPath && checkPath.convert(originalPath); - checkPath( - path6, - originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError2 - ); - return this._t(path6, cache, checkUnignored, slices); - } - _t(path6, cache, checkUnignored, slices) { - if (path6 in cache) { - return cache[path6]; - } - if (!slices) { - slices = path6.split(SLASH); - } - slices.pop(); - if (!slices.length) { - return cache[path6] = this._testOne(path6, checkUnignored); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path6] = parent.ignored ? parent : this._testOne(path6, checkUnignored); - } - ignores(path6) { - return this._test(path6, this._ignoreCache, false).ignored; - } - createFilter() { - return (path6) => !this.ignores(path6); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path6) { - return this._test(path6, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - var isPathValid = (path6) => checkPath(path6 && checkPath.convert(path6), path6, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module2.exports = factory; - if ( - // Detect `process` so that it can run in browsers. - typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") - ) { - const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); - checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path6) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path6) || isNotRelative(path6); - } - } -}); - -// node_modules/slash/index.js -var require_slash = __commonJS({ - "node_modules/slash/index.js"(exports2, module2) { - "use strict"; - module2.exports = (path6) => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path6); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path6); - if (isExtendedLengthPath || hasNonAscii) { - return path6; - } - return path6.replace(/\\/g, "/"); - }; - } -}); - -// node_modules/globby/gitignore.js -var require_gitignore = __commonJS({ - "node_modules/globby/gitignore.js"(exports2, module2) { - "use strict"; - var { promisify } = require("util"); - var fs7 = require("fs"); - var path6 = require("path"); - var fastGlob = require_out4(); - var gitIgnore = require_ignore(); - var slash = require_slash(); - var DEFAULT_IGNORE = [ - "**/node_modules/**", - "**/flow-typed/**", - "**/coverage/**", - "**/.git" - ]; - var readFileP = promisify(fs7.readFile); - var mapGitIgnorePatternTo = (base) => (ignore) => { - if (ignore.startsWith("!")) { - return "!" + path6.posix.join(base, ignore.slice(1)); - } - return path6.posix.join(base, ignore); - }; - var parseGitIgnore = (content, options) => { - const base = slash(path6.relative(options.cwd, path6.dirname(options.fileName))); - return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); - }; - var reduceIgnore = (files) => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - return ignores; - }; - var ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path6.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - return path6.join(cwd, p); - }; - var getIsIgnoredPredecate = (ignores, cwd) => { - return (p) => ignores.ignores(slash(path6.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); - }; - var getFile = async (file, cwd) => { - const filePath = path6.join(cwd, file); - const content = await readFileP(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var getFileSync = (file, cwd) => { - const filePath = path6.join(cwd, file); - const content = fs7.readFileSync(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) - } = {}) => { - return { ignore, cwd }; - }; - module2.exports = async (options) => { - options = normalizeOptions(options); - const paths = await fastGlob("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - module2.exports.sync = (options) => { - options = normalizeOptions(options); - const paths = fastGlob.sync("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = paths.map((file) => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - } -}); - -// node_modules/globby/stream-utils.js -var require_stream_utils = __commonJS({ - "node_modules/globby/stream-utils.js"(exports2, module2) { - "use strict"; - var { Transform } = require("stream"); - var ObjectTransform = class extends Transform { - constructor() { - super({ - objectMode: true - }); - } - }; - var FilterStream = class extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - callback(); - } - }; - var UniqueStream = class extends ObjectTransform { - constructor() { - super(); - this._pushed = /* @__PURE__ */ new Set(); - } - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - callback(); - } - }; - module2.exports = { - FilterStream, - UniqueStream - }; - } -}); - -// node_modules/globby/index.js -var require_globby = __commonJS({ - "node_modules/globby/index.js"(exports2, module2) { - "use strict"; - var fs7 = require("fs"); - var arrayUnion = require_array_union(); - var merge2 = require_merge2(); - var fastGlob = require_out4(); - var dirGlob = require_dir_glob(); - var gitignore = require_gitignore(); - var { FilterStream, UniqueStream } = require_stream_utils(); - var DEFAULT_FILTER = () => false; - var isNegative = (pattern) => pattern[0] === "!"; - var assertPatternsInput = (patterns) => { - if (!patterns.every((pattern) => typeof pattern === "string")) { - throw new TypeError("Patterns must be a string or an array of strings"); - } - }; - var checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - let stat; - try { - stat = fs7.statSync(options.cwd); - } catch { - return; - } - if (!stat.isDirectory()) { - throw new Error("The `cwd` option must be a path to a directory"); - } - }; - var getPathString = (p) => p.stats instanceof fs7.Stats ? p.path : p; - var generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - const globTasks = []; - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - for (const [index, pattern] of patterns.entries()) { - if (isNegative(pattern)) { - continue; - } - const ignore = patterns.slice(index).filter((pattern2) => isNegative(pattern2)).map((pattern2) => pattern2.slice(1)); - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - globTasks.push({ pattern, options }); - } - return globTasks; - }; - var globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === "object") { - options = { - ...options, - ...task.options.expandDirectories - }; - } - return fn(task.pattern, options); - }; - var getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - var getFilterSync = (options) => { - return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - var globToTask = (task) => (glob2) => { - const { options } = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - return { - pattern: glob2, - options - }; - }; - module2.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const getFilter = async () => { - return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - const getTasks = async () => { - const tasks2 = await Promise.all(globTasks.map(async (task) => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - return arrayUnion(...tasks2); - }; - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); - return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); - }; - module2.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - return matches.filter((path_) => !filter(path_)); - }; - module2.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - const filterStream = new FilterStream((p) => !filter(p)); - const uniqueStream = new UniqueStream(); - return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); - }; - module2.exports.generateGlobTasks = generateGlobTasks; - module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); - module2.exports.gitignore = gitignore; - } -}); - -// node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - "node_modules/graceful-fs/polyfills.js"(exports2, module2) { - var constants = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs7) { - if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs7); - } - if (!fs7.lutimes) { - patchLutimes(fs7); - } - fs7.chown = chownFix(fs7.chown); - fs7.fchown = chownFix(fs7.fchown); - fs7.lchown = chownFix(fs7.lchown); - fs7.chmod = chmodFix(fs7.chmod); - fs7.fchmod = chmodFix(fs7.fchmod); - fs7.lchmod = chmodFix(fs7.lchmod); - fs7.chownSync = chownFixSync(fs7.chownSync); - fs7.fchownSync = chownFixSync(fs7.fchownSync); - fs7.lchownSync = chownFixSync(fs7.lchownSync); - fs7.chmodSync = chmodFixSync(fs7.chmodSync); - fs7.fchmodSync = chmodFixSync(fs7.fchmodSync); - fs7.lchmodSync = chmodFixSync(fs7.lchmodSync); - fs7.stat = statFix(fs7.stat); - fs7.fstat = statFix(fs7.fstat); - fs7.lstat = statFix(fs7.lstat); - fs7.statSync = statFixSync(fs7.statSync); - fs7.fstatSync = statFixSync(fs7.fstatSync); - fs7.lstatSync = statFixSync(fs7.lstatSync); - if (fs7.chmod && !fs7.lchmod) { - fs7.lchmod = function(path6, mode, cb) { - if (cb) process.nextTick(cb); - }; - fs7.lchmodSync = function() { - }; - } - if (fs7.chown && !fs7.lchown) { - fs7.lchown = function(path6, uid, gid, cb) { - if (cb) process.nextTick(cb); - }; - fs7.lchownSync = function() { - }; - } - if (platform === "win32") { - fs7.rename = typeof fs7.rename !== "function" ? fs7.rename : (function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { - setTimeout(function() { - fs7.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er); - }); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); - return rename; - })(fs7.rename); - } - fs7.read = typeof fs7.read !== "function" ? fs7.read : (function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _2, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs7, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs7, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); - return read; - })(fs7.read); - fs7.readSync = typeof fs7.readSync !== "function" ? fs7.readSync : /* @__PURE__ */ (function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs7, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - })(fs7.readSync); - function patchLchmod(fs8) { - fs8.lchmod = function(path6, mode, callback) { - fs8.open( - path6, - constants.O_WRONLY | constants.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) callback(err); - return; - } - fs8.fchmod(fd, mode, function(err2) { - fs8.close(fd, function(err22) { - if (callback) callback(err2 || err22); - }); - }); - } - ); - }; - fs8.lchmodSync = function(path6, mode) { - var fd = fs8.openSync(path6, constants.O_WRONLY | constants.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs8.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs8.closeSync(fd); - } catch (er) { - } - } else { - fs8.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs8) { - if (constants.hasOwnProperty("O_SYMLINK") && fs8.futimes) { - fs8.lutimes = function(path6, at, mt, cb) { - fs8.open(path6, constants.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) cb(er); - return; - } - fs8.futimes(fd, at, mt, function(er2) { - fs8.close(fd, function(er22) { - if (cb) cb(er2 || er22); - }); - }); - }); - }; - fs8.lutimesSync = function(path6, at, mt) { - var fd = fs8.openSync(path6, constants.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs8.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs8.closeSync(fd); - } catch (er) { - } - } else { - fs8.closeSync(fd); - } - } - return ret; - }; - } else if (fs8.futimes) { - fs8.lutimes = function(_a, _b, _c, cb) { - if (cb) process.nextTick(cb); - }; - fs8.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) return orig; - return function(target, mode, cb) { - return orig.call(fs7, target, mode, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) return orig; - return function(target, mode) { - try { - return orig.call(fs7, target, mode); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function chownFix(orig) { - if (!orig) return orig; - return function(target, uid, gid, cb) { - return orig.call(fs7, target, uid, gid, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) return orig; - return function(target, uid, gid) { - try { - return orig.call(fs7, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function statFix(orig) { - if (!orig) return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - if (cb) cb.apply(this, arguments); - } - return options ? orig.call(fs7, target, options, callback) : orig.call(fs7, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) return orig; - return function(target, options) { - var stats = options ? orig.call(fs7, target, options) : orig.call(fs7, target); - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { - var Stream = require("stream").Stream; - module2.exports = legacy; - function legacy(fs7) { - return { - ReadStream, - WriteStream - }; - function ReadStream(path6, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path6, options); - Stream.call(this); - var self2 = this; - this.path = path6; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self2._read(); - }); - return; - } - fs7.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self2.emit("error", err); - self2.readable = false; - return; - } - self2.fd = fd; - self2.emit("open", fd); - self2._read(); - }); - } - function WriteStream(path6, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path6, options); - Stream.call(this); - this.path = path6; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs7.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - "node_modules/graceful-fs/clone.js"(exports2, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs7 = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop() { - } - function publishQueue(context2, queue2) { - Object.defineProperty(context2, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug2 = noop; - if (util.debuglog) - debug2 = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug2 = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs7[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs7, queue); - fs7.close = (function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs7, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - })(fs7.close); - fs7.closeSync = (function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs7, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - })(fs7.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug2(fs7[gracefulQueue]); - require("assert").equal(fs7[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs7[gracefulQueue]); - } - module2.exports = patch(clone(fs7)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs7.__patched) { - module2.exports = patch(fs7); - fs7.__patched = true; - } - function patch(fs8) { - polyfills(fs8); - fs8.gracefulify = patch; - fs8.createReadStream = createReadStream; - fs8.createWriteStream = createWriteStream2; - var fs$readFile = fs8.readFile; - fs8.readFile = readFile; - function readFile(path6, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path6, options, cb); - function go$readFile(path7, options2, cb2, startTime) { - return fs$readFile(path7, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path7, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs8.writeFile; - fs8.writeFile = writeFile; - function writeFile(path6, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path6, data, options, cb); - function go$writeFile(path7, data2, options2, cb2, startTime) { - return fs$writeFile(path7, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path7, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs8.appendFile; - if (fs$appendFile) - fs8.appendFile = appendFile; - function appendFile(path6, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path6, data, options, cb); - function go$appendFile(path7, data2, options2, cb2, startTime) { - return fs$appendFile(path7, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path7, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs8.copyFile; - if (fs$copyFile) - fs8.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs8.readdir; - fs8.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path6, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path7, options2, cb2, startTime) { - return fs$readdir(path7, fs$readdirCallback( - path7, - options2, - cb2, - startTime - )); - } : function go$readdir2(path7, options2, cb2, startTime) { - return fs$readdir(path7, options2, fs$readdirCallback( - path7, - options2, - cb2, - startTime - )); - }; - return go$readdir(path6, options, cb); - function fs$readdirCallback(path7, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path7, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs8); - ReadStream = legStreams.ReadStream; - WriteStream = legStreams.WriteStream; - } - var fs$ReadStream = fs8.ReadStream; - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype); - ReadStream.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs8.WriteStream; - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype); - WriteStream.prototype.open = WriteStream$open; - } - Object.defineProperty(fs8, "ReadStream", { - get: function() { - return ReadStream; - }, - set: function(val2) { - ReadStream = val2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs8, "WriteStream", { - get: function() { - return WriteStream; - }, - set: function(val2) { - WriteStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream; - Object.defineProperty(fs8, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val2) { - FileReadStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream; - Object.defineProperty(fs8, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val2) { - FileWriteStream = val2; - }, - enumerable: true, - configurable: true - }); - function ReadStream(path6, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream(path6, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream(path6, options) { - return new fs8.ReadStream(path6, options); - } - function createWriteStream2(path6, options) { - return new fs8.WriteStream(path6, options); - } - var fs$open = fs8.open; - fs8.open = open; - function open(path6, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path6, flags, mode, cb); - function go$open(path7, flags2, mode2, cb2, startTime) { - return fs$open(path7, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path7, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs8; - } - function enqueue(elem) { - debug2("ENQUEUE", elem[0].name, elem[1]); - fs7[gracefulQueue].push(elem); - retry3(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs7[gracefulQueue].length; ++i) { - if (fs7[gracefulQueue][i].length > 2) { - fs7[gracefulQueue][i][3] = now; - fs7[gracefulQueue][i][4] = now; - } - } - retry3(); - } - function retry3() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs7[gracefulQueue].length === 0) - return; - var elem = fs7[gracefulQueue].shift(); - var fn = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug2("RETRY", fn.name, args); - fn.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug2("TIMEOUT", fn.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug2("RETRY", fn.name, args); - fn.apply(null, args.concat([startTime])); - } else { - fs7[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry3, 0); - } - } - } -}); - -// node_modules/is-path-cwd/index.js -var require_is_path_cwd = __commonJS({ - "node_modules/is-path-cwd/index.js"(exports2, module2) { - "use strict"; - var path6 = require("path"); - module2.exports = (path_) => { - let cwd = process.cwd(); - path_ = path6.resolve(path_); - if (process.platform === "win32") { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - return path_ === cwd; - }; - } -}); - -// node_modules/is-path-inside/index.js -var require_is_path_inside = __commonJS({ - "node_modules/is-path-inside/index.js"(exports2, module2) { - "use strict"; - var path6 = require("path"); - module2.exports = (childPath, parentPath) => { - const relation = path6.relative(parentPath, childPath); - return Boolean( - relation && relation !== ".." && !relation.startsWith(`..${path6.sep}`) && relation !== path6.resolve(childPath) - ); - }; - } -}); - -// node_modules/fs.realpath/old.js -var require_old = __commonJS({ - "node_modules/fs.realpath/old.js"(exports2) { - var pathModule = require("path"); - var isWindows = process.platform === "win32"; - var fs7 = require("fs"); - var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - function rethrow() { - var callback; - if (DEBUG) { - var backtrace = new Error(); - callback = debugCallback; - } else - callback = missingCallback; - return callback; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; - else if (!process.noDeprecation) { - var msg = "fs: missing callback " + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } - } - function maybeCallback(cb) { - return typeof cb === "function" ? cb : rethrow(); - } - var normalize3 = pathModule.normalize; - if (isWindows) { - nextPartRe = /(.*?)(?:[\/\\]+|$)/g; - } else { - nextPartRe = /(.*?)(?:[\/]+|$)/g; - } - var nextPartRe; - if (isWindows) { - splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; - } else { - splitRootRe = /^[\/]*/; - } - var splitRootRe; - exports2.realpathSync = function realpathSync(p, cache) { - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs7.lstatSync(base); - knownHard[base] = true; - } - } - while (pos < p.length) { - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - continue; - } - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - resolvedLink = cache[base]; - } else { - var stat = fs7.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs7.statSync(base); - linkTarget = fs7.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - if (cache) cache[original] = p; - return p; - }; - exports2.realpath = function realpath(p, cache, cb) { - if (typeof cb !== "function") { - cb = maybeCallback(cache); - cache = null; - } - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs7.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - function LOOP() { - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - return process.nextTick(LOOP); - } - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - return gotResolvedLink(cache[base]); - } - return fs7.lstat(base, gotStat); - } - function gotStat(err, stat) { - if (err) return cb(err); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs7.stat(base, function(err2) { - if (err2) return cb(err2); - fs7.readlink(base, function(err3, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err3, target); - }); - }); - } - function gotTarget(err, target, base2) { - if (err) return cb(err); - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base2] = resolvedLink; - gotResolvedLink(resolvedLink); - } - function gotResolvedLink(resolvedLink) { - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - }; - } -}); - -// node_modules/fs.realpath/index.js -var require_fs5 = __commonJS({ - "node_modules/fs.realpath/index.js"(exports2, module2) { - module2.exports = realpath; - realpath.realpath = realpath; - realpath.sync = realpathSync; - realpath.realpathSync = realpathSync; - realpath.monkeypatch = monkeypatch; - realpath.unmonkeypatch = unmonkeypatch; - var fs7 = require("fs"); - var origRealpath = fs7.realpath; - var origRealpathSync = fs7.realpathSync; - var version = process.version; - var ok = /^v[0-5]\./.test(version); - var old = require_old(); - function newError(er) { - return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); - } - function realpath(p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb); - } - if (typeof cache === "function") { - cb = cache; - cache = null; - } - origRealpath(p, cache, function(er, result) { - if (newError(er)) { - old.realpath(p, cache, cb); - } else { - cb(er, result); - } - }); - } - function realpathSync(p, cache) { - if (ok) { - return origRealpathSync(p, cache); - } - try { - return origRealpathSync(p, cache); - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache); - } else { - throw er; - } - } - } - function monkeypatch() { - fs7.realpath = realpath; - fs7.realpathSync = realpathSync; - } - function unmonkeypatch() { - fs7.realpath = origRealpath; - fs7.realpathSync = origRealpathSync; - } - } -}); - -// node_modules/concat-map/index.js -var require_concat_map = __commonJS({ - "node_modules/concat-map/index.js"(exports2, module2) { - module2.exports = function(xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - } -}); - -// node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ - "node_modules/balanced-match/index.js"(exports2, module2) { - "use strict"; - module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r = range(a, b, str2); - return r && { - start: r[0], - end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + a.length, r[1]), - post: str2.slice(r[1] + b.length) - }; - } - function maybeMatch(reg, str2) { - var m = str2.match(reg); - return m ? m[0] : null; - } - balanced.range = range; - function range(a, b, str2) { - var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); - var i = ai; - if (ai >= 0 && bi > 0) { - begs = []; - left = str2.length; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str2.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - bi = str2.indexOf(b, i + 1); - } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length) { - result = [left, right]; - } - } - return result; - } - } -}); - -// node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ - "node_modules/brace-expansion/index.js"(exports2, module2) { - var concatMap = require_concat_map(); - var balanced = require_balanced_match(); - module2.exports = expandTop; - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) - return [""]; - var parts = []; - var m = balanced("{", "}", str2); - if (!m) - return str2.split(","); - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; - } - function expandTop(str2) { - if (!str2) - return []; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); - } - return expand(escapeBraces(str2), true).map(unescapeBraces); - } - function embrace(str2) { - return "{" + str2 + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte5(i, y) { - return i >= y; - } - function expand(str2, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2); - } - return [str2]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand(m.post, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte5; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { - return expand(el, false); - }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - return expansions; - } - } -}); - -// node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ - "node_modules/minimatch/minimatch.js"(exports2, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path6 = (function() { - try { - return require("path"); - } catch (e) { - } - })() || { - sep: "/" - }; - minimatch.sep = path6.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand = require_brace_expansion(); - var plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" } - }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set2, c) { - set2[c] = true; - return set2; - }, {}); - } - var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { - options = options || {}; - return function(p, i, list) { - return minimatch(p, pattern, options); - }; - } - function ext(a, b) { - b = b || {}; - var t = {}; - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; - } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); - }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); - }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); - }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); - }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); - }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); - }; - m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); - }; - return m; - }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); - if (!options) options = {}; - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); - } - assertValidPattern(pattern); - if (!options) options = {}; - pattern = pattern.trim(); - if (!options.allowWindowsEscape && path6.sep !== "/") { - pattern = pattern.split(path6.sep).join("/"); - } - this.options = options; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.make(); - } - Minimatch.prototype.debug = function() { - }; - Minimatch.prototype.make = make; - function make() { - var pattern = this.pattern; - var options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); - if (options.debug) this.debug = function debug2() { - console.error.apply(console, arguments); - }; - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { - return s.split(slashSplit); - }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { - return s.map(this.parse, this); - }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { - return s.indexOf(false) === -1; - }); - this.debug(this.pattern, set2); - this.set = set2; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate = false; - var options = this.options; - var negateOffset = 0; - if (options.nonegate) return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate = !negate; - negateOffset++; - } - if (negateOffset) this.pattern = pattern.substr(negateOffset); - this.negate = negate; - } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return expand(pattern); - } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); - } - }; - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - assertValidPattern(pattern); - var options = this.options; - if (pattern === "**") { - if (!options.noglobstar) - return GLOBSTAR; - else - pattern = "*"; - } - if (pattern === "") return ""; - var re = ""; - var hasMagic = !!options.nocase; - var escaping = false; - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self2 = this; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; - } - self2.debug("clearStateChar %j %j", stateChar, re); - stateChar = false; - } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; - } - switch (c) { - /* istanbul ignore next */ - case "/": { - return false; - } - case "\\": - clearStateChar(); - escaping = true; - continue; - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); - if (inClass) { - this.debug(" in class"); - if (c === "!" && i === classStart + 1) c = "^"; - re += c; - continue; - } - self2.debug("call clearStateChar %j", stateChar); - clearStateChar(); - stateChar = c; - if (options.noext) clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re); - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - re += pl.close; - if (pl.type === "!") { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - clearStateChar(); - re += "|"; - continue; - // these are mostly the same in regexp and glob - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - var cs = pattern.substring(classStart + 1, i); - try { - RegExp("[" + cs + "]"); - } catch (er) { - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; - } - } - if (inClass) { - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re, pl); - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_2, $1, $2) { - if (!$2) { - $2 = "\\"; - } - return $1 + $1 + $2 + "|"; - }); - this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case "[": - case ".": - case "(": - addPatternStart = true; - } - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - nlLast += nlAfter; - var openParensBefore = nlBefore.split("(").length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); - } - nlAfter = cleanAfter; - var dollar = ""; - if (nlAfter === "" && isSub !== SUBPARSE) { - dollar = "$"; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - if (re !== "" && hasMagic) { - re = "(?=.)" + re; - } - if (addPatternStart) { - re = patternStart + re; - } - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options.nocase ? "i" : ""; - try { - var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); - } - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) re = "^(?!" + re + ").*$"; - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - minimatch.match = function(list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function(f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = function match(f, partial) { - if (typeof partial === "undefined") partial = this.partial; - this.debug("match", f, this.pattern); - if (this.comment) return false; - if (this.empty) return f === ""; - if (f === "/" && partial) return true; - var options = this.options; - if (path6.sep !== "/") { - f = f.split(path6.sep).join("/"); - } - f = f.split(slashSplit); - this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) break; - } - for (i = 0; i < set2.length; i++) { - var pattern = set2[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) return true; - return !this.negate; - } - } - if (options.flipNegate) return false; - return this.negate; - }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options = this.options; - this.debug( - "matchOne", - { "this": this, file, pattern } - ); - this.debug("matchOne", file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug("matchOne loop"); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - if (p === false) return false; - if (p === GLOBSTAR) { - this.debug("GLOBSTAR", [pattern, p, f]); - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; - } - return true; - } - while (fr < fl) { - var swallowee = file[fr]; - this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { - this.debug("dot detected!", file, fr, pattern, pr); - break; - } - this.debug("globstar swallow a segment, and continue"); - fr++; - } - } - if (partial) { - this.debug("\n>>> no match, partial?", file, fr, pattern, pr); - if (fr === fl) return true; - } - return false; - } - var hit; - if (typeof p === "string") { - hit = f === p; - this.debug("string match", p, f, hit); - } else { - hit = f.match(p); - this.debug("pattern match", p, f, hit); - } - if (!hit) return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - return fi === fl - 1 && file[fi] === ""; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/inherits/inherits_browser.js -var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports2, module2) { - if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; - } - } -}); - -// node_modules/inherits/inherits.js -var require_inherits = __commonJS({ - "node_modules/inherits/inherits.js"(exports2, module2) { - try { - util = require("util"); - if (typeof util.inherits !== "function") throw ""; - module2.exports = util.inherits; - } catch (e) { - module2.exports = require_inherits_browser(); - } - var util; - } -}); - -// node_modules/path-is-absolute/index.js -var require_path_is_absolute = __commonJS({ - "node_modules/path-is-absolute/index.js"(exports2, module2) { - "use strict"; - function posix(path6) { - return path6.charAt(0) === "/"; - } - function win32(path6) { - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path6); - var device = result[1] || ""; - var isUnc = Boolean(device && device.charAt(1) !== ":"); - return Boolean(result[2] || isUnc); - } - module2.exports = process.platform === "win32" ? win32 : posix; - module2.exports.posix = posix; - module2.exports.win32 = win32; - } -}); - -// node_modules/rimraf/node_modules/glob/common.js -var require_common3 = __commonJS({ - "node_modules/rimraf/node_modules/glob/common.js"(exports2) { - exports2.setopts = setopts; - exports2.ownProp = ownProp; - exports2.makeAbs = makeAbs; - exports2.finish = finish; - exports2.mark = mark; - exports2.isIgnored = isIgnored; - exports2.childrenIgnored = childrenIgnored; - function ownProp(obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field); - } - var fs7 = require("fs"); - var path6 = require("path"); - var minimatch = require_minimatch(); - var isAbsolute2 = require_path_is_absolute(); - var Minimatch = minimatch.Minimatch; - function alphasort(a, b) { - return a.localeCompare(b, "en"); - } - function setupIgnores(self2, options) { - self2.ignore = options.ignore || []; - if (!Array.isArray(self2.ignore)) - self2.ignore = [self2.ignore]; - if (self2.ignore.length) { - self2.ignore = self2.ignore.map(ignoreMap); - } - } - function ignoreMap(pattern) { - var gmatcher = null; - if (pattern.slice(-3) === "/**") { - var gpattern = pattern.replace(/(\/\*\*)+$/, ""); - gmatcher = new Minimatch(gpattern, { dot: true }); - } - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher - }; - } - function setopts(self2, pattern, options) { - if (!options) - options = {}; - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar"); - } - pattern = "**/" + pattern; - } - self2.silent = !!options.silent; - self2.pattern = pattern; - self2.strict = options.strict !== false; - self2.realpath = !!options.realpath; - self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); - self2.follow = !!options.follow; - self2.dot = !!options.dot; - self2.mark = !!options.mark; - self2.nodir = !!options.nodir; - if (self2.nodir) - self2.mark = true; - self2.sync = !!options.sync; - self2.nounique = !!options.nounique; - self2.nonull = !!options.nonull; - self2.nosort = !!options.nosort; - self2.nocase = !!options.nocase; - self2.stat = !!options.stat; - self2.noprocess = !!options.noprocess; - self2.absolute = !!options.absolute; - self2.fs = options.fs || fs7; - self2.maxLength = options.maxLength || Infinity; - self2.cache = options.cache || /* @__PURE__ */ Object.create(null); - self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); - self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); - setupIgnores(self2, options); - self2.changedCwd = false; - var cwd = process.cwd(); - if (!ownProp(options, "cwd")) - self2.cwd = cwd; - else { - self2.cwd = path6.resolve(options.cwd); - self2.changedCwd = self2.cwd !== cwd; - } - self2.root = options.root || path6.resolve(self2.cwd, "/"); - self2.root = path6.resolve(self2.root); - if (process.platform === "win32") - self2.root = self2.root.replace(/\\/g, "/"); - self2.cwdAbs = isAbsolute2(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); - if (process.platform === "win32") - self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); - self2.nomount = !!options.nomount; - options.nonegate = true; - options.nocomment = true; - self2.minimatch = new Minimatch(pattern, options); - self2.options = self2.minimatch.options; - } - function finish(self2) { - var nou = self2.nounique; - var all = nou ? [] : /* @__PURE__ */ Object.create(null); - for (var i = 0, l = self2.matches.length; i < l; i++) { - var matches = self2.matches[i]; - if (!matches || Object.keys(matches).length === 0) { - if (self2.nonull) { - var literal = self2.minimatch.globSet[i]; - if (nou) - all.push(literal); - else - all[literal] = true; - } - } else { - var m = Object.keys(matches); - if (nou) - all.push.apply(all, m); - else - m.forEach(function(m2) { - all[m2] = true; - }); - } - } - if (!nou) - all = Object.keys(all); - if (!self2.nosort) - all = all.sort(alphasort); - if (self2.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self2._mark(all[i]); - } - if (self2.nodir) { - all = all.filter(function(e) { - var notDir = !/\/$/.test(e); - var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; - if (notDir && c) - notDir = c !== "DIR" && !Array.isArray(c); - return notDir; - }); - } - } - if (self2.ignore.length) - all = all.filter(function(m2) { - return !isIgnored(self2, m2); - }); - self2.found = all; - } - function mark(self2, p) { - var abs = makeAbs(self2, p); - var c = self2.cache[abs]; - var m = p; - if (c) { - var isDir = c === "DIR" || Array.isArray(c); - var slash = p.slice(-1) === "/"; - if (isDir && !slash) - m += "/"; - else if (!isDir && slash) - m = m.slice(0, -1); - if (m !== p) { - var mabs = makeAbs(self2, m); - self2.statCache[mabs] = self2.statCache[abs]; - self2.cache[mabs] = self2.cache[abs]; - } - } - return m; - } - function makeAbs(self2, f) { - var abs = f; - if (f.charAt(0) === "/") { - abs = path6.join(self2.root, f); - } else if (isAbsolute2(f) || f === "") { - abs = f; - } else if (self2.changedCwd) { - abs = path6.resolve(self2.cwd, f); - } else { - abs = path6.resolve(f); - } - if (process.platform === "win32") - abs = abs.replace(/\\/g, "/"); - return abs; - } - function isIgnored(self2, path7) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return item.matcher.match(path7) || !!(item.gmatcher && item.gmatcher.match(path7)); - }); - } - function childrenIgnored(self2, path7) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path7)); - }); - } - } -}); - -// node_modules/rimraf/node_modules/glob/sync.js -var require_sync7 = __commonJS({ - "node_modules/rimraf/node_modules/glob/sync.js"(exports2, module2) { - module2.exports = globSync; - globSync.GlobSync = GlobSync; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var Glob = require_glob().Glob; - var util = require("util"); - var path6 = require("path"); - var assert = require("assert"); - var isAbsolute2 = require_path_is_absolute(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - function globSync(pattern, options) { - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - return new GlobSync(pattern, options).found; - } - function GlobSync(pattern, options) { - if (!pattern) - throw new Error("must provide pattern"); - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options); - setopts(this, pattern, options); - if (this.noprocess) - return this; - var n = this.minimatch.set.length; - this.matches = new Array(n); - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false); - } - this._finish(); - } - GlobSync.prototype._finish = function() { - assert(this instanceof GlobSync); - if (this.realpath) { - var self2 = this; - this.matches.forEach(function(matchset, index) { - var set2 = self2.matches[index] = /* @__PURE__ */ Object.create(null); - for (var p in matchset) { - try { - p = self2._makeAbs(p); - var real = rp.realpathSync(p, self2.realpathCache); - set2[real] = true; - } catch (er) { - if (er.syscall === "stat") - set2[self2._makeAbs(p)] = true; - else - throw er; - } - } - }); - } - common2.finish(this); - }; - GlobSync.prototype._process = function(pattern, index, inGlobStar) { - assert(this instanceof GlobSync); - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute2(prefix) || isAbsolute2(pattern.join("/"))) { - if (!prefix || !isAbsolute2(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return; - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar); - }; - GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path6.join(this.root, e); - } - this._emitMatch(index, e); - } - return; - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) - newPattern = [prefix, e]; - else - newPattern = [e]; - this._process(newPattern.concat(remain), index, inGlobStar); - } - }; - GlobSync.prototype._emitMatch = function(index, e) { - if (isIgnored(this, e)) - return; - var abs = this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) { - e = abs; - } - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - if (this.stat) - this._stat(e); - }; - GlobSync.prototype._readdirInGlobStar = function(abs) { - if (this.follow) - return this._readdir(abs, false); - var entries; - var lstat; - var stat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er.code === "ENOENT") { - return null; - } - } - var isSym = lstat && lstat.isSymbolicLink(); - this.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = "FILE"; - else - entries = this._readdir(abs, false); - return entries; - }; - GlobSync.prototype._readdir = function(abs, inGlobStar) { - var entries; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return null; - if (Array.isArray(c)) - return c; - } - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)); - } catch (er) { - this._readdirError(abs, er); - return null; - } - }; - GlobSync.prototype._readdirEntries = function(abs, entries) { - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return entries; - }; - GlobSync.prototype._readdirError = function(f, er) { - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - throw error2; - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) - throw er; - if (!this.silent) - console.error("glob error", er); - break; - } - }; - GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false); - var len = entries.length; - var isSym = this.symlinks[abs]; - if (isSym && inGlobStar) - return; - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true); - } - }; - GlobSync.prototype._processSimple = function(prefix, index) { - var exists = this._stat(prefix); - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return; - if (prefix && isAbsolute2(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path6.join(this.root, prefix); - } else { - prefix = path6.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - }; - GlobSync.prototype._stat = function(f) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return false; - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return c; - if (needDir && c === "FILE") - return false; - } - var exists; - var stat = this.statCache[abs]; - if (!stat) { - var lstat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return false; - } - } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs); - } catch (er) { - stat = lstat; - } - } else { - stat = lstat; - } - } - this.statCache[abs] = stat; - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return false; - return c; - }; - GlobSync.prototype._mark = function(p) { - return common2.mark(this, p); - }; - GlobSync.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - } -}); - -// node_modules/inflight/inflight.js -var require_inflight = __commonJS({ - "node_modules/inflight/inflight.js"(exports2, module2) { - var wrappy = require_wrappy(); - var reqs = /* @__PURE__ */ Object.create(null); - var once = require_once(); - module2.exports = wrappy(inflight); - function inflight(key, cb) { - if (reqs[key]) { - reqs[key].push(cb); - return null; - } else { - reqs[key] = [cb]; - return makeres(key); - } - } - function makeres(key) { - return once(function RES() { - var cbs = reqs[key]; - var len = cbs.length; - var args = slice(arguments); - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args); - } - } finally { - if (cbs.length > len) { - cbs.splice(0, len); - process.nextTick(function() { - RES.apply(null, args); - }); - } else { - delete reqs[key]; - } - } - }); - } - function slice(args) { - var length = args.length; - var array = []; - for (var i = 0; i < length; i++) array[i] = args[i]; - return array; - } - } -}); - -// node_modules/rimraf/node_modules/glob/glob.js -var require_glob = __commonJS({ - "node_modules/rimraf/node_modules/glob/glob.js"(exports2, module2) { - module2.exports = glob2; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var inherits = require_inherits(); - var EE = require("events").EventEmitter; - var path6 = require("path"); - var assert = require("assert"); - var isAbsolute2 = require_path_is_absolute(); - var globSync = require_sync7(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var inflight = require_inflight(); - var util = require("util"); - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - var once = require_once(); - function glob2(pattern, options, cb) { - if (typeof options === "function") cb = options, options = {}; - if (!options) options = {}; - if (options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return globSync(pattern, options); - } - return new Glob(pattern, options, cb); - } - glob2.sync = globSync; - var GlobSync = glob2.GlobSync = globSync.GlobSync; - glob2.glob = glob2; - function extend3(origin, add) { - if (add === null || typeof add !== "object") { - return origin; - } - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; - } - glob2.hasMagic = function(pattern, options_) { - var options = extend3({}, options_); - options.noprocess = true; - var g = new Glob(pattern, options); - var set2 = g.minimatch.set; - if (!pattern) - return false; - if (set2.length > 1) - return true; - for (var j = 0; j < set2[0].length; j++) { - if (typeof set2[0][j] !== "string") - return true; - } - return false; - }; - glob2.Glob = Glob; - inherits(Glob, EE); - function Glob(pattern, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - if (options && options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return new GlobSync(pattern, options); - } - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb); - setopts(this, pattern, options); - this._didRealPath = false; - var n = this.minimatch.set.length; - this.matches = new Array(n); - if (typeof cb === "function") { - cb = once(cb); - this.on("error", cb); - this.on("end", function(matches) { - cb(null, matches); - }); - } - var self2 = this; - this._processing = 0; - this._emitQueue = []; - this._processQueue = []; - this.paused = false; - if (this.noprocess) - return this; - if (n === 0) - return done(); - var sync = true; - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false, done); - } - sync = false; - function done() { - --self2._processing; - if (self2._processing <= 0) { - if (sync) { - process.nextTick(function() { - self2._finish(); - }); - } else { - self2._finish(); - } - } - } - } - Glob.prototype._finish = function() { - assert(this instanceof Glob); - if (this.aborted) - return; - if (this.realpath && !this._didRealpath) - return this._realpath(); - common2.finish(this); - this.emit("end", this.found); - }; - Glob.prototype._realpath = function() { - if (this._didRealpath) - return; - this._didRealpath = true; - var n = this.matches.length; - if (n === 0) - return this._finish(); - var self2 = this; - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next); - function next() { - if (--n === 0) - self2._finish(); - } - }; - Glob.prototype._realpathSet = function(index, cb) { - var matchset = this.matches[index]; - if (!matchset) - return cb(); - var found = Object.keys(matchset); - var self2 = this; - var n = found.length; - if (n === 0) - return cb(); - var set2 = this.matches[index] = /* @__PURE__ */ Object.create(null); - found.forEach(function(p, i) { - p = self2._makeAbs(p); - rp.realpath(p, self2.realpathCache, function(er, real) { - if (!er) - set2[real] = true; - else if (er.syscall === "stat") - set2[p] = true; - else - self2.emit("error", er); - if (--n === 0) { - self2.matches[index] = set2; - cb(); - } - }); - }); - }; - Glob.prototype._mark = function(p) { - return common2.mark(this, p); - }; - Glob.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - Glob.prototype.abort = function() { - this.aborted = true; - this.emit("abort"); - }; - Glob.prototype.pause = function() { - if (!this.paused) { - this.paused = true; - this.emit("pause"); - } - }; - Glob.prototype.resume = function() { - if (this.paused) { - this.emit("resume"); - this.paused = false; - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0); - this._emitQueue.length = 0; - for (var i = 0; i < eq.length; i++) { - var e = eq[i]; - this._emitMatch(e[0], e[1]); - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0); - this._processQueue.length = 0; - for (var i = 0; i < pq.length; i++) { - var p = pq[i]; - this._processing--; - this._process(p[0], p[1], p[2], p[3]); - } - } - } - }; - Glob.prototype._process = function(pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === "function"); - if (this.aborted) - return; - this._processing++; - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]); - return; - } - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index, cb); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute2(prefix) || isAbsolute2(pattern.join("/"))) { - if (!prefix || !isAbsolute2(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return cb(); - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); - }; - Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return cb(); - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path6.join(this.root, e); - } - this._emitMatch(index, e); - } - return cb(); - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - this._process([e].concat(remain), index, inGlobStar, cb); - } - cb(); - }; - Glob.prototype._emitMatch = function(index, e) { - if (this.aborted) - return; - if (isIgnored(this, e)) - return; - if (this.paused) { - this._emitQueue.push([index, e]); - return; - } - var abs = isAbsolute2(e) ? e : this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) - e = abs; - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - var st = this.statCache[abs]; - if (st) - this.emit("stat", e, st); - this.emit("match", e); - }; - Glob.prototype._readdirInGlobStar = function(abs, cb) { - if (this.aborted) - return; - if (this.follow) - return this._readdir(abs, false, cb); - var lstatkey = "lstat\0" + abs; - var self2 = this; - var lstatcb = inflight(lstatkey, lstatcb_); - if (lstatcb) - self2.fs.lstat(abs, lstatcb); - function lstatcb_(er, lstat) { - if (er && er.code === "ENOENT") - return cb(); - var isSym = lstat && lstat.isSymbolicLink(); - self2.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) { - self2.cache[abs] = "FILE"; - cb(); - } else - self2._readdir(abs, false, cb); - } - }; - Glob.prototype._readdir = function(abs, inGlobStar, cb) { - if (this.aborted) - return; - cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); - if (!cb) - return; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return cb(); - if (Array.isArray(c)) - return cb(null, c); - } - var self2 = this; - self2.fs.readdir(abs, readdirCb(this, abs, cb)); - }; - function readdirCb(self2, abs, cb) { - return function(er, entries) { - if (er) - self2._readdirError(abs, er, cb); - else - self2._readdirEntries(abs, entries, cb); - }; - } - Glob.prototype._readdirEntries = function(abs, entries, cb) { - if (this.aborted) - return; - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return cb(null, entries); - }; - Glob.prototype._readdirError = function(f, er, cb) { - if (this.aborted) - return; - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - this.emit("error", error2); - this.abort(); - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) { - this.emit("error", er); - this.abort(); - } - if (!this.silent) - console.error("glob error", er); - break; - } - return cb(); - }; - Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false, cb); - var isSym = this.symlinks[abs]; - var len = entries.length; - if (isSym && inGlobStar) - return cb(); - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true, cb); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true, cb); - } - cb(); - }; - Glob.prototype._processSimple = function(prefix, index, cb) { - var self2 = this; - this._stat(prefix, function(er, exists) { - self2._processSimple2(prefix, index, er, exists, cb); - }); - }; - Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return cb(); - if (prefix && isAbsolute2(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path6.join(this.root, prefix); - } else { - prefix = path6.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - cb(); - }; - Glob.prototype._stat = function(f, cb) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return cb(); - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return cb(null, c); - if (needDir && c === "FILE") - return cb(); - } - var exists; - var stat = this.statCache[abs]; - if (stat !== void 0) { - if (stat === false) - return cb(null, stat); - else { - var type2 = stat.isDirectory() ? "DIR" : "FILE"; - if (needDir && type2 === "FILE") - return cb(); - else - return cb(null, type2, stat); - } - } - var self2 = this; - var statcb = inflight("stat\0" + abs, lstatcb_); - if (statcb) - self2.fs.lstat(abs, statcb); - function lstatcb_(er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - return self2.fs.stat(abs, function(er2, stat2) { - if (er2) - self2._stat2(f, abs, null, lstat, cb); - else - self2._stat2(f, abs, er2, stat2, cb); - }); - } else { - self2._stat2(f, abs, er, lstat, cb); - } - } - }; - Glob.prototype._stat2 = function(f, abs, er, stat, cb) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return cb(); - } - var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat; - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) - return cb(null, false, stat); - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return cb(); - return cb(null, c, stat); - }; - } -}); - -// node_modules/rimraf/rimraf.js -var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports2, module2) { - var assert = require("assert"); - var path6 = require("path"); - var fs7 = require("fs"); - var glob2 = void 0; - try { - glob2 = require_glob(); - } catch (_err) { - } - var defaultGlobOpts = { - nosort: true, - silent: true - }; - var timeout = 0; - var isWindows = process.platform === "win32"; - var defaults = (options) => { - const methods = [ - "unlink", - "chmod", - "stat", - "lstat", - "rmdir", - "readdir" - ]; - methods.forEach((m) => { - options[m] = options[m] || fs7[m]; - m = m + "Sync"; - options[m] = options[m] || fs7[m]; - }); - options.maxBusyTries = options.maxBusyTries || 3; - options.emfileWait = options.emfileWait || 1e3; - if (options.glob === false) { - options.disableGlob = true; - } - if (options.disableGlob !== true && glob2 === void 0) { - throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); - } - options.disableGlob = options.disableGlob || false; - options.glob = options.glob || defaultGlobOpts; - }; - var rimraf = (p, options, cb) => { - if (typeof options === "function") { - cb = options; - options = {}; - } - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert.equal(typeof cb, "function", "rimraf: callback function required"); - assert(options, "rimraf: invalid options argument provided"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - defaults(options); - let busyTries = 0; - let errState = null; - let n = 0; - const next = (er) => { - errState = errState || er; - if (--n === 0) - cb(errState); - }; - const afterGlob = (er, results) => { - if (er) - return cb(er); - n = results.length; - if (n === 0) - return cb(); - results.forEach((p2) => { - const CB = (er2) => { - if (er2) { - if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { - busyTries++; - return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); - } - if (er2.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p2, options, CB), timeout++); - } - if (er2.code === "ENOENT") er2 = null; - } - timeout = 0; - next(er2); - }; - rimraf_(p2, options, CB); - }); - }; - if (options.disableGlob || !glob2.hasMagic(p)) - return afterGlob(null, [p]); - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]); - glob2(p, options.glob, afterGlob); - }); - }; - var rimraf_ = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null); - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb); - if (st && st.isDirectory()) - return rmdir(p, options, er, cb); - options.unlink(p, (er2) => { - if (er2) { - if (er2.code === "ENOENT") - return cb(null); - if (er2.code === "EPERM") - return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); - if (er2.code === "EISDIR") - return rmdir(p, options, er2, cb); - } - return cb(er2); - }); - }); - }; - var fixWinEPERM = (p, options, er, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.chmod(p, 438, (er2) => { - if (er2) - cb(er2.code === "ENOENT" ? null : er); - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er); - else if (stats.isDirectory()) - rmdir(p, options, er, cb); - else - options.unlink(p, cb); - }); - }); - }; - var fixWinEPERMSync = (p, options, er) => { - assert(p); - assert(options); - try { - options.chmodSync(p, 438); - } catch (er2) { - if (er2.code === "ENOENT") - return; - else - throw er; - } - let stats; - try { - stats = options.statSync(p); - } catch (er3) { - if (er3.code === "ENOENT") - return; - else - throw er; - } - if (stats.isDirectory()) - rmdirSync(p, options, er); - else - options.unlinkSync(p); - }; - var rmdir = (p, options, originalEr, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.rmdir(p, (er) => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb); - else if (er && er.code === "ENOTDIR") - cb(originalEr); - else - cb(er); - }); - }; - var rmkids = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.readdir(p, (er, files) => { - if (er) - return cb(er); - let n = files.length; - if (n === 0) - return options.rmdir(p, cb); - let errState; - files.forEach((f) => { - rimraf(path6.join(p, f), options, (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--n === 0) - options.rmdir(p, cb); - }); - }); - }); - }; - var rimrafSync = (p, options) => { - options = options || {}; - defaults(options); - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert(options, "rimraf: missing options"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - let results; - if (options.disableGlob || !glob2.hasMagic(p)) { - results = [p]; - } else { - try { - options.lstatSync(p); - results = [p]; - } catch (er) { - results = glob2.sync(p, options.glob); - } - } - if (!results.length) - return; - for (let i = 0; i < results.length; i++) { - const p2 = results[i]; - let st; - try { - st = options.lstatSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p2, options, er); - } - try { - if (st && st.isDirectory()) - rmdirSync(p2, options, null); - else - options.unlinkSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); - if (er.code !== "EISDIR") - throw er; - rmdirSync(p2, options, er); - } - } - }; - var rmdirSync = (p, options, originalEr) => { - assert(p); - assert(options); - try { - options.rmdirSync(p); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "ENOTDIR") - throw originalEr; - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options); - } - }; - var rmkidsSync = (p, options) => { - assert(p); - assert(options); - options.readdirSync(p).forEach((f) => rimrafSync(path6.join(p, f), options)); - const retries = isWindows ? 100 : 1; - let i = 0; - do { - let threw = true; - try { - const ret = options.rmdirSync(p, options); - threw = false; - return ret; - } finally { - if (++i < retries && threw) - continue; - } - } while (true); - }; - module2.exports = rimraf; - rimraf.sync = rimrafSync; - } -}); - -// node_modules/del/node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "node_modules/del/node_modules/indent-string/index.js"(exports2, module2) { - "use strict"; - module2.exports = (string, count = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count)); - }; - } -}); - -// node_modules/del/node_modules/clean-stack/index.js -var require_clean_stack = __commonJS({ - "node_modules/del/node_modules/clean-stack/index.js"(exports2, module2) { - "use strict"; - var os = require("os"); - var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; - var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; - var homeDir = typeof os.homedir === "undefined" ? "" : os.homedir(); - module2.exports = (stack, options) => { - options = Object.assign({ pretty: false }, options); - return stack.replace(/\\/g, "/").split("\n").filter((line) => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - const match = pathMatches[1]; - if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { - return false; - } - return !pathRegex.test(match); - }).filter((line) => line.trim() !== "").map((line) => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); - } - return line; - }).join("\n"); - }; - } -}); - -// node_modules/del/node_modules/aggregate-error/index.js -var require_aggregate_error = __commonJS({ - "node_modules/del/node_modules/aggregate-error/index.js"(exports2, module2) { - "use strict"; - var indentString2 = require_indent_string(); - var cleanStack = require_clean_stack(); - var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - errors = [...errors].map((error2) => { - if (error2 instanceof Error) { - return error2; - } - if (error2 !== null && typeof error2 === "object") { - return Object.assign(new Error(error2.message), error2); - } - return new Error(error2); - }); - let message = errors.map((error2) => { - return typeof error2.stack === "string" ? cleanInternalStack(cleanStack(error2.stack)) : String(error2); - }).join("\n"); - message = "\n" + indentString2(message, 4); - super(message); - this.name = "AggregateError"; - Object.defineProperty(this, "_errors", { value: errors }); - } - *[Symbol.iterator]() { - for (const error2 of this._errors) { - yield error2; - } - } - }; - module2.exports = AggregateError; - } -}); - -// node_modules/del/node_modules/p-map/index.js -var require_p_map = __commonJS({ - "node_modules/del/node_modules/p-map/index.js"(exports2, module2) { - "use strict"; - var AggregateError = require_aggregate_error(); - module2.exports = async (iterable, mapper, { - concurrency = Infinity, - stopOnError = true - } = {}) => { - return new Promise((resolve5, reject) => { - if (typeof mapper !== "function") { - throw new TypeError("Mapper function is required"); - } - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - const next = () => { - if (isRejected) { - return; - } - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - if (nextItem.done) { - isIterableDone = true; - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve5(result); - } - } - return; - } - resolvingCount++; - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error2) { - if (stopOnError) { - isRejected = true; - reject(error2); - } else { - errors.push(error2); - resolvingCount--; - next(); - } - } - })(); - }; - for (let i = 0; i < concurrency; i++) { - next(); - if (isIterableDone) { - break; - } - } - }); - }; - } -}); - -// node_modules/del/index.js -var require_del = __commonJS({ - "node_modules/del/index.js"(exports2, module2) { - "use strict"; - var { promisify } = require("util"); - var path6 = require("path"); - var globby = require_globby(); - var isGlob = require_is_glob(); - var slash = require_slash(); - var gracefulFs = require_graceful_fs(); - var isPathCwd = require_is_path_cwd(); - var isPathInside = require_is_path_inside(); - var rimraf = require_rimraf(); - var pMap = require_p_map(); - var rimrafP = promisify(rimraf); - var rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync - }; - function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); - } - if (!isPathInside(file, cwd)) { - throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); - } - } - function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - patterns = patterns.map((pattern) => { - if (process.platform === "win32" && isGlob(pattern) === false) { - return slash(pattern); - } - return pattern; - }); - return patterns; - } - module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), onProgress = () => { - }, ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); - if (files.length === 0) { - onProgress({ - totalCount: 0, - deletedCount: 0, - percent: 1 - }); - } - let deletedCount = 0; - const mapper = async (file) => { - file = path6.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - deletedCount += 1; - onProgress({ - totalCount: files.length, - deletedCount, - percent: deletedCount / files.length - }); - return file; - }; - const removedFiles = await pMap(files, mapper, options); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); - const removedFiles = files.map((file) => { - file = path6.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - return file; - }); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - } -}); - // node_modules/semver/internal/constants.js -var require_constants9 = __commonJS({ +var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { "use strict"; var SEMVER_SPEC_VERSION = "2.0.0"; @@ -34386,7 +24575,7 @@ var require_re = __commonJS({ MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH - } = require_constants9(); + } = require_constants6(); var debug2 = require_debug(); exports2 = module2.exports = {}; var re = exports2.re = []; @@ -34512,7 +24701,7 @@ var require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports2, module2) { "use strict"; var debug2 = require_debug(); - var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants9(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants6(); var { safeRe: re, t } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); @@ -34769,7 +24958,7 @@ var require_semver = __commonJS({ }); // node_modules/semver/functions/parse.js -var require_parse4 = __commonJS({ +var require_parse2 = __commonJS({ "node_modules/semver/functions/parse.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); @@ -34794,7 +24983,7 @@ var require_parse4 = __commonJS({ var require_valid = __commonJS({ "node_modules/semver/functions/valid.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var valid3 = (version, options) => { const v = parse(version, options); return v ? v.version : null; @@ -34807,7 +24996,7 @@ var require_valid = __commonJS({ var require_clean = __commonJS({ "node_modules/semver/functions/clean.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var clean3 = (version, options) => { const s = parse(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; @@ -34844,7 +25033,7 @@ var require_inc = __commonJS({ var require_diff = __commonJS({ "node_modules/semver/functions/diff.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var diff = (version1, version2) => { const v1 = parse(version1, null, true); const v2 = parse(version2, null, true); @@ -34918,7 +25107,7 @@ var require_patch = __commonJS({ var require_prerelease = __commonJS({ "node_modules/semver/functions/prerelease.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var prerelease = (version, options) => { const parsed = parse(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; @@ -35106,7 +25295,7 @@ var require_coerce = __commonJS({ "node_modules/semver/functions/coerce.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); - var parse = require_parse4(); + var parse = require_parse2(); var { safeRe: re, t } = require_re(); var coerce3 = (version, options) => { if (version instanceof SemVer) { @@ -35342,7 +25531,7 @@ var require_range = __commonJS({ tildeTrimReplace, caretTrimReplace } = require_re(); - var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants9(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants6(); var isNullSet = (c) => c.value === "<0.0.0-0"; var isAny = (c) => c.value === ""; var isSatisfiable = (comparators, options) => { @@ -36154,10 +26343,10 @@ var require_semver2 = __commonJS({ "node_modules/semver/index.js"(exports2, module2) { "use strict"; var internalRe = require_re(); - var constants = require_constants9(); + var constants = require_constants6(); var SemVer = require_semver(); var identifiers = require_identifiers(); - var parse = require_parse4(); + var parse = require_parse2(); var valid3 = require_valid(); var clean3 = require_clean(); var inc = require_inc(); @@ -36287,7 +26476,7 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^6.1.1", + del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -38211,6 +28400,796 @@ var require_internal_pattern_helper = __commonJS({ } }); +// node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str2) { + if (a instanceof RegExp) a = maybeMatch(a, str2); + if (b instanceof RegExp) b = maybeMatch(b, str2); + var r = range(a, b, str2); + return r && { + start: r[0], + end: r[1], + pre: str2.slice(0, r[0]), + body: str2.slice(r[0] + a.length, r[1]), + post: str2.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str2) { + var m = str2.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str2) { + var begs, beg, left, right, result; + var ai = str2.indexOf(a); + var bi = str2.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + begs = []; + left = str2.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str2.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str2.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str2) { + return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + } + function escapeBraces(str2) { + return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str2) { + return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str2) { + if (!str2) + return [""]; + var parts = []; + var m = balanced("{", "}", str2); + if (!m) + return str2.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str2) { + if (!str2) + return []; + if (str2.substr(0, 2) === "{}") { + str2 = "\\{\\}" + str2.substr(2); + } + return expand(escapeBraces(str2), true).map(unescapeBraces); + } + function embrace(str2) { + return "{" + str2 + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte5(i, y) { + return i >= y; + } + function expand(str2, isTop) { + var expansions = []; + var m = balanced("{", "}", str2); + if (!m || /\$$/.test(m.pre)) return [str2]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str2 = m.pre + "{" + m.body + escClose + m.post; + return expand(str2); + } + return [str2]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte5; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path6 = (function() { + try { + return require("path"); + } catch (e) { + } + })() || { + sep: "/" + }; + minimatch.sep = path6.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set2, c) { + set2[c] = true; + return set2; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path6.sep !== "/") { + pattern = pattern.split(path6.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set2 = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug2() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set2); + set2 = this.globParts = set2.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set2); + set2 = set2.map(function(s, si, set3) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set2); + set2 = set2.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set2); + this.set = set2; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_2, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set2 = this.set; + if (!set2.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set2.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path6.sep !== "/") { + f = f.split(path6.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set2 = this.set; + this.debug(this.pattern, "set", set2); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set2.length; i++) { + var pattern = set2[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug( + "matchOne", + { "this": this, file, pattern } + ); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) return true; + } + return false; + } + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { @@ -38789,7 +29768,7 @@ var require_internal_globber = __commonJS({ }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ +var require_glob = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -39988,7 +30967,7 @@ var require_semver3 = __commonJS({ }); // node_modules/@actions/cache/lib/internal/constants.js -var require_constants10 = __commonJS({ +var require_constants7 = __commonJS({ "node_modules/@actions/cache/lib/internal/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40101,14 +31080,14 @@ var require_cacheUtils = __commonJS({ exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); - var glob2 = __importStar4(require_glob2()); + var glob2 = __importStar4(require_glob()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs7 = __importStar4(require("fs")); var path6 = __importStar4(require("path")); var semver8 = __importStar4(require_semver3()); var util = __importStar4(require("util")); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { return __awaiter4(this, void 0, void 0, function* () { @@ -40786,7 +31765,7 @@ var require_object = __commonJS({ }); // node_modules/@azure/core-util/dist/commonjs/error.js -var require_error2 = __commonJS({ +var require_error = __commonJS({ "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40948,7 +31927,7 @@ var require_commonjs2 = __commonJS({ Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { return object_js_1.isObject; } }); - var error_js_1 = require_error2(); + var error_js_1 = require_error(); Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { return error_js_1.isError; } }); @@ -41746,7 +32725,7 @@ var require_userAgentPlatform = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants11 = __commonJS({ +var require_constants8 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -41764,7 +32743,7 @@ var require_userAgent = __commonJS({ exports2.getUserAgentHeaderName = getUserAgentHeaderName; exports2.getUserAgentValue = getUserAgentValue; var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { @@ -42293,7 +33272,7 @@ var require_retryPolicy = __commonJS({ var helpers_js_1 = require_helpers(); var logger_1 = require_dist(); var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); var retryPolicyName = "retryPolicy"; function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { @@ -42390,7 +33369,7 @@ var require_defaultRetryPolicy = __commonJS({ var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.defaultRetryPolicyName = "defaultRetryPolicy"; function defaultRetryPolicy(options = {}) { var _a; @@ -42699,7 +33678,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common4 = __commonJS({ +var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -43033,7 +34012,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common4()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -43321,7 +34300,7 @@ var require_node = __commonJS({ debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common4()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -44392,7 +35371,7 @@ var require_tracingPolicy = __commonJS({ exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); var userAgent_js_1 = require_userAgent(); var log_js_1 = require_log(); var core_util_1 = require_commonjs2(); @@ -44909,7 +35888,7 @@ var require_exponentialRetryPolicy = __commonJS({ exports2.exponentialRetryPolicy = exponentialRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; function exponentialRetryPolicy(options = {}) { var _a; @@ -44931,7 +35910,7 @@ var require_systemErrorRetryPolicy = __commonJS({ exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; function systemErrorRetryPolicy(options = {}) { var _a; @@ -44956,7 +35935,7 @@ var require_throttlingRetryPolicy = __commonJS({ exports2.throttlingRetryPolicy = throttlingRetryPolicy; var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; function throttlingRetryPolicy(options = {}) { var _a; @@ -46708,7 +37687,7 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils9 = __commonJS({ +var require_utils5 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -46783,7 +37762,7 @@ var require_serializer = __commonJS({ var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils9(); + var utils_js_1 = require_utils5(); var SerializerImpl = class { constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; @@ -48261,7 +39240,7 @@ var require_serviceClient = __commonJS({ exports2.ServiceClient = void 0; var core_rest_pipeline_1 = require_commonjs5(); var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils9(); + var utils_js_1 = require_utils5(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); var urlHelpers_js_1 = require_urlHelpers(); @@ -75693,7 +66672,7 @@ var require_requestUtils = __commonJS({ exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { return false; @@ -75867,7 +66846,7 @@ var require_downloadUtils = __commonJS({ var stream = __importStar4(require("stream")); var util = __importStar4(require("util")); var utils = __importStar4(require_cacheUtils()); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); var abort_controller_1 = require_dist5(); function pipeResponseToStream(response, output) { @@ -81822,7 +72801,7 @@ var require_tar = __commonJS({ var fs_1 = require("fs"); var path6 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { return __awaiter4(this, void 0, void 0, function* () { @@ -82067,7 +73046,7 @@ var require_cache3 = __commonJS({ var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { @@ -86625,7 +77604,7 @@ var require_blob_upload = __commonJS({ }); // node_modules/readdir-glob/node_modules/minimatch/lib/path.js -var require_path2 = __commonJS({ +var require_path = __commonJS({ "node_modules/readdir-glob/node_modules/minimatch/lib/path.js"(exports2, module2) { var isWindows = typeof process === "object" && process && process.platform === "win32"; module2.exports = isWindows ? { sep: "\\" } : { sep: "/" }; @@ -86793,7 +77772,7 @@ var require_minimatch2 = __commonJS({ return new Minimatch(pattern, options).match(p); }; module2.exports = minimatch; - var path6 = require_path2(); + var path6 = require_path(); minimatch.sep = path6.sep; var GLOBSTAR = Symbol("globstar **"); minimatch.GLOBSTAR = GLOBSTAR; @@ -87561,7 +78540,7 @@ var require_readdir_glob = __commonJS({ }); // node_modules/async/dist/async.js -var require_async7 = __commonJS({ +var require_async = __commonJS({ "node_modules/async/dist/async.js"(exports2, module2) { (function(global2, factory) { typeof exports2 === "object" && typeof module2 !== "undefined" ? factory(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.async = {})); @@ -89420,6 +80399,783 @@ var require_async7 = __commonJS({ } }); +// node_modules/graceful-fs/polyfills.js +var require_polyfills = __commonJS({ + "node_modules/graceful-fs/polyfills.js"(exports2, module2) { + var constants = require("constants"); + var origCwd = process.cwd; + var cwd = null; + var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process); + return cwd; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs7) { + if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs7); + } + if (!fs7.lutimes) { + patchLutimes(fs7); + } + fs7.chown = chownFix(fs7.chown); + fs7.fchown = chownFix(fs7.fchown); + fs7.lchown = chownFix(fs7.lchown); + fs7.chmod = chmodFix(fs7.chmod); + fs7.fchmod = chmodFix(fs7.fchmod); + fs7.lchmod = chmodFix(fs7.lchmod); + fs7.chownSync = chownFixSync(fs7.chownSync); + fs7.fchownSync = chownFixSync(fs7.fchownSync); + fs7.lchownSync = chownFixSync(fs7.lchownSync); + fs7.chmodSync = chmodFixSync(fs7.chmodSync); + fs7.fchmodSync = chmodFixSync(fs7.fchmodSync); + fs7.lchmodSync = chmodFixSync(fs7.lchmodSync); + fs7.stat = statFix(fs7.stat); + fs7.fstat = statFix(fs7.fstat); + fs7.lstat = statFix(fs7.lstat); + fs7.statSync = statFixSync(fs7.statSync); + fs7.fstatSync = statFixSync(fs7.fstatSync); + fs7.lstatSync = statFixSync(fs7.lstatSync); + if (fs7.chmod && !fs7.lchmod) { + fs7.lchmod = function(path6, mode, cb) { + if (cb) process.nextTick(cb); + }; + fs7.lchmodSync = function() { + }; + } + if (fs7.chown && !fs7.lchown) { + fs7.lchown = function(path6, uid, gid, cb) { + if (cb) process.nextTick(cb); + }; + fs7.lchownSync = function() { + }; + } + if (platform === "win32") { + fs7.rename = typeof fs7.rename !== "function" ? fs7.rename : (function(fs$rename) { + function rename(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { + setTimeout(function() { + fs7.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er); + }); + }, backoff); + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er); + }); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); + return rename; + })(fs7.rename); + } + fs7.read = typeof fs7.read !== "function" ? fs7.read : (function(fs$read) { + function read(fd, buffer, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _2, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs7, fd, buffer, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs7, fd, buffer, offset, length, position, callback); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); + return read; + })(fs7.read); + fs7.readSync = typeof fs7.readSync !== "function" ? fs7.readSync : /* @__PURE__ */ (function(fs$readSync) { + return function(fd, buffer, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs7, fd, buffer, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + })(fs7.readSync); + function patchLchmod(fs8) { + fs8.lchmod = function(path6, mode, callback) { + fs8.open( + path6, + constants.O_WRONLY | constants.O_SYMLINK, + mode, + function(err, fd) { + if (err) { + if (callback) callback(err); + return; + } + fs8.fchmod(fd, mode, function(err2) { + fs8.close(fd, function(err22) { + if (callback) callback(err2 || err22); + }); + }); + } + ); + }; + fs8.lchmodSync = function(path6, mode) { + var fd = fs8.openSync(path6, constants.O_WRONLY | constants.O_SYMLINK, mode); + var threw = true; + var ret; + try { + ret = fs8.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs8.closeSync(fd); + } catch (er) { + } + } else { + fs8.closeSync(fd); + } + } + return ret; + }; + } + function patchLutimes(fs8) { + if (constants.hasOwnProperty("O_SYMLINK") && fs8.futimes) { + fs8.lutimes = function(path6, at, mt, cb) { + fs8.open(path6, constants.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) cb(er); + return; + } + fs8.futimes(fd, at, mt, function(er2) { + fs8.close(fd, function(er22) { + if (cb) cb(er2 || er22); + }); + }); + }); + }; + fs8.lutimesSync = function(path6, at, mt) { + var fd = fs8.openSync(path6, constants.O_SYMLINK); + var ret; + var threw = true; + try { + ret = fs8.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs8.closeSync(fd); + } catch (er) { + } + } else { + fs8.closeSync(fd); + } + } + return ret; + }; + } else if (fs8.futimes) { + fs8.lutimes = function(_a, _b, _c, cb) { + if (cb) process.nextTick(cb); + }; + fs8.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) return orig; + return function(target, mode, cb) { + return orig.call(fs7, target, mode, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) return orig; + return function(target, mode) { + try { + return orig.call(fs7, target, mode); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function chownFix(orig) { + if (!orig) return orig; + return function(target, uid, gid, cb) { + return orig.call(fs7, target, uid, gid, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) return orig; + return function(target, uid, gid) { + try { + return orig.call(fs7, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function statFix(orig) { + if (!orig) return orig; + return function(target, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + if (cb) cb.apply(this, arguments); + } + return options ? orig.call(fs7, target, options, callback) : orig.call(fs7, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) return orig; + return function(target, options) { + var stats = options ? orig.call(fs7, target, options) : orig.call(fs7, target); + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + return stats; + }; + } + function chownErOk(er) { + if (!er) + return true; + if (er.code === "ENOSYS") + return true; + var nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true; + } + return false; + } + } + } +}); + +// node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = __commonJS({ + "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { + var Stream = require("stream").Stream; + module2.exports = legacy; + function legacy(fs7) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path6, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path6, options); + Stream.call(this); + var self2 = this; + this.path = path6; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.encoding) this.setEncoding(this.encoding); + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.end === void 0) { + this.end = Infinity; + } else if ("number" !== typeof this.end) { + throw TypeError("end must be a Number"); + } + if (this.start > this.end) { + throw new Error("start must be <= end"); + } + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self2._read(); + }); + return; + } + fs7.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self2.emit("error", err); + self2.readable = false; + return; + } + self2.fd = fd; + self2.emit("open", fd); + self2._read(); + }); + } + function WriteStream(path6, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path6, options); + Stream.call(this); + this.path = path6; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.start < 0) { + throw new Error("start must be >= zero"); + } + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs7.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } + } + } + } +}); + +// node_modules/graceful-fs/clone.js +var require_clone = __commonJS({ + "node_modules/graceful-fs/clone.js"(exports2, module2) { + "use strict"; + module2.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj) { + return obj.__proto__; + }; + function clone(obj) { + if (obj === null || typeof obj !== "object") + return obj; + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) }; + else + var copy = /* @__PURE__ */ Object.create(null); + Object.getOwnPropertyNames(obj).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); + }); + return copy; + } + } +}); + +// node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = __commonJS({ + "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { + var fs7 = require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util = require("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); + } else { + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop() { + } + function publishQueue(context2, queue2) { + Object.defineProperty(context2, gracefulQueue, { + get: function() { + return queue2; + } + }); + } + var debug2 = noop; + if (util.debuglog) + debug2 = util.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug2 = function() { + var m = util.format.apply(util, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs7[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs7, queue); + fs7.close = (function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs7, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }); + return close; + })(fs7.close); + fs7.closeSync = (function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs7, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + })(fs7.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug2(fs7[gracefulQueue]); + require("assert").equal(fs7[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs7[gracefulQueue]); + } + module2.exports = patch(clone(fs7)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs7.__patched) { + module2.exports = patch(fs7); + fs7.__patched = true; + } + function patch(fs8) { + polyfills(fs8); + fs8.gracefulify = patch; + fs8.createReadStream = createReadStream; + fs8.createWriteStream = createWriteStream2; + var fs$readFile = fs8.readFile; + fs8.readFile = readFile; + function readFile(path6, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readFile(path6, options, cb); + function go$readFile(path7, options2, cb2, startTime) { + return fs$readFile(path7, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path7, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs8.writeFile; + fs8.writeFile = writeFile; + function writeFile(path6, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$writeFile(path6, data, options, cb); + function go$writeFile(path7, data2, options2, cb2, startTime) { + return fs$writeFile(path7, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path7, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs8.appendFile; + if (fs$appendFile) + fs8.appendFile = appendFile; + function appendFile(path6, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$appendFile(path6, data, options, cb); + function go$appendFile(path7, data2, options2, cb2, startTime) { + return fs$appendFile(path7, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path7, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs8.copyFile; + if (fs$copyFile) + fs8.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs8.readdir; + fs8.readdir = readdir; + var noReaddirOptionVersions = /^v[0-5]\./; + function readdir(path6, options, cb) { + if (typeof options === "function") + cb = options, options = null; + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path7, options2, cb2, startTime) { + return fs$readdir(path7, fs$readdirCallback( + path7, + options2, + cb2, + startTime + )); + } : function go$readdir2(path7, options2, cb2, startTime) { + return fs$readdir(path7, options2, fs$readdirCallback( + path7, + options2, + cb2, + startTime + )); + }; + return go$readdir(path6, options, cb); + function fs$readdirCallback(path7, options2, cb2, startTime) { + return function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([ + go$readdir, + [path7, options2, cb2], + err, + startTime || Date.now(), + Date.now() + ]); + else { + if (files && files.sort) + files.sort(); + if (typeof cb2 === "function") + cb2.call(this, err, files); + } + }; + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs8); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs8.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs8.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs8, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val2) { + ReadStream = val2; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs8, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val2) { + WriteStream = val2; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs8, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val2) { + FileReadStream = val2; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs8, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val2) { + FileWriteStream = val2; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path6, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this; + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream(path6, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this; + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream(path6, options) { + return new fs8.ReadStream(path6, options); + } + function createWriteStream2(path6, options) { + return new fs8.WriteStream(path6, options); + } + var fs$open = fs8.open; + fs8.open = open; + function open(path6, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path6, flags, mode, cb); + function go$open(path7, flags2, mode2, cb2, startTime) { + return fs$open(path7, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path7, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + return fs8; + } + function enqueue(elem) { + debug2("ENQUEUE", elem[0].name, elem[1]); + fs7[gracefulQueue].push(elem); + retry3(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs7[gracefulQueue].length; ++i) { + if (fs7[gracefulQueue][i].length > 2) { + fs7[gracefulQueue][i][3] = now; + fs7[gracefulQueue][i][4] = now; + } + } + retry3(); + } + function retry3() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs7[gracefulQueue].length === 0) + return; + var elem = fs7[gracefulQueue].shift(); + var fn = elem[0]; + var args = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug2("RETRY", fn.name, args); + fn.apply(null, args); + } else if (Date.now() - startTime >= 6e4) { + debug2("TIMEOUT", fn.name, args); + var cb = args.pop(); + if (typeof cb === "function") + cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + var desiredDelay = Math.min(sinceStart * 1.2, 100); + if (sinceAttempt >= desiredDelay) { + debug2("RETRY", fn.name, args); + fn.apply(null, args.concat([startTime])); + } else { + fs7[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry3, 0); + } + } + } +}); + // node_modules/archiver-utils/node_modules/is-stream/index.js var require_is_stream = __commonJS({ "node_modules/archiver-utils/node_modules/is-stream/index.js"(exports2, module2) { @@ -89489,7 +81245,7 @@ var require_isarray = __commonJS({ }); // node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream.js -var require_stream5 = __commonJS({ +var require_stream = __commonJS({ "node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { module2.exports = require("stream"); } @@ -89622,6 +81378,48 @@ var require_util12 = __commonJS({ } }); +// node_modules/inherits/inherits_browser.js +var require_inherits_browser = __commonJS({ + "node_modules/inherits/inherits_browser.js"(exports2, module2) { + if (typeof Object.create === "function") { + module2.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + module2.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; + } + } +}); + +// node_modules/inherits/inherits.js +var require_inherits = __commonJS({ + "node_modules/inherits/inherits.js"(exports2, module2) { + try { + util = require("util"); + if (typeof util.inherits !== "function") throw ""; + module2.exports = util.inherits; + } catch (e) { + module2.exports = require_inherits_browser(); + } + var util; + } +}); + // node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js var require_BufferList = __commonJS({ "node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports2, module2) { @@ -89798,7 +81596,7 @@ var require_stream_writable = __commonJS({ var internalUtil = { deprecate: require_node2() }; - var Stream = require_stream5(); + var Stream = require_stream(); var Buffer2 = require_safe_buffer().Buffer; var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { }; @@ -90544,7 +82342,7 @@ var require_stream_readable = __commonJS({ var EElistenerCount = function(emitter, type2) { return emitter.listeners(type2).length; }; - var Stream = require_stream5(); + var Stream = require_stream(); var Buffer2 = require_safe_buffer().Buffer; var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { }; @@ -93722,7 +85520,7 @@ var require_process = __commonJS({ }); // node_modules/readable-stream/lib/internal/streams/utils.js -var require_utils10 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/utils.js"(exports2, module2) { "use strict"; var { SymbolAsyncIterator, SymbolIterator, SymbolFor } = require_primordials(); @@ -93954,7 +85752,7 @@ var require_end_of_stream = __commonJS({ isNodeStream, willEmitClose: _willEmitClose, kIsClosedPromise - } = require_utils10(); + } = require_utils6(); var addAbortListener; function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; @@ -94192,7 +85990,7 @@ var require_destroy2 = __commonJS({ AbortError } = require_errors4(); var { Symbol: Symbol2 } = require_primordials(); - var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils10(); + var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils6(); var kDestroy = Symbol2("kDestroy"); var kConstruct = Symbol2("kConstruct"); function checkError(err, w, r) { @@ -94530,7 +86328,7 @@ var require_add_abort_signal = __commonJS({ "use strict"; var { SymbolDispose } = require_primordials(); var { AbortError, codes } = require_errors4(); - var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils10(); + var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils6(); var eos = require_end_of_stream(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2 } = codes; var addAbortListener; @@ -96467,7 +88265,7 @@ var require_duplexify = __commonJS({ isDuplexNodeStream, isReadableStream, isWritableStream - } = require_utils10(); + } = require_utils6(); var eos = require_end_of_stream(); var { AbortError, @@ -97067,7 +88865,7 @@ var require_pipeline3 = __commonJS({ isWebStream, isReadableStream, isReadableFinished - } = require_utils10(); + } = require_utils6(); var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; var PassThrough; var Readable; @@ -97480,7 +89278,7 @@ var require_compose = __commonJS({ isTransformStream, isWritableStream, isReadableStream - } = require_utils10(); + } = require_utils6(); var { AbortError, codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } @@ -97673,7 +89471,7 @@ var require_operators = __commonJS({ var { finished } = require_end_of_stream(); var staticCompose = require_compose(); var { addAbortSignalNoValidate } = require_add_abort_signal(); - var { isWritable, isNodeStream } = require_utils10(); + var { isWritable, isNodeStream } = require_utils6(); var { deprecate } = require_util13(); var { ArrayPrototypePush, @@ -98068,10 +89866,10 @@ var require_promises = __commonJS({ "node_modules/readable-stream/lib/stream/promises.js"(exports2, module2) { "use strict"; var { ArrayPrototypePop, Promise: Promise2 } = require_primordials(); - var { isIterable, isNodeStream, isWebStream } = require_utils10(); + var { isIterable, isNodeStream, isWebStream } = require_utils6(); var { pipelineImpl: pl } = require_pipeline3(); var { finished } = require_end_of_stream(); - require_stream6(); + require_stream2(); function pipeline(...streams) { return new Promise2((resolve5, reject) => { let signal; @@ -98106,7 +89904,7 @@ var require_promises = __commonJS({ }); // node_modules/readable-stream/lib/stream.js -var require_stream6 = __commonJS({ +var require_stream2 = __commonJS({ "node_modules/readable-stream/lib/stream.js"(exports2, module2) { var { Buffer: Buffer2 } = require("buffer"); var { ObjectDefineProperty, ObjectKeys, ReflectApply } = require_primordials(); @@ -98123,7 +89921,7 @@ var require_stream6 = __commonJS({ var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); var promises2 = require_promises(); - var utils = require_utils10(); + var utils = require_utils6(); var Stream = module2.exports = require_legacy().Stream; Stream.isDestroyed = utils.isDestroyed; Stream.isDisturbed = utils.isDisturbed; @@ -98258,7 +90056,7 @@ var require_ours = __commonJS({ }); module2.exports.Stream = Stream.Stream; } else { - const CustomStream = require_stream6(); + const CustomStream = require_stream2(); const promises2 = require_promises(); const originalDestroy = CustomStream.Readable.destroy; module2.exports = CustomStream.Readable; @@ -101694,8 +93492,8 @@ var require_commonjs14 = __commonJS({ const noDelete = allowStale || options.noDeleteOnFetchRejection; const bf2 = p; if (this.#valList[index] === p) { - const del4 = !noDelete || bf2.__staleWhileFetching === void 0; - if (del4) { + const del = !noDelete || bf2.__staleWhileFetching === void 0; + if (del) { this.#delete(k, "fetch"); } else if (!allowStaleAborted) { this.#valList[index] = bf2.__staleWhileFetching; @@ -104689,7 +96487,7 @@ var require_commonjs16 = __commonJS({ }); // node_modules/archiver-utils/node_modules/glob/dist/commonjs/pattern.js -var require_pattern2 = __commonJS({ +var require_pattern = __commonJS({ "node_modules/archiver-utils/node_modules/glob/dist/commonjs/pattern.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -104863,13 +96661,13 @@ var require_pattern2 = __commonJS({ }); // node_modules/archiver-utils/node_modules/glob/dist/commonjs/ignore.js -var require_ignore2 = __commonJS({ +var require_ignore = __commonJS({ "node_modules/archiver-utils/node_modules/glob/dist/commonjs/ignore.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Ignore = void 0; var minimatch_1 = require_commonjs13(); - var pattern_js_1 = require_pattern2(); + var pattern_js_1 = require_pattern(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; var Ignore = class { relative; @@ -105199,7 +96997,7 @@ var require_walker = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.GlobStream = exports2.GlobWalker = exports2.GlobUtil = void 0; var minipass_1 = require_commonjs15(); - var ignore_js_1 = require_ignore2(); + var ignore_js_1 = require_ignore(); var processor_js_1 = require_processor(); var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new ignore_js_1.Ignore([ignore], opts) : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) : ignore; var GlobUtil = class { @@ -105533,7 +97331,7 @@ var require_walker = __commonJS({ }); // node_modules/archiver-utils/node_modules/glob/dist/commonjs/glob.js -var require_glob3 = __commonJS({ +var require_glob2 = __commonJS({ "node_modules/archiver-utils/node_modules/glob/dist/commonjs/glob.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -105541,7 +97339,7 @@ var require_glob3 = __commonJS({ var minimatch_1 = require_commonjs13(); var node_url_1 = require("node:url"); var path_scurry_1 = require_commonjs16(); - var pattern_js_1 = require_pattern2(); + var pattern_js_1 = require_pattern(); var walker_js_1 = require_walker(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; var Glob = class { @@ -105778,7 +97576,7 @@ var require_commonjs17 = __commonJS({ exports2.globIterateSync = globIterateSync; exports2.globIterate = globIterate; var minimatch_1 = require_commonjs13(); - var glob_js_1 = require_glob3(); + var glob_js_1 = require_glob2(); var has_magic_js_1 = require_has_magic(); var minimatch_2 = require_commonjs13(); Object.defineProperty(exports2, "escape", { enumerable: true, get: function() { @@ -105787,7 +97585,7 @@ var require_commonjs17 = __commonJS({ Object.defineProperty(exports2, "unescape", { enumerable: true, get: function() { return minimatch_2.unescape; } }); - var glob_js_2 = require_glob3(); + var glob_js_2 = require_glob2(); Object.defineProperty(exports2, "Glob", { enumerable: true, get: function() { return glob_js_2.Glob; } }); @@ -105795,7 +97593,7 @@ var require_commonjs17 = __commonJS({ Object.defineProperty(exports2, "hasMagic", { enumerable: true, get: function() { return has_magic_js_2.hasMagic; } }); - var ignore_js_1 = require_ignore2(); + var ignore_js_1 = require_ignore(); Object.defineProperty(exports2, "Ignore", { enumerable: true, get: function() { return ignore_js_1.Ignore; } }); @@ -106121,7 +97919,7 @@ var require_archiver_utils = __commonJS({ }); // node_modules/archiver/lib/error.js -var require_error3 = __commonJS({ +var require_error2 = __commonJS({ "node_modules/archiver/lib/error.js"(exports2, module2) { var util = require("util"); var ERROR_CODES = { @@ -106158,11 +97956,11 @@ var require_core2 = __commonJS({ "node_modules/archiver/lib/core.js"(exports2, module2) { var fs7 = require("fs"); var glob2 = require_readdir_glob(); - var async = require_async7(); + var async = require_async(); var path6 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; - var ArchiverError = require_error3(); + var ArchiverError = require_error2(); var Transform = require_ours().Transform; var win32 = process.platform === "win32"; var Archiver = function(format, options) { @@ -106890,7 +98688,7 @@ var require_unix_stat = __commonJS({ }); // node_modules/compress-commons/lib/archivers/zip/constants.js -var require_constants12 = __commonJS({ +var require_constants9 = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/constants.js"(exports2, module2) { module2.exports = { WORD: 4, @@ -106974,7 +98772,7 @@ var require_zip_archive_entry = __commonJS({ var ArchiveEntry = require_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); var UnixStat = require_unix_stat(); - var constants = require_constants12(); + var constants = require_constants9(); var zipUtil = require_util14(); var ZipArchiveEntry = module2.exports = function(name) { if (!(this instanceof ZipArchiveEntry)) { @@ -107466,7 +99264,7 @@ var require_zip_archive_output_stream = __commonJS({ var ArchiveOutputStream = require_archive_output_stream(); var ZipArchiveEntry = require_zip_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); - var constants = require_constants12(); + var constants = require_constants9(); var util = require_util15(); var zipUtil = require_util14(); var ZipArchiveOutputStream = module2.exports = function(options) { @@ -107897,7 +99695,7 @@ var require_zip = __commonJS({ }); // node_modules/queue-tick/queue-microtask.js -var require_queue_microtask2 = __commonJS({ +var require_queue_microtask = __commonJS({ "node_modules/queue-tick/queue-microtask.js"(exports2, module2) { module2.exports = typeof queueMicrotask === "function" ? queueMicrotask : (fn) => Promise.resolve().then(fn); } @@ -107906,7 +99704,7 @@ var require_queue_microtask2 = __commonJS({ // node_modules/queue-tick/process-next-tick.js var require_process_next_tick = __commonJS({ "node_modules/queue-tick/process-next-tick.js"(exports2, module2) { - module2.exports = typeof process !== "undefined" && typeof process.nextTick === "function" ? process.nextTick.bind(process) : require_queue_microtask2(); + module2.exports = typeof process !== "undefined" && typeof process.nextTick === "function" ? process.nextTick.bind(process) : require_queue_microtask(); } }); @@ -109864,7 +101662,7 @@ var require_extract = __commonJS({ }); // node_modules/tar-stream/constants.js -var require_constants13 = __commonJS({ +var require_constants10 = __commonJS({ "node_modules/tar-stream/constants.js"(exports2, module2) { var constants = { // just for envs without fs @@ -109888,7 +101686,7 @@ var require_pack = __commonJS({ "node_modules/tar-stream/pack.js"(exports2, module2) { var { Readable, Writable, getStreamError } = require_streamx(); var b4a = require_b4a(); - var constants = require_constants13(); + var constants = require_constants10(); var headers = require_headers2(); var DMODE = 493; var FMODE = 420; @@ -110927,7 +102725,7 @@ var require_context2 = __commonJS({ }); // node_modules/@actions/artifact/node_modules/@actions/github/lib/internal/utils.js -var require_utils11 = __commonJS({ +var require_utils7 = __commonJS({ "node_modules/@actions/artifact/node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { @@ -111452,7 +103250,7 @@ var require_lib3 = __commonJS({ }); // node_modules/whatwg-url/lib/utils.js -var require_utils12 = __commonJS({ +var require_utils8 = __commonJS({ "node_modules/whatwg-url/lib/utils.js"(exports2, module2) { "use strict"; module2.exports.mixin = function mixin(target, source) { @@ -112874,7 +104672,7 @@ var require_URL = __commonJS({ "node_modules/whatwg-url/lib/URL.js"(exports2, module2) { "use strict"; var conversions = require_lib3(); - var utils = require_utils12(); + var utils = require_utils8(); var Impl = require_URL_impl(); var impl = utils.implSymbol; function URL2(url) { @@ -115968,7 +107766,7 @@ var require_dist_node23 = __commonJS({ }); // node_modules/@actions/artifact/node_modules/@actions/github/lib/utils.js -var require_utils13 = __commonJS({ +var require_utils9 = __commonJS({ "node_modules/@actions/artifact/node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { @@ -115997,7 +107795,7 @@ var require_utils13 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; var Context = __importStar4(require_context2()); - var Utils = __importStar4(require_utils11()); + var Utils = __importStar4(require_utils7()); var core_1 = require_dist_node21(); var plugin_rest_endpoint_methods_1 = require_dist_node22(); var plugin_paginate_rest_1 = require_dist_node23(); @@ -116052,7 +107850,7 @@ var require_github2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; var Context = __importStar4(require_context2()); - var utils_1 = require_utils13(); + var utils_1 = require_utils9(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); @@ -117091,7 +108889,7 @@ var require_matcher_stream = __commonJS({ }); // node_modules/unzip-stream/lib/entry.js -var require_entry3 = __commonJS({ +var require_entry = __commonJS({ "node_modules/unzip-stream/lib/entry.js"(exports2, module2) { "use strict"; var stream = require("stream"); @@ -117124,7 +108922,7 @@ var require_unzip_stream = __commonJS({ var util = require("util"); var zlib = require("zlib"); var MatcherStream = require_matcher_stream(); - var Entry = require_entry3(); + var Entry = require_entry(); var states = { STREAM_START: 0, START: 1, @@ -118392,7 +110190,7 @@ var require_get_artifact = __commonJS({ var github_1 = require_github2(); var plugin_retry_1 = require_dist_node25(); var core14 = __importStar4(require_core()); - var utils_1 = require_utils13(); + var utils_1 = require_utils9(); var retry_options_1 = require_retry_options(); var plugin_request_log_1 = require_dist_node24(); var util_1 = require_util11(); @@ -118516,7 +110314,7 @@ var require_delete_artifact = __commonJS({ var github_1 = require_github2(); var user_agent_1 = require_user_agent2(); var retry_options_1 = require_retry_options(); - var utils_1 = require_utils13(); + var utils_1 = require_utils9(); var plugin_request_log_1 = require_dist_node24(); var plugin_retry_1 = require_dist_node25(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); @@ -118622,7 +110420,7 @@ var require_list_artifacts = __commonJS({ var github_1 = require_github2(); var user_agent_1 = require_user_agent2(); var retry_options_1 = require_retry_options(); - var utils_1 = require_utils13(); + var utils_1 = require_utils9(); var plugin_request_log_1 = require_dist_node24(); var plugin_retry_1 = require_dist_node25(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); @@ -119844,7 +111642,7 @@ var require_crc64 = __commonJS({ }); // node_modules/@actions/artifact-legacy/lib/internal/utils.js -var require_utils14 = __commonJS({ +var require_utils10 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/utils.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -120154,7 +111952,7 @@ var require_http_manager = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpManager = void 0; - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var HttpManager = class { constructor(clientCount, userAgent) { if (clientCount < 1) { @@ -120409,7 +112207,7 @@ var require_requestUtils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientRequest = exports2.retry = void 0; - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var core14 = __importStar4(require_core()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { @@ -120530,7 +112328,7 @@ var require_upload_http_client = __commonJS({ var core14 = __importStar4(require_core()); var tmp = __importStar4(require_tmp_promise()); var stream = __importStar4(require("stream")); - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var config_variables_1 = require_config_variables(); var util_1 = require("util"); var url_1 = require("url"); @@ -120921,7 +112719,7 @@ var require_download_http_client = __commonJS({ var fs7 = __importStar4(require("fs")); var core14 = __importStar4(require_core()); var zlib = __importStar4(require("zlib")); - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var url_1 = require("url"); var status_reporter_1 = require_status_reporter(); var perf_hooks_1 = require("perf_hooks"); @@ -121264,7 +113062,7 @@ var require_artifact_client = __commonJS({ var core14 = __importStar4(require_core()); var upload_specification_1 = require_upload_specification(); var upload_http_client_1 = require_upload_http_client(); - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); var download_http_client_1 = require_download_http_client(); var download_specification_1 = require_download_specification(); @@ -122456,7 +114254,7 @@ var require_internal_hash_files = __commonJS({ }); // node_modules/@actions/glob/lib/glob.js -var require_glob4 = __commonJS({ +var require_glob3 = __commonJS({ "node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -122526,7 +114324,6 @@ var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); -var import_del = __toESM(require_del()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -126812,11 +118609,9 @@ var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); -var import_del3 = __toESM(require_del()); // src/analyze.ts var io5 = __toESM(require_io()); -var import_del2 = __toESM(require_del()); // src/autobuild.ts var core11 = __toESM(require_core()); @@ -126824,7 +118619,7 @@ var core11 = __toESM(require_core()); // src/dependency-caching.ts var import_path = require("path"); var actionsCache3 = __toESM(require_cache3()); -var glob = __toESM(require_glob4()); +var glob = __toESM(require_glob3()); function getJavaTempDependencyDir() { return (0, import_path.join)(getTemporaryDirectory(), "codeql_java", "repository"); } @@ -126973,52 +118768,6 @@ undici/lib/fetch/body.js: undici/lib/websocket/frame.js: (*! ws. MIT License. Einar Otto Stangvik *) -is-extglob/index.js: - (*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - *) - -is-glob/index.js: - (*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - *) - -is-number/index.js: - (*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - *) - -to-regex-range/index.js: - (*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - *) - -fill-range/index.js: - (*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - *) - -queue-microtask/index.js: - (*! queue-microtask. MIT License. Feross Aboukhadijeh *) - -run-parallel/index.js: - (*! run-parallel. MIT License. Feross Aboukhadijeh *) - normalize-path/index.js: (*! * normalize-path diff --git a/lib/analyze-action.js b/lib/analyze-action.js index 936357be7..ae1091621 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -185,7 +185,7 @@ var require_file_command = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; var crypto = __importStar4(require("crypto")); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var os5 = __importStar4(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -193,10 +193,10 @@ var require_file_command = __commonJS({ if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs17.existsSync(filePath)) { + if (!fs20.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs17.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os5.EOL}`, { + fs20.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os5.EOL}`, { encoding: "utf8" }); } @@ -999,14 +999,14 @@ var require_util = __commonJS({ } const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; - let path16 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path20 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path16 && !path16.startsWith("/")) { - path16 = `/${path16}`; + if (path20 && !path20.startsWith("/")) { + path20 = `/${path20}`; } - url2 = new URL(origin + path16); + url2 = new URL(origin + path20); } return url2; } @@ -2620,20 +2620,20 @@ var require_parseParams = __commonJS({ var require_basename = __commonJS({ "node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) { "use strict"; - module2.exports = function basename(path16) { - if (typeof path16 !== "string") { + module2.exports = function basename(path20) { + if (typeof path20 !== "string") { return ""; } - for (var i = path16.length - 1; i >= 0; --i) { - switch (path16.charCodeAt(i)) { + for (var i = path20.length - 1; i >= 0; --i) { + switch (path20.charCodeAt(i)) { case 47: // '/' case 92: - path16 = path16.slice(i + 1); - return path16 === ".." || path16 === "." ? "" : path16; + path20 = path20.slice(i + 1); + return path20 === ".." || path20 === "." ? "" : path20; } } - return path16 === ".." || path16 === "." ? "" : path16; + return path20 === ".." || path20 === "." ? "" : path20; }; } }); @@ -2673,8 +2673,8 @@ var require_multipart = __commonJS({ } } function checkFinished() { - if (nends === 0 && finished && !boy._done) { - finished = false; + if (nends === 0 && finished2 && !boy._done) { + finished2 = false; self2.end(); } } @@ -2693,7 +2693,7 @@ var require_multipart = __commonJS({ let nends = 0; let curFile; let curField; - let finished = false; + let finished2 = false; this._needDrain = false; this._pause = false; this._cb = void 0; @@ -2879,7 +2879,7 @@ var require_multipart = __commonJS({ }).on("error", function(err) { boy.emit("error", err); }).on("finish", function() { - finished = true; + finished2 = true; checkFinished(); }); } @@ -5663,7 +5663,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path16, + path: path20, method, body, headers, @@ -5677,11 +5677,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path16 !== "string") { + if (typeof path20 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") { + } else if (path20[0] !== "/" && !(path20.startsWith("http://") || path20.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path16) !== null) { + } else if (invalidPathRegex.exec(path20) !== null) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -5744,7 +5744,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? util.buildURL(path16, query) : path16; + this.path = query ? util.buildURL(path20, query) : path20; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -6752,9 +6752,9 @@ var require_RedirectHandler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path16 = search ? `${pathname}${search}` : pathname; + const path20 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path16; + this.opts.path = path20; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -7994,7 +7994,7 @@ var require_client = __commonJS({ writeH2(client, client[kHTTP2Session], request); return; } - const { body, method, path: path16, host, upgrade, headers, blocking, reset } = request; + const { body, method, path: path20, host, upgrade, headers, blocking, reset } = request; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); @@ -8044,7 +8044,7 @@ var require_client = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path16} HTTP/1.1\r + let header = `${method} ${path20} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -8107,7 +8107,7 @@ upgrade: ${upgrade}\r return true; } function writeH2(client, session, request) { - const { body, method, path: path16, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + const { body, method, path: path20, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; @@ -8150,7 +8150,7 @@ upgrade: ${upgrade}\r }); return true; } - headers[HTTP2_HEADER_PATH] = path16; + headers[HTTP2_HEADER_PATH] = path20; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -8310,10 +8310,10 @@ upgrade: ${upgrade}\r }); return; } - let finished = false; + let finished2 = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { - if (finished) { + if (finished2) { return; } try { @@ -8325,7 +8325,7 @@ upgrade: ${upgrade}\r } }; const onDrain = function() { - if (finished) { + if (finished2) { return; } if (body.resume) { @@ -8333,17 +8333,17 @@ upgrade: ${upgrade}\r } }; const onAbort = function() { - if (finished) { + if (finished2) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); }; const onFinished = function(err) { - if (finished) { + if (finished2) { return; } - finished = true; + finished2 = true; assert(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); socket.off("drain", onDrain).off("error", onFinished); body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); @@ -9217,7 +9217,7 @@ var require_readable = __commonJS({ var kBody = Symbol("kBody"); var kAbort = Symbol("abort"); var kContentType = Symbol("kContentType"); - var noop = () => { + var noop2 = () => { }; module2.exports = class BodyReadable extends Readable2 { constructor({ @@ -9339,7 +9339,7 @@ var require_readable = __commonJS({ return new Promise((resolve8, reject) => { const signalListenerCleanup = signal ? util.addAbortListener(signal, () => { this.destroy(); - }) : noop; + }) : noop2; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { @@ -9347,7 +9347,7 @@ var require_readable = __commonJS({ } else { resolve8(null); } - }).on("error", noop).on("data", function(chunk) { + }).on("error", noop2).on("data", function(chunk) { limit -= chunk.length; if (limit <= 0) { this.destroy(); @@ -9704,7 +9704,7 @@ var require_api_request = __commonJS({ var require_api_stream = __commonJS({ "node_modules/undici/lib/api/api-stream.js"(exports2, module2) { "use strict"; - var { finished, PassThrough } = require("stream"); + var { finished: finished2, PassThrough } = require("stream"); var { InvalidArgumentError, InvalidReturnValueError, @@ -9802,7 +9802,7 @@ var require_api_stream = __commonJS({ if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { throw new InvalidReturnValueError("expected Writable"); } - finished(res, { readable: false }, (err) => { + finished2(res, { readable: false }, (err) => { const { callback: callback2, res: res2, opaque: opaque2, trailers, abort } = this; this.res = null; if (err || !res2.readable) { @@ -10390,20 +10390,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path16) { - if (typeof path16 !== "string") { - return path16; + function safeUrl(path20) { + if (typeof path20 !== "string") { + return path20; } - const pathSegments = path16.split("?"); + const pathSegments = path20.split("?"); if (pathSegments.length !== 2) { - return path16; + return path20; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path16, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path16); + function matchKey(mockDispatch2, { path: path20, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path20); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10421,7 +10421,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path16 }) => matchValue(safeUrl(path16), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path20 }) => matchValue(safeUrl(path20), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10458,9 +10458,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path16, method, body, headers, query } = opts; + const { path: path20, method, body, headers, query } = opts; return { - path: path16, + path: path20, method, body, headers, @@ -10754,7 +10754,7 @@ var require_mock_interceptor = __commonJS({ var require_mock_client = __commonJS({ "node_modules/undici/lib/mock/mock-client.js"(exports2, module2) { "use strict"; - var { promisify: promisify2 } = require("util"); + var { promisify: promisify3 } = require("util"); var Client = require_client(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10794,7 +10794,7 @@ var require_mock_client = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify2(this[kOriginalClose])(); + await promisify3(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10807,7 +10807,7 @@ var require_mock_client = __commonJS({ var require_mock_pool = __commonJS({ "node_modules/undici/lib/mock/mock-pool.js"(exports2, module2) { "use strict"; - var { promisify: promisify2 } = require("util"); + var { promisify: promisify3 } = require("util"); var Pool = require_pool(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10847,7 +10847,7 @@ var require_mock_pool = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify2(this[kOriginalClose])(); + await promisify3(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10909,10 +10909,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path16, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path20, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path16, + Path: path20, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -15532,8 +15532,8 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path16) { - for (const char of path16) { + function validateCookiePath(path20) { + for (const char of path20) { const code = char.charCodeAt(0); if (code < 33 || char === ";") { throw new Error("Invalid cookie path"); @@ -17213,11 +17213,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path16 = opts.path; + let path20 = opts.path; if (!opts.path.startsWith("/")) { - path16 = `/${path16}`; + path20 = `/${path20}`; } - url2 = new URL(util.parseOrigin(url2).origin + path16); + url2 = new URL(util.parseOrigin(url2).origin + path20); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -18440,7 +18440,7 @@ var require_path_utils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -18450,7 +18450,7 @@ var require_path_utils = __commonJS({ } exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path16.sep); + return pth.replace(/[/\\]/g, path20.sep); } exports2.toPlatformPath = toPlatformPath; } @@ -18513,12 +18513,12 @@ var require_io_util = __commonJS({ var _a; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs17 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); - _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + var fs20 = __importStar4(require("fs")); + var path20 = __importStar4(require("path")); + _a = fs20.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs17.constants.O_RDONLY; + exports2.READONLY = fs20.constants.O_RDONLY; function exists(fsPath) { return __awaiter4(this, void 0, void 0, function* () { try { @@ -18533,13 +18533,13 @@ var require_io_util = __commonJS({ }); } exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { + function isDirectory2(fsPath, useStat = false) { return __awaiter4(this, void 0, void 0, function* () { const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; + exports2.isDirectory = isDirectory2; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18563,7 +18563,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path16.extname(filePath).toUpperCase(); + const upperExt = path20.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -18587,11 +18587,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path16.dirname(filePath); - const upperName = path16.basename(filePath).toUpperCase(); + const directory = path20.dirname(filePath); + const upperName = path20.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path16.join(directory, actualName); + filePath = path20.join(directory, actualName); break; } } @@ -18686,7 +18686,7 @@ var require_io = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; var assert_1 = require("assert"); - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var ioUtil = __importStar4(require_io_util()); function cp(source, dest, options = {}) { return __awaiter4(this, void 0, void 0, function* () { @@ -18695,7 +18695,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path20.join(dest, path20.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -18707,7 +18707,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path16.relative(source, newDest) === "") { + if (path20.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); @@ -18720,7 +18720,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path16.join(dest, path16.basename(source)); + dest = path20.join(dest, path20.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -18731,7 +18731,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path16.dirname(dest)); + yield mkdirP(path20.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -18794,7 +18794,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path20.delimiter)) { if (extension) { extensions.push(extension); } @@ -18807,12 +18807,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path16.sep)) { + if (tool.includes(path20.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path16.delimiter)) { + for (const p of process.env.PATH.split(path20.delimiter)) { if (p) { directories.push(p); } @@ -18820,7 +18820,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path20.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -18936,7 +18936,7 @@ var require_toolrunner = __commonJS({ var os5 = __importStar4(require("os")); var events = __importStar4(require("events")); var child = __importStar4(require("child_process")); - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var io7 = __importStar4(require_io()); var ioUtil = __importStar4(require_io_util()); var timers_1 = require("timers"); @@ -19151,7 +19151,7 @@ var require_toolrunner = __commonJS({ exec() { return __awaiter4(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path16.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path20.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io7.which(this.toolPath, true); return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { @@ -19651,7 +19651,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os5 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -19679,7 +19679,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path16.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path20.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath; function getInput2(name, options) { @@ -19835,8 +19835,8 @@ var require_context = __commonJS({ if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path16 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path16} does not exist${os_1.EOL}`); + const path20 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path20} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -20529,12 +20529,12 @@ var require_wrappy = __commonJS({ var require_once = __commonJS({ "node_modules/once/once.js"(exports2, module2) { var wrappy = require_wrappy(); - module2.exports = wrappy(once); + module2.exports = wrappy(once2); module2.exports.strict = wrappy(onceStrict); - once.proto = once(function() { + once2.proto = once2(function() { Object.defineProperty(Function.prototype, "once", { value: function() { - return once(this); + return once2(this); }, configurable: true }); @@ -20545,7 +20545,7 @@ var require_once = __commonJS({ configurable: true }); }); - function once(fn) { + function once2(fn) { var f = function() { if (f.called) return f.value; f.called = true; @@ -21759,7 +21759,7 @@ var require_dist_node11 = __commonJS({ var import_graphql = require_dist_node9(); var import_auth_token = require_dist_node10(); var VERSION = "5.2.0"; - var noop = () => { + var noop2 = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); @@ -21838,8 +21838,8 @@ var require_dist_node11 = __commonJS({ this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); this.log = Object.assign( { - debug: noop, - info: noop, + debug: noop2, + info: noop2, warn: consoleWarn, error: consoleError }, @@ -24525,135 +24525,6 @@ var require_github = __commonJS({ } }); -// node_modules/array-union/index.js -var require_array_union = __commonJS({ - "node_modules/array-union/index.js"(exports2, module2) { - "use strict"; - module2.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; - }; - } -}); - -// node_modules/merge2/index.js -var require_merge2 = __commonJS({ - "node_modules/merge2/index.js"(exports2, module2) { - "use strict"; - var Stream = require("stream"); - var PassThrough = Stream.PassThrough; - var slice = Array.prototype.slice; - module2.exports = merge2; - function merge2() { - const streamsQueue = []; - const args = slice.call(arguments); - let merging = false; - let options = args[args.length - 1]; - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop(); - } else { - options = {}; - } - const doEnd = options.end !== false; - const doPipeError = options.pipeError === true; - if (options.objectMode == null) { - options.objectMode = true; - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024; - } - const mergedStream = PassThrough(options); - function addStream() { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)); - } - mergeStream(); - return this; - } - function mergeStream() { - if (merging) { - return; - } - merging = true; - let streams = streamsQueue.shift(); - if (!streams) { - process.nextTick(endStream); - return; - } - if (!Array.isArray(streams)) { - streams = [streams]; - } - let pipesCount = streams.length + 1; - function next() { - if (--pipesCount > 0) { - return; - } - merging = false; - mergeStream(); - } - function pipe(stream2) { - function onend() { - stream2.removeListener("merge2UnpipeEnd", onend); - stream2.removeListener("end", onend); - if (doPipeError) { - stream2.removeListener("error", onerror); - } - next(); - } - function onerror(err) { - mergedStream.emit("error", err); - } - if (stream2._readableState.endEmitted) { - return next(); - } - stream2.on("merge2UnpipeEnd", onend); - stream2.on("end", onend); - if (doPipeError) { - stream2.on("error", onerror); - } - stream2.pipe(mergedStream, { end: false }); - stream2.resume(); - } - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]); - } - next(); - } - function endStream() { - merging = false; - mergedStream.emit("queueDrain"); - if (doEnd) { - mergedStream.end(); - } - } - mergedStream.setMaxListeners(0); - mergedStream.add = addStream; - mergedStream.on("unpipe", function(stream2) { - stream2.emit("merge2UnpipeEnd"); - }); - if (args.length) { - addStream.apply(null, args); - } - return mergedStream; - } - function pauseStreams(streams, options) { - if (!Array.isArray(streams)) { - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)); - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error("Only readable stream can be merged."); - } - streams.pause(); - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options); - } - } - return streams; - } - } -}); - // node_modules/fast-glob/out/utils/array.js var require_array = __commonJS({ "node_modules/fast-glob/out/utils/array.js"(exports2) { @@ -24726,7 +24597,7 @@ var require_path = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0; var os5 = require("os"); - var path16 = require("path"); + var path20 = require("path"); var IS_WINDOWS_PLATFORM = os5.platform() === "win32"; var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; @@ -24738,7 +24609,7 @@ var require_path = __commonJS({ } exports2.unixify = unixify; function makeAbsolute(cwd, filepath) { - return path16.resolve(cwd, filepath); + return path20.resolve(cwd, filepath); } exports2.makeAbsolute = makeAbsolute; function removeLeadingDotSegment(entry) { @@ -24904,7 +24775,7 @@ var require_is_glob = __commonJS({ } return false; }; - module2.exports = function isGlob(str2, options) { + module2.exports = function isGlob2(str2, options) { if (typeof str2 !== "string" || str2 === "") { return false; } @@ -24924,26 +24795,26 @@ var require_is_glob = __commonJS({ var require_glob_parent = __commonJS({ "node_modules/glob-parent/index.js"(exports2, module2) { "use strict"; - var isGlob = require_is_glob(); + var isGlob2 = require_is_glob(); var pathPosixDirname = require("path").posix.dirname; var isWin32 = require("os").platform() === "win32"; - var slash = "/"; + var slash2 = "/"; var backslash = /\\/g; var enclosure = /[\{\[].*[\}\]]$/; - var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; + var globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/; var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; module2.exports = function globParent(str2, opts) { var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); + if (options.flipBackslashes && isWin32 && str2.indexOf(slash2) < 0) { + str2 = str2.replace(backslash, slash2); } if (enclosure.test(str2)) { - str2 += slash; + str2 += slash2; } str2 += "a"; do { str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); + } while (isGlob2(str2) || globby2.test(str2)); return str2.replace(escaped, "$1"); }; } @@ -26035,7 +25906,7 @@ var require_braces = __commonJS({ var require_constants7 = __commonJS({ "node_modules/picomatch/lib/constants.js"(exports2, module2) { "use strict"; - var path16 = require("path"); + var path20 = require("path"); var WIN_SLASH = "\\\\/"; var WIN_NO_SLASH = `[^${WIN_SLASH}]`; var DOT_LITERAL = "\\."; @@ -26205,7 +26076,7 @@ var require_constants7 = __commonJS({ /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - SEP: path16.sep, + SEP: path20.sep, /** * Create EXTGLOB_CHARS */ @@ -26232,7 +26103,7 @@ var require_constants7 = __commonJS({ var require_utils6 = __commonJS({ "node_modules/picomatch/lib/utils.js"(exports2) { "use strict"; - var path16 = require("path"); + var path20 = require("path"); var win32 = process.platform === "win32"; var { REGEX_BACKSLASH, @@ -26261,7 +26132,7 @@ var require_utils6 = __commonJS({ if (options && typeof options.windows === "boolean") { return options.windows; } - return win32 === true || path16.sep === "\\"; + return win32 === true || path20.sep === "\\"; }; exports2.escapeLast = (input, char, lastIdx) => { const idx = input.lastIndexOf(char, lastIdx); @@ -26347,14 +26218,14 @@ var require_scan = __commonJS({ let lastIndex = 0; let isBrace = false; let isBracket = false; - let isGlob = false; + let isGlob2 = false; let isExtglob = false; let isGlobstar = false; let braceEscaped = false; let backslashes = false; let negated = false; let negatedExtglob = false; - let finished = false; + let finished2 = false; let braces = 0; let prev; let code; @@ -26390,8 +26261,8 @@ var require_scan = __commonJS({ } if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -26399,8 +26270,8 @@ var require_scan = __commonJS({ } if (braceEscaped !== true && code === CHAR_COMMA2) { isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -26411,7 +26282,7 @@ var require_scan = __commonJS({ if (braces === 0) { braceEscaped = false; isBrace = token.isBrace = true; - finished = true; + finished2 = true; break; } } @@ -26425,7 +26296,7 @@ var require_scan = __commonJS({ slashes.push(index); tokens.push(token); token = { value: "", depth: 0, isGlob: false }; - if (finished === true) continue; + if (finished2 === true) continue; if (prev === CHAR_DOT && index === start + 1) { start += 2; continue; @@ -26436,9 +26307,9 @@ var require_scan = __commonJS({ if (opts.noext !== true) { const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; + isGlob2 = token.isGlob = true; isExtglob = token.isExtglob = true; - finished = true; + finished2 = true; if (code === CHAR_EXCLAMATION_MARK && index === start) { negatedExtglob = true; } @@ -26450,8 +26321,8 @@ var require_scan = __commonJS({ continue; } if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; break; } } @@ -26462,16 +26333,16 @@ var require_scan = __commonJS({ } if (code === CHAR_ASTERISK2) { if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } break; } if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -26486,8 +26357,8 @@ var require_scan = __commonJS({ } if (next === CHAR_RIGHT_SQUARE_BRACKET2) { isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; break; } } @@ -26502,7 +26373,7 @@ var require_scan = __commonJS({ continue; } if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; + isGlob2 = token.isGlob = true; if (scanToEnd === true) { while (eos() !== true && (code = advance())) { if (code === CHAR_LEFT_PARENTHESES) { @@ -26511,7 +26382,7 @@ var require_scan = __commonJS({ continue; } if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; + finished2 = true; break; } } @@ -26519,8 +26390,8 @@ var require_scan = __commonJS({ } break; } - if (isGlob === true) { - finished = true; + if (isGlob2 === true) { + finished2 = true; if (scanToEnd === true) { continue; } @@ -26529,7 +26400,7 @@ var require_scan = __commonJS({ } if (opts.noext === true) { isExtglob = false; - isGlob = false; + isGlob2 = false; } let base = str2; let prefix = ""; @@ -26539,10 +26410,10 @@ var require_scan = __commonJS({ str2 = str2.slice(start); lastIndex -= start; } - if (base && isGlob === true && lastIndex > 0) { + if (base && isGlob2 === true && lastIndex > 0) { base = str2.slice(0, lastIndex); glob2 = str2.slice(lastIndex); - } else if (isGlob === true) { + } else if (isGlob2 === true) { base = ""; glob2 = str2; } else { @@ -26567,7 +26438,7 @@ var require_scan = __commonJS({ glob: glob2, isBrace, isBracket, - isGlob, + isGlob: isGlob2, isExtglob, isGlobstar, negated, @@ -27396,7 +27267,7 @@ var require_parse3 = __commonJS({ var require_picomatch = __commonJS({ "node_modules/picomatch/lib/picomatch.js"(exports2, module2) { "use strict"; - var path16 = require("path"); + var path20 = require("path"); var scan = require_scan(); var parse = require_parse3(); var utils = require_utils6(); @@ -27481,7 +27352,7 @@ var require_picomatch = __commonJS({ }; picomatch.matchBase = (input, glob2, options, posix = utils.isWindows(options)) => { const regex = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options); - return regex.test(path16.basename(input)); + return regex.test(path20.basename(input)); }; picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); picomatch.parse = (pattern, options) => { @@ -27708,7 +27579,7 @@ var require_pattern = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; - var path16 = require("path"); + var path20 = require("path"); var globParent = require_glob_parent(); var micromatch = require_micromatch(); var GLOBSTAR = "**"; @@ -27720,10 +27591,10 @@ var require_pattern = __commonJS({ var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); + return !isDynamicPattern2(pattern, options); } exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern(pattern, options = {}) { + function isDynamicPattern2(pattern, options = {}) { if (pattern === "") { return false; } @@ -27741,7 +27612,7 @@ var require_pattern = __commonJS({ } return false; } - exports2.isDynamicPattern = isDynamicPattern; + exports2.isDynamicPattern = isDynamicPattern2; function hasBraceExpansion(pattern) { const openingBraceIndex = pattern.indexOf("{"); if (openingBraceIndex === -1) { @@ -27755,23 +27626,23 @@ var require_pattern = __commonJS({ return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); } function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; + return isNegativePattern2(pattern) ? pattern.slice(1) : pattern; } exports2.convertToPositivePattern = convertToPositivePattern; function convertToNegativePattern(pattern) { return "!" + pattern; } exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern(pattern) { + function isNegativePattern2(pattern) { return pattern.startsWith("!") && pattern[1] !== "("; } - exports2.isNegativePattern = isNegativePattern; + exports2.isNegativePattern = isNegativePattern2; function isPositivePattern(pattern) { - return !isNegativePattern(pattern); + return !isNegativePattern2(pattern); } exports2.isPositivePattern = isPositivePattern; function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); + return patterns.filter(isNegativePattern2); } exports2.getNegativePatterns = getNegativePatterns; function getPositivePatterns(patterns) { @@ -27803,7 +27674,7 @@ var require_pattern = __commonJS({ } exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; function isAffectDepthOfReadingPattern(pattern) { - const basename = path16.basename(pattern); + const basename = path20.basename(pattern); return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); } exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; @@ -27861,12 +27732,131 @@ var require_pattern = __commonJS({ } exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; function isAbsolute3(pattern) { - return path16.isAbsolute(pattern); + return path20.isAbsolute(pattern); } exports2.isAbsolute = isAbsolute3; } }); +// node_modules/merge2/index.js +var require_merge2 = __commonJS({ + "node_modules/merge2/index.js"(exports2, module2) { + "use strict"; + var Stream = require("stream"); + var PassThrough = Stream.PassThrough; + var slice = Array.prototype.slice; + module2.exports = merge2; + function merge2() { + const streamsQueue = []; + const args = slice.call(arguments); + let merging = false; + let options = args[args.length - 1]; + if (options && !Array.isArray(options) && options.pipe == null) { + args.pop(); + } else { + options = {}; + } + const doEnd = options.end !== false; + const doPipeError = options.pipeError === true; + if (options.objectMode == null) { + options.objectMode = true; + } + if (options.highWaterMark == null) { + options.highWaterMark = 64 * 1024; + } + const mergedStream = PassThrough(options); + function addStream() { + for (let i = 0, len = arguments.length; i < len; i++) { + streamsQueue.push(pauseStreams(arguments[i], options)); + } + mergeStream(); + return this; + } + function mergeStream() { + if (merging) { + return; + } + merging = true; + let streams = streamsQueue.shift(); + if (!streams) { + process.nextTick(endStream2); + return; + } + if (!Array.isArray(streams)) { + streams = [streams]; + } + let pipesCount = streams.length + 1; + function next() { + if (--pipesCount > 0) { + return; + } + merging = false; + mergeStream(); + } + function pipe(stream2) { + function onend() { + stream2.removeListener("merge2UnpipeEnd", onend); + stream2.removeListener("end", onend); + if (doPipeError) { + stream2.removeListener("error", onerror); + } + next(); + } + function onerror(err) { + mergedStream.emit("error", err); + } + if (stream2._readableState.endEmitted) { + return next(); + } + stream2.on("merge2UnpipeEnd", onend); + stream2.on("end", onend); + if (doPipeError) { + stream2.on("error", onerror); + } + stream2.pipe(mergedStream, { end: false }); + stream2.resume(); + } + for (let i = 0; i < streams.length; i++) { + pipe(streams[i]); + } + next(); + } + function endStream2() { + merging = false; + mergedStream.emit("queueDrain"); + if (doEnd) { + mergedStream.end(); + } + } + mergedStream.setMaxListeners(0); + mergedStream.add = addStream; + mergedStream.on("unpipe", function(stream2) { + stream2.emit("merge2UnpipeEnd"); + }); + if (args.length) { + addStream.apply(null, args); + } + return mergedStream; + } + function pauseStreams(streams, options) { + if (!Array.isArray(streams)) { + if (!streams._readableState && streams.pipe) { + streams = streams.pipe(PassThrough(options)); + } + if (!streams._readableState || !streams.pause || !streams.pipe) { + throw new Error("Only readable stream can be merged."); + } + streams.pause(); + } else { + for (let i = 0, len = streams.length; i < len; i++) { + streams[i] = pauseStreams(streams[i], options); + } + } + return streams; + } + } +}); + // node_modules/fast-glob/out/utils/stream.js var require_stream = __commonJS({ "node_modules/fast-glob/out/utils/stream.js"(exports2) { @@ -27917,10 +27907,10 @@ var require_utils7 = __commonJS({ exports2.array = array; var errno = require_errno(); exports2.errno = errno; - var fs17 = require_fs(); - exports2.fs = fs17; - var path16 = require_path(); - exports2.path = path16; + var fs20 = require_fs(); + exports2.fs = fs20; + var path20 = require_path(); + exports2.path = path20; var pattern = require_pattern(); exports2.pattern = pattern; var stream2 = require_stream(); @@ -28032,8 +28022,8 @@ var require_async = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.read = void 0; - function read(path16, settings, callback) { - settings.fs.lstat(path16, (lstatError, lstat) => { + function read(path20, settings, callback) { + settings.fs.lstat(path20, (lstatError, lstat) => { if (lstatError !== null) { callFailureCallback(callback, lstatError); return; @@ -28042,7 +28032,7 @@ var require_async = __commonJS({ callSuccessCallback(callback, lstat); return; } - settings.fs.stat(path16, (statError, stat) => { + settings.fs.stat(path20, (statError, stat) => { if (statError !== null) { if (settings.throwErrorOnBrokenSymbolicLink) { callFailureCallback(callback, statError); @@ -28074,13 +28064,13 @@ var require_sync = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.read = void 0; - function read(path16, settings) { - const lstat = settings.fs.lstatSync(path16); + function read(path20, settings) { + const lstat = settings.fs.lstatSync(path20); if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { return lstat; } try { - const stat = settings.fs.statSync(path16); + const stat = settings.fs.statSync(path20); if (settings.markSymbolicLink) { stat.isSymbolicLink = () => true; } @@ -28102,12 +28092,12 @@ var require_fs2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs17 = require("fs"); + var fs20 = require("fs"); exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs17.lstat, - stat: fs17.stat, - lstatSync: fs17.lstatSync, - statSync: fs17.statSync + lstat: fs20.lstat, + stat: fs20.stat, + lstatSync: fs20.lstatSync, + statSync: fs20.statSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -28124,12 +28114,12 @@ var require_settings = __commonJS({ "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var fs17 = require_fs2(); + var fs20 = require_fs2(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs17.createFileSystemAdapter(this._options.fs); + this.fs = fs20.createFileSystemAdapter(this._options.fs); this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); } @@ -28151,17 +28141,17 @@ var require_out = __commonJS({ var sync = require_sync(); var settings_1 = require_settings(); exports2.Settings = settings_1.default; - function stat(path16, optionsOrSettingsOrCallback, callback) { + function stat(path20, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path16, getSettings(), optionsOrSettingsOrCallback); + async.read(path20, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path16, getSettings(optionsOrSettingsOrCallback), callback); + async.read(path20, getSettings(optionsOrSettingsOrCallback), callback); } exports2.stat = stat; - function statSync3(path16, optionsOrSettings) { + function statSync3(path20, optionsOrSettings) { const settings = getSettings(optionsOrSettings); - return sync.read(path16, settings); + return sync.read(path20, settings); } exports2.statSync = statSync3; function getSettings(settingsOrOptions = {}) { @@ -28284,8 +28274,8 @@ var require_utils8 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fs = void 0; - var fs17 = require_fs3(); - exports2.fs = fs17; + var fs20 = require_fs3(); + exports2.fs = fs20; } }); @@ -28377,16 +28367,16 @@ var require_async2 = __commonJS({ return; } const tasks = names.map((name) => { - const path16 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const path20 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); return (done) => { - fsStat.stat(path16, settings.fsStatSettings, (error2, stats) => { + fsStat.stat(path20, settings.fsStatSettings, (error2, stats) => { if (error2 !== null) { done(error2); return; } const entry = { name, - path: path16, + path: path20, dirent: utils.fs.createDirentFromStats(name, stats) }; if (settings.stats) { @@ -28480,14 +28470,14 @@ var require_fs4 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs17 = require("fs"); + var fs20 = require("fs"); exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs17.lstat, - stat: fs17.stat, - lstatSync: fs17.lstatSync, - statSync: fs17.statSync, - readdir: fs17.readdir, - readdirSync: fs17.readdirSync + lstat: fs20.lstat, + stat: fs20.stat, + lstatSync: fs20.lstatSync, + statSync: fs20.statSync, + readdir: fs20.readdir, + readdirSync: fs20.readdirSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -28504,15 +28494,15 @@ var require_settings2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path16 = require("path"); + var path20 = require("path"); var fsStat = require_out(); - var fs17 = require_fs4(); + var fs20 = require_fs4(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs17.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path16.sep); + this.fs = fs20.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path20.sep); this.stats = this._getValue(this._options.stats, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); this.fsStatSettings = new fsStat.Settings({ @@ -28539,17 +28529,17 @@ var require_out2 = __commonJS({ var sync = require_sync2(); var settings_1 = require_settings2(); exports2.Settings = settings_1.default; - function scandir(path16, optionsOrSettingsOrCallback, callback) { + function scandir(path20, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path16, getSettings(), optionsOrSettingsOrCallback); + async.read(path20, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path16, getSettings(optionsOrSettingsOrCallback), callback); + async.read(path20, getSettings(optionsOrSettingsOrCallback), callback); } exports2.scandir = scandir; - function scandirSync(path16, optionsOrSettings) { + function scandirSync(path20, optionsOrSettings) { const settings = getSettings(optionsOrSettings); - return sync.read(path16, settings); + return sync.read(path20, settings); } exports2.scandirSync = scandirSync; function getSettings(settingsOrOptions = {}) { @@ -28609,8 +28599,8 @@ var require_queue = __commonJS({ var _running = 0; var self2 = { push, - drain: noop, - saturated: noop, + drain: noop2, + saturated: noop2, pause, paused: false, concurrency, @@ -28620,7 +28610,7 @@ var require_queue = __commonJS({ length, getQueue, unshift, - empty: noop, + empty: noop2, kill, killAndDrain }; @@ -28665,7 +28655,7 @@ var require_queue = __commonJS({ current.context = context2; current.release = release3; current.value = value; - current.callback = done || noop; + current.callback = done || noop2; if (_running === self2.concurrency || self2.paused) { if (queueTail) { queueTail.next = current; @@ -28685,7 +28675,7 @@ var require_queue = __commonJS({ current.context = context2; current.release = release3; current.value = value; - current.callback = done || noop; + current.callback = done || noop2; if (_running === self2.concurrency || self2.paused) { if (queueHead) { current.next = queueHead; @@ -28726,28 +28716,28 @@ var require_queue = __commonJS({ function kill() { queueHead = null; queueTail = null; - self2.drain = noop; + self2.drain = noop2; } function killAndDrain() { queueHead = null; queueTail = null; self2.drain(); - self2.drain = noop; + self2.drain = noop2; } } - function noop() { + function noop2() { } function Task() { this.value = null; - this.callback = noop; + this.callback = noop2; this.next = null; - this.release = noop; + this.release = noop2; this.context = null; var self2 = this; this.worked = function worked(err, result) { var callback = self2.callback; self2.value = null; - self2.callback = noop; + self2.callback = noop2; callback.call(self2.context, err, result); self2.release(self2); }; @@ -29076,7 +29066,7 @@ var require_settings3 = __commonJS({ "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path16 = require("path"); + var path20 = require("path"); var fsScandir = require_out2(); var Settings = class { constructor(_options = {}) { @@ -29086,7 +29076,7 @@ var require_settings3 = __commonJS({ this.deepFilter = this._getValue(this._options.deepFilter, null); this.entryFilter = this._getValue(this._options.entryFilter, null); this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path16.sep); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path20.sep); this.fsScandirSettings = new fsScandir.Settings({ followSymbolicLinks: this._options.followSymbolicLinks, fs: this._options.fs, @@ -29148,7 +29138,7 @@ var require_reader2 = __commonJS({ "node_modules/fast-glob/out/readers/reader.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path16 = require("path"); + var path20 = require("path"); var fsStat = require_out(); var utils = require_utils7(); var Reader = class { @@ -29161,7 +29151,7 @@ var require_reader2 = __commonJS({ }); } _getFullEntryPath(filepath) { - return path16.resolve(this._settings.cwd, filepath); + return path20.resolve(this._settings.cwd, filepath); } _makeEntry(stats, pattern) { const entry = { @@ -29482,34 +29472,34 @@ var require_entry = __commonJS({ _onlyDirectoryFilter(entry) { return this._settings.onlyDirectories && !entry.dirent.isDirectory(); } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); + _isMatchToPatternsSet(filepath, patterns, isDirectory2) { + const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2); if (!isMatched) { return false; } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); + const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2); if (isMatchedByRelativeNegative) { return false; } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); + const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2); if (isMatchedByAbsoluteNegative) { return false; } return true; } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { + _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) { if (patternsRe.length === 0) { return false; } const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); + return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2); } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { + _isMatchToPatterns(filepath, patternsRe, isDirectory2) { if (patternsRe.length === 0) { return false; } const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { + if (!isMatched && isDirectory2) { return utils.pattern.matchAny(filepath + "/", patternsRe); } return isMatched; @@ -29577,7 +29567,7 @@ var require_provider = __commonJS({ "node_modules/fast-glob/out/providers/provider.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path16 = require("path"); + var path20 = require("path"); var deep_1 = require_deep(); var entry_1 = require_entry(); var error_1 = require_error(); @@ -29591,7 +29581,7 @@ var require_provider = __commonJS({ this.entryTransformer = new entry_2.default(this._settings); } _getRootDirectory(task) { - return path16.resolve(this._settings.cwd, task.base); + return path20.resolve(this._settings.cwd, task.base); } _getReaderOptions(task) { const basePath = task.base === "." ? "" : task.base; @@ -29772,16 +29762,16 @@ var require_settings4 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs17 = require("fs"); + var fs20 = require("fs"); var os5 = require("os"); var CPU_COUNT = Math.max(os5.cpus().length, 1); exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs17.lstat, - lstatSync: fs17.lstatSync, - stat: fs17.stat, - statSync: fs17.statSync, - readdir: fs17.readdir, - readdirSync: fs17.readdirSync + lstat: fs20.lstat, + lstatSync: fs20.lstatSync, + stat: fs20.stat, + statSync: fs20.statSync, + readdir: fs20.readdir, + readdirSync: fs20.readdirSync }; var Settings = class { constructor(_options = {}) { @@ -29837,7 +29827,7 @@ var require_out4 = __commonJS({ var settings_1 = require_settings4(); var utils = require_utils7(); async function FastGlob(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, async_1.default, options); const result = await Promise.all(works); return utils.array.flatten(result); @@ -29848,65 +29838,65 @@ var require_out4 = __commonJS({ FastGlob2.globStream = stream2; FastGlob2.async = FastGlob2; function sync(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, sync_1.default, options); return utils.array.flatten(works); } FastGlob2.sync = sync; function stream2(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, stream_1.default, options); return utils.stream.merge(works); } FastGlob2.stream = stream2; - function generateTasks(source, options) { - assertPatternsInput(source); + function generateTasks2(source, options) { + assertPatternsInput2(source); const patterns = [].concat(source); const settings = new settings_1.default(options); return taskManager.generate(patterns, settings); } - FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); + FastGlob2.generateTasks = generateTasks2; + function isDynamicPattern2(source, options) { + assertPatternsInput2(source); const settings = new settings_1.default(options); return utils.pattern.isDynamicPattern(source, settings); } - FastGlob2.isDynamicPattern = isDynamicPattern; + FastGlob2.isDynamicPattern = isDynamicPattern2; function escapePath(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escape(source); } FastGlob2.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); + function convertPathToPattern2(source) { + assertPatternsInput2(source); return utils.path.convertPathToPattern(source); } - FastGlob2.convertPathToPattern = convertPathToPattern; + FastGlob2.convertPathToPattern = convertPathToPattern2; let posix; (function(posix2) { function escapePath2(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escapePosixPath(source); } posix2.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); + function convertPathToPattern3(source) { + assertPatternsInput2(source); return utils.path.convertPosixPathToPattern(source); } - posix2.convertPathToPattern = convertPathToPattern2; + posix2.convertPathToPattern = convertPathToPattern3; })(posix = FastGlob2.posix || (FastGlob2.posix = {})); let win32; (function(win322) { function escapePath2(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escapeWindowsPath(source); } win322.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); + function convertPathToPattern3(source) { + assertPatternsInput2(source); return utils.path.convertWindowsPathToPattern(source); } - win322.convertPathToPattern = convertPathToPattern2; + win322.convertPathToPattern = convertPathToPattern3; })(win32 = FastGlob2.win32 || (FastGlob2.win32 = {})); })(FastGlob || (FastGlob = {})); function getWorks(source, _Provider, options) { @@ -29916,7 +29906,7 @@ var require_out4 = __commonJS({ const provider = new _Provider(settings); return tasks.map(provider.read, provider); } - function assertPatternsInput(input) { + function assertPatternsInput2(input) { const source = [].concat(input); const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); if (!isValidSource) { @@ -29927,117 +29917,13 @@ var require_out4 = __commonJS({ } }); -// node_modules/path-type/index.js -var require_path_type = __commonJS({ - "node_modules/path-type/index.js"(exports2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var fs17 = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify2(fs17[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - return fs17[fsStatType](filePath)[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - exports2.isFile = isType.bind(null, "stat", "isFile"); - exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// node_modules/dir-glob/index.js -var require_dir_glob = __commonJS({ - "node_modules/dir-glob/index.js"(exports2, module2) { - "use strict"; - var path16 = require("path"); - var pathType = require_path_type(); - var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; - var getPath = (filepath, cwd) => { - const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; - return path16.isAbsolute(pth) ? pth : path16.join(cwd, pth); - }; - var addExtensions = (file, extensions) => { - if (path16.extname(file)) { - return `**/${file}`; - } - return `**/${file}.${getExtensions(extensions)}`; - }; - var getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - if (options.files && options.extensions) { - return options.files.map((x) => path16.posix.join(directory, addExtensions(x, options.extensions))); - } - if (options.files) { - return options.files.map((x) => path16.posix.join(directory, `**/${x}`)); - } - if (options.extensions) { - return [path16.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - return [path16.posix.join(directory, "**")]; - }; - module2.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = await Promise.all([].concat(input).map(async (x) => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - return [].concat.apply([], globs); - }; - module2.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - return [].concat.apply([], globs); - }; - } -}); - -// node_modules/ignore/index.js +// node_modules/globby/node_modules/ignore/index.js var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports2, module2) { + "node_modules/globby/node_modules/ignore/index.js"(exports2, module2) { function makeArray(subject) { return Array.isArray(subject) ? subject : [subject]; } + var UNDEFINED = void 0; var EMPTY = ""; var SPACE = " "; var ESCAPE = "\\"; @@ -30046,14 +29932,18 @@ var require_ignore = __commonJS({ var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + var REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/; + var REGEX_TEST_TRAILING_SLASH = /\/$/; var SLASH = "/"; var TMP_KEY_IGNORE = "node-ignore"; if (typeof Symbol !== "undefined") { TMP_KEY_IGNORE = Symbol.for("node-ignore"); } var KEY_IGNORE = TMP_KEY_IGNORE; - var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); + var define2 = (object, key, value) => { + Object.defineProperty(object, key, { value }); + return value; + }; var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; var RETURN_FALSE = () => false; var sanitizeRange = (range) => range.replace( @@ -30066,7 +29956,7 @@ var require_ignore = __commonJS({ }; var REPLACERS = [ [ - // remove BOM + // Remove BOM // TODO: // Other similar zero-width characters? /^\uFEFF/, @@ -30076,14 +29966,21 @@ var require_ignore = __commonJS({ [ // (a\ ) -> (a ) // (a ) -> (a) + // (a ) -> (a) // (a \ ) -> (a ) - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY + /((?:\\\\)*?)(\\?\s+)$/, + (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY) ], - // replace (\ ) with ' ' + // Replace (\ ) with ' ' + // (\ ) -> ' ' + // (\\ ) -> '\\ ' + // (\\\ ) -> '\\ ' [ - /\\\s/g, - () => SPACE + /(\\+?)\s/g, + (_, m1) => { + const { length } = m1; + return m1.slice(0, length - length % 2) + SPACE; + } ], // Escape metacharacters // which is written down by users but means special for regular expressions. @@ -30203,103 +30100,100 @@ var require_ignore = __commonJS({ // 'js/' will not match 'a.js' // 'js' will match 'a.js' and 'a.js/' (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } ] ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; + var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/; + var MODE_IGNORE = "regex"; + var MODE_CHECK_IGNORE = "checkRegex"; + var UNDERSCORE = "_"; + var TRAILING_WILD_CARD_REPLACERS = { + [MODE_IGNORE](_, p1) { + const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; + }, + [MODE_CHECK_IGNORE](_, p1) { + const prefix = p1 ? `${p1}[^/]*` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); }; + var makeRegexPrefix = (pattern) => REPLACERS.reduce( + (prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)), + pattern + ); var isString = (subject) => typeof subject === "string"; var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); + var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean); var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; + constructor(pattern, mark, body, ignoreCase, negative, prefix) { this.pattern = pattern; + this.mark = mark; this.negative = negative; - this.regex = regex; + define2(this, "body", body); + define2(this, "ignoreCase", ignoreCase); + define2(this, "regexPrefix", prefix); + } + get regex() { + const key = UNDERSCORE + MODE_IGNORE; + if (this[key]) { + return this[key]; + } + return this._make(MODE_IGNORE, key); + } + get checkRegex() { + const key = UNDERSCORE + MODE_CHECK_IGNORE; + if (this[key]) { + return this[key]; + } + return this._make(MODE_CHECK_IGNORE, key); + } + _make(mode, key) { + const str2 = this.regexPrefix.replace( + REGEX_REPLACE_TRAILING_WILDCARD, + // It does not need to bind pattern + TRAILING_WILD_CARD_REPLACERS[mode] + ); + const regex = this.ignoreCase ? new RegExp(str2, "i") : new RegExp(str2); + return define2(this, key, regex); } }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; + var createRule = ({ + pattern, + mark + }, ignoreCase) => { let negative = false; - if (pattern.indexOf("!") === 0) { + let body = pattern; + if (body.indexOf("!") === 0) { negative = true; - pattern = pattern.substr(1); + body = body.substr(1); } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); + body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regexPrefix = makeRegexPrefix(body); return new IgnoreRule( - origin, pattern, + mark, + body, + ignoreCase, negative, - regex + regexPrefix ); }; - var throwError2 = (message, Ctor) => { - throw new Ctor(message); - }; - var checkPath = (path16, originalPath, doThrow) => { - if (!isString(path16)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path16) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path16)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; - }; - var isNotRelative = (path16) => REGEX_TEST_INVALID_PATH.test(path16); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define2(this, KEY_IGNORE, true); - this._rules = []; + var RuleManager = class { + constructor(ignoreCase) { this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); + this._rules = []; } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); - } - _addPattern(pattern) { + _add(pattern) { if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); + this._rules = this._rules.concat(pattern._rules._rules); this._added = true; return; } - if (checkPattern(pattern)) { + if (isString(pattern)) { + pattern = { + pattern + }; + } + if (checkPattern(pattern.pattern)) { const rule = createRule(pattern, this._ignoreCase); this._added = true; this._rules.push(rule); @@ -30310,8 +30204,85 @@ var require_ignore = __commonJS({ this._added = false; makeArray( isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { + ).forEach(this._add, this); + return this._added; + } + // Test one single path without recursively checking parent directories + // + // - checkUnignored `boolean` whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE` + // @returns {TestResult} true if a file is ignored + test(path20, checkUnignored, mode) { + let ignored = false; + let unignored = false; + let matchedRule; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { + return; + } + const matched = rule[mode].test(path20); + if (!matched) { + return; + } + ignored = !negative; + unignored = negative; + matchedRule = negative ? UNDEFINED : rule; + }); + const ret = { + ignored, + unignored + }; + if (matchedRule) { + ret.rule = matchedRule; + } + return ret; + } + }; + var throwError2 = (message, Ctor) => { + throw new Ctor(message); + }; + var checkPath = (path20, originalPath, doThrow) => { + if (!isString(path20)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ); + } + if (!path20) { + return doThrow(`path must not be empty`, TypeError); + } + if (checkPath.isNotRelative(path20)) { + const r = "`path.relative()`d"; + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ); + } + return true; + }; + var isNotRelative = (path20) => REGEX_TEST_INVALID_PATH.test(path20); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ + ignorecase = true, + ignoreCase = ignorecase, + allowRelativePaths = false + } = {}) { + define2(this, KEY_IGNORE, true); + this._rules = new RuleManager(ignoreCase); + this._strictPathCheck = !allowRelativePaths; + this._initCache(); + } + _initCache() { + this._ignoreCache = /* @__PURE__ */ Object.create(null); + this._testCache = /* @__PURE__ */ Object.create(null); + } + add(pattern) { + if (this._rules.add(pattern)) { this._initCache(); } return this; @@ -30320,58 +30291,45 @@ var require_ignore = __commonJS({ addPattern(pattern) { return this.add(pattern); } - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - _testOne(path16, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path16); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; - } // @returns {TestResult} _test(originalPath, cache, checkUnignored, slices) { - const path16 = originalPath && checkPath.convert(originalPath); + const path20 = originalPath && checkPath.convert(originalPath); checkPath( - path16, + path20, originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError2 + this._strictPathCheck ? throwError2 : RETURN_FALSE ); - return this._t(path16, cache, checkUnignored, slices); + return this._t(path20, cache, checkUnignored, slices); } - _t(path16, cache, checkUnignored, slices) { - if (path16 in cache) { - return cache[path16]; + checkIgnore(path20) { + if (!REGEX_TEST_TRAILING_SLASH.test(path20)) { + return this.test(path20); + } + const slices = path20.split(SLASH).filter(Boolean); + slices.pop(); + if (slices.length) { + const parent = this._t( + slices.join(SLASH) + SLASH, + this._testCache, + true, + slices + ); + if (parent.ignored) { + return parent; + } + } + return this._rules.test(path20, false, MODE_CHECK_IGNORE); + } + _t(path20, cache, checkUnignored, slices) { + if (path20 in cache) { + return cache[path20]; } if (!slices) { - slices = path16.split(SLASH); + slices = path20.split(SLASH).filter(Boolean); } slices.pop(); if (!slices.length) { - return cache[path16] = this._testOne(path16, checkUnignored); + return cache[path20] = this._rules.test(path20, checkUnignored, MODE_IGNORE); } const parent = this._t( slices.join(SLASH) + SLASH, @@ -30379,3960 +30337,40 @@ var require_ignore = __commonJS({ checkUnignored, slices ); - return cache[path16] = parent.ignored ? parent : this._testOne(path16, checkUnignored); + return cache[path20] = parent.ignored ? parent : this._rules.test(path20, checkUnignored, MODE_IGNORE); } - ignores(path16) { - return this._test(path16, this._ignoreCache, false).ignored; + ignores(path20) { + return this._test(path20, this._ignoreCache, false).ignored; } createFilter() { - return (path16) => !this.ignores(path16); + return (path20) => !this.ignores(path20); } filter(paths) { return makeArray(paths).filter(this.createFilter()); } // @returns {TestResult} - test(path16) { - return this._test(path16, this._testCache, true); + test(path20) { + return this._test(path20, this._testCache, true); } }; var factory = (options) => new Ignore(options); - var isPathValid = (path16) => checkPath(path16 && checkPath.convert(path16), path16, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module2.exports = factory; - if ( - // Detect `process` so that it can run in browsers. - typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") - ) { + var isPathValid = (path20) => checkPath(path20 && checkPath.convert(path20), path20, RETURN_FALSE); + var setupWindows = () => { const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path16) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path16) || isNotRelative(path16); - } - } -}); - -// node_modules/slash/index.js -var require_slash = __commonJS({ - "node_modules/slash/index.js"(exports2, module2) { - "use strict"; - module2.exports = (path16) => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path16); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path16); - if (isExtendedLengthPath || hasNonAscii) { - return path16; - } - return path16.replace(/\\/g, "/"); - }; - } -}); - -// node_modules/globby/gitignore.js -var require_gitignore = __commonJS({ - "node_modules/globby/gitignore.js"(exports2, module2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var fs17 = require("fs"); - var path16 = require("path"); - var fastGlob = require_out4(); - var gitIgnore = require_ignore(); - var slash = require_slash(); - var DEFAULT_IGNORE = [ - "**/node_modules/**", - "**/flow-typed/**", - "**/coverage/**", - "**/.git" - ]; - var readFileP = promisify2(fs17.readFile); - var mapGitIgnorePatternTo = (base) => (ignore) => { - if (ignore.startsWith("!")) { - return "!" + path16.posix.join(base, ignore.slice(1)); - } - return path16.posix.join(base, ignore); - }; - var parseGitIgnore = (content, options) => { - const base = slash(path16.relative(options.cwd, path16.dirname(options.fileName))); - return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); - }; - var reduceIgnore = (files) => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - return ignores; - }; - var ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path16.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - return path16.join(cwd, p); - }; - var getIsIgnoredPredecate = (ignores, cwd) => { - return (p) => ignores.ignores(slash(path16.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); - }; - var getFile = async (file, cwd) => { - const filePath = path16.join(cwd, file); - const content = await readFileP(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var getFileSync = (file, cwd) => { - const filePath = path16.join(cwd, file); - const content = fs17.readFileSync(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) - } = {}) => { - return { ignore, cwd }; - }; - module2.exports = async (options) => { - options = normalizeOptions(options); - const paths = await fastGlob("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - module2.exports.sync = (options) => { - options = normalizeOptions(options); - const paths = fastGlob.sync("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = paths.map((file) => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - } -}); - -// node_modules/globby/stream-utils.js -var require_stream_utils = __commonJS({ - "node_modules/globby/stream-utils.js"(exports2, module2) { - "use strict"; - var { Transform } = require("stream"); - var ObjectTransform = class extends Transform { - constructor() { - super({ - objectMode: true - }); - } - }; - var FilterStream = class extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - callback(); - } - }; - var UniqueStream = class extends ObjectTransform { - constructor() { - super(); - this._pushed = /* @__PURE__ */ new Set(); - } - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - callback(); - } - }; - module2.exports = { - FilterStream, - UniqueStream - }; - } -}); - -// node_modules/globby/index.js -var require_globby = __commonJS({ - "node_modules/globby/index.js"(exports2, module2) { - "use strict"; - var fs17 = require("fs"); - var arrayUnion = require_array_union(); - var merge2 = require_merge2(); - var fastGlob = require_out4(); - var dirGlob = require_dir_glob(); - var gitignore = require_gitignore(); - var { FilterStream, UniqueStream } = require_stream_utils(); - var DEFAULT_FILTER = () => false; - var isNegative2 = (pattern) => pattern[0] === "!"; - var assertPatternsInput = (patterns) => { - if (!patterns.every((pattern) => typeof pattern === "string")) { - throw new TypeError("Patterns must be a string or an array of strings"); - } - }; - var checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - let stat; - try { - stat = fs17.statSync(options.cwd); - } catch { - return; - } - if (!stat.isDirectory()) { - throw new Error("The `cwd` option must be a path to a directory"); - } - }; - var getPathString = (p) => p.stats instanceof fs17.Stats ? p.path : p; - var generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - const globTasks = []; - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - for (const [index, pattern] of patterns.entries()) { - if (isNegative2(pattern)) { - continue; - } - const ignore = patterns.slice(index).filter((pattern2) => isNegative2(pattern2)).map((pattern2) => pattern2.slice(1)); - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - globTasks.push({ pattern, options }); - } - return globTasks; - }; - var globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === "object") { - options = { - ...options, - ...task.options.expandDirectories - }; - } - return fn(task.pattern, options); - }; - var getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - var getFilterSync = (options) => { - return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - var globToTask = (task) => (glob2) => { - const { options } = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - return { - pattern: glob2, - options - }; - }; - module2.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const getFilter = async () => { - return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - const getTasks = async () => { - const tasks2 = await Promise.all(globTasks.map(async (task) => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - return arrayUnion(...tasks2); - }; - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); - return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); - }; - module2.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - return matches.filter((path_) => !filter(path_)); - }; - module2.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - const filterStream = new FilterStream((p) => !filter(p)); - const uniqueStream = new UniqueStream(); - return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); - }; - module2.exports.generateGlobTasks = generateGlobTasks; - module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); - module2.exports.gitignore = gitignore; - } -}); - -// node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - "node_modules/graceful-fs/polyfills.js"(exports2, module2) { - var constants = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform3 = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs17) { - if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs17); - } - if (!fs17.lutimes) { - patchLutimes(fs17); - } - fs17.chown = chownFix(fs17.chown); - fs17.fchown = chownFix(fs17.fchown); - fs17.lchown = chownFix(fs17.lchown); - fs17.chmod = chmodFix(fs17.chmod); - fs17.fchmod = chmodFix(fs17.fchmod); - fs17.lchmod = chmodFix(fs17.lchmod); - fs17.chownSync = chownFixSync(fs17.chownSync); - fs17.fchownSync = chownFixSync(fs17.fchownSync); - fs17.lchownSync = chownFixSync(fs17.lchownSync); - fs17.chmodSync = chmodFixSync(fs17.chmodSync); - fs17.fchmodSync = chmodFixSync(fs17.fchmodSync); - fs17.lchmodSync = chmodFixSync(fs17.lchmodSync); - fs17.stat = statFix(fs17.stat); - fs17.fstat = statFix(fs17.fstat); - fs17.lstat = statFix(fs17.lstat); - fs17.statSync = statFixSync(fs17.statSync); - fs17.fstatSync = statFixSync(fs17.fstatSync); - fs17.lstatSync = statFixSync(fs17.lstatSync); - if (fs17.chmod && !fs17.lchmod) { - fs17.lchmod = function(path16, mode, cb) { - if (cb) process.nextTick(cb); - }; - fs17.lchmodSync = function() { - }; - } - if (fs17.chown && !fs17.lchown) { - fs17.lchown = function(path16, uid, gid, cb) { - if (cb) process.nextTick(cb); - }; - fs17.lchownSync = function() { - }; - } - if (platform3 === "win32") { - fs17.rename = typeof fs17.rename !== "function" ? fs17.rename : (function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { - setTimeout(function() { - fs17.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er); - }); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); - return rename; - })(fs17.rename); - } - fs17.read = typeof fs17.read !== "function" ? fs17.read : (function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs17, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs17, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); - return read; - })(fs17.read); - fs17.readSync = typeof fs17.readSync !== "function" ? fs17.readSync : /* @__PURE__ */ (function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs17, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - })(fs17.readSync); - function patchLchmod(fs18) { - fs18.lchmod = function(path16, mode, callback) { - fs18.open( - path16, - constants.O_WRONLY | constants.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) callback(err); - return; - } - fs18.fchmod(fd, mode, function(err2) { - fs18.close(fd, function(err22) { - if (callback) callback(err2 || err22); - }); - }); - } - ); - }; - fs18.lchmodSync = function(path16, mode) { - var fd = fs18.openSync(path16, constants.O_WRONLY | constants.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs18.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs18.closeSync(fd); - } catch (er) { - } - } else { - fs18.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs18) { - if (constants.hasOwnProperty("O_SYMLINK") && fs18.futimes) { - fs18.lutimes = function(path16, at, mt, cb) { - fs18.open(path16, constants.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) cb(er); - return; - } - fs18.futimes(fd, at, mt, function(er2) { - fs18.close(fd, function(er22) { - if (cb) cb(er2 || er22); - }); - }); - }); - }; - fs18.lutimesSync = function(path16, at, mt) { - var fd = fs18.openSync(path16, constants.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs18.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs18.closeSync(fd); - } catch (er) { - } - } else { - fs18.closeSync(fd); - } - } - return ret; - }; - } else if (fs18.futimes) { - fs18.lutimes = function(_a, _b, _c, cb) { - if (cb) process.nextTick(cb); - }; - fs18.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) return orig; - return function(target, mode, cb) { - return orig.call(fs17, target, mode, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) return orig; - return function(target, mode) { - try { - return orig.call(fs17, target, mode); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function chownFix(orig) { - if (!orig) return orig; - return function(target, uid, gid, cb) { - return orig.call(fs17, target, uid, gid, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) return orig; - return function(target, uid, gid) { - try { - return orig.call(fs17, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function statFix(orig) { - if (!orig) return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - if (cb) cb.apply(this, arguments); - } - return options ? orig.call(fs17, target, options, callback) : orig.call(fs17, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) return orig; - return function(target, options) { - var stats = options ? orig.call(fs17, target, options) : orig.call(fs17, target); - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { - var Stream = require("stream").Stream; - module2.exports = legacy; - function legacy(fs17) { - return { - ReadStream, - WriteStream - }; - function ReadStream(path16, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path16, options); - Stream.call(this); - var self2 = this; - this.path = path16; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self2._read(); - }); - return; - } - fs17.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self2.emit("error", err); - self2.readable = false; - return; - } - self2.fd = fd; - self2.emit("open", fd); - self2._read(); - }); - } - function WriteStream(path16, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path16, options); - Stream.call(this); - this.path = path16; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs17.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - "node_modules/graceful-fs/clone.js"(exports2, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs17 = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop() { - } - function publishQueue(context2, queue2) { - Object.defineProperty(context2, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug3 = noop; - if (util.debuglog) - debug3 = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug3 = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs17[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs17, queue); - fs17.close = (function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs17, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - })(fs17.close); - fs17.closeSync = (function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs17, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - })(fs17.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug3(fs17[gracefulQueue]); - require("assert").equal(fs17[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs17[gracefulQueue]); - } - module2.exports = patch(clone(fs17)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs17.__patched) { - module2.exports = patch(fs17); - fs17.__patched = true; - } - function patch(fs18) { - polyfills(fs18); - fs18.gracefulify = patch; - fs18.createReadStream = createReadStream3; - fs18.createWriteStream = createWriteStream; - var fs$readFile = fs18.readFile; - fs18.readFile = readFile; - function readFile(path16, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path16, options, cb); - function go$readFile(path17, options2, cb2, startTime) { - return fs$readFile(path17, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path17, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs18.writeFile; - fs18.writeFile = writeFile; - function writeFile(path16, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path16, data, options, cb); - function go$writeFile(path17, data2, options2, cb2, startTime) { - return fs$writeFile(path17, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path17, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs18.appendFile; - if (fs$appendFile) - fs18.appendFile = appendFile; - function appendFile(path16, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path16, data, options, cb); - function go$appendFile(path17, data2, options2, cb2, startTime) { - return fs$appendFile(path17, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path17, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs18.copyFile; - if (fs$copyFile) - fs18.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs18.readdir; - fs18.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path16, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path17, options2, cb2, startTime) { - return fs$readdir(path17, fs$readdirCallback( - path17, - options2, - cb2, - startTime - )); - } : function go$readdir2(path17, options2, cb2, startTime) { - return fs$readdir(path17, options2, fs$readdirCallback( - path17, - options2, - cb2, - startTime - )); - }; - return go$readdir(path16, options, cb); - function fs$readdirCallback(path17, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path17, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs18); - ReadStream = legStreams.ReadStream; - WriteStream = legStreams.WriteStream; - } - var fs$ReadStream = fs18.ReadStream; - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype); - ReadStream.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs18.WriteStream; - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype); - WriteStream.prototype.open = WriteStream$open; - } - Object.defineProperty(fs18, "ReadStream", { - get: function() { - return ReadStream; - }, - set: function(val2) { - ReadStream = val2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs18, "WriteStream", { - get: function() { - return WriteStream; - }, - set: function(val2) { - WriteStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream; - Object.defineProperty(fs18, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val2) { - FileReadStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream; - Object.defineProperty(fs18, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val2) { - FileWriteStream = val2; - }, - enumerable: true, - configurable: true - }); - function ReadStream(path16, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream(path16, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream3(path16, options) { - return new fs18.ReadStream(path16, options); - } - function createWriteStream(path16, options) { - return new fs18.WriteStream(path16, options); - } - var fs$open = fs18.open; - fs18.open = open; - function open(path16, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path16, flags, mode, cb); - function go$open(path17, flags2, mode2, cb2, startTime) { - return fs$open(path17, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path17, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs18; - } - function enqueue(elem) { - debug3("ENQUEUE", elem[0].name, elem[1]); - fs17[gracefulQueue].push(elem); - retry3(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs17[gracefulQueue].length; ++i) { - if (fs17[gracefulQueue][i].length > 2) { - fs17[gracefulQueue][i][3] = now; - fs17[gracefulQueue][i][4] = now; - } - } - retry3(); - } - function retry3() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs17[gracefulQueue].length === 0) - return; - var elem = fs17[gracefulQueue].shift(); - var fn = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug3("RETRY", fn.name, args); - fn.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug3("TIMEOUT", fn.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug3("RETRY", fn.name, args); - fn.apply(null, args.concat([startTime])); - } else { - fs17[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry3, 0); - } - } - } -}); - -// node_modules/is-path-cwd/index.js -var require_is_path_cwd = __commonJS({ - "node_modules/is-path-cwd/index.js"(exports2, module2) { - "use strict"; - var path16 = require("path"); - module2.exports = (path_) => { - let cwd = process.cwd(); - path_ = path16.resolve(path_); - if (process.platform === "win32") { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - return path_ === cwd; - }; - } -}); - -// node_modules/is-path-inside/index.js -var require_is_path_inside = __commonJS({ - "node_modules/is-path-inside/index.js"(exports2, module2) { - "use strict"; - var path16 = require("path"); - module2.exports = (childPath, parentPath) => { - const relation = path16.relative(parentPath, childPath); - return Boolean( - relation && relation !== ".." && !relation.startsWith(`..${path16.sep}`) && relation !== path16.resolve(childPath) - ); - }; - } -}); - -// node_modules/fs.realpath/old.js -var require_old = __commonJS({ - "node_modules/fs.realpath/old.js"(exports2) { - var pathModule = require("path"); - var isWindows = process.platform === "win32"; - var fs17 = require("fs"); - var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - function rethrow() { - var callback; - if (DEBUG) { - var backtrace = new Error(); - callback = debugCallback; - } else - callback = missingCallback; - return callback; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; - else if (!process.noDeprecation) { - var msg = "fs: missing callback " + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } - } - function maybeCallback(cb) { - return typeof cb === "function" ? cb : rethrow(); - } - var normalize3 = pathModule.normalize; - if (isWindows) { - nextPartRe = /(.*?)(?:[\/\\]+|$)/g; - } else { - nextPartRe = /(.*?)(?:[\/]+|$)/g; - } - var nextPartRe; - if (isWindows) { - splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; - } else { - splitRootRe = /^[\/]*/; - } - var splitRootRe; - exports2.realpathSync = function realpathSync(p, cache) { - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs17.lstatSync(base); - knownHard[base] = true; - } - } - while (pos < p.length) { - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - continue; - } - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - resolvedLink = cache[base]; - } else { - var stat = fs17.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs17.statSync(base); - linkTarget = fs17.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - if (cache) cache[original] = p; - return p; - }; - exports2.realpath = function realpath(p, cache, cb) { - if (typeof cb !== "function") { - cb = maybeCallback(cache); - cache = null; - } - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs17.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - function LOOP() { - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - return process.nextTick(LOOP); - } - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - return gotResolvedLink(cache[base]); - } - return fs17.lstat(base, gotStat); - } - function gotStat(err, stat) { - if (err) return cb(err); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs17.stat(base, function(err2) { - if (err2) return cb(err2); - fs17.readlink(base, function(err3, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err3, target); - }); - }); - } - function gotTarget(err, target, base2) { - if (err) return cb(err); - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base2] = resolvedLink; - gotResolvedLink(resolvedLink); - } - function gotResolvedLink(resolvedLink) { - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - }; - } -}); - -// node_modules/fs.realpath/index.js -var require_fs5 = __commonJS({ - "node_modules/fs.realpath/index.js"(exports2, module2) { - module2.exports = realpath; - realpath.realpath = realpath; - realpath.sync = realpathSync; - realpath.realpathSync = realpathSync; - realpath.monkeypatch = monkeypatch; - realpath.unmonkeypatch = unmonkeypatch; - var fs17 = require("fs"); - var origRealpath = fs17.realpath; - var origRealpathSync = fs17.realpathSync; - var version = process.version; - var ok = /^v[0-5]\./.test(version); - var old = require_old(); - function newError(er) { - return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); - } - function realpath(p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb); - } - if (typeof cache === "function") { - cb = cache; - cache = null; - } - origRealpath(p, cache, function(er, result) { - if (newError(er)) { - old.realpath(p, cache, cb); - } else { - cb(er, result); - } - }); - } - function realpathSync(p, cache) { - if (ok) { - return origRealpathSync(p, cache); - } - try { - return origRealpathSync(p, cache); - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache); - } else { - throw er; - } - } - } - function monkeypatch() { - fs17.realpath = realpath; - fs17.realpathSync = realpathSync; - } - function unmonkeypatch() { - fs17.realpath = origRealpath; - fs17.realpathSync = origRealpathSync; - } - } -}); - -// node_modules/concat-map/index.js -var require_concat_map = __commonJS({ - "node_modules/concat-map/index.js"(exports2, module2) { - module2.exports = function(xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - } -}); - -// node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ - "node_modules/balanced-match/index.js"(exports2, module2) { - "use strict"; - module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r = range(a, b, str2); - return r && { - start: r[0], - end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + a.length, r[1]), - post: str2.slice(r[1] + b.length) - }; - } - function maybeMatch(reg, str2) { - var m = str2.match(reg); - return m ? m[0] : null; - } - balanced.range = range; - function range(a, b, str2) { - var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); - var i = ai; - if (ai >= 0 && bi > 0) { - begs = []; - left = str2.length; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str2.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - bi = str2.indexOf(b, i + 1); - } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length) { - result = [left, right]; - } - } - return result; - } - } -}); - -// node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ - "node_modules/brace-expansion/index.js"(exports2, module2) { - var concatMap = require_concat_map(); - var balanced = require_balanced_match(); - module2.exports = expandTop; - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) - return [""]; - var parts = []; - var m = balanced("{", "}", str2); - if (!m) - return str2.split(","); - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; - } - function expandTop(str2) { - if (!str2) - return []; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); - } - return expand(escapeBraces(str2), true).map(unescapeBraces); - } - function embrace(str2) { - return "{" + str2 + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte5(i, y) { - return i >= y; - } - function expand(str2, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2); - } - return [str2]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand(m.post, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte5; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { - return expand(el, false); - }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - return expansions; - } - } -}); - -// node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ - "node_modules/minimatch/minimatch.js"(exports2, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path16 = (function() { - try { - return require("path"); - } catch (e) { - } - })() || { - sep: "/" - }; - minimatch.sep = path16.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand = require_brace_expansion(); - var plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" } - }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set2, c) { - set2[c] = true; - return set2; - }, {}); - } - var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { - options = options || {}; - return function(p, i, list) { - return minimatch(p, pattern, options); - }; - } - function ext(a, b) { - b = b || {}; - var t = {}; - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; - } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); - }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); - }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); - }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); - }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); - }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); - }; - m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); - }; - return m; - }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); - if (!options) options = {}; - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); - } - assertValidPattern(pattern); - if (!options) options = {}; - pattern = pattern.trim(); - if (!options.allowWindowsEscape && path16.sep !== "/") { - pattern = pattern.split(path16.sep).join("/"); - } - this.options = options; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.make(); - } - Minimatch.prototype.debug = function() { - }; - Minimatch.prototype.make = make; - function make() { - var pattern = this.pattern; - var options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); - if (options.debug) this.debug = function debug3() { - console.error.apply(console, arguments); - }; - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { - return s.split(slashSplit); - }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { - return s.map(this.parse, this); - }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { - return s.indexOf(false) === -1; - }); - this.debug(this.pattern, set2); - this.set = set2; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate2 = false; - var options = this.options; - var negateOffset = 0; - if (options.nonegate) return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate2 = !negate2; - negateOffset++; - } - if (negateOffset) this.pattern = pattern.substr(negateOffset); - this.negate = negate2; - } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return expand(pattern); - } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); - } - }; - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - assertValidPattern(pattern); - var options = this.options; - if (pattern === "**") { - if (!options.noglobstar) - return GLOBSTAR; - else - pattern = "*"; - } - if (pattern === "") return ""; - var re = ""; - var hasMagic = !!options.nocase; - var escaping = false; - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self2 = this; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; - } - self2.debug("clearStateChar %j %j", stateChar, re); - stateChar = false; - } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; - } - switch (c) { - /* istanbul ignore next */ - case "/": { - return false; - } - case "\\": - clearStateChar(); - escaping = true; - continue; - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); - if (inClass) { - this.debug(" in class"); - if (c === "!" && i === classStart + 1) c = "^"; - re += c; - continue; - } - self2.debug("call clearStateChar %j", stateChar); - clearStateChar(); - stateChar = c; - if (options.noext) clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re); - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - re += pl.close; - if (pl.type === "!") { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - clearStateChar(); - re += "|"; - continue; - // these are mostly the same in regexp and glob - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - var cs = pattern.substring(classStart + 1, i); - try { - RegExp("[" + cs + "]"); - } catch (er) { - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; - } - } - if (inClass) { - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re, pl); - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { - if (!$2) { - $2 = "\\"; - } - return $1 + $1 + $2 + "|"; - }); - this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case "[": - case ".": - case "(": - addPatternStart = true; - } - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - nlLast += nlAfter; - var openParensBefore = nlBefore.split("(").length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); - } - nlAfter = cleanAfter; - var dollar = ""; - if (nlAfter === "" && isSub !== SUBPARSE) { - dollar = "$"; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - if (re !== "" && hasMagic) { - re = "(?=.)" + re; - } - if (addPatternStart) { - re = patternStart + re; - } - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options.nocase ? "i" : ""; - try { - var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); - } - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) re = "^(?!" + re + ").*$"; - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - minimatch.match = function(list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function(f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = function match(f, partial) { - if (typeof partial === "undefined") partial = this.partial; - this.debug("match", f, this.pattern); - if (this.comment) return false; - if (this.empty) return f === ""; - if (f === "/" && partial) return true; - var options = this.options; - if (path16.sep !== "/") { - f = f.split(path16.sep).join("/"); - } - f = f.split(slashSplit); - this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) break; - } - for (i = 0; i < set2.length; i++) { - var pattern = set2[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) return true; - return !this.negate; - } - } - if (options.flipNegate) return false; - return this.negate; - }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options = this.options; - this.debug( - "matchOne", - { "this": this, file, pattern } - ); - this.debug("matchOne", file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug("matchOne loop"); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - if (p === false) return false; - if (p === GLOBSTAR) { - this.debug("GLOBSTAR", [pattern, p, f]); - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; - } - return true; - } - while (fr < fl) { - var swallowee = file[fr]; - this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { - this.debug("dot detected!", file, fr, pattern, pr); - break; - } - this.debug("globstar swallow a segment, and continue"); - fr++; - } - } - if (partial) { - this.debug("\n>>> no match, partial?", file, fr, pattern, pr); - if (fr === fl) return true; - } - return false; - } - var hit; - if (typeof p === "string") { - hit = f === p; - this.debug("string match", p, f, hit); - } else { - hit = f.match(p); - this.debug("pattern match", p, f, hit); - } - if (!hit) return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - return fi === fl - 1 && file[fi] === ""; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/inherits/inherits_browser.js -var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports2, module2) { - if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; - } - } -}); - -// node_modules/inherits/inherits.js -var require_inherits = __commonJS({ - "node_modules/inherits/inherits.js"(exports2, module2) { - try { - util = require("util"); - if (typeof util.inherits !== "function") throw ""; - module2.exports = util.inherits; - } catch (e) { - module2.exports = require_inherits_browser(); - } - var util; - } -}); - -// node_modules/path-is-absolute/index.js -var require_path_is_absolute = __commonJS({ - "node_modules/path-is-absolute/index.js"(exports2, module2) { - "use strict"; - function posix(path16) { - return path16.charAt(0) === "/"; - } - function win32(path16) { - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path16); - var device = result[1] || ""; - var isUnc = Boolean(device && device.charAt(1) !== ":"); - return Boolean(result[2] || isUnc); - } - module2.exports = process.platform === "win32" ? win32 : posix; - module2.exports.posix = posix; - module2.exports.win32 = win32; - } -}); - -// node_modules/rimraf/node_modules/glob/common.js -var require_common3 = __commonJS({ - "node_modules/rimraf/node_modules/glob/common.js"(exports2) { - exports2.setopts = setopts; - exports2.ownProp = ownProp; - exports2.makeAbs = makeAbs; - exports2.finish = finish; - exports2.mark = mark; - exports2.isIgnored = isIgnored; - exports2.childrenIgnored = childrenIgnored; - function ownProp(obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field); - } - var fs17 = require("fs"); - var path16 = require("path"); - var minimatch = require_minimatch(); - var isAbsolute3 = require_path_is_absolute(); - var Minimatch = minimatch.Minimatch; - function alphasort(a, b) { - return a.localeCompare(b, "en"); - } - function setupIgnores(self2, options) { - self2.ignore = options.ignore || []; - if (!Array.isArray(self2.ignore)) - self2.ignore = [self2.ignore]; - if (self2.ignore.length) { - self2.ignore = self2.ignore.map(ignoreMap); - } - } - function ignoreMap(pattern) { - var gmatcher = null; - if (pattern.slice(-3) === "/**") { - var gpattern = pattern.replace(/(\/\*\*)+$/, ""); - gmatcher = new Minimatch(gpattern, { dot: true }); - } - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher - }; - } - function setopts(self2, pattern, options) { - if (!options) - options = {}; - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar"); - } - pattern = "**/" + pattern; - } - self2.silent = !!options.silent; - self2.pattern = pattern; - self2.strict = options.strict !== false; - self2.realpath = !!options.realpath; - self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); - self2.follow = !!options.follow; - self2.dot = !!options.dot; - self2.mark = !!options.mark; - self2.nodir = !!options.nodir; - if (self2.nodir) - self2.mark = true; - self2.sync = !!options.sync; - self2.nounique = !!options.nounique; - self2.nonull = !!options.nonull; - self2.nosort = !!options.nosort; - self2.nocase = !!options.nocase; - self2.stat = !!options.stat; - self2.noprocess = !!options.noprocess; - self2.absolute = !!options.absolute; - self2.fs = options.fs || fs17; - self2.maxLength = options.maxLength || Infinity; - self2.cache = options.cache || /* @__PURE__ */ Object.create(null); - self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); - self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); - setupIgnores(self2, options); - self2.changedCwd = false; - var cwd = process.cwd(); - if (!ownProp(options, "cwd")) - self2.cwd = cwd; - else { - self2.cwd = path16.resolve(options.cwd); - self2.changedCwd = self2.cwd !== cwd; - } - self2.root = options.root || path16.resolve(self2.cwd, "/"); - self2.root = path16.resolve(self2.root); - if (process.platform === "win32") - self2.root = self2.root.replace(/\\/g, "/"); - self2.cwdAbs = isAbsolute3(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); - if (process.platform === "win32") - self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); - self2.nomount = !!options.nomount; - options.nonegate = true; - options.nocomment = true; - self2.minimatch = new Minimatch(pattern, options); - self2.options = self2.minimatch.options; - } - function finish(self2) { - var nou = self2.nounique; - var all = nou ? [] : /* @__PURE__ */ Object.create(null); - for (var i = 0, l = self2.matches.length; i < l; i++) { - var matches = self2.matches[i]; - if (!matches || Object.keys(matches).length === 0) { - if (self2.nonull) { - var literal = self2.minimatch.globSet[i]; - if (nou) - all.push(literal); - else - all[literal] = true; - } - } else { - var m = Object.keys(matches); - if (nou) - all.push.apply(all, m); - else - m.forEach(function(m2) { - all[m2] = true; - }); - } - } - if (!nou) - all = Object.keys(all); - if (!self2.nosort) - all = all.sort(alphasort); - if (self2.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self2._mark(all[i]); - } - if (self2.nodir) { - all = all.filter(function(e) { - var notDir = !/\/$/.test(e); - var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; - if (notDir && c) - notDir = c !== "DIR" && !Array.isArray(c); - return notDir; - }); - } - } - if (self2.ignore.length) - all = all.filter(function(m2) { - return !isIgnored(self2, m2); - }); - self2.found = all; - } - function mark(self2, p) { - var abs = makeAbs(self2, p); - var c = self2.cache[abs]; - var m = p; - if (c) { - var isDir = c === "DIR" || Array.isArray(c); - var slash = p.slice(-1) === "/"; - if (isDir && !slash) - m += "/"; - else if (!isDir && slash) - m = m.slice(0, -1); - if (m !== p) { - var mabs = makeAbs(self2, m); - self2.statCache[mabs] = self2.statCache[abs]; - self2.cache[mabs] = self2.cache[abs]; - } - } - return m; - } - function makeAbs(self2, f) { - var abs = f; - if (f.charAt(0) === "/") { - abs = path16.join(self2.root, f); - } else if (isAbsolute3(f) || f === "") { - abs = f; - } else if (self2.changedCwd) { - abs = path16.resolve(self2.cwd, f); - } else { - abs = path16.resolve(f); - } - if (process.platform === "win32") - abs = abs.replace(/\\/g, "/"); - return abs; - } - function isIgnored(self2, path17) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return item.matcher.match(path17) || !!(item.gmatcher && item.gmatcher.match(path17)); - }); - } - function childrenIgnored(self2, path17) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path17)); - }); - } - } -}); - -// node_modules/rimraf/node_modules/glob/sync.js -var require_sync7 = __commonJS({ - "node_modules/rimraf/node_modules/glob/sync.js"(exports2, module2) { - module2.exports = globSync; - globSync.GlobSync = GlobSync; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var Glob = require_glob().Glob; - var util = require("util"); - var path16 = require("path"); - var assert = require("assert"); - var isAbsolute3 = require_path_is_absolute(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - function globSync(pattern, options) { - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - return new GlobSync(pattern, options).found; - } - function GlobSync(pattern, options) { - if (!pattern) - throw new Error("must provide pattern"); - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options); - setopts(this, pattern, options); - if (this.noprocess) - return this; - var n = this.minimatch.set.length; - this.matches = new Array(n); - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false); - } - this._finish(); - } - GlobSync.prototype._finish = function() { - assert(this instanceof GlobSync); - if (this.realpath) { - var self2 = this; - this.matches.forEach(function(matchset, index) { - var set2 = self2.matches[index] = /* @__PURE__ */ Object.create(null); - for (var p in matchset) { - try { - p = self2._makeAbs(p); - var real = rp.realpathSync(p, self2.realpathCache); - set2[real] = true; - } catch (er) { - if (er.syscall === "stat") - set2[self2._makeAbs(p)] = true; - else - throw er; - } - } - }); - } - common2.finish(this); - }; - GlobSync.prototype._process = function(pattern, index, inGlobStar) { - assert(this instanceof GlobSync); - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute3(prefix) || isAbsolute3(pattern.join("/"))) { - if (!prefix || !isAbsolute3(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return; - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar); - }; - GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var pn = remain[0]; - var negate2 = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate2 && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path16.join(this.root, e); - } - this._emitMatch(index, e); - } - return; - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) - newPattern = [prefix, e]; - else - newPattern = [e]; - this._process(newPattern.concat(remain), index, inGlobStar); - } - }; - GlobSync.prototype._emitMatch = function(index, e) { - if (isIgnored(this, e)) - return; - var abs = this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) { - e = abs; - } - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - if (this.stat) - this._stat(e); - }; - GlobSync.prototype._readdirInGlobStar = function(abs) { - if (this.follow) - return this._readdir(abs, false); - var entries; - var lstat; - var stat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er.code === "ENOENT") { - return null; - } - } - var isSym = lstat && lstat.isSymbolicLink(); - this.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = "FILE"; - else - entries = this._readdir(abs, false); - return entries; - }; - GlobSync.prototype._readdir = function(abs, inGlobStar) { - var entries; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return null; - if (Array.isArray(c)) - return c; - } - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)); - } catch (er) { - this._readdirError(abs, er); - return null; - } - }; - GlobSync.prototype._readdirEntries = function(abs, entries) { - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return entries; - }; - GlobSync.prototype._readdirError = function(f, er) { - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - throw error2; - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) - throw er; - if (!this.silent) - console.error("glob error", er); - break; - } - }; - GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false); - var len = entries.length; - var isSym = this.symlinks[abs]; - if (isSym && inGlobStar) - return; - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true); - } - }; - GlobSync.prototype._processSimple = function(prefix, index) { - var exists = this._stat(prefix); - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return; - if (prefix && isAbsolute3(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path16.join(this.root, prefix); - } else { - prefix = path16.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - }; - GlobSync.prototype._stat = function(f) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return false; - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return c; - if (needDir && c === "FILE") - return false; - } - var exists; - var stat = this.statCache[abs]; - if (!stat) { - var lstat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return false; - } - } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs); - } catch (er) { - stat = lstat; - } - } else { - stat = lstat; - } - } - this.statCache[abs] = stat; - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return false; - return c; - }; - GlobSync.prototype._mark = function(p) { - return common2.mark(this, p); - }; - GlobSync.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - } -}); - -// node_modules/inflight/inflight.js -var require_inflight = __commonJS({ - "node_modules/inflight/inflight.js"(exports2, module2) { - var wrappy = require_wrappy(); - var reqs = /* @__PURE__ */ Object.create(null); - var once = require_once(); - module2.exports = wrappy(inflight); - function inflight(key, cb) { - if (reqs[key]) { - reqs[key].push(cb); - return null; - } else { - reqs[key] = [cb]; - return makeres(key); - } - } - function makeres(key) { - return once(function RES() { - var cbs = reqs[key]; - var len = cbs.length; - var args = slice(arguments); - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args); - } - } finally { - if (cbs.length > len) { - cbs.splice(0, len); - process.nextTick(function() { - RES.apply(null, args); - }); - } else { - delete reqs[key]; - } - } - }); - } - function slice(args) { - var length = args.length; - var array = []; - for (var i = 0; i < length; i++) array[i] = args[i]; - return array; - } - } -}); - -// node_modules/rimraf/node_modules/glob/glob.js -var require_glob = __commonJS({ - "node_modules/rimraf/node_modules/glob/glob.js"(exports2, module2) { - module2.exports = glob2; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var inherits = require_inherits(); - var EE = require("events").EventEmitter; - var path16 = require("path"); - var assert = require("assert"); - var isAbsolute3 = require_path_is_absolute(); - var globSync = require_sync7(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var inflight = require_inflight(); - var util = require("util"); - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - var once = require_once(); - function glob2(pattern, options, cb) { - if (typeof options === "function") cb = options, options = {}; - if (!options) options = {}; - if (options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return globSync(pattern, options); - } - return new Glob(pattern, options, cb); - } - glob2.sync = globSync; - var GlobSync = glob2.GlobSync = globSync.GlobSync; - glob2.glob = glob2; - function extend3(origin, add2) { - if (add2 === null || typeof add2 !== "object") { - return origin; - } - var keys = Object.keys(add2); - var i = keys.length; - while (i--) { - origin[keys[i]] = add2[keys[i]]; - } - return origin; - } - glob2.hasMagic = function(pattern, options_) { - var options = extend3({}, options_); - options.noprocess = true; - var g = new Glob(pattern, options); - var set2 = g.minimatch.set; - if (!pattern) - return false; - if (set2.length > 1) - return true; - for (var j = 0; j < set2[0].length; j++) { - if (typeof set2[0][j] !== "string") - return true; - } - return false; - }; - glob2.Glob = Glob; - inherits(Glob, EE); - function Glob(pattern, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - if (options && options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return new GlobSync(pattern, options); - } - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb); - setopts(this, pattern, options); - this._didRealPath = false; - var n = this.minimatch.set.length; - this.matches = new Array(n); - if (typeof cb === "function") { - cb = once(cb); - this.on("error", cb); - this.on("end", function(matches) { - cb(null, matches); - }); - } - var self2 = this; - this._processing = 0; - this._emitQueue = []; - this._processQueue = []; - this.paused = false; - if (this.noprocess) - return this; - if (n === 0) - return done(); - var sync = true; - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false, done); - } - sync = false; - function done() { - --self2._processing; - if (self2._processing <= 0) { - if (sync) { - process.nextTick(function() { - self2._finish(); - }); - } else { - self2._finish(); - } - } - } - } - Glob.prototype._finish = function() { - assert(this instanceof Glob); - if (this.aborted) - return; - if (this.realpath && !this._didRealpath) - return this._realpath(); - common2.finish(this); - this.emit("end", this.found); - }; - Glob.prototype._realpath = function() { - if (this._didRealpath) - return; - this._didRealpath = true; - var n = this.matches.length; - if (n === 0) - return this._finish(); - var self2 = this; - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next); - function next() { - if (--n === 0) - self2._finish(); - } - }; - Glob.prototype._realpathSet = function(index, cb) { - var matchset = this.matches[index]; - if (!matchset) - return cb(); - var found = Object.keys(matchset); - var self2 = this; - var n = found.length; - if (n === 0) - return cb(); - var set2 = this.matches[index] = /* @__PURE__ */ Object.create(null); - found.forEach(function(p, i) { - p = self2._makeAbs(p); - rp.realpath(p, self2.realpathCache, function(er, real) { - if (!er) - set2[real] = true; - else if (er.syscall === "stat") - set2[p] = true; - else - self2.emit("error", er); - if (--n === 0) { - self2.matches[index] = set2; - cb(); - } - }); - }); - }; - Glob.prototype._mark = function(p) { - return common2.mark(this, p); - }; - Glob.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - Glob.prototype.abort = function() { - this.aborted = true; - this.emit("abort"); - }; - Glob.prototype.pause = function() { - if (!this.paused) { - this.paused = true; - this.emit("pause"); - } - }; - Glob.prototype.resume = function() { - if (this.paused) { - this.emit("resume"); - this.paused = false; - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0); - this._emitQueue.length = 0; - for (var i = 0; i < eq.length; i++) { - var e = eq[i]; - this._emitMatch(e[0], e[1]); - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0); - this._processQueue.length = 0; - for (var i = 0; i < pq.length; i++) { - var p = pq[i]; - this._processing--; - this._process(p[0], p[1], p[2], p[3]); - } - } - } - }; - Glob.prototype._process = function(pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === "function"); - if (this.aborted) - return; - this._processing++; - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]); - return; - } - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index, cb); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute3(prefix) || isAbsolute3(pattern.join("/"))) { - if (!prefix || !isAbsolute3(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return cb(); - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); - }; - Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var pn = remain[0]; - var negate2 = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate2 && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return cb(); - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path16.join(this.root, e); - } - this._emitMatch(index, e); - } - return cb(); - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - this._process([e].concat(remain), index, inGlobStar, cb); - } - cb(); - }; - Glob.prototype._emitMatch = function(index, e) { - if (this.aborted) - return; - if (isIgnored(this, e)) - return; - if (this.paused) { - this._emitQueue.push([index, e]); - return; - } - var abs = isAbsolute3(e) ? e : this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) - e = abs; - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - var st = this.statCache[abs]; - if (st) - this.emit("stat", e, st); - this.emit("match", e); - }; - Glob.prototype._readdirInGlobStar = function(abs, cb) { - if (this.aborted) - return; - if (this.follow) - return this._readdir(abs, false, cb); - var lstatkey = "lstat\0" + abs; - var self2 = this; - var lstatcb = inflight(lstatkey, lstatcb_); - if (lstatcb) - self2.fs.lstat(abs, lstatcb); - function lstatcb_(er, lstat) { - if (er && er.code === "ENOENT") - return cb(); - var isSym = lstat && lstat.isSymbolicLink(); - self2.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) { - self2.cache[abs] = "FILE"; - cb(); - } else - self2._readdir(abs, false, cb); - } - }; - Glob.prototype._readdir = function(abs, inGlobStar, cb) { - if (this.aborted) - return; - cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); - if (!cb) - return; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return cb(); - if (Array.isArray(c)) - return cb(null, c); - } - var self2 = this; - self2.fs.readdir(abs, readdirCb(this, abs, cb)); - }; - function readdirCb(self2, abs, cb) { - return function(er, entries) { - if (er) - self2._readdirError(abs, er, cb); - else - self2._readdirEntries(abs, entries, cb); - }; - } - Glob.prototype._readdirEntries = function(abs, entries, cb) { - if (this.aborted) - return; - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return cb(null, entries); - }; - Glob.prototype._readdirError = function(f, er, cb) { - if (this.aborted) - return; - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - this.emit("error", error2); - this.abort(); - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) { - this.emit("error", er); - this.abort(); - } - if (!this.silent) - console.error("glob error", er); - break; - } - return cb(); - }; - Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false, cb); - var isSym = this.symlinks[abs]; - var len = entries.length; - if (isSym && inGlobStar) - return cb(); - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true, cb); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true, cb); - } - cb(); - }; - Glob.prototype._processSimple = function(prefix, index, cb) { - var self2 = this; - this._stat(prefix, function(er, exists) { - self2._processSimple2(prefix, index, er, exists, cb); - }); - }; - Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return cb(); - if (prefix && isAbsolute3(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path16.join(this.root, prefix); - } else { - prefix = path16.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - cb(); - }; - Glob.prototype._stat = function(f, cb) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return cb(); - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return cb(null, c); - if (needDir && c === "FILE") - return cb(); - } - var exists; - var stat = this.statCache[abs]; - if (stat !== void 0) { - if (stat === false) - return cb(null, stat); - else { - var type2 = stat.isDirectory() ? "DIR" : "FILE"; - if (needDir && type2 === "FILE") - return cb(); - else - return cb(null, type2, stat); - } - } - var self2 = this; - var statcb = inflight("stat\0" + abs, lstatcb_); - if (statcb) - self2.fs.lstat(abs, statcb); - function lstatcb_(er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - return self2.fs.stat(abs, function(er2, stat2) { - if (er2) - self2._stat2(f, abs, null, lstat, cb); - else - self2._stat2(f, abs, er2, stat2, cb); - }); - } else { - self2._stat2(f, abs, er, lstat, cb); - } - } - }; - Glob.prototype._stat2 = function(f, abs, er, stat, cb) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return cb(); - } - var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat; - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) - return cb(null, false, stat); - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return cb(); - return cb(null, c, stat); - }; - } -}); - -// node_modules/rimraf/rimraf.js -var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports2, module2) { - var assert = require("assert"); - var path16 = require("path"); - var fs17 = require("fs"); - var glob2 = void 0; - try { - glob2 = require_glob(); - } catch (_err) { - } - var defaultGlobOpts = { - nosort: true, - silent: true - }; - var timeout = 0; - var isWindows = process.platform === "win32"; - var defaults = (options) => { - const methods = [ - "unlink", - "chmod", - "stat", - "lstat", - "rmdir", - "readdir" - ]; - methods.forEach((m) => { - options[m] = options[m] || fs17[m]; - m = m + "Sync"; - options[m] = options[m] || fs17[m]; - }); - options.maxBusyTries = options.maxBusyTries || 3; - options.emfileWait = options.emfileWait || 1e3; - if (options.glob === false) { - options.disableGlob = true; - } - if (options.disableGlob !== true && glob2 === void 0) { - throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); - } - options.disableGlob = options.disableGlob || false; - options.glob = options.glob || defaultGlobOpts; - }; - var rimraf = (p, options, cb) => { - if (typeof options === "function") { - cb = options; - options = {}; - } - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert.equal(typeof cb, "function", "rimraf: callback function required"); - assert(options, "rimraf: invalid options argument provided"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - defaults(options); - let busyTries = 0; - let errState = null; - let n = 0; - const next = (er) => { - errState = errState || er; - if (--n === 0) - cb(errState); - }; - const afterGlob = (er, results) => { - if (er) - return cb(er); - n = results.length; - if (n === 0) - return cb(); - results.forEach((p2) => { - const CB = (er2) => { - if (er2) { - if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { - busyTries++; - return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); - } - if (er2.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p2, options, CB), timeout++); - } - if (er2.code === "ENOENT") er2 = null; - } - timeout = 0; - next(er2); - }; - rimraf_(p2, options, CB); - }); - }; - if (options.disableGlob || !glob2.hasMagic(p)) - return afterGlob(null, [p]); - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]); - glob2(p, options.glob, afterGlob); - }); - }; - var rimraf_ = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null); - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb); - if (st && st.isDirectory()) - return rmdir(p, options, er, cb); - options.unlink(p, (er2) => { - if (er2) { - if (er2.code === "ENOENT") - return cb(null); - if (er2.code === "EPERM") - return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); - if (er2.code === "EISDIR") - return rmdir(p, options, er2, cb); - } - return cb(er2); - }); - }); - }; - var fixWinEPERM = (p, options, er, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.chmod(p, 438, (er2) => { - if (er2) - cb(er2.code === "ENOENT" ? null : er); - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er); - else if (stats.isDirectory()) - rmdir(p, options, er, cb); - else - options.unlink(p, cb); - }); - }); - }; - var fixWinEPERMSync = (p, options, er) => { - assert(p); - assert(options); - try { - options.chmodSync(p, 438); - } catch (er2) { - if (er2.code === "ENOENT") - return; - else - throw er; - } - let stats; - try { - stats = options.statSync(p); - } catch (er3) { - if (er3.code === "ENOENT") - return; - else - throw er; - } - if (stats.isDirectory()) - rmdirSync(p, options, er); - else - options.unlinkSync(p); - }; - var rmdir = (p, options, originalEr, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.rmdir(p, (er) => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb); - else if (er && er.code === "ENOTDIR") - cb(originalEr); - else - cb(er); - }); - }; - var rmkids = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.readdir(p, (er, files) => { - if (er) - return cb(er); - let n = files.length; - if (n === 0) - return options.rmdir(p, cb); - let errState; - files.forEach((f) => { - rimraf(path16.join(p, f), options, (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--n === 0) - options.rmdir(p, cb); - }); - }); - }); - }; - var rimrafSync = (p, options) => { - options = options || {}; - defaults(options); - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert(options, "rimraf: missing options"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - let results; - if (options.disableGlob || !glob2.hasMagic(p)) { - results = [p]; - } else { - try { - options.lstatSync(p); - results = [p]; - } catch (er) { - results = glob2.sync(p, options.glob); - } - } - if (!results.length) - return; - for (let i = 0; i < results.length; i++) { - const p2 = results[i]; - let st; - try { - st = options.lstatSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p2, options, er); - } - try { - if (st && st.isDirectory()) - rmdirSync(p2, options, null); - else - options.unlinkSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); - if (er.code !== "EISDIR") - throw er; - rmdirSync(p2, options, er); - } - } - }; - var rmdirSync = (p, options, originalEr) => { - assert(p); - assert(options); - try { - options.rmdirSync(p); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "ENOTDIR") - throw originalEr; - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options); - } - }; - var rmkidsSync = (p, options) => { - assert(p); - assert(options); - options.readdirSync(p).forEach((f) => rimrafSync(path16.join(p, f), options)); - const retries = isWindows ? 100 : 1; - let i = 0; - do { - let threw = true; - try { - const ret = options.rmdirSync(p, options); - threw = false; - return ret; - } finally { - if (++i < retries && threw) - continue; - } - } while (true); - }; - module2.exports = rimraf; - rimraf.sync = rimrafSync; - } -}); - -// node_modules/del/node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "node_modules/del/node_modules/indent-string/index.js"(exports2, module2) { - "use strict"; - module2.exports = (string, count = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count)); - }; - } -}); - -// node_modules/del/node_modules/clean-stack/index.js -var require_clean_stack = __commonJS({ - "node_modules/del/node_modules/clean-stack/index.js"(exports2, module2) { - "use strict"; - var os5 = require("os"); - var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; - var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; - var homeDir = typeof os5.homedir === "undefined" ? "" : os5.homedir(); - module2.exports = (stack, options) => { - options = Object.assign({ pretty: false }, options); - return stack.replace(/\\/g, "/").split("\n").filter((line) => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - const match = pathMatches[1]; - if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { - return false; - } - return !pathRegex.test(match); - }).filter((line) => line.trim() !== "").map((line) => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); - } - return line; - }).join("\n"); - }; - } -}); - -// node_modules/del/node_modules/aggregate-error/index.js -var require_aggregate_error = __commonJS({ - "node_modules/del/node_modules/aggregate-error/index.js"(exports2, module2) { - "use strict"; - var indentString2 = require_indent_string(); - var cleanStack = require_clean_stack(); - var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - errors = [...errors].map((error2) => { - if (error2 instanceof Error) { - return error2; - } - if (error2 !== null && typeof error2 === "object") { - return Object.assign(new Error(error2.message), error2); - } - return new Error(error2); - }); - let message = errors.map((error2) => { - return typeof error2.stack === "string" ? cleanInternalStack(cleanStack(error2.stack)) : String(error2); - }).join("\n"); - message = "\n" + indentString2(message, 4); - super(message); - this.name = "AggregateError"; - Object.defineProperty(this, "_errors", { value: errors }); - } - *[Symbol.iterator]() { - for (const error2 of this._errors) { - yield error2; - } - } - }; - module2.exports = AggregateError; - } -}); - -// node_modules/del/node_modules/p-map/index.js -var require_p_map = __commonJS({ - "node_modules/del/node_modules/p-map/index.js"(exports2, module2) { - "use strict"; - var AggregateError = require_aggregate_error(); - module2.exports = async (iterable, mapper, { - concurrency = Infinity, - stopOnError = true - } = {}) => { - return new Promise((resolve8, reject) => { - if (typeof mapper !== "function") { - throw new TypeError("Mapper function is required"); - } - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - const next = () => { - if (isRejected) { - return; - } - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - if (nextItem.done) { - isIterableDone = true; - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve8(result); - } - } - return; - } - resolvingCount++; - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error2) { - if (stopOnError) { - isRejected = true; - reject(error2); - } else { - errors.push(error2); - resolvingCount--; - next(); - } - } - })(); - }; - for (let i = 0; i < concurrency; i++) { - next(); - if (isIterableDone) { - break; - } - } - }); - }; - } -}); - -// node_modules/del/index.js -var require_del = __commonJS({ - "node_modules/del/index.js"(exports2, module2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var path16 = require("path"); - var globby = require_globby(); - var isGlob = require_is_glob(); - var slash = require_slash(); - var gracefulFs = require_graceful_fs(); - var isPathCwd = require_is_path_cwd(); - var isPathInside = require_is_path_inside(); - var rimraf = require_rimraf(); - var pMap = require_p_map(); - var rimrafP = promisify2(rimraf); - var rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync - }; - function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); - } - if (!isPathInside(file, cwd)) { - throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); - } - } - function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - patterns = patterns.map((pattern) => { - if (process.platform === "win32" && isGlob(pattern) === false) { - return slash(pattern); - } - return pattern; - }); - return patterns; - } - module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), onProgress = () => { - }, ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); - if (files.length === 0) { - onProgress({ - totalCount: 0, - deletedCount: 0, - percent: 1 - }); - } - let deletedCount = 0; - const mapper = async (file) => { - file = path16.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - deletedCount += 1; - onProgress({ - totalCount: files.length, - deletedCount, - percent: deletedCount / files.length - }); - return file; - }; - const removedFiles = await pMap(files, mapper, options); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); - const removedFiles = files.map((file) => { - file = path16.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - return file; - }); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; + const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path20) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path20) || isNotRelative(path20); + }; + if ( + // Detect `process` so that it can run in browsers. + typeof process !== "undefined" && process.platform === "win32" + ) { + setupWindows(); + } + module2.exports = factory; + factory.default = factory; + module2.exports.isPathValid = isPathValid; + define2(module2.exports, Symbol.for("setupWindows"), setupWindows); } }); @@ -36287,7 +32325,7 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^6.1.1", + del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -37444,18 +33482,18 @@ var require_light = __commonJS({ var done, waitForExecuting; options = parser$5.load(options, this.stopDefaults); waitForExecuting = (at) => { - var finished; - finished = () => { + var finished2; + finished2 = () => { var counts; counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; return new this.Promise((resolve8, reject) => { - if (finished()) { + if (finished2()) { return resolve8(); } else { return this.on("done", () => { - if (finished()) { + if (finished2()) { this.removeAllListeners("done"); return resolve8(); } @@ -37882,7 +33920,7 @@ var require_console_log_level = __commonJS({ "use strict"; var util = require("util"); var levels = ["trace", "debug", "info", "warn", "error", "fatal"]; - var noop = function() { + var noop2 = function() { }; module2.exports = function(opts) { opts = opts || {}; @@ -37892,7 +33930,7 @@ var require_console_log_level = __commonJS({ return levels.indexOf(level) >= levels.indexOf(opts.level); }; levels.forEach(function(level) { - logger[level] = shouldLog(level) ? log : noop; + logger[level] = shouldLog(level) ? log : noop2; function log() { var prefix = opts.prefix; var normalizedLevel; @@ -38013,7 +34051,7 @@ var require_internal_path_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -38021,7 +34059,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path16.dirname(p); + let result = path20.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -38059,7 +34097,7 @@ var require_internal_path_helper = __commonJS({ assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { - root += path16.sep; + root += path20.sep; } return root + itemPath; } @@ -38097,10 +34135,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path16.sep)) { + if (!p.endsWith(path20.sep)) { return p; } - if (p === path16.sep) { + if (p === path20.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -38211,6 +34249,796 @@ var require_internal_pattern_helper = __commonJS({ } }); +// node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str2) { + if (a instanceof RegExp) a = maybeMatch(a, str2); + if (b instanceof RegExp) b = maybeMatch(b, str2); + var r = range(a, b, str2); + return r && { + start: r[0], + end: r[1], + pre: str2.slice(0, r[0]), + body: str2.slice(r[0] + a.length, r[1]), + post: str2.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str2) { + var m = str2.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str2) { + var begs, beg, left, right, result; + var ai = str2.indexOf(a); + var bi = str2.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + begs = []; + left = str2.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str2.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str2.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str2) { + return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + } + function escapeBraces(str2) { + return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str2) { + return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str2) { + if (!str2) + return [""]; + var parts = []; + var m = balanced("{", "}", str2); + if (!m) + return str2.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str2) { + if (!str2) + return []; + if (str2.substr(0, 2) === "{}") { + str2 = "\\{\\}" + str2.substr(2); + } + return expand(escapeBraces(str2), true).map(unescapeBraces); + } + function embrace(str2) { + return "{" + str2 + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte5(i, y) { + return i >= y; + } + function expand(str2, isTop) { + var expansions = []; + var m = balanced("{", "}", str2); + if (!m || /\$$/.test(m.pre)) return [str2]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str2 = m.pre + "{" + m.body + escClose + m.post; + return expand(str2); + } + return [str2]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte5; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path20 = (function() { + try { + return require("path"); + } catch (e) { + } + })() || { + sep: "/" + }; + minimatch.sep = path20.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set2, c) { + set2[c] = true; + return set2; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path20.sep !== "/") { + pattern = pattern.split(path20.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set2 = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug3() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set2); + set2 = this.globParts = set2.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set2); + set2 = set2.map(function(s, si, set3) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set2); + set2 = set2.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set2); + this.set = set2; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate2 = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate2 = !negate2; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate2; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set2 = this.set; + if (!set2.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set2.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path20.sep !== "/") { + f = f.split(path20.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set2 = this.set; + this.debug(this.pattern, "set", set2); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set2.length; i++) { + var pattern = set2[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug( + "matchOne", + { "this": this, file, pattern } + ); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) return true; + } + return false; + } + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { @@ -38243,7 +35071,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -38258,12 +35086,12 @@ var require_internal_path = __commonJS({ assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path16.sep); + this.segments = itemPath.split(path20.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path16.basename(remaining); + const basename = path20.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -38281,7 +35109,7 @@ var require_internal_path = __commonJS({ assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); + assert_1.default(!segment.includes(path20.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -38292,12 +35120,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path16.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path20.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path16.sep; + result += path20.sep; } result += this.segments[i]; } @@ -38341,7 +35169,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os5 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -38370,7 +35198,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir2); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path16.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path20.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -38394,8 +35222,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path16.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path16.sep}`; + if (!itemPath.endsWith(path20.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path20.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -38430,9 +35258,9 @@ var require_internal_pattern = __commonJS({ assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path16.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path20.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path16.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path20.sep}`)) { homedir2 = homedir2 || os5.homedir(); assert_1.default(homedir2, "Unable to determine HOME directory"); assert_1.default(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); @@ -38516,8 +35344,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path16, level) { - this.path = path16; + constructor(path20, level) { + this.path = path20; this.level = level; } }; @@ -38637,9 +35465,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core15 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var patternHelper = __importStar4(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); @@ -38689,7 +35517,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core15.debug(`Search path '${searchPath}'`); try { - yield __await4(fs17.promises.lstat(searchPath)); + yield __await4(fs20.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -38720,7 +35548,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs20.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path20.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await4(item.path); @@ -38755,7 +35583,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs17.promises.stat(item.path); + stats = yield fs20.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -38767,10 +35595,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs17.promises.lstat(item.path); + stats = yield fs20.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs17.promises.realpath(item.path); + const realPath = yield fs20.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -38789,7 +35617,7 @@ var require_internal_globber = __commonJS({ }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ +var require_glob = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -40101,11 +36929,11 @@ var require_cacheUtils = __commonJS({ exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; var core15 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); - var glob2 = __importStar4(require_glob2()); + var glob2 = __importStar4(require_glob()); var io7 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs17 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); + var fs20 = __importStar4(require("fs")); + var path20 = __importStar4(require("path")); var semver8 = __importStar4(require_semver3()); var util = __importStar4(require("util")); var constants_1 = require_constants10(); @@ -40125,16 +36953,16 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path16.join(baseLocation, "actions", "temp"); + tempDirectory = path20.join(baseLocation, "actions", "temp"); } - const dest = path16.join(tempDirectory, crypto.randomUUID()); + const dest = path20.join(tempDirectory, crypto.randomUUID()); yield io7.mkdirP(dest); return dest; }); } exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs17.statSync(filePath).size; + return fs20.statSync(filePath).size; } exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { @@ -40151,7 +36979,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path16.relative(workspace, file).replace(new RegExp(`\\${path16.sep}`, "g"), "/"); + const relativeFile = path20.relative(workspace, file).replace(new RegExp(`\\${path20.sep}`, "g"), "/"); core15.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -40174,7 +37002,7 @@ var require_cacheUtils = __commonJS({ exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { return __awaiter4(this, void 0, void 0, function* () { - return util.promisify(fs17.unlink)(filePath); + return util.promisify(fs20.unlink)(filePath); }); } exports2.unlinkFile = unlinkFile; @@ -40219,7 +37047,7 @@ var require_cacheUtils = __commonJS({ exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { return __awaiter4(this, void 0, void 0, function* () { - if (fs17.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs20.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -41725,13 +38553,13 @@ var require_userAgentPlatform = __commonJS({ exports2.setPlatformSpecificData = setPlatformSpecificData; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var os5 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); + var process6 = tslib_1.__importStar(require("node:process")); function getHeaderName() { return "User-Agent"; } async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; + if (process6 && process6.versions) { + const versions = process6.versions; if (versions.bun) { map2.set("Bun", versions.bun); } else if (versions.deno) { @@ -42699,7 +39527,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common4 = __commonJS({ +var require_common3 = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -43033,7 +39861,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common4()(exports2); + module2.exports = require_common3()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -43321,7 +40149,7 @@ var require_node = __commonJS({ debug3.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common4()(exports2); + module2.exports = require_common3()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -48057,15 +44885,15 @@ var require_urlHelpers = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path16 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path16.startsWith("/")) { - path16 = path16.substring(1); + let path20 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path20.startsWith("/")) { + path20 = path20.substring(1); } - if (isAbsoluteUrl(path16)) { - requestUrl = path16; + if (isAbsoluteUrl(path20)) { + requestUrl = path20; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path16); + requestUrl = appendPath(requestUrl, path20); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -48113,9 +44941,9 @@ var require_urlHelpers = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path16 = pathToAppend.substring(0, searchStart); + const path20 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path16; + newPath = newPath + path20; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -51992,7 +48820,7 @@ var require_dist7 = __commonJS({ var stream2 = require("stream"); var coreLro = require_dist6(); var events = require("events"); - var fs17 = require("fs"); + var fs20 = require("fs"); var util = require("util"); var buffer = require("buffer"); function _interopNamespaceDefault(e) { @@ -52015,7 +48843,7 @@ var require_dist7 = __commonJS({ } var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs17); + var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs20); var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); var logger = logger$1.createClientLogger("storage-blob"); var BaseRequestPolicy = class { @@ -52264,10 +49092,10 @@ var require_dist7 = __commonJS({ ]; function escapeURLPath(url3) { const urlParsed = new URL(url3); - let path16 = urlParsed.pathname; - path16 = path16 || "/"; - path16 = escape(path16); - urlParsed.pathname = path16; + let path20 = urlParsed.pathname; + path20 = path20 || "/"; + path20 = escape(path20); + urlParsed.pathname = path20; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -52352,9 +49180,9 @@ var require_dist7 = __commonJS({ } function appendToURLPath(url3, name) { const urlParsed = new URL(url3); - let path16 = urlParsed.pathname; - path16 = path16 ? path16.endsWith("/") ? `${path16}${name}` : `${path16}/${name}` : name; - urlParsed.pathname = path16; + let path20 = urlParsed.pathname; + path20 = path20 ? path20.endsWith("/") ? `${path20}${name}` : `${path20}/${name}` : name; + urlParsed.pathname = path20; return urlParsed.toString(); } function setURLParameter(url3, name, value) { @@ -53435,9 +50263,9 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path16 = getURLPath(request.url) || "/"; + const path20 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path16}`; + canonicalizedResourceString += `/${this.factory.accountName}${path20}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -53730,9 +50558,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path16 = getURLPath(request.url) || "/"; + const path20 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path16}`; + canonicalizedResourceString += `/${options.accountName}${path20}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -73034,8 +69862,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (this.operationCount >= BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path16 = getURLPath(subRequest.url); - if (!path16 || path16 === "") { + const path20 = getURLPath(subRequest.url); + if (!path20 || path20 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -73095,8 +69923,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; pipeline = newPipeline(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); - const path16 = getURLPath(url3); - if (path16 && path16 !== "/") { + const path20 = getURLPath(url3); + if (path20 && path20 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -75863,7 +72691,7 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); var utils = __importStar4(require_cacheUtils()); @@ -75974,7 +72802,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter4(this, void 0, void 0, function* () { - const writeStream = fs17.createWriteStream(archivePath); + const writeStream = fs20.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); @@ -76000,7 +72828,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { var _a; return __awaiter4(this, void 0, void 0, function* () { - const archiveDescriptor = yield fs17.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs20.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -76117,7 +72945,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs17.openSync(archivePath, "w"); + const fd = fs20.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -76135,12 +72963,12 @@ var require_downloadUtils = __commonJS({ controller.abort(); throw new Error("Aborting cache download as the download time exceeded the timeout."); } else if (Buffer.isBuffer(result)) { - fs17.writeFileSync(fd, result); + fs20.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs17.closeSync(fd); + fs20.closeSync(fd); } } }); @@ -76439,7 +73267,7 @@ var require_cacheHttpClient = __commonJS({ var core15 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var url_1 = require("url"); var utils = __importStar4(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -76577,7 +73405,7 @@ Other caches with similar key:`); return __awaiter4(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); - const fd = fs17.openSync(archivePath, "r"); + const fd = fs20.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -76591,7 +73419,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs17.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs20.createReadStream(archivePath, { fd, start, end, @@ -76602,7 +73430,7 @@ Other caches with similar key:`); } }))); } finally { - fs17.closeSync(fd); + fs20.closeSync(fd); } return; }); @@ -81820,7 +78648,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io7 = __importStar4(require_io()); var fs_1 = require("fs"); - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var constants_1 = require_constants10(); var IS_WINDOWS = process.platform === "win32"; @@ -81866,13 +78694,13 @@ var require_tar = __commonJS({ const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type2) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path20.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path20.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path20.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path16.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path20.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path20.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path20.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -81918,7 +78746,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path20.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -81927,7 +78755,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path20.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -81942,7 +78770,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path20.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -81951,7 +78779,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path20.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -81991,7 +78819,7 @@ var require_tar = __commonJS({ exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter4(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path16.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path20.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -82061,7 +78889,7 @@ var require_cache3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; var core15 = __importStar4(require_core()); - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); @@ -82151,7 +78979,7 @@ var require_cache3 = __commonJS({ core15.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path20.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core15.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core15.isDebug()) { @@ -82220,7 +79048,7 @@ var require_cache3 = __commonJS({ core15.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path20.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core15.debug(`Archive path: ${archivePath}`); core15.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -82283,7 +79111,7 @@ var require_cache3 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path16.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path20.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core15.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -82347,7 +79175,7 @@ var require_cache3 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path16.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path20.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core15.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -82480,7 +79308,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os5 = require("os"); var cp = require("child_process"); - var fs17 = require("fs"); + var fs20 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter4(this, void 0, void 0, function* () { const platFilter = os5.platform(); @@ -82544,10 +79372,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs17.existsSync(lsbReleaseFile)) { - contents = fs17.readFileSync(lsbReleaseFile).toString(); - } else if (fs17.existsSync(osReleaseFile)) { - contents = fs17.readFileSync(osReleaseFile).toString(); + if (fs20.existsSync(lsbReleaseFile)) { + contents = fs20.readFileSync(lsbReleaseFile).toString(); + } else if (fs20.existsSync(osReleaseFile)) { + contents = fs20.readFileSync(osReleaseFile).toString(); } return contents; } @@ -82724,10 +79552,10 @@ var require_tool_cache = __commonJS({ var core15 = __importStar4(require_core()); var io7 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); var os5 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var httpm = __importStar4(require_lib()); var semver8 = __importStar4(require_semver2()); var stream2 = __importStar4(require("stream")); @@ -82748,8 +79576,8 @@ var require_tool_cache = __commonJS({ var userAgent = "actions/tool-cache"; function downloadTool2(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path16.join(_getTempDirectory(), crypto.randomUUID()); - yield io7.mkdirP(path16.dirname(dest)); + dest = dest || path20.join(_getTempDirectory(), crypto.randomUUID()); + yield io7.mkdirP(path20.dirname(dest)); core15.debug(`Downloading ${url2}`); core15.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -82771,7 +79599,7 @@ var require_tool_cache = __commonJS({ exports2.downloadTool = downloadTool2; function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - if (fs17.existsSync(dest)) { + if (fs20.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { @@ -82795,7 +79623,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs17.createWriteStream(dest)); + yield pipeline(readStream, fs20.createWriteStream(dest)); core15.debug("download complete"); succeeded = true; return dest; @@ -82836,7 +79664,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path16.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path20.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; @@ -83007,12 +79835,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os5.arch(); core15.debug(`Caching tool ${tool} ${version} ${arch2}`); core15.debug(`source dir: ${sourceDir}`); - if (!fs17.statSync(sourceDir).isDirectory()) { + if (!fs20.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs17.readdirSync(sourceDir)) { - const s = path16.join(sourceDir, itemName); + for (const itemName of fs20.readdirSync(sourceDir)) { + const s = path20.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -83026,11 +79854,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os5.arch(); core15.debug(`Caching tool ${tool} ${version} ${arch2}`); core15.debug(`source file: ${sourceFile}`); - if (!fs17.statSync(sourceFile).isFile()) { + if (!fs20.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path16.join(destFolder, targetFile); + const destPath = path20.join(destFolder, targetFile); core15.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -83054,9 +79882,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; - const cachePath = path16.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path20.join(_getCacheDirectory(), toolName, versionSpec, arch2); core15.debug(`checking cache: ${cachePath}`); - if (fs17.existsSync(cachePath) && fs17.existsSync(`${cachePath}.complete`)) { + if (fs20.existsSync(cachePath) && fs20.existsSync(`${cachePath}.complete`)) { core15.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -83069,13 +79897,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os5.arch(); - const toolPath = path16.join(_getCacheDirectory(), toolName); - if (fs17.existsSync(toolPath)) { - const children = fs17.readdirSync(toolPath); + const toolPath = path20.join(_getCacheDirectory(), toolName); + if (fs20.existsSync(toolPath)) { + const children = fs20.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path16.join(toolPath, child, arch2 || ""); - if (fs17.existsSync(fullPath) && fs17.existsSync(`${fullPath}.complete`)) { + const fullPath = path20.join(toolPath, child, arch2 || ""); + if (fs20.existsSync(fullPath) && fs20.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -83129,7 +79957,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter4(this, void 0, void 0, function* () { if (!dest) { - dest = path16.join(_getTempDirectory(), crypto.randomUUID()); + dest = path20.join(_getTempDirectory(), crypto.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -83137,7 +79965,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { - const folderPath = path16.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path20.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core15.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -83147,9 +79975,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path16.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path20.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs17.writeFileSync(markerPath, ""); + fs20.writeFileSync(markerPath, ""); core15.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -83326,7 +80154,7 @@ var require_follow_redirects = __commonJS({ "ERR_STREAM_WRITE_AFTER_END", "write after end" ); - var destroy = Writable.prototype.destroy || noop; + var destroy = Writable.prototype.destroy || noop2; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); @@ -83655,7 +80483,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop() { + function noop2() { } function parseUrl(input) { var parsed; @@ -83731,7 +80559,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.removeListener(event, eventHandlers[event]); } - request.on("error", noop); + request.on("error", noop2); request.destroy(error2); } function isSubdomain(subdomain, domain) { @@ -83862,7 +80690,7 @@ var require_internal_path_helper2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -83870,7 +80698,7 @@ var require_internal_path_helper2 = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path16.dirname(p); + let result = path20.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -83908,7 +80736,7 @@ var require_internal_path_helper2 = __commonJS({ (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { - root += path16.sep; + root += path20.sep; } return root + itemPath; } @@ -83946,10 +80774,10 @@ var require_internal_path_helper2 = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path16.sep)) { + if (!p.endsWith(path20.sep)) { return p; } - if (p === path16.sep) { + if (p === path20.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -84100,7 +80928,7 @@ var require_internal_path2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -84115,12 +80943,12 @@ var require_internal_path2 = __commonJS({ (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path16.sep); + this.segments = itemPath.split(path20.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path16.basename(remaining); + const basename = path20.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -84138,7 +80966,7 @@ var require_internal_path2 = __commonJS({ (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - (0, assert_1.default)(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path20.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -84149,12 +80977,12 @@ var require_internal_path2 = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path16.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path20.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path16.sep; + result += path20.sep; } result += this.segments[i]; } @@ -84202,7 +81030,7 @@ var require_internal_pattern2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os5 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -84231,7 +81059,7 @@ var require_internal_pattern2 = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir2); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path16.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path20.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -84255,8 +81083,8 @@ var require_internal_pattern2 = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path16.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path16.sep}`; + if (!itemPath.endsWith(path20.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path20.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -84291,9 +81119,9 @@ var require_internal_pattern2 = __commonJS({ (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path16.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path20.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path16.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path20.sep}`)) { homedir2 = homedir2 || os5.homedir(); (0, assert_1.default)(homedir2, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); @@ -84377,8 +81205,8 @@ var require_internal_search_state2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path16, level) { - this.path = path16; + constructor(path20, level) { + this.path = path20; this.level = level; } }; @@ -84502,9 +81330,9 @@ var require_internal_globber2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core15 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); var patternHelper = __importStar4(require_internal_pattern_helper2()); var internal_match_kind_1 = require_internal_match_kind2(); var internal_pattern_1 = require_internal_pattern2(); @@ -84556,7 +81384,7 @@ var require_internal_globber2 = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core15.debug(`Search path '${searchPath}'`); try { - yield __await4(fs17.promises.lstat(searchPath)); + yield __await4(fs20.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -84580,7 +81408,7 @@ var require_internal_globber2 = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path16.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path20.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -84590,7 +81418,7 @@ var require_internal_globber2 = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs20.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path20.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await4(item.path); @@ -84625,7 +81453,7 @@ var require_internal_globber2 = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs17.promises.stat(item.path); + stats = yield fs20.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -84637,10 +81465,10 @@ var require_internal_globber2 = __commonJS({ throw err; } } else { - stats = yield fs17.promises.lstat(item.path); + stats = yield fs20.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs17.promises.realpath(item.path); + const realPath = yield fs20.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -84739,10 +81567,10 @@ var require_internal_hash_files = __commonJS({ exports2.hashFiles = void 0; var crypto = __importStar4(require("crypto")); var core15 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); - var path16 = __importStar4(require("path")); + var path20 = __importStar4(require("path")); function hashFiles2(globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; var _d; @@ -84758,17 +81586,17 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path16.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path20.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } - if (fs17.statSync(file).isDirectory()) { + if (fs20.statSync(file).isDirectory()) { writeDelegate(`Skip directory '${file}'.`); continue; } const hash2 = crypto.createHash("sha256"); const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs17.createReadStream(file), hash2); + yield pipeline(fs20.createReadStream(file), hash2); result.write(hash2.digest()); count++; if (!hasMatch) { @@ -84799,7 +81627,7 @@ var require_internal_hash_files = __commonJS({ }); // node_modules/@actions/glob/lib/glob.js -var require_glob3 = __commonJS({ +var require_glob2 = __commonJS({ "node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -84858,14 +81686,14 @@ var require_helpers3 = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; var uri = require("url"); - var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path16, name, argument) { - if (Array.isArray(path16)) { - this.path = path16; - this.property = path16.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path20, name, argument) { + if (Array.isArray(path20)) { + this.path = path20; + this.property = path20.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path16 !== void 0) { - this.property = path16; + } else if (path20 !== void 0) { + this.property = path20; } if (message) { this.message = message; @@ -84956,16 +81784,16 @@ var require_helpers3 = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path16, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path20, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path16)) { - this.path = path16; - this.propertyPath = path16.reduce(function(sum, item) { + if (Array.isArray(path20)) { + this.path = path20; + this.propertyPath = path20.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path16; + this.propertyPath = path20; } this.base = base; this.schemas = schemas; @@ -84974,10 +81802,10 @@ var require_helpers3 = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path16 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path20 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); var id = schema2.$id || schema2.id; var base = uri.resolve(this.base, id || ""); - var ctx = new SchemaContext(schema2, this.options, path16, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path20, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -89052,23 +85880,23 @@ __export(analyze_action_exports, { runPromise: () => runPromise }); module.exports = __toCommonJS(analyze_action_exports); -var fs16 = __toESM(require("fs")); +var fs19 = __toESM(require("fs")); var import_path4 = __toESM(require("path")); var import_perf_hooks3 = require("perf_hooks"); var core14 = __toESM(require_core()); // src/actions-util.ts -var fs2 = __toESM(require("fs")); -var path2 = __toESM(require("path")); +var fs5 = __toESM(require("fs")); +var path6 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts -var fs = __toESM(require("fs")); +var fs4 = __toESM(require("fs")); var os = __toESM(require("os")); -var path = __toESM(require("path")); +var path5 = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -89208,36 +86036,764 @@ function checkDiskSpace(directoryPath, dependencies = { return checkUnix(directoryPath); } -// src/util.ts -var import_del = __toESM(require_del()); +// node_modules/del/index.js +var import_promises5 = __toESM(require("node:fs/promises"), 1); +var import_node_path6 = __toESM(require("node:path"), 1); +var import_node_process5 = __toESM(require("node:process"), 1); + +// node_modules/globby/index.js +var import_node_process3 = __toESM(require("node:process"), 1); +var import_node_fs3 = __toESM(require("node:fs"), 1); +var import_node_path3 = __toESM(require("node:path"), 1); + +// node_modules/globby/node_modules/@sindresorhus/merge-streams/index.js +var import_node_events = require("node:events"); +var import_node_stream = require("node:stream"); +var import_promises2 = require("node:stream/promises"); +function mergeStreams(streams) { + if (!Array.isArray(streams)) { + throw new TypeError(`Expected an array, got \`${typeof streams}\`.`); + } + for (const stream2 of streams) { + validateStream(stream2); + } + const objectMode = streams.some(({ readableObjectMode }) => readableObjectMode); + const highWaterMark = getHighWaterMark(streams, objectMode); + const passThroughStream = new MergedStream({ + objectMode, + writableHighWaterMark: highWaterMark, + readableHighWaterMark: highWaterMark + }); + for (const stream2 of streams) { + passThroughStream.add(stream2); + } + if (streams.length === 0) { + endStream(passThroughStream); + } + return passThroughStream; +} +var getHighWaterMark = (streams, objectMode) => { + if (streams.length === 0) { + return 16384; + } + const highWaterMarks = streams.filter(({ readableObjectMode }) => readableObjectMode === objectMode).map(({ readableHighWaterMark }) => readableHighWaterMark); + return Math.max(...highWaterMarks); +}; +var MergedStream = class extends import_node_stream.PassThrough { + #streams = /* @__PURE__ */ new Set([]); + #ended = /* @__PURE__ */ new Set([]); + #aborted = /* @__PURE__ */ new Set([]); + #onFinished; + add(stream2) { + validateStream(stream2); + if (this.#streams.has(stream2)) { + return; + } + this.#streams.add(stream2); + this.#onFinished ??= onMergedStreamFinished(this, this.#streams); + endWhenStreamsDone({ + passThroughStream: this, + stream: stream2, + streams: this.#streams, + ended: this.#ended, + aborted: this.#aborted, + onFinished: this.#onFinished + }); + stream2.pipe(this, { end: false }); + } + remove(stream2) { + validateStream(stream2); + if (!this.#streams.has(stream2)) { + return false; + } + stream2.unpipe(this); + return true; + } +}; +var onMergedStreamFinished = async (passThroughStream, streams) => { + updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT); + const controller = new AbortController(); + try { + await Promise.race([ + onMergedStreamEnd(passThroughStream, controller), + onInputStreamsUnpipe(passThroughStream, streams, controller) + ]); + } finally { + controller.abort(); + updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_COUNT); + } +}; +var onMergedStreamEnd = async (passThroughStream, { signal }) => { + await (0, import_promises2.finished)(passThroughStream, { signal, cleanup: true }); +}; +var onInputStreamsUnpipe = async (passThroughStream, streams, { signal }) => { + for await (const [unpipedStream] of (0, import_node_events.on)(passThroughStream, "unpipe", { signal })) { + if (streams.has(unpipedStream)) { + unpipedStream.emit(unpipeEvent); + } + } +}; +var validateStream = (stream2) => { + if (typeof stream2?.pipe !== "function") { + throw new TypeError(`Expected a readable stream, got: \`${typeof stream2}\`.`); + } +}; +var endWhenStreamsDone = async ({ passThroughStream, stream: stream2, streams, ended, aborted, onFinished }) => { + updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM); + const controller = new AbortController(); + try { + await Promise.race([ + afterMergedStreamFinished(onFinished, stream2), + onInputStreamEnd({ passThroughStream, stream: stream2, streams, ended, aborted, controller }), + onInputStreamUnpipe({ stream: stream2, streams, ended, aborted, controller }) + ]); + } finally { + controller.abort(); + updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM); + } + if (streams.size === ended.size + aborted.size) { + if (ended.size === 0 && aborted.size > 0) { + abortStream(passThroughStream); + } else { + endStream(passThroughStream); + } + } +}; +var isAbortError = (error2) => error2?.code === "ERR_STREAM_PREMATURE_CLOSE"; +var afterMergedStreamFinished = async (onFinished, stream2) => { + try { + await onFinished; + abortStream(stream2); + } catch (error2) { + if (isAbortError(error2)) { + abortStream(stream2); + } else { + errorStream(stream2, error2); + } + } +}; +var onInputStreamEnd = async ({ passThroughStream, stream: stream2, streams, ended, aborted, controller: { signal } }) => { + try { + await (0, import_promises2.finished)(stream2, { signal, cleanup: true, readable: true, writable: false }); + if (streams.has(stream2)) { + ended.add(stream2); + } + } catch (error2) { + if (signal.aborted || !streams.has(stream2)) { + return; + } + if (isAbortError(error2)) { + aborted.add(stream2); + } else { + errorStream(passThroughStream, error2); + } + } +}; +var onInputStreamUnpipe = async ({ stream: stream2, streams, ended, aborted, controller: { signal } }) => { + await (0, import_node_events.once)(stream2, unpipeEvent, { signal }); + streams.delete(stream2); + ended.delete(stream2); + aborted.delete(stream2); +}; +var unpipeEvent = Symbol("unpipe"); +var endStream = (stream2) => { + if (stream2.writable) { + stream2.end(); + } +}; +var abortStream = (stream2) => { + if (stream2.readable || stream2.writable) { + stream2.destroy(); + } +}; +var errorStream = (stream2, error2) => { + if (!stream2.destroyed) { + stream2.once("error", noop); + stream2.destroy(error2); + } +}; +var noop = () => { +}; +var updateMaxListeners = (passThroughStream, increment) => { + const maxListeners = passThroughStream.getMaxListeners(); + if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) { + passThroughStream.setMaxListeners(maxListeners + increment); + } +}; +var PASSTHROUGH_LISTENERS_COUNT = 2; +var PASSTHROUGH_LISTENERS_PER_STREAM = 1; + +// node_modules/globby/index.js +var import_fast_glob2 = __toESM(require_out4(), 1); + +// node_modules/path-type/index.js +var import_node_fs = __toESM(require("node:fs"), 1); +var import_promises3 = __toESM(require("node:fs/promises"), 1); +async function isType(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + const stats = await import_promises3.default[fsStatType](filePath); + return stats[statsMethodName](); + } catch (error2) { + if (error2.code === "ENOENT") { + return false; + } + throw error2; + } +} +function isTypeSync(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + return import_node_fs.default[fsStatType](filePath)[statsMethodName](); + } catch (error2) { + if (error2.code === "ENOENT") { + return false; + } + throw error2; + } +} +var isFile = isType.bind(void 0, "stat", "isFile"); +var isDirectory = isType.bind(void 0, "stat", "isDirectory"); +var isSymlink = isType.bind(void 0, "lstat", "isSymbolicLink"); +var isFileSync = isTypeSync.bind(void 0, "statSync", "isFile"); +var isDirectorySync = isTypeSync.bind(void 0, "statSync", "isDirectory"); +var isSymlinkSync = isTypeSync.bind(void 0, "lstatSync", "isSymbolicLink"); + +// node_modules/unicorn-magic/node.js +var import_node_util2 = require("node:util"); +var import_node_child_process2 = require("node:child_process"); +var import_node_url = require("node:url"); +var execFileOriginal = (0, import_node_util2.promisify)(import_node_child_process2.execFile); +function toPath(urlOrPath) { + return urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath; +} +var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024; + +// node_modules/globby/ignore.js +var import_node_process2 = __toESM(require("node:process"), 1); +var import_node_fs2 = __toESM(require("node:fs"), 1); +var import_promises4 = __toESM(require("node:fs/promises"), 1); +var import_node_path2 = __toESM(require("node:path"), 1); +var import_fast_glob = __toESM(require_out4(), 1); +var import_ignore = __toESM(require_ignore(), 1); + +// node_modules/slash/index.js +function slash(path20) { + const isExtendedLengthPath = path20.startsWith("\\\\?\\"); + if (isExtendedLengthPath) { + return path20; + } + return path20.replace(/\\/g, "/"); +} + +// node_modules/globby/utilities.js +var isNegativePattern = (pattern) => pattern[0] === "!"; + +// node_modules/globby/ignore.js +var defaultIgnoredDirectories = [ + "**/node_modules", + "**/flow-typed", + "**/coverage", + "**/.git" +]; +var ignoreFilesGlobOptions = { + absolute: true, + dot: true +}; +var GITIGNORE_FILES_PATTERN = "**/.gitignore"; +var applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" + import_node_path2.default.posix.join(base, pattern.slice(1)) : import_node_path2.default.posix.join(base, pattern); +var parseIgnoreFile = (file, cwd) => { + const base = slash(import_node_path2.default.relative(cwd, import_node_path2.default.dirname(file.filePath))); + return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base)); +}; +var toRelativePath = (fileOrDirectory, cwd) => { + cwd = slash(cwd); + if (import_node_path2.default.isAbsolute(fileOrDirectory)) { + if (slash(fileOrDirectory).startsWith(cwd)) { + return import_node_path2.default.relative(cwd, fileOrDirectory); + } + throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`); + } + return fileOrDirectory; +}; +var getIsIgnoredPredicate = (files, cwd) => { + const patterns = files.flatMap((file) => parseIgnoreFile(file, cwd)); + const ignores = (0, import_ignore.default)().add(patterns); + return (fileOrDirectory) => { + fileOrDirectory = toPath(fileOrDirectory); + fileOrDirectory = toRelativePath(fileOrDirectory, cwd); + return fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false; + }; +}; +var normalizeOptions = (options = {}) => ({ + cwd: toPath(options.cwd) ?? import_node_process2.default.cwd(), + suppressErrors: Boolean(options.suppressErrors), + deep: typeof options.deep === "number" ? options.deep : Number.POSITIVE_INFINITY, + ignore: [...options.ignore ?? [], ...defaultIgnoredDirectories] +}); +var isIgnoredByIgnoreFiles = async (patterns, options) => { + const { cwd, suppressErrors, deep, ignore } = normalizeOptions(options); + const paths = await (0, import_fast_glob.default)(patterns, { + cwd, + suppressErrors, + deep, + ignore, + ...ignoreFilesGlobOptions + }); + const files = await Promise.all( + paths.map(async (filePath) => ({ + filePath, + content: await import_promises4.default.readFile(filePath, "utf8") + })) + ); + return getIsIgnoredPredicate(files, cwd); +}; +var isIgnoredByIgnoreFilesSync = (patterns, options) => { + const { cwd, suppressErrors, deep, ignore } = normalizeOptions(options); + const paths = import_fast_glob.default.sync(patterns, { + cwd, + suppressErrors, + deep, + ignore, + ...ignoreFilesGlobOptions + }); + const files = paths.map((filePath) => ({ + filePath, + content: import_node_fs2.default.readFileSync(filePath, "utf8") + })); + return getIsIgnoredPredicate(files, cwd); +}; + +// node_modules/globby/index.js +var assertPatternsInput = (patterns) => { + if (patterns.some((pattern) => typeof pattern !== "string")) { + throw new TypeError("Patterns must be a string or an array of strings"); + } +}; +var normalizePathForDirectoryGlob = (filePath, cwd) => { + const path20 = isNegativePattern(filePath) ? filePath.slice(1) : filePath; + return import_node_path3.default.isAbsolute(path20) ? path20 : import_node_path3.default.join(cwd, path20); +}; +var getDirectoryGlob = ({ directoryPath, files, extensions }) => { + const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : ""; + return files ? files.map((file) => import_node_path3.default.posix.join(directoryPath, `**/${import_node_path3.default.extname(file) ? file : `${file}${extensionGlob}`}`)) : [import_node_path3.default.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)]; +}; +var directoryToGlob = async (directoryPaths, { + cwd = import_node_process3.default.cwd(), + files, + extensions +} = {}) => { + const globs = await Promise.all( + directoryPaths.map(async (directoryPath) => await isDirectory(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath) + ); + return globs.flat(); +}; +var directoryToGlobSync = (directoryPaths, { + cwd = import_node_process3.default.cwd(), + files, + extensions +} = {}) => directoryPaths.flatMap((directoryPath) => isDirectorySync(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath); +var toPatternsArray = (patterns) => { + patterns = [...new Set([patterns].flat())]; + assertPatternsInput(patterns); + return patterns; +}; +var checkCwdOption = (cwd) => { + if (!cwd) { + return; + } + let stat; + try { + stat = import_node_fs3.default.statSync(cwd); + } catch { + return; + } + if (!stat.isDirectory()) { + throw new Error("The `cwd` option must be a path to a directory"); + } +}; +var normalizeOptions2 = (options = {}) => { + options = { + ...options, + ignore: options.ignore ?? [], + expandDirectories: options.expandDirectories ?? true, + cwd: toPath(options.cwd) + }; + checkCwdOption(options.cwd); + return options; +}; +var normalizeArguments = (function_) => async (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)); +var normalizeArgumentsSync = (function_) => (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)); +var getIgnoreFilesPatterns = (options) => { + const { ignoreFiles, gitignore } = options; + const patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : []; + if (gitignore) { + patterns.push(GITIGNORE_FILES_PATTERN); + } + return patterns; +}; +var getFilter = async (options) => { + const ignoreFilesPatterns = getIgnoreFilesPatterns(options); + return createFilterFunction( + ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options) + ); +}; +var getFilterSync = (options) => { + const ignoreFilesPatterns = getIgnoreFilesPatterns(options); + return createFilterFunction( + ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options) + ); +}; +var createFilterFunction = (isIgnored) => { + const seen = /* @__PURE__ */ new Set(); + return (fastGlobResult) => { + const pathKey = import_node_path3.default.normalize(fastGlobResult.path ?? fastGlobResult); + if (seen.has(pathKey) || isIgnored && isIgnored(pathKey)) { + return false; + } + seen.add(pathKey); + return true; + }; +}; +var unionFastGlobResults = (results, filter) => results.flat().filter((fastGlobResult) => filter(fastGlobResult)); +var convertNegativePatterns = (patterns, options) => { + const tasks = []; + while (patterns.length > 0) { + const index = patterns.findIndex((pattern) => isNegativePattern(pattern)); + if (index === -1) { + tasks.push({ patterns, options }); + break; + } + const ignorePattern = patterns[index].slice(1); + for (const task of tasks) { + task.options.ignore.push(ignorePattern); + } + if (index !== 0) { + tasks.push({ + patterns: patterns.slice(0, index), + options: { + ...options, + ignore: [ + ...options.ignore, + ignorePattern + ] + } + }); + } + patterns = patterns.slice(index + 1); + } + return tasks; +}; +var normalizeExpandDirectoriesOption = (options, cwd) => ({ + ...cwd ? { cwd } : {}, + ...Array.isArray(options) ? { files: options } : options +}); +var generateTasks = async (patterns, options) => { + const globTasks = convertNegativePatterns(patterns, options); + const { cwd, expandDirectories } = options; + if (!expandDirectories) { + return globTasks; + } + const directoryToGlobOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd); + return Promise.all( + globTasks.map(async (task) => { + let { patterns: patterns2, options: options2 } = task; + [ + patterns2, + options2.ignore + ] = await Promise.all([ + directoryToGlob(patterns2, directoryToGlobOptions), + directoryToGlob(options2.ignore, { cwd }) + ]); + return { patterns: patterns2, options: options2 }; + }) + ); +}; +var generateTasksSync = (patterns, options) => { + const globTasks = convertNegativePatterns(patterns, options); + const { cwd, expandDirectories } = options; + if (!expandDirectories) { + return globTasks; + } + const directoryToGlobSyncOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd); + return globTasks.map((task) => { + let { patterns: patterns2, options: options2 } = task; + patterns2 = directoryToGlobSync(patterns2, directoryToGlobSyncOptions); + options2.ignore = directoryToGlobSync(options2.ignore, { cwd }); + return { patterns: patterns2, options: options2 }; + }); +}; +var globby = normalizeArguments(async (patterns, options) => { + const [ + tasks, + filter + ] = await Promise.all([ + generateTasks(patterns, options), + getFilter(options) + ]); + const results = await Promise.all(tasks.map((task) => (0, import_fast_glob2.default)(task.patterns, task.options))); + return unionFastGlobResults(results, filter); +}); +var globbySync = normalizeArgumentsSync((patterns, options) => { + const tasks = generateTasksSync(patterns, options); + const filter = getFilterSync(options); + const results = tasks.map((task) => import_fast_glob2.default.sync(task.patterns, task.options)); + return unionFastGlobResults(results, filter); +}); +var globbyStream = normalizeArgumentsSync((patterns, options) => { + const tasks = generateTasksSync(patterns, options); + const filter = getFilterSync(options); + const streams = tasks.map((task) => import_fast_glob2.default.stream(task.patterns, task.options)); + const stream2 = mergeStreams(streams).filter((fastGlobResult) => filter(fastGlobResult)); + return stream2; +}); +var isDynamicPattern = normalizeArgumentsSync( + (patterns, options) => patterns.some((pattern) => import_fast_glob2.default.isDynamicPattern(pattern, options)) +); +var generateGlobTasks = normalizeArguments(generateTasks); +var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync); +var { convertPathToPattern } = import_fast_glob2.default; + +// node_modules/del/index.js +var import_is_glob = __toESM(require_is_glob(), 1); + +// node_modules/is-path-cwd/index.js +var import_node_process4 = __toESM(require("node:process"), 1); +var import_node_path4 = __toESM(require("node:path"), 1); +function isPathCwd(path_) { + let cwd = import_node_process4.default.cwd(); + path_ = import_node_path4.default.resolve(path_); + if (import_node_process4.default.platform === "win32") { + cwd = cwd.toLowerCase(); + path_ = path_.toLowerCase(); + } + return path_ === cwd; +} + +// node_modules/del/node_modules/is-path-inside/index.js +var import_node_path5 = __toESM(require("node:path"), 1); +function isPathInside(childPath, parentPath) { + const relation = import_node_path5.default.relative(parentPath, childPath); + return Boolean( + relation && relation !== ".." && !relation.startsWith(`..${import_node_path5.default.sep}`) && relation !== import_node_path5.default.resolve(childPath) + ); +} + +// node_modules/p-map/index.js +async function pMap(iterable, mapper, { + concurrency = Number.POSITIVE_INFINITY, + stopOnError = true, + signal +} = {}) { + return new Promise((resolve_, reject_) => { + if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) { + throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`); + } + if (typeof mapper !== "function") { + throw new TypeError("Mapper function is required"); + } + if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) { + throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); + } + const result = []; + const errors = []; + const skippedIndexesMap = /* @__PURE__ */ new Map(); + let isRejected = false; + let isResolved = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const iterator = iterable[Symbol.iterator] === void 0 ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator](); + const signalListener = () => { + reject(signal.reason); + }; + const cleanup = () => { + signal?.removeEventListener("abort", signalListener); + }; + const resolve8 = (value) => { + resolve_(value); + cleanup(); + }; + const reject = (reason) => { + isRejected = true; + isResolved = true; + reject_(reason); + cleanup(); + }; + if (signal) { + if (signal.aborted) { + reject(signal.reason); + } + signal.addEventListener("abort", signalListener, { once: true }); + } + const next = async () => { + if (isResolved) { + return; + } + const nextItem = await iterator.next(); + const index = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0 && !isResolved) { + if (!stopOnError && errors.length > 0) { + reject(new AggregateError(errors)); + return; + } + isResolved = true; + if (skippedIndexesMap.size === 0) { + resolve8(result); + return; + } + const pureResult = []; + for (const [index2, value] of result.entries()) { + if (skippedIndexesMap.get(index2) === pMapSkip) { + continue; + } + pureResult.push(value); + } + resolve8(pureResult); + } + return; + } + resolvingCount++; + (async () => { + try { + const element = await nextItem.value; + if (isResolved) { + return; + } + const value = await mapper(element, index); + if (value === pMapSkip) { + skippedIndexesMap.set(index, value); + } + result[index] = value; + resolvingCount--; + await next(); + } catch (error2) { + if (stopOnError) { + reject(error2); + } else { + errors.push(error2); + resolvingCount--; + try { + await next(); + } catch (error3) { + reject(error3); + } + } + } + })(); + }; + (async () => { + for (let index = 0; index < concurrency; index++) { + try { + await next(); + } catch (error2) { + reject(error2); + break; + } + if (isIterableDone || isRejected) { + break; + } + } + })(); + }); +} +var pMapSkip = Symbol("skip"); + +// node_modules/del/index.js +function safeCheck(file, cwd) { + if (isPathCwd(file)) { + throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); + } + if (!isPathInside(file, cwd)) { + throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); + } +} +function normalizePatterns(patterns) { + patterns = Array.isArray(patterns) ? patterns : [patterns]; + patterns = patterns.map((pattern) => { + if (import_node_process5.default.platform === "win32" && (0, import_is_glob.default)(pattern) === false) { + return slash(pattern); + } + return pattern; + }); + return patterns; +} +async function deleteAsync(patterns, { force, dryRun, cwd = import_node_process5.default.cwd(), onProgress = () => { +}, ...options } = {}) { + options = { + expandDirectories: false, + onlyFiles: false, + followSymbolicLinks: false, + cwd, + ...options + }; + patterns = normalizePatterns(patterns); + const paths = await globby(patterns, options); + const files = paths.sort((a, b) => b.localeCompare(a)); + if (files.length === 0) { + onProgress({ + totalCount: 0, + deletedCount: 0, + percent: 1 + }); + } + let deletedCount = 0; + const mapper = async (file) => { + file = import_node_path6.default.resolve(cwd, file); + if (!force) { + safeCheck(file, cwd); + } + if (!dryRun) { + await import_promises5.default.rm(file, { recursive: true, force: true }); + } + deletedCount += 1; + onProgress({ + totalCount: files.length, + deletedCount, + percent: deletedCount / files.length, + path: file + }); + return file; + }; + const removedFiles = await pMap(files, mapper, options); + removedFiles.sort((a, b) => a.localeCompare(b)); + return removedFiles; +} // node_modules/get-folder-size/index.js -var import_node_path2 = require("node:path"); +var import_node_path7 = require("node:path"); async function getFolderSize(itemPath, options) { return await core(itemPath, options, { errors: true }); } getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); async function core(rootItemPath, options = {}, returnType = {}) { - const fs17 = options.fs || await import("node:fs/promises"); + const fs20 = options.fs || await import("node:fs/promises"); let folderSize = 0n; const foundInos = /* @__PURE__ */ new Set(); const errors = []; await processItem(rootItemPath); async function processItem(itemPath) { if (options.ignore?.test(itemPath)) return; - const stats = returnType.strict ? await fs17.lstat(itemPath, { bigint: true }) : await fs17.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + const stats = returnType.strict ? await fs20.lstat(itemPath, { bigint: true }) : await fs20.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); if (typeof stats !== "object") return; if (!foundInos.has(stats.ino)) { foundInos.add(stats.ino); folderSize += stats.size; } if (stats.isDirectory()) { - const directoryItems = returnType.strict ? await fs17.readdir(itemPath) : await fs17.readdir(itemPath).catch((error2) => errors.push(error2)); + const directoryItems = returnType.strict ? await fs20.readdir(itemPath) : await fs20.readdir(itemPath).catch((error2) => errors.push(error2)); if (typeof directoryItems !== "object") return; await Promise.all( directoryItems.map( - (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path7.join)(itemPath, directoryItem)) ) ); } @@ -91932,13 +89488,13 @@ function getTotalMemoryBytes(logger) { return limit; } function getCgroupMemoryLimitBytes(limitFile, logger) { - if (!fs.existsSync(limitFile)) { + if (!fs4.existsSync(limitFile)) { logger.debug( `While resolving RAM, did not find a cgroup memory limit at ${limitFile}.` ); return void 0; } - const limit = Number(fs.readFileSync(limitFile, "utf8")); + const limit = Number(fs4.readFileSync(limitFile, "utf8")); if (!Number.isInteger(limit)) { logger.debug( `While resolving RAM, ignored the file ${limitFile} that may contain a cgroup memory limit as this file did not contain an integer.` @@ -92018,13 +89574,13 @@ function getThreadsFlagValue(userInput, logger) { return numThreads; } function getCgroupCpuCountFromCpuMax(cpuMaxFile, logger) { - if (!fs.existsSync(cpuMaxFile)) { + if (!fs4.existsSync(cpuMaxFile)) { logger.debug( `While resolving threads, did not find a cgroup CPU file at ${cpuMaxFile}.` ); return void 0; } - const cpuMaxString = fs.readFileSync(cpuMaxFile, "utf-8"); + const cpuMaxString = fs4.readFileSync(cpuMaxFile, "utf-8"); const cpuMaxStringSplit = cpuMaxString.split(" "); if (cpuMaxStringSplit.length !== 2) { logger.debug( @@ -92044,14 +89600,14 @@ function getCgroupCpuCountFromCpuMax(cpuMaxFile, logger) { return cpuCount; } function getCgroupCpuCountFromCpus(cpusFile, logger) { - if (!fs.existsSync(cpusFile)) { + if (!fs4.existsSync(cpusFile)) { logger.debug( `While resolving threads, did not find a cgroup CPUs file at ${cpusFile}.` ); return void 0; } let cpuCount = 0; - const cpusString = fs.readFileSync(cpusFile, "utf-8").trim(); + const cpusString = fs4.readFileSync(cpusFile, "utf-8").trim(); if (cpusString.length === 0) { return void 0; } @@ -92073,10 +89629,10 @@ function getThreadsFlag(userInput, logger) { return `--threads=${getThreadsFlagValue(userInput, logger)}`; } function getCodeQLDatabasePath(config, language) { - return path.resolve(config.dbLocation, language); + return path5.resolve(config.dbLocation, language); } function getGeneratedSuitePath(config, language) { - return path.resolve( + return path5.resolve( config.dbLocation, language, "temp", @@ -92157,9 +89713,9 @@ async function codeQlVersionAtLeast(codeql, requiredVersion) { } async function bundleDb(config, language, codeql, dbName) { const databasePath = getCodeQLDatabasePath(config, language); - const databaseBundlePath = path.resolve(config.dbLocation, `${dbName}.zip`); - if (fs.existsSync(databaseBundlePath)) { - await (0, import_del.default)(databaseBundlePath, { force: true }); + const databaseBundlePath = path5.resolve(config.dbLocation, `${dbName}.zip`); + if (fs4.existsSync(databaseBundlePath)) { + await deleteAsync(databaseBundlePath, { force: true }); } await codeql.databaseBundle(databasePath, databaseBundlePath, dbName); return databaseBundlePath; @@ -92200,15 +89756,15 @@ async function tryGetFolderBytes(cacheDir, logger, quiet = false) { } var hadTimeout = false; async function withTimeout(timeoutMs, promise, onTimeout) { - let finished = false; + let finished2 = false; const mainTask = async () => { const result = await promise; - finished = true; + finished2 = true; return result; }; const timeoutTask = async () => { await delay(timeoutMs, { allowProcessExit: true }); - if (!finished) { + if (!finished2) { hadTimeout = true; onTimeout(); } @@ -92323,7 +89879,7 @@ async function checkSipEnablement(logger) { async function cleanUpGlob(glob2, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await (0, import_del.default)(glob2, { force: true }); + const deletedPaths = await deleteAsync(glob2, { force: true }); if (deletedPaths.length === 0) { logger.warning( `Failed to clean up ${name}: no files found matching ${glob2}.` @@ -92377,17 +89933,17 @@ function getWorkflowEventName() { } function isRunningLocalAction() { const relativeScriptPath = getRelativeScriptPath(); - return relativeScriptPath.startsWith("..") || path2.isAbsolute(relativeScriptPath); + return relativeScriptPath.startsWith("..") || path6.isAbsolute(relativeScriptPath); } function getRelativeScriptPath() { const runnerTemp = getRequiredEnvParam("RUNNER_TEMP"); - const actionsDirectory = path2.join(path2.dirname(runnerTemp), "_actions"); - return path2.relative(actionsDirectory, __filename); + const actionsDirectory = path6.join(path6.dirname(runnerTemp), "_actions"); + return path6.relative(actionsDirectory, __filename); } function getWorkflowEvent() { const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH"); try { - return JSON.parse(fs2.readFileSync(eventJsonFile, "utf-8")); + return JSON.parse(fs5.readFileSync(eventJsonFile, "utf-8")); } catch (e) { throw new Error( `Unable to read workflow event JSON from ${eventJsonFile}: ${e}` @@ -92560,11 +90116,10 @@ function fixCodeQualityCategory(logger, category) { } // src/analyze.ts -var fs12 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var fs15 = __toESM(require("fs")); +var path16 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); var io5 = __toESM(require_io()); -var import_del2 = __toESM(require_del()); // src/api-client.ts var core5 = __toESM(require_core()); @@ -92726,8 +90281,8 @@ function wrapApiConfigurationError(e) { var core11 = __toESM(require_core()); // src/codeql.ts -var fs11 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var fs14 = __toESM(require("fs")); +var path14 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -92969,8 +90524,8 @@ function wrapCliConfigurationError(cliError) { } // src/config-utils.ts -var fs6 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var fs9 = __toESM(require("fs")); +var path10 = __toESM(require("path")); var semver4 = __toESM(require_semver2()); // src/analyses.ts @@ -92994,12 +90549,12 @@ function shouldStoreCache(kind) { } // src/diff-informed-analysis-utils.ts -var fs5 = __toESM(require("fs")); -var path5 = __toESM(require("path")); +var fs8 = __toESM(require("fs")); +var path9 = __toESM(require("path")); // src/feature-flags.ts -var fs4 = __toESM(require("fs")); -var path4 = __toESM(require("path")); +var fs7 = __toESM(require("fs")); +var path8 = __toESM(require("path")); var semver3 = __toESM(require_semver2()); // src/defaults.json @@ -93007,8 +90562,8 @@ var bundleVersion = "codeql-bundle-v2.22.4"; var cliVersion = "2.22.4"; // src/overlay-database-utils.ts -var fs3 = __toESM(require("fs")); -var path3 = __toESM(require("path")); +var fs6 = __toESM(require("fs")); +var path7 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts @@ -93134,8 +90689,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path16 = decodeGitFilePath(match[2]); - fileOidMap[path16] = oid; + const path20 = decodeGitFilePath(match[2]); + fileOidMap[path20] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -93241,12 +90796,12 @@ async function writeBaseDatabaseOidsFile(config, sourceRoot) { const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOidsJson = JSON.stringify(gitFileOids); const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - await fs3.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); + await fs6.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); } async function readBaseDatabaseOidsFile(config, logger) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); try { - const contents = await fs3.promises.readFile( + const contents = await fs6.promises.readFile( baseDatabaseOidsFilePath, "utf-8" ); @@ -93259,7 +90814,7 @@ async function readBaseDatabaseOidsFile(config, logger) { } } function getBaseDatabaseOidsFilePath(config) { - return path3.join(config.dbLocation, "base-database-oids.json"); + return path7.join(config.dbLocation, "base-database-oids.json"); } async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); @@ -93269,14 +90824,14 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path3.join( + const overlayChangesFile = path7.join( getTemporaryDirectory(), "overlay-changes.json" ); logger.debug( `Writing overlay changed files to ${overlayChangesFile}: ${changedFilesJson}` ); - await fs3.promises.writeFile(overlayChangesFile, changedFilesJson); + await fs6.promises.writeFile(overlayChangesFile, changedFilesJson); return overlayChangesFile; } function computeChangedFiles(baseFileOids, overlayFileOids) { @@ -93298,7 +90853,7 @@ var CACHE_PREFIX = "codeql-overlay-base-database"; var MAX_CACHE_OPERATION_MS = 12e4; function checkOverlayBaseDatabase(config, logger, warningPrefix) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - if (!fs3.existsSync(baseDatabaseOidsFilePath)) { + if (!fs6.existsSync(baseDatabaseOidsFilePath)) { logger.warning( `${warningPrefix}: ${baseDatabaseOidsFilePath} does not exist` ); @@ -93562,7 +91117,7 @@ var Features = class { this.gitHubFeatureFlags = new GitHubFeatureFlags( gitHubVersion, repositoryNwo, - path4.join(tempDir, FEATURE_FLAGS_FILE_NAME), + path8.join(tempDir, FEATURE_FLAGS_FILE_NAME), logger ); } @@ -93741,12 +91296,12 @@ var GitHubFeatureFlags = class { } async readLocalFlags() { try { - if (fs4.existsSync(this.featureFlagsFile)) { + if (fs7.existsSync(this.featureFlagsFile)) { this.logger.debug( `Loading feature flags from ${this.featureFlagsFile}` ); return JSON.parse( - fs4.readFileSync(this.featureFlagsFile, "utf8") + fs7.readFileSync(this.featureFlagsFile, "utf8") ); } } catch (e) { @@ -93759,7 +91314,7 @@ var GitHubFeatureFlags = class { async writeLocalFlags(flags) { try { this.logger.debug(`Writing feature flags to ${this.featureFlagsFile}`); - fs4.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); + fs7.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); } catch (e) { this.logger.warning( `Error writing cached feature flags file ${this.featureFlagsFile}: ${e}.` @@ -93838,12 +91393,12 @@ async function getDiffInformedAnalysisBranches(codeql, features, logger) { return branches; } function getDiffRangesJsonFilePath() { - return path5.join(getTemporaryDirectory(), "pr-diff-range.json"); + return path9.join(getTemporaryDirectory(), "pr-diff-range.json"); } function writeDiffRangesJsonFile(logger, ranges) { const jsonContents = JSON.stringify(ranges, null, 2); const jsonFilePath = getDiffRangesJsonFilePath(); - fs5.writeFileSync(jsonFilePath, jsonContents); + fs8.writeFileSync(jsonFilePath, jsonContents); logger.debug( `Wrote pr-diff-range JSON file to ${jsonFilePath}: ${jsonContents}` @@ -93851,11 +91406,11 @@ ${jsonContents}` } function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); - if (!fs5.existsSync(jsonFilePath)) { + if (!fs8.existsSync(jsonFilePath)) { logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`); return void 0; } - const jsonContents = fs5.readFileSync(jsonFilePath, "utf8"); + const jsonContents = fs8.readFileSync(jsonFilePath, "utf8"); logger.debug( `Read pr-diff-range JSON file from ${jsonFilePath}: ${jsonContents}` @@ -94027,14 +91582,14 @@ var PACK_IDENTIFIER_PATTERN = (function() { return new RegExp(`^${component}/${component}$`); })(); function getPathToParsedConfigFile(tempDir) { - return path6.join(tempDir, "config"); + return path10.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); - if (!fs6.existsSync(configFile)) { + if (!fs9.existsSync(configFile)) { return void 0; } - const configString = fs6.readFileSync(configFile, "utf8"); + const configString = fs9.readFileSync(configFile, "utf8"); logger.debug("Loaded config:"); logger.debug(configString); return JSON.parse(configString); @@ -94090,8 +91645,8 @@ function isCodeQualityEnabled(config) { } // src/setup-codeql.ts -var fs9 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var fs12 = __toESM(require("fs")); +var path12 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver7 = __toESM(require_semver2()); @@ -94149,7 +91704,7 @@ var v4_default = v4; // src/tar.ts var import_child_process = require("child_process"); -var fs7 = __toESM(require("fs")); +var fs10 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -94222,7 +91777,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs7.mkdirSync(dest, { recursive: true }); + fs10.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -94306,9 +91861,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs8 = __toESM(require("fs")); +var fs11 = __toESM(require("fs")); var os2 = __toESM(require("os")); -var path7 = __toESM(require("path")); +var path11 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -94413,7 +91968,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs8.mkdirSync(dest, { recursive: true }); + fs11.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -94441,7 +91996,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path7.join( + return path11.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver6.clean(version) || version, @@ -94450,7 +92005,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs8.writeFileSync(markerFilePath, ""); + fs11.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url2) { @@ -94581,7 +92136,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs9.existsSync(path8.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs12.existsSync(path12.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -94914,12 +92469,12 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path8.join(tempDir, v4_default()); + return path12.join(tempDir, v4_default()); } // src/tracer-config.ts -var fs10 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var fs13 = __toESM(require("fs")); +var path13 = __toESM(require("path")); async function shouldEnableIndirectTracing(codeql, config) { if (config.buildMode === "none" /* None */) { return false; @@ -94934,18 +92489,18 @@ async function endTracingForCluster(codeql, config, logger) { logger.info( "Unsetting build tracing environment variables. Subsequent steps of this job will not be traced." ); - const envVariablesFile = path9.resolve( + const envVariablesFile = path13.resolve( config.dbLocation, "temp/tracingEnvironment/end-tracing.json" ); - if (!fs10.existsSync(envVariablesFile)) { + if (!fs13.existsSync(envVariablesFile)) { throw new Error( `Environment file for ending tracing not found: ${envVariablesFile}` ); } try { const endTracingEnvVariables = JSON.parse( - fs10.readFileSync(envVariablesFile, "utf8") + fs13.readFileSync(envVariablesFile, "utf8") ); for (const [key, value] of Object.entries(endTracingEnvVariables)) { if (value !== null) { @@ -94990,7 +92545,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path10.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path14.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -95051,12 +92606,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path10.join( + const tracingConfigPath = path14.join( extractorPath, "tools", "tracing-config.lua" ); - return fs11.existsSync(tracingConfigPath); + return fs14.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -95127,7 +92682,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path10.join( + const autobuildCmd = path14.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -95515,7 +93070,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs11.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs14.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -95538,7 +93093,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path10.resolve(config.tempDir, "user-config.yaml"); + return path14.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -95608,7 +93163,7 @@ async function runAutobuild(config, language, logger) { var os3 = __toESM(require("os")); var import_path = require("path"); var actionsCache3 = __toESM(require_cache3()); -var glob = __toESM(require_glob3()); +var glob = __toESM(require_glob2()); var CODEQL_DEPENDENCY_CACHE_PREFIX = "codeql-dependencies"; var CODEQL_DEPENDENCY_CACHE_VERSION = 1; function getJavaTempDependencyDir() { @@ -95810,7 +93365,7 @@ function dbIsFinalized(config, language, logger) { const dbPath = getCodeQLDatabasePath(config, language); try { const dbInfo = load( - fs12.readFileSync(path12.resolve(dbPath, "codeql-database.yml"), "utf8") + fs15.readFileSync(path16.resolve(dbPath, "codeql-database.yml"), "utf8") ); return !("inProgress" in dbInfo); } catch { @@ -95925,7 +93480,7 @@ Error Response: ${JSON.stringify(error2.response, null, 2)}` } } function getDiffRanges(fileDiff, logger) { - const filename = path12.join(getRequiredInput("checkout_path"), fileDiff.filename).replaceAll(path12.sep, "/"); + const filename = path16.join(getRequiredInput("checkout_path"), fileDiff.filename).replaceAll(path16.sep, "/"); if (fileDiff.patch === void 0) { if (fileDiff.changes === 0) { return []; @@ -95987,10 +93542,10 @@ function writeDiffRangeDataExtensionPack(logger, ranges) { if (ranges.length === 0) { ranges = [{ path: "", startLine: 0, endLine: 0 }]; } - const diffRangeDir = path12.join(getTemporaryDirectory(), "pr-diff-range"); - fs12.mkdirSync(diffRangeDir, { recursive: true }); - fs12.writeFileSync( - path12.join(diffRangeDir, "qlpack.yml"), + const diffRangeDir = path16.join(getTemporaryDirectory(), "pr-diff-range"); + fs15.mkdirSync(diffRangeDir, { recursive: true }); + fs15.writeFileSync( + path16.join(diffRangeDir, "qlpack.yml"), ` name: codeql-action/pr-diff-range version: 0.0.0 @@ -96022,8 +93577,8 @@ extensions: data = ' - ["", 0, 0]\n'; } const extensionContents = header + data; - const extensionFilePath = path12.join(diffRangeDir, "pr-diff-range.yml"); - fs12.writeFileSync(extensionFilePath, extensionContents); + const extensionFilePath = path16.join(diffRangeDir, "pr-diff-range.yml"); + fs15.writeFileSync(extensionFilePath, extensionContents); logger.debug( `Wrote pr-diff-range extension pack to ${extensionFilePath}: ${extensionContents}` @@ -96065,7 +93620,7 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, const sarifRunPropertyFlag = incrementalMode.length > 0 ? `--sarif-run-property=incrementalMode=${incrementalMode.join(",")}` : void 0; for (const language of config.languages) { try { - const sarifFile = path12.join(sarifFolder, `${language}.sarif`); + const sarifFile = path16.join(sarifFolder, `${language}.sarif`); const queries = []; if (isCodeQualityEnabled(config)) { queries.push(getGeneratedSuitePath(config, language)); @@ -96095,7 +93650,7 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, logger, automationDetailsId ); - const qualitySarifFile = path12.join( + const qualitySarifFile = path16.join( sarifFolder, `${language}.quality.sarif` ); @@ -96160,7 +93715,7 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, } function getPerQueryAlertCounts(sarifPath) { const sarifObject = JSON.parse( - fs12.readFileSync(sarifPath, "utf8") + fs15.readFileSync(sarifPath, "utf8") ); const perQueryAlertCounts = {}; for (const sarifRun of sarifObject.runs) { @@ -96178,13 +93733,13 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, } async function runFinalize(outputDir, threadsFlag, memoryFlag, codeql, config, logger) { try { - await (0, import_del2.default)(outputDir, { force: true }); + await deleteAsync(outputDir, { force: true }); } catch (error2) { if (error2?.code !== "ENOENT") { throw error2; } } - await fs12.promises.mkdir(outputDir, { recursive: true }); + await fs15.promises.mkdir(outputDir, { recursive: true }); const timings = await finalizeDatabaseCreation( codeql, config, @@ -96227,7 +93782,7 @@ async function warnIfGoInstalledAfterInit(config, logger) { } // src/database-upload.ts -var fs13 = __toESM(require("fs")); +var fs16 = __toESM(require("fs")); async function uploadDatabases(repositoryNwo, codeql, config, apiDetails, logger) { if (getRequiredInput("upload-database") !== "true") { logger.debug("Database upload disabled in workflow. Skipping upload."); @@ -96258,8 +93813,8 @@ async function uploadDatabases(repositoryNwo, codeql, config, apiDetails, logger for (const language of config.languages) { try { const bundledDb = await bundleDb(config, language, codeql, language); - const bundledDbSize = fs13.statSync(bundledDb).size; - const bundledDbReadStream = fs13.createReadStream(bundledDb); + const bundledDbSize = fs16.statSync(bundledDb).size; + const bundledDbReadStream = fs16.createReadStream(bundledDb); const commitOid = await getCommitOid( getRequiredInput("checkout_path") ); @@ -96467,15 +94022,15 @@ async function sendStatusReport(statusReport) { } // src/upload-lib.ts -var fs15 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var fs18 = __toESM(require("fs")); +var path18 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core13 = __toESM(require_core()); var jsonschema = __toESM(require_lib2()); // src/fingerprints.ts -var fs14 = __toESM(require("fs")); +var fs17 = __toESM(require("fs")); var import_path3 = __toESM(require("path")); // node_modules/long/index.js @@ -97463,7 +95018,7 @@ async function hash(callback, filepath) { } updateHash(current); }; - const readStream = fs14.createReadStream(filepath, "utf8"); + const readStream = fs17.createReadStream(filepath, "utf8"); for await (const data of readStream) { for (let i = 0; i < data.length; ++i) { processCharacter(data.charCodeAt(i)); @@ -97538,11 +95093,11 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { if (!import_path3.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } - if (!fs14.existsSync(uri)) { + if (!fs17.existsSync(uri)) { logger.debug(`Unable to compute fingerprint for non-existent file: ${uri}`); return void 0; } - if (fs14.statSync(uri).isDirectory()) { + if (fs17.statSync(uri).isDirectory()) { logger.debug(`Unable to compute fingerprint for directory: ${uri}`); return void 0; } @@ -97639,7 +95194,7 @@ function combineSarifFiles(sarifFiles, logger) { for (const sarifFile of sarifFiles) { logger.debug(`Loading SARIF file: ${sarifFile}`); const sarifObject = JSON.parse( - fs15.readFileSync(sarifFile, "utf8") + fs18.readFileSync(sarifFile, "utf8") ); if (combinedSarif.version === null) { combinedSarif.version = sarifObject.version; @@ -97711,7 +95266,7 @@ async function shouldDisableCombineSarifFiles(sarifObjects, githubVersion) { async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger) { logger.info("Combining SARIF files using the CodeQL CLI"); const sarifObjects = sarifFiles.map((sarifFile) => { - return JSON.parse(fs15.readFileSync(sarifFile, "utf8")); + return JSON.parse(fs18.readFileSync(sarifFile, "utf8")); }); const deprecationWarningMessage = gitHubVersion.type === 1 /* GHES */ ? "and will be removed in GitHub Enterprise Server 3.18" : "and will be removed in July 2025"; const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-from-a-single-upload"; @@ -97781,14 +95336,14 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo } return combineSarifFiles(sarifFiles, logger); } - const baseTempDir = path14.resolve(tempDir, "combined-sarif"); - fs15.mkdirSync(baseTempDir, { recursive: true }); - const outputDirectory = fs15.mkdtempSync(path14.resolve(baseTempDir, "output-")); - const outputFile = path14.resolve(outputDirectory, "combined-sarif.sarif"); + const baseTempDir = path18.resolve(tempDir, "combined-sarif"); + fs18.mkdirSync(baseTempDir, { recursive: true }); + const outputDirectory = fs18.mkdtempSync(path18.resolve(baseTempDir, "output-")); + const outputFile = path18.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); - return JSON.parse(fs15.readFileSync(outputFile, "utf8")); + return JSON.parse(fs18.readFileSync(outputFile, "utf8")); } function populateRunAutomationDetails(sarif, category, analysis_key, environment) { const automationID = getAutomationID(category, analysis_key, environment); @@ -97817,7 +95372,7 @@ function getAutomationID(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, target) { logger.info("Uploading results"); if (isInTestMode()) { - const payloadSaveFile = path14.join( + const payloadSaveFile = path18.join( getTemporaryDirectory(), "payload.json" ); @@ -97825,7 +95380,7 @@ async function uploadPayload(payload, repositoryNwo, logger, target) { `In test mode. Results are not uploaded. Saving to ${payloadSaveFile}` ); logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`); - fs15.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); + fs18.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); return "test-mode-sarif-id"; } const client = getApiClient(); @@ -97858,12 +95413,12 @@ async function uploadPayload(payload, repositoryNwo, logger, target) { function findSarifFilesInDir(sarifPath, isSarif) { const sarifFiles = []; const walkSarifFiles = (dir) => { - const entries = fs15.readdirSync(dir, { withFileTypes: true }); + const entries = fs18.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path14.resolve(dir, entry.name)); + sarifFiles.push(path18.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path14.resolve(dir, entry.name)); + walkSarifFiles(path18.resolve(dir, entry.name)); } } }; @@ -97871,11 +95426,11 @@ function findSarifFilesInDir(sarifPath, isSarif) { return sarifFiles; } function getSarifFilePaths(sarifPath, isSarif) { - if (!fs15.existsSync(sarifPath)) { + if (!fs18.existsSync(sarifPath)) { throw new ConfigurationError(`Path does not exist: ${sarifPath}`); } let sarifFiles; - if (fs15.lstatSync(sarifPath).isDirectory()) { + if (fs18.lstatSync(sarifPath).isDirectory()) { sarifFiles = findSarifFilesInDir(sarifPath, isSarif); if (sarifFiles.length === 0) { throw new ConfigurationError( @@ -97905,7 +95460,7 @@ function countResultsInSarif(sarif) { } function readSarifFile(sarifFilePath) { try { - return JSON.parse(fs15.readFileSync(sarifFilePath, "utf8")); + return JSON.parse(fs18.readFileSync(sarifFilePath, "utf8")); } catch (e) { throw new InvalidSarifUploadError( `Invalid SARIF. JSON syntax error: ${getErrorMessage(e)}` @@ -97974,7 +95529,7 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo payloadObj.base_sha = mergeBaseCommitOid; } else if (process.env.GITHUB_EVENT_PATH) { const githubEvent = JSON.parse( - fs15.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8") + fs18.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8") ); payloadObj.base_ref = `refs/heads/${githubEvent.pull_request.base.ref}`; payloadObj.base_sha = githubEvent.pull_request.base.sha; @@ -98224,7 +95779,7 @@ function filterAlertsByDiffRange(logger, sarif) { if (!locationUri || locationStartLine === void 0) { return false; } - const locationPath = path14.join(checkoutPath, locationUri).replaceAll(path14.sep, "/"); + const locationPath = path18.join(checkoutPath, locationUri).replaceAll(path18.sep, "/"); return diffRanges.some( (range) => range.path === locationPath && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0) ); @@ -98278,7 +95833,7 @@ function doesGoExtractionOutputExist(config) { "go" /* go */ ); const trapDirectory = import_path4.default.join(golangDbDirectory, "trap", "go" /* go */); - return fs16.existsSync(trapDirectory) && fs16.readdirSync(trapDirectory).some( + return fs19.existsSync(trapDirectory) && fs19.readdirSync(trapDirectory).some( (fileName) => [ ".trap", ".trap.gz", diff --git a/lib/autobuild-action.js b/lib/autobuild-action.js index 83691a20e..dd81e0d38 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -24525,9819 +24525,8 @@ var require_github = __commonJS({ } }); -// node_modules/array-union/index.js -var require_array_union = __commonJS({ - "node_modules/array-union/index.js"(exports2, module2) { - "use strict"; - module2.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; - }; - } -}); - -// node_modules/merge2/index.js -var require_merge2 = __commonJS({ - "node_modules/merge2/index.js"(exports2, module2) { - "use strict"; - var Stream = require("stream"); - var PassThrough = Stream.PassThrough; - var slice = Array.prototype.slice; - module2.exports = merge2; - function merge2() { - const streamsQueue = []; - const args = slice.call(arguments); - let merging = false; - let options = args[args.length - 1]; - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop(); - } else { - options = {}; - } - const doEnd = options.end !== false; - const doPipeError = options.pipeError === true; - if (options.objectMode == null) { - options.objectMode = true; - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024; - } - const mergedStream = PassThrough(options); - function addStream() { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)); - } - mergeStream(); - return this; - } - function mergeStream() { - if (merging) { - return; - } - merging = true; - let streams = streamsQueue.shift(); - if (!streams) { - process.nextTick(endStream); - return; - } - if (!Array.isArray(streams)) { - streams = [streams]; - } - let pipesCount = streams.length + 1; - function next() { - if (--pipesCount > 0) { - return; - } - merging = false; - mergeStream(); - } - function pipe(stream) { - function onend() { - stream.removeListener("merge2UnpipeEnd", onend); - stream.removeListener("end", onend); - if (doPipeError) { - stream.removeListener("error", onerror); - } - next(); - } - function onerror(err) { - mergedStream.emit("error", err); - } - if (stream._readableState.endEmitted) { - return next(); - } - stream.on("merge2UnpipeEnd", onend); - stream.on("end", onend); - if (doPipeError) { - stream.on("error", onerror); - } - stream.pipe(mergedStream, { end: false }); - stream.resume(); - } - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]); - } - next(); - } - function endStream() { - merging = false; - mergedStream.emit("queueDrain"); - if (doEnd) { - mergedStream.end(); - } - } - mergedStream.setMaxListeners(0); - mergedStream.add = addStream; - mergedStream.on("unpipe", function(stream) { - stream.emit("merge2UnpipeEnd"); - }); - if (args.length) { - addStream.apply(null, args); - } - return mergedStream; - } - function pauseStreams(streams, options) { - if (!Array.isArray(streams)) { - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)); - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error("Only readable stream can be merged."); - } - streams.pause(); - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options); - } - } - return streams; - } - } -}); - -// node_modules/fast-glob/out/utils/array.js -var require_array = __commonJS({ - "node_modules/fast-glob/out/utils/array.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.splitWhen = exports2.flatten = void 0; - function flatten(items) { - return items.reduce((collection, item) => [].concat(collection, item), []); - } - exports2.flatten = flatten; - function splitWhen(items, predicate) { - const result = [[]]; - let groupIndex = 0; - for (const item of items) { - if (predicate(item)) { - groupIndex++; - result[groupIndex] = []; - } else { - result[groupIndex].push(item); - } - } - return result; - } - exports2.splitWhen = splitWhen; - } -}); - -// node_modules/fast-glob/out/utils/errno.js -var require_errno = __commonJS({ - "node_modules/fast-glob/out/utils/errno.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEnoentCodeError = void 0; - function isEnoentCodeError(error2) { - return error2.code === "ENOENT"; - } - exports2.isEnoentCodeError = isEnoentCodeError; - } -}); - -// node_modules/fast-glob/out/utils/fs.js -var require_fs = __commonJS({ - "node_modules/fast-glob/out/utils/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports2.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/fast-glob/out/utils/path.js -var require_path = __commonJS({ - "node_modules/fast-glob/out/utils/path.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0; - var os2 = require("os"); - var path7 = require("path"); - var IS_WINDOWS_PLATFORM = os2.platform() === "win32"; - var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; - var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; - var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; - var DOS_DEVICE_PATH_RE = /^\\\\([.?])/; - var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; - function unixify(filepath) { - return filepath.replace(/\\/g, "/"); - } - exports2.unixify = unixify; - function makeAbsolute(cwd, filepath) { - return path7.resolve(cwd, filepath); - } - exports2.makeAbsolute = makeAbsolute; - function removeLeadingDotSegment(entry) { - if (entry.charAt(0) === ".") { - const secondCharactery = entry.charAt(1); - if (secondCharactery === "/" || secondCharactery === "\\") { - return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); - } - } - return entry; - } - exports2.removeLeadingDotSegment = removeLeadingDotSegment; - exports2.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; - function escapeWindowsPath(pattern) { - return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports2.escapeWindowsPath = escapeWindowsPath; - function escapePosixPath(pattern) { - return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports2.escapePosixPath = escapePosixPath; - exports2.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; - function convertWindowsPathToPattern(filepath) { - return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/"); - } - exports2.convertWindowsPathToPattern = convertWindowsPathToPattern; - function convertPosixPathToPattern(filepath) { - return escapePosixPath(filepath); - } - exports2.convertPosixPathToPattern = convertPosixPathToPattern; - } -}); - -// node_modules/is-extglob/index.js -var require_is_extglob = __commonJS({ - "node_modules/is-extglob/index.js"(exports2, module2) { - module2.exports = function isExtglob(str2) { - if (typeof str2 !== "string" || str2 === "") { - return false; - } - var match; - while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str2)) { - if (match[2]) return true; - str2 = str2.slice(match.index + match[0].length); - } - return false; - }; - } -}); - -// node_modules/is-glob/index.js -var require_is_glob = __commonJS({ - "node_modules/is-glob/index.js"(exports2, module2) { - var isExtglob = require_is_extglob(); - var chars = { "{": "}", "(": ")", "[": "]" }; - var strictCheck = function(str2) { - if (str2[0] === "!") { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str2.length) { - if (str2[index] === "*") { - return true; - } - if (str2[index + 1] === "?" && /[\].+)]/.test(str2[index])) { - return true; - } - if (closeSquareIndex !== -1 && str2[index] === "[" && str2[index + 1] !== "]") { - if (closeSquareIndex < index) { - closeSquareIndex = str2.indexOf("]", index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - if (closeCurlyIndex !== -1 && str2[index] === "{" && str2[index + 1] !== "}") { - closeCurlyIndex = str2.indexOf("}", index); - if (closeCurlyIndex > index) { - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - if (closeParenIndex !== -1 && str2[index] === "(" && str2[index + 1] === "?" && /[:!=]/.test(str2[index + 2]) && str2[index + 3] !== ")") { - closeParenIndex = str2.indexOf(")", index); - if (closeParenIndex > index) { - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - if (pipeIndex !== -1 && str2[index] === "(" && str2[index + 1] !== "|") { - if (pipeIndex < index) { - pipeIndex = str2.indexOf("|", index); - } - if (pipeIndex !== -1 && str2[pipeIndex + 1] !== ")") { - closeParenIndex = str2.indexOf(")", pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str2.indexOf("\\", pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - if (str2[index] === "\\") { - var open = str2[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str2.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str2[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - var relaxedCheck = function(str2) { - if (str2[0] === "!") { - return true; - } - var index = 0; - while (index < str2.length) { - if (/[*?{}()[\]]/.test(str2[index])) { - return true; - } - if (str2[index] === "\\") { - var open = str2[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str2.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str2[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - module2.exports = function isGlob(str2, options) { - if (typeof str2 !== "string" || str2 === "") { - return false; - } - if (isExtglob(str2)) { - return true; - } - var check = strictCheck; - if (options && options.strict === false) { - check = relaxedCheck; - } - return check(str2); - }; - } -}); - -// node_modules/glob-parent/index.js -var require_glob_parent = __commonJS({ - "node_modules/glob-parent/index.js"(exports2, module2) { - "use strict"; - var isGlob = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str2, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); - } - if (enclosure.test(str2)) { - str2 += slash; - } - str2 += "a"; - do { - str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); - return str2.replace(escaped, "$1"); - }; - } -}); - -// node_modules/braces/lib/utils.js -var require_utils5 = __commonJS({ - "node_modules/braces/lib/utils.js"(exports2) { - "use strict"; - exports2.isInteger = (num) => { - if (typeof num === "number") { - return Number.isInteger(num); - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isInteger(Number(num)); - } - return false; - }; - exports2.find = (node, type2) => node.nodes.find((node2) => node2.type === type2); - exports2.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports2.isInteger(min) || !exports2.isInteger(max)) return false; - return (Number(max) - Number(min)) / Number(step) >= limit; - }; - exports2.escapeNode = (block, n = 0, type2) => { - const node = block.nodes[n]; - if (!node) return; - if (type2 && node.type === type2 || node.type === "open" || node.type === "close") { - if (node.escaped !== true) { - node.value = "\\" + node.value; - node.escaped = true; - } - } - }; - exports2.encloseBrace = (node) => { - if (node.type !== "brace") return false; - if (node.commas >> 0 + node.ranges >> 0 === 0) { - node.invalid = true; - return true; - } - return false; - }; - exports2.isInvalidBrace = (block) => { - if (block.type !== "brace") return false; - if (block.invalid === true || block.dollar) return true; - if (block.commas >> 0 + block.ranges >> 0 === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; - }; - exports2.isOpenOrClose = (node) => { - if (node.type === "open" || node.type === "close") { - return true; - } - return node.open === true || node.close === true; - }; - exports2.reduce = (nodes) => nodes.reduce((acc, node) => { - if (node.type === "text") acc.push(node.value); - if (node.type === "range") node.type = "text"; - return acc; - }, []); - exports2.flatten = (...args) => { - const result = []; - const flat = (arr) => { - for (let i = 0; i < arr.length; i++) { - const ele = arr[i]; - if (Array.isArray(ele)) { - flat(ele); - continue; - } - if (ele !== void 0) { - result.push(ele); - } - } - return result; - }; - flat(args); - return result; - }; - } -}); - -// node_modules/braces/lib/stringify.js -var require_stringify = __commonJS({ - "node_modules/braces/lib/stringify.js"(exports2, module2) { - "use strict"; - var utils = require_utils5(); - module2.exports = (ast, options = {}) => { - const stringify = (node, parent = {}) => { - const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ""; - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return "\\" + node.value; - } - return node.value; - } - if (node.value) { - return node.value; - } - if (node.nodes) { - for (const child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - return stringify(ast); - }; - } -}); - -// node_modules/is-number/index.js -var require_is_number = __commonJS({ - "node_modules/is-number/index.js"(exports2, module2) { - "use strict"; - module2.exports = function(num) { - if (typeof num === "number") { - return num - num === 0; - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; - }; - } -}); - -// node_modules/to-regex-range/index.js -var require_to_regex_range = __commonJS({ - "node_modules/to-regex-range/index.js"(exports2, module2) { - "use strict"; - var isNumber = require_is_number(); - var toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError("toRegexRange: expected the first argument to be a number"); - } - if (max === void 0 || min === max) { - return String(min); - } - if (isNumber(max) === false) { - throw new TypeError("toRegexRange: expected the second argument to be a number."); - } - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === "boolean") { - opts.relaxZeros = opts.strictZeros === false; - } - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap; - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - let a = Math.min(min, max); - let b = Math.max(min, max); - if (Math.abs(a - b) === 1) { - let result = min + "|" + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && positives.length + negatives.length > 1) { - state.result = `(?:${state.result})`; - } - toRegexRange.cache[cacheKey] = state; - return state.result; - }; - function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, "-", false, options) || []; - let onlyPositive = filterPatterns(pos, neg, "", false, options) || []; - let intersected = filterPatterns(neg, pos, "-?", true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join("|"); - } - function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - let stop = countNines(min, nines); - let stops = /* @__PURE__ */ new Set([max]); - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - stop = countZeros(max + 1, zeros) - 1; - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - stops = [...stops]; - stops.sort(compare); - return stops; - } - function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ""; - let count = 0; - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - if (startDigit === stopDigit) { - pattern += startDigit; - } else if (startDigit !== "0" || stopDigit !== "9") { - pattern += toCharacterClass(startDigit, stopDigit, options); - } else { - count++; - } - } - if (count) { - pattern += options.shorthand === true ? "\\d" : "[0-9]"; - } - return { pattern, count: [count], digits }; - } - function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - for (let i = 0; i < ranges.length; i++) { - let max2 = ranges[i]; - let obj = rangeToPattern(String(start), String(max2), options); - let zeros = ""; - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max2 + 1; - continue; - } - if (tok.isPadded) { - zeros = padZeros(max2, tok, options); - } - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max2 + 1; - prev = obj; - } - return tokens; - } - function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - for (let ele of arr) { - let { string } = ele; - if (!intersection && !contains(comparison, "string", string)) { - result.push(prefix + string); - } - if (intersection && contains(comparison, "string", string)) { - result.push(prefix + string); - } - } - return result; - } - function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; - } - function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; - } - function contains(arr, key, val2) { - return arr.some((ele) => ele[key] === val2); - } - function countNines(min, len) { - return Number(String(min).slice(0, -len) + "9".repeat(len)); - } - function countZeros(integer, zeros) { - return integer - integer % Math.pow(10, zeros); - } - function toQuantifier(digits) { - let [start = 0, stop = ""] = digits; - if (stop || start > 1) { - return `{${start + (stop ? "," + stop : "")}}`; - } - return ""; - } - function toCharacterClass(a, b, options) { - return `[${a}${b - a === 1 ? "" : "-"}${b}]`; - } - function hasPadding(str2) { - return /^-?(0+)\d/.test(str2); - } - function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - switch (diff) { - case 0: - return ""; - case 1: - return relax ? "0?" : "0"; - case 2: - return relax ? "0{0,2}" : "00"; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } - } - toRegexRange.cache = {}; - toRegexRange.clearCache = () => toRegexRange.cache = {}; - module2.exports = toRegexRange; - } -}); - -// node_modules/fill-range/index.js -var require_fill_range = __commonJS({ - "node_modules/fill-range/index.js"(exports2, module2) { - "use strict"; - var util = require("util"); - var toRegexRange = require_to_regex_range(); - var isObject2 = (val2) => val2 !== null && typeof val2 === "object" && !Array.isArray(val2); - var transform = (toNumber) => { - return (value) => toNumber === true ? Number(value) : String(value); - }; - var isValidValue = (value) => { - return typeof value === "number" || typeof value === "string" && value !== ""; - }; - var isNumber = (num) => Number.isInteger(+num); - var zeros = (input) => { - let value = `${input}`; - let index = -1; - if (value[0] === "-") value = value.slice(1); - if (value === "0") return false; - while (value[++index] === "0") ; - return index > 0; - }; - var stringify = (start, end, options) => { - if (typeof start === "string" || typeof end === "string") { - return true; - } - return options.stringify === true; - }; - var pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === "-" ? "-" : ""; - if (dash) input = input.slice(1); - input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); - } - if (toNumber === false) { - return String(input); - } - return input; - }; - var toMaxLen = (input, maxLength) => { - let negative = input[0] === "-" ? "-" : ""; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = "0" + input; - return negative ? "-" + input : input; - }; - var toSequence = (parts, options, maxLen) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - let prefix = options.capture ? "" : "?:"; - let positives = ""; - let negatives = ""; - let result; - if (parts.positives.length) { - positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|"); - } - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`; - } - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - if (options.wrap) { - return `(${prefix}${result})`; - } - return result; - }; - var toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - let start = String.fromCharCode(a); - if (a === b) return start; - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; - }; - var toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? "" : "?:"; - return wrap ? `(${prefix}${start.join("|")})` : start.join("|"); - } - return toRegexRange(start, end, options); - }; - var rangeError = (...args) => { - return new RangeError("Invalid range arguments: " + util.inspect(...args)); - }; - var invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - }; - var invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; - }; - var fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - if (a === 0) a = 0; - if (b === 0) b = 0; - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - let parts = { negatives: [], positives: [] }; - let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: false, ...options }); - } - return range; - }; - var fillLetters = (start, end, step = 1, options = {}) => { - if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) { - return invalidRange(start, end, options); - } - let format = options.transform || ((val2) => String.fromCharCode(val2)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - return range; - }; - var fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - if (typeof step === "function") { - return fill(start, end, 1, { transform: step }); - } - if (isObject2(step)) { - return fill(start, end, 0, step); - } - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - if (!isNumber(step)) { - if (step != null && !isObject2(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); - }; - module2.exports = fill; - } -}); - -// node_modules/braces/lib/compile.js -var require_compile = __commonJS({ - "node_modules/braces/lib/compile.js"(exports2, module2) { - "use strict"; - var fill = require_fill_range(); - var utils = require_utils5(); - var compile = (ast, options = {}) => { - const walk = (node, parent = {}) => { - const invalidBlock = utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - const invalid = invalidBlock === true || invalidNode === true; - const prefix = options.escapeInvalid === true ? "\\" : ""; - let output = ""; - if (node.isOpen === true) { - return prefix + node.value; - } - if (node.isClose === true) { - console.log("node.isClose", prefix, node.value); - return prefix + node.value; - } - if (node.type === "open") { - return invalid ? prefix + node.value : "("; - } - if (node.type === "close") { - return invalid ? prefix + node.value : ")"; - } - if (node.type === "comma") { - return node.prev.type === "comma" ? "" : invalid ? node.value : "|"; - } - if (node.value) { - return node.value; - } - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - if (node.nodes) { - for (const child of node.nodes) { - output += walk(child, node); - } - } - return output; - }; - return walk(ast); - }; - module2.exports = compile; - } -}); - -// node_modules/braces/lib/expand.js -var require_expand = __commonJS({ - "node_modules/braces/lib/expand.js"(exports2, module2) { - "use strict"; - var fill = require_fill_range(); - var stringify = require_stringify(); - var utils = require_utils5(); - var append = (queue = "", stash = "", enclose = false) => { - const result = []; - queue = [].concat(queue); - stash = [].concat(stash); - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash; - } - for (const item of queue) { - if (Array.isArray(item)) { - for (const value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === "string") ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); - } - } - } - return utils.flatten(result); - }; - var expand = (ast, options = {}) => { - const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit; - const walk = (node, parent = {}) => { - node.queue = []; - let p = parent; - let q = parent.queue; - while (p.type !== "brace" && p.type !== "root" && p.parent) { - p = p.parent; - q = p.queue; - } - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ["{}"])); - return; - } - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); - } - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - const enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - while (block.type !== "brace" && block.type !== "root" && block.parent) { - block = block.parent; - queue = block.queue; - } - for (let i = 0; i < node.nodes.length; i++) { - const child = node.nodes[i]; - if (child.type === "comma" && node.type === "brace") { - if (i === 1) queue.push(""); - queue.push(""); - continue; - } - if (child.type === "close") { - q.push(append(q.pop(), queue, enclose)); - continue; - } - if (child.value && child.type !== "open") { - queue.push(append(queue.pop(), child.value)); - continue; - } - if (child.nodes) { - walk(child, node); - } - } - return queue; - }; - return utils.flatten(walk(ast)); - }; - module2.exports = expand; - } -}); - -// node_modules/braces/lib/constants.js -var require_constants6 = __commonJS({ - "node_modules/braces/lib/constants.js"(exports2, module2) { - "use strict"; - module2.exports = { - MAX_LENGTH: 1e4, - // Digits - CHAR_0: "0", - /* 0 */ - CHAR_9: "9", - /* 9 */ - // Alphabet chars. - CHAR_UPPERCASE_A: "A", - /* A */ - CHAR_LOWERCASE_A: "a", - /* a */ - CHAR_UPPERCASE_Z: "Z", - /* Z */ - CHAR_LOWERCASE_Z: "z", - /* z */ - CHAR_LEFT_PARENTHESES: "(", - /* ( */ - CHAR_RIGHT_PARENTHESES: ")", - /* ) */ - CHAR_ASTERISK: "*", - /* * */ - // Non-alphabetic chars. - CHAR_AMPERSAND: "&", - /* & */ - CHAR_AT: "@", - /* @ */ - CHAR_BACKSLASH: "\\", - /* \ */ - CHAR_BACKTICK: "`", - /* ` */ - CHAR_CARRIAGE_RETURN: "\r", - /* \r */ - CHAR_CIRCUMFLEX_ACCENT: "^", - /* ^ */ - CHAR_COLON: ":", - /* : */ - CHAR_COMMA: ",", - /* , */ - CHAR_DOLLAR: "$", - /* . */ - CHAR_DOT: ".", - /* . */ - CHAR_DOUBLE_QUOTE: '"', - /* " */ - CHAR_EQUAL: "=", - /* = */ - CHAR_EXCLAMATION_MARK: "!", - /* ! */ - CHAR_FORM_FEED: "\f", - /* \f */ - CHAR_FORWARD_SLASH: "/", - /* / */ - CHAR_HASH: "#", - /* # */ - CHAR_HYPHEN_MINUS: "-", - /* - */ - CHAR_LEFT_ANGLE_BRACKET: "<", - /* < */ - CHAR_LEFT_CURLY_BRACE: "{", - /* { */ - CHAR_LEFT_SQUARE_BRACKET: "[", - /* [ */ - CHAR_LINE_FEED: "\n", - /* \n */ - CHAR_NO_BREAK_SPACE: "\xA0", - /* \u00A0 */ - CHAR_PERCENT: "%", - /* % */ - CHAR_PLUS: "+", - /* + */ - CHAR_QUESTION_MARK: "?", - /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: ">", - /* > */ - CHAR_RIGHT_CURLY_BRACE: "}", - /* } */ - CHAR_RIGHT_SQUARE_BRACKET: "]", - /* ] */ - CHAR_SEMICOLON: ";", - /* ; */ - CHAR_SINGLE_QUOTE: "'", - /* ' */ - CHAR_SPACE: " ", - /* */ - CHAR_TAB: " ", - /* \t */ - CHAR_UNDERSCORE: "_", - /* _ */ - CHAR_VERTICAL_LINE: "|", - /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF" - /* \uFEFF */ - }; - } -}); - -// node_modules/braces/lib/parse.js -var require_parse2 = __commonJS({ - "node_modules/braces/lib/parse.js"(exports2, module2) { - "use strict"; - var stringify = require_stringify(); - var { - MAX_LENGTH, - CHAR_BACKSLASH, - /* \ */ - CHAR_BACKTICK, - /* ` */ - CHAR_COMMA: CHAR_COMMA2, - /* , */ - CHAR_DOT, - /* . */ - CHAR_LEFT_PARENTHESES, - /* ( */ - CHAR_RIGHT_PARENTHESES, - /* ) */ - CHAR_LEFT_CURLY_BRACE, - /* { */ - CHAR_RIGHT_CURLY_BRACE, - /* } */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, - /* [ */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2, - /* ] */ - CHAR_DOUBLE_QUOTE: CHAR_DOUBLE_QUOTE2, - /* " */ - CHAR_SINGLE_QUOTE: CHAR_SINGLE_QUOTE2, - /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE - } = require_constants6(); - var parse = (input, options = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - const opts = options || {}; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - const ast = { type: "root", input, nodes: [] }; - const stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - const length = input.length; - let index = 0; - let depth = 0; - let value; - const advance = () => input[index++]; - const push = (node) => { - if (node.type === "text" && prev.type === "dot") { - prev.type = "text"; - } - if (prev && prev.type === "text" && node.type === "text") { - prev.value += node.value; - return; - } - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - push({ type: "bos" }); - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - if (value === CHAR_BACKSLASH) { - push({ type: "text", value: (options.keepEscaping ? value : "") + advance() }); - continue; - } - if (value === CHAR_RIGHT_SQUARE_BRACKET2) { - push({ type: "text", value: "\\" + value }); - continue; - } - if (value === CHAR_LEFT_SQUARE_BRACKET2) { - brackets++; - let next; - while (index < length && (next = advance())) { - value += next; - if (next === CHAR_LEFT_SQUARE_BRACKET2) { - brackets++; - continue; - } - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { - brackets--; - if (brackets === 0) { - break; - } - } - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: "paren", nodes: [] }); - stack.push(block); - push({ type: "text", value }); - continue; - } - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== "paren") { - push({ type: "text", value }); - continue; - } - block = stack.pop(); - push({ type: "text", value }); - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_DOUBLE_QUOTE2 || value === CHAR_SINGLE_QUOTE2 || value === CHAR_BACKTICK) { - const open = value; - let next; - if (options.keepQuotes !== true) { - value = ""; - } - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - value += next; - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true; - const brace = { - type: "brace", - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - block = push(brace); - stack.push(block); - push({ type: "open", value }); - continue; - } - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== "brace") { - push({ type: "text", value }); - continue; - } - const type2 = "close"; - block = stack.pop(); - block.close = true; - push({ type: type2, value }); - depth--; - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_COMMA2 && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - const open = block.nodes.shift(); - block.nodes = [open, { type: "text", value: stringify(block) }]; - } - push({ type: "comma", value }); - block.commas++; - continue; - } - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - const siblings = block.nodes; - if (depth === 0 || siblings.length === 0) { - push({ type: "text", value }); - continue; - } - if (prev.type === "dot") { - block.range = []; - prev.value += value; - prev.type = "range"; - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = "text"; - continue; - } - block.ranges++; - block.args = []; - continue; - } - if (prev.type === "range") { - siblings.pop(); - const before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - push({ type: "dot", value }); - continue; - } - push({ type: "text", value }); - } - do { - block = stack.pop(); - if (block.type !== "root") { - block.nodes.forEach((node) => { - if (!node.nodes) { - if (node.type === "open") node.isOpen = true; - if (node.type === "close") node.isClose = true; - if (!node.nodes) node.type = "text"; - node.invalid = true; - } - }); - const parent = stack[stack.length - 1]; - const index2 = parent.nodes.indexOf(block); - parent.nodes.splice(index2, 1, ...block.nodes); - } - } while (stack.length > 0); - push({ type: "eos" }); - return ast; - }; - module2.exports = parse; - } -}); - -// node_modules/braces/index.js -var require_braces = __commonJS({ - "node_modules/braces/index.js"(exports2, module2) { - "use strict"; - var stringify = require_stringify(); - var compile = require_compile(); - var expand = require_expand(); - var parse = require_parse2(); - var braces = (input, options = {}) => { - let output = []; - if (Array.isArray(input)) { - for (const pattern of input) { - const result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; - }; - braces.parse = (input, options = {}) => parse(input, options); - braces.stringify = (input, options = {}) => { - if (typeof input === "string") { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); - }; - braces.compile = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - return compile(input, options); - }; - braces.expand = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - let result = expand(input, options); - if (options.noempty === true) { - result = result.filter(Boolean); - } - if (options.nodupes === true) { - result = [...new Set(result)]; - } - return result; - }; - braces.create = (input, options = {}) => { - if (input === "" || input.length < 3) { - return [input]; - } - return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); - }; - module2.exports = braces; - } -}); - -// node_modules/picomatch/lib/constants.js -var require_constants7 = __commonJS({ - "node_modules/picomatch/lib/constants.js"(exports2, module2) { - "use strict"; - var path7 = require("path"); - var WIN_SLASH = "\\\\/"; - var WIN_NO_SLASH = `[^${WIN_SLASH}]`; - var DOT_LITERAL = "\\."; - var PLUS_LITERAL = "\\+"; - var QMARK_LITERAL = "\\?"; - var SLASH_LITERAL = "\\/"; - var ONE_CHAR = "(?=.)"; - var QMARK = "[^/]"; - var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; - var START_ANCHOR = `(?:^|${SLASH_LITERAL})`; - var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; - var NO_DOT = `(?!${DOT_LITERAL})`; - var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; - var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; - var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; - var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; - var STAR = `${QMARK}*?`; - var POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR - }; - var WINDOWS_CHARS = { - ...POSIX_CHARS, - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` - }; - var POSIX_REGEX_SOURCE = { - alnum: "a-zA-Z0-9", - alpha: "a-zA-Z", - ascii: "\\x00-\\x7F", - blank: " \\t", - cntrl: "\\x00-\\x1F\\x7F", - digit: "0-9", - graph: "\\x21-\\x7E", - lower: "a-z", - print: "\\x20-\\x7E ", - punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", - space: " \\t\\r\\n\\v\\f", - upper: "A-Z", - word: "A-Za-z0-9_", - xdigit: "A-Fa-f0-9" - }; - module2.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - "***": "*", - "**/**": "**", - "**/**/**": "**" - }, - // Digits - CHAR_0: 48, - /* 0 */ - CHAR_9: 57, - /* 9 */ - // Alphabet chars. - CHAR_UPPERCASE_A: 65, - /* A */ - CHAR_LOWERCASE_A: 97, - /* a */ - CHAR_UPPERCASE_Z: 90, - /* Z */ - CHAR_LOWERCASE_Z: 122, - /* z */ - CHAR_LEFT_PARENTHESES: 40, - /* ( */ - CHAR_RIGHT_PARENTHESES: 41, - /* ) */ - CHAR_ASTERISK: 42, - /* * */ - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, - /* & */ - CHAR_AT: 64, - /* @ */ - CHAR_BACKWARD_SLASH: 92, - /* \ */ - CHAR_CARRIAGE_RETURN: 13, - /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, - /* ^ */ - CHAR_COLON: 58, - /* : */ - CHAR_COMMA: 44, - /* , */ - CHAR_DOT: 46, - /* . */ - CHAR_DOUBLE_QUOTE: 34, - /* " */ - CHAR_EQUAL: 61, - /* = */ - CHAR_EXCLAMATION_MARK: 33, - /* ! */ - CHAR_FORM_FEED: 12, - /* \f */ - CHAR_FORWARD_SLASH: 47, - /* / */ - CHAR_GRAVE_ACCENT: 96, - /* ` */ - CHAR_HASH: 35, - /* # */ - CHAR_HYPHEN_MINUS: 45, - /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, - /* < */ - CHAR_LEFT_CURLY_BRACE: 123, - /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, - /* [ */ - CHAR_LINE_FEED: 10, - /* \n */ - CHAR_NO_BREAK_SPACE: 160, - /* \u00A0 */ - CHAR_PERCENT: 37, - /* % */ - CHAR_PLUS: 43, - /* + */ - CHAR_QUESTION_MARK: 63, - /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, - /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, - /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, - /* ] */ - CHAR_SEMICOLON: 59, - /* ; */ - CHAR_SINGLE_QUOTE: 39, - /* ' */ - CHAR_SPACE: 32, - /* */ - CHAR_TAB: 9, - /* \t */ - CHAR_UNDERSCORE: 95, - /* _ */ - CHAR_VERTICAL_LINE: 124, - /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, - /* \uFEFF */ - SEP: path7.sep, - /** - * Create EXTGLOB_CHARS - */ - extglobChars(chars) { - return { - "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` }, - "?": { type: "qmark", open: "(?:", close: ")?" }, - "+": { type: "plus", open: "(?:", close: ")+" }, - "*": { type: "star", open: "(?:", close: ")*" }, - "@": { type: "at", open: "(?:", close: ")" } - }; - }, - /** - * Create GLOB_CHARS - */ - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } - }; - } -}); - -// node_modules/picomatch/lib/utils.js -var require_utils6 = __commonJS({ - "node_modules/picomatch/lib/utils.js"(exports2) { - "use strict"; - var path7 = require("path"); - var win32 = process.platform === "win32"; - var { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL - } = require_constants7(); - exports2.isObject = (val2) => val2 !== null && typeof val2 === "object" && !Array.isArray(val2); - exports2.hasRegexChars = (str2) => REGEX_SPECIAL_CHARS.test(str2); - exports2.isRegexChar = (str2) => str2.length === 1 && exports2.hasRegexChars(str2); - exports2.escapeRegex = (str2) => str2.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); - exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/"); - exports2.removeBackslashes = (str2) => { - return str2.replace(REGEX_REMOVE_BACKSLASH, (match) => { - return match === "\\" ? "" : match; - }); - }; - exports2.supportsLookbehinds = () => { - const segs = process.version.slice(1).split(".").map(Number); - if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) { - return true; - } - return false; - }; - exports2.isWindows = (options) => { - if (options && typeof options.windows === "boolean") { - return options.windows; - } - return win32 === true || path7.sep === "\\"; - }; - exports2.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === "\\") return exports2.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; - }; - exports2.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith("./")) { - output = output.slice(2); - state.prefix = "./"; - } - return output; - }; - exports2.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? "" : "^"; - const append = options.contains ? "" : "$"; - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; - }; - } -}); - -// node_modules/picomatch/lib/scan.js -var require_scan = __commonJS({ - "node_modules/picomatch/lib/scan.js"(exports2, module2) { - "use strict"; - var utils = require_utils6(); - var { - CHAR_ASTERISK: CHAR_ASTERISK2, - /* * */ - CHAR_AT, - /* @ */ - CHAR_BACKWARD_SLASH, - /* \ */ - CHAR_COMMA: CHAR_COMMA2, - /* , */ - CHAR_DOT, - /* . */ - CHAR_EXCLAMATION_MARK, - /* ! */ - CHAR_FORWARD_SLASH, - /* / */ - CHAR_LEFT_CURLY_BRACE, - /* { */ - CHAR_LEFT_PARENTHESES, - /* ( */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, - /* [ */ - CHAR_PLUS, - /* + */ - CHAR_QUESTION_MARK, - /* ? */ - CHAR_RIGHT_CURLY_BRACE, - /* } */ - CHAR_RIGHT_PARENTHESES, - /* ) */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2 - /* ] */ - } = require_constants7(); - var isPathSeparator = (code) => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; - }; - var depth = (token) => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } - }; - var scan = (input, options) => { - const opts = options || {}; - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - let str2 = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: "", depth: 0, isGlob: false }; - const eos = () => index >= length; - const peek = () => str2.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str2.charCodeAt(++index); - }; - while (index < length) { - code = advance(); - let next; - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA2) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: "", depth: 0, isGlob: false }; - if (finished === true) continue; - if (prev === CHAR_DOT && index === start + 1) { - start += 2; - continue; - } - lastIndex = index + 1; - continue; - } - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_LEFT_SQUARE_BRACKET2) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - if (isGlob === true) { - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - let base = str2; - let prefix = ""; - let glob = ""; - if (start > 0) { - prefix = str2.slice(0, start); - str2 = str2.slice(start); - lastIndex -= start; - } - if (base && isGlob === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob = str2.slice(lastIndex); - } else if (isGlob === true) { - base = ""; - glob = str2; - } else { - base = str2; - } - if (base && base !== "" && base !== "/" && base !== str2) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== "") { - parts.push(value); - } - prevIndex = i; - } - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - state.slashes = slashes; - state.parts = parts; - } - return state; - }; - module2.exports = scan; - } -}); - -// node_modules/picomatch/lib/parse.js -var require_parse3 = __commonJS({ - "node_modules/picomatch/lib/parse.js"(exports2, module2) { - "use strict"; - var constants = require_constants7(); - var utils = require_utils6(); - var { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS - } = constants; - var expandRange = (args, options) => { - if (typeof options.expandRange === "function") { - return options.expandRange(...args, options); - } - args.sort(); - const value = `[${args.join("-")}]`; - try { - new RegExp(value); - } catch (ex) { - return args.map((v) => utils.escapeRegex(v)).join(".."); - } - return value; - }; - var syntaxError = (type2, char) => { - return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; - }; - var parse = (input, options) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - input = REPLACEMENTS[input] || input; - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - const bos = { type: "bos", value: "", output: opts.prepend || "" }; - const tokens = [bos]; - const capture = opts.capture ? "" : "?:"; - const win32 = utils.isWindows(options); - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - const globstar = (opts2) => { - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const nodot = opts.dot ? "" : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - if (opts.capture) { - star = `(${star})`; - } - if (typeof opts.noext === "boolean") { - opts.noextglob = opts.noext; - } - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: "", - output: "", - prefix: "", - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - input = utils.removePrefix(input, state); - len = input.length; - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ""; - const remaining = () => input.slice(state.index + 1); - const consume = (value2 = "", num = 0) => { - state.consumed += value2; - state.index += num; - }; - const append = (token) => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - const negate = () => { - let count = 1; - while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { - advance(); - state.start++; - count++; - } - if (count % 2 === 0) { - return false; - } - state.negated = true; - state.start++; - return true; - }; - const increment = (type2) => { - state[type2]++; - stack.push(type2); - }; - const decrement = (type2) => { - state[type2]--; - stack.pop(); - }; - const push = (tok) => { - if (prev.type === "globstar") { - const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); - const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); - if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = "star"; - prev.value = "*"; - prev.output = star; - state.output += prev.output; - } - } - if (extglobs.length && tok.type !== "paren") { - extglobs[extglobs.length - 1].inner += tok.value; - } - if (tok.value || tok.output) append(tok); - if (prev && prev.type === "text" && tok.type === "text") { - prev.value += tok.value; - prev.output = (prev.output || "") + tok.value; - return; - } - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - const extglobOpen = (type2, value2) => { - const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? "(" : "") + token.open; - increment("parens"); - push({ type: type2, value: value2, output: state.output ? "" : ONE_CHAR }); - push({ type: "paren", extglob: true, value: advance(), output }); - extglobs.push(token); - }; - const extglobClose = (token) => { - let output = token.close + (opts.capture ? ")" : ""); - let rest; - if (token.type === "negate") { - let extglobStar = star; - if (token.inner && token.inner.length > 1 && token.inner.includes("/")) { - extglobStar = globstar(opts); - } - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - const expression = parse(rest, { ...options, fastpaths: false }).output; - output = token.close = `)${expression})${extglobStar})`; - } - if (token.prev.type === "bos") { - state.negatedExtglob = true; - } - } - push({ type: "paren", extglob: true, value, output }); - decrement("parens"); - }; - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === "\\") { - backslashes = true; - return m; - } - if (first === "?") { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ""); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); - } - return QMARK.repeat(chars.length); - } - if (first === ".") { - return DOT_LITERAL.repeat(chars.length); - } - if (first === "*") { - if (esc) { - return esc + first + (rest ? star : ""); - } - return star; - } - return esc ? m : `\\${m}`; - }); - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ""); - } else { - output = output.replace(/\\+/g, (m) => { - return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; - }); - } - } - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - state.output = utils.wrapOutput(output, state, options); - return state; - } - while (!eos()) { - value = advance(); - if (value === "\0") { - continue; - } - if (value === "\\") { - const next = peek(); - if (next === "/" && opts.bash !== true) { - continue; - } - if (next === "." || next === ";") { - continue; - } - if (!next) { - value += "\\"; - push({ type: "text", value }); - continue; - } - const match = /^\\+/.exec(remaining()); - let slashes = 0; - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += "\\"; - } - } - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - if (state.brackets === 0) { - push({ type: "text", value }); - continue; - } - } - if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { - if (opts.posix !== false && value === ":") { - const inner = prev.value.slice(1); - if (inner.includes("[")) { - prev.posix = true; - if (inner.includes(":")) { - const idx = prev.value.lastIndexOf("["); - const pre = prev.value.slice(0, idx); - const rest2 = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest2]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") { - value = `\\${value}`; - } - if (value === "]" && (prev.value === "[" || prev.value === "[^")) { - value = `\\${value}`; - } - if (opts.posix === true && value === "!" && prev.value === "[") { - value = "^"; - } - prev.value += value; - append({ value }); - continue; - } - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: "text", value }); - } - continue; - } - if (value === "(") { - increment("parens"); - push({ type: "paren", value }); - continue; - } - if (value === ")") { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "(")); - } - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - push({ type: "paren", value, output: state.parens ? ")" : "\\)" }); - decrement("parens"); - continue; - } - if (value === "[") { - if (opts.nobracket === true || !remaining().includes("]")) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("closing", "]")); - } - value = `\\${value}`; - } else { - increment("brackets"); - } - push({ type: "bracket", value }); - continue; - } - if (value === "]") { - if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { - push({ type: "text", value, output: `\\${value}` }); - continue; - } - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "[")); - } - push({ type: "text", value, output: `\\${value}` }); - continue; - } - decrement("brackets"); - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) { - value = `/${value}`; - } - prev.value += value; - append({ value }); - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - if (value === "{" && opts.nobrace !== true) { - increment("braces"); - const open = { - type: "brace", - value, - output: "(", - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - braces.push(open); - push(open); - continue; - } - if (value === "}") { - const brace = braces[braces.length - 1]; - if (opts.nobrace === true || !brace) { - push({ type: "text", value, output: value }); - continue; - } - let output = ")"; - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === "brace") { - break; - } - if (arr[i].type !== "dots") { - range.unshift(arr[i].value); - } - } - output = expandRange(range, opts); - state.backtrack = true; - } - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = "\\{"; - value = output = "\\}"; - state.output = out; - for (const t of toks) { - state.output += t.output || t.value; - } - } - push({ type: "brace", value, output }); - decrement("braces"); - braces.pop(); - continue; - } - if (value === "|") { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: "text", value }); - continue; - } - if (value === ",") { - let output = value; - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === "braces") { - brace.comma = true; - output = "|"; - } - push({ type: "comma", value, output }); - continue; - } - if (value === "/") { - if (prev.type === "dot" && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ""; - state.output = ""; - tokens.pop(); - prev = bos; - continue; - } - push({ type: "slash", value, output: SLASH_LITERAL }); - continue; - } - if (value === ".") { - if (state.braces > 0 && prev.type === "dot") { - if (prev.value === ".") prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = "dots"; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { - push({ type: "text", value, output: DOT_LITERAL }); - continue; - } - push({ type: "dot", value, output: DOT_LITERAL }); - continue; - } - if (value === "?") { - const isGroup = prev && prev.value === "("; - if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("qmark", value); - continue; - } - if (prev && prev.type === "paren") { - const next = peek(); - let output = value; - if (next === "<" && !utils.supportsLookbehinds()) { - throw new Error("Node.js v10 or higher is required for regex lookbehinds"); - } - if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) { - output = `\\${value}`; - } - push({ type: "text", value, output }); - continue; - } - if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { - push({ type: "qmark", value, output: QMARK_NO_DOT }); - continue; - } - push({ type: "qmark", value, output: QMARK }); - continue; - } - if (value === "!") { - if (opts.noextglob !== true && peek() === "(") { - if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { - extglobOpen("negate", value); - continue; - } - } - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - if (value === "+") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("plus", value); - continue; - } - if (prev && prev.value === "(" || opts.regex === false) { - push({ type: "plus", value, output: PLUS_LITERAL }); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { - push({ type: "plus", value }); - continue; - } - push({ type: "plus", value: PLUS_LITERAL }); - continue; - } - if (value === "@") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - push({ type: "at", extglob: true, value, output: "" }); - continue; - } - push({ type: "text", value }); - continue; - } - if (value !== "*") { - if (value === "$" || value === "^") { - value = `\\${value}`; - } - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - push({ type: "text", value }); - continue; - } - if (prev && (prev.type === "globstar" || prev.star === true)) { - prev.type = "star"; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen("star", value); - continue; - } - if (prev.type === "star") { - if (opts.noglobstar === true) { - consume(value); - continue; - } - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === "slash" || prior.type === "bos"; - const afterStar = before && (before.type === "star" || before.type === "globstar"); - if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { - push({ type: "star", value, output: "" }); - continue; - } - const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); - const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); - if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { - push({ type: "star", value, output: "" }); - continue; - } - while (rest.slice(0, 3) === "/**") { - const after = input[state.index + 4]; - if (after && after !== "/") { - break; - } - rest = rest.slice(3); - consume("/**", 3); - } - if (prior.type === "bos" && eos()) { - prev.type = "globstar"; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { - const end = rest[1] !== void 0 ? "|$" : ""; - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - state.output += prior.output + prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - if (prior.type === "bos" && rest[0] === "/") { - prev.type = "globstar"; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - state.output = state.output.slice(0, -prev.output.length); - prev.type = "globstar"; - prev.output = globstar(opts); - prev.value += value; - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - const token = { type: "star", value, output: star }; - if (opts.bash === true) { - token.output = ".*?"; - if (prev.type === "bos" || prev.type === "slash") { - token.output = nodot + token.output; - } - push(token); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { - token.output = value; - push(token); - continue; - } - if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { - if (prev.type === "dot") { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - } else { - state.output += nodot; - prev.output += nodot; - } - if (peek() !== "*") { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - push(token); - } - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]")); - state.output = utils.escapeLast(state.output, "["); - decrement("brackets"); - } - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")")); - state.output = utils.escapeLast(state.output, "("); - decrement("parens"); - } - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}")); - state.output = utils.escapeLast(state.output, "{"); - decrement("braces"); - } - if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) { - push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); - } - if (state.backtrack === true) { - state.output = ""; - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - if (token.suffix) { - state.output += token.suffix; - } - } - } - return state; - }; - parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? "" : "?:"; - const state = { negated: false, prefix: "" }; - let star = opts.bash === true ? ".*?" : STAR; - if (opts.capture) { - star = `(${star})`; - } - const globstar = (opts2) => { - if (opts2.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const create = (str2) => { - switch (str2) { - case "*": - return `${nodot}${ONE_CHAR}${star}`; - case ".*": - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*.*": - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*/*": - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - case "**": - return nodot + globstar(opts); - case "**/*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - case "**/*.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "**/.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - default: { - const match = /^(.*?)\.(\w+)$/.exec(str2); - if (!match) return; - const source2 = create(match[1]); - if (!source2) return; - return source2 + DOT_LITERAL + match[2]; - } - } - }; - const output = utils.removePrefix(input, state); - let source = create(output); - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - return source; - }; - module2.exports = parse; - } -}); - -// node_modules/picomatch/lib/picomatch.js -var require_picomatch = __commonJS({ - "node_modules/picomatch/lib/picomatch.js"(exports2, module2) { - "use strict"; - var path7 = require("path"); - var scan = require_scan(); - var parse = require_parse3(); - var utils = require_utils6(); - var constants = require_constants7(); - var isObject2 = (val2) => val2 && typeof val2 === "object" && !Array.isArray(val2); - var picomatch = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map((input) => picomatch(input, options, returnState)); - const arrayMatcher = (str2) => { - for (const isMatch of fns) { - const state2 = isMatch(str2); - if (state2) return state2; - } - return false; - }; - return arrayMatcher; - } - const isState = isObject2(glob) && glob.tokens && glob.input; - if (glob === "" || typeof glob !== "string" && !isState) { - throw new TypeError("Expected pattern to be a non-empty string"); - } - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true); - const state = regex.state; - delete regex.state; - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - if (typeof opts.onResult === "function") { - opts.onResult(result); - } - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - if (isIgnored(input)) { - if (typeof opts.onIgnore === "function") { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - if (typeof opts.onMatch === "function") { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - if (returnState) { - matcher.state = state; - } - return matcher; - }; - picomatch.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected input to be a string"); - } - if (input === "") { - return { isMatch: false, output: "" }; - } - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = match && format ? format(input) : input; - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - return { isMatch: Boolean(match), match, output }; - }; - picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path7.basename(input)); - }; - picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); - picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); - }; - picomatch.scan = (input, options) => scan(input, options); - picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - const opts = options || {}; - const prepend = opts.contains ? "" : "^"; - const append = opts.contains ? "" : "$"; - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - return regex; - }; - picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== "string") { - throw new TypeError("Expected a non-empty string"); - } - let parsed = { negated: false, fastpaths: true }; - if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) { - parsed.output = parse.fastpaths(input, options); - } - if (!parsed.output) { - parsed = parse(input, options); - } - return picomatch.compileRe(parsed, options, returnOutput, returnState); - }; - picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } - }; - picomatch.constants = constants; - module2.exports = picomatch; - } -}); - -// node_modules/picomatch/index.js -var require_picomatch2 = __commonJS({ - "node_modules/picomatch/index.js"(exports2, module2) { - "use strict"; - module2.exports = require_picomatch(); - } -}); - -// node_modules/micromatch/index.js -var require_micromatch = __commonJS({ - "node_modules/micromatch/index.js"(exports2, module2) { - "use strict"; - var util = require("util"); - var braces = require_braces(); - var picomatch = require_picomatch2(); - var utils = require_utils6(); - var isEmptyString = (v) => v === "" || v === "./"; - var hasBraces = (v) => { - const index = v.indexOf("{"); - return index > -1 && v.indexOf("}", index) > -1; - }; - var micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - let omit = /* @__PURE__ */ new Set(); - let keep = /* @__PURE__ */ new Set(); - let items = /* @__PURE__ */ new Set(); - let negatives = 0; - let onResult = (state) => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) negatives++; - for (let item of list) { - let matched = isMatch(item, true); - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) continue; - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter((item) => !omit.has(item)); - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(", ")}"`); - } - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns; - } - } - return matches; - }; - micromatch.match = micromatch; - micromatch.matcher = (pattern, options) => picomatch(pattern, options); - micromatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); - micromatch.any = micromatch.isMatch; - micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = /* @__PURE__ */ new Set(); - let items = []; - let onResult = (state) => { - if (options.onResult) options.onResult(state); - items.push(state.output); - }; - let matches = new Set(micromatch(list, patterns, { ...options, onResult })); - for (let item of items) { - if (!matches.has(item)) { - result.add(item); - } - } - return [...result]; - }; - micromatch.contains = (str2, pattern, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str2)}"`); - } - if (Array.isArray(pattern)) { - return pattern.some((p) => micromatch.contains(str2, p, options)); - } - if (typeof pattern === "string") { - if (isEmptyString(str2) || isEmptyString(pattern)) { - return false; - } - if (str2.includes(pattern) || str2.startsWith("./") && str2.slice(2).includes(pattern)) { - return true; - } - } - return micromatch.isMatch(str2, pattern, { ...options, contains: true }); - }; - micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError("Expected the first argument to be an object"); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) res[key] = obj[key]; - return res; - }; - micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some((item) => isMatch(item))) { - return true; - } - } - return false; - }; - micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every((item) => isMatch(item))) { - return false; - } - } - return true; - }; - micromatch.all = (str2, patterns, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str2)}"`); - } - return [].concat(patterns).every((p) => picomatch(p, options)(str2)); - }; - micromatch.capture = (glob, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - if (match) { - return match.slice(1).map((v) => v === void 0 ? "" : v); - } - }; - micromatch.makeRe = (...args) => picomatch.makeRe(...args); - micromatch.scan = (...args) => picomatch.scan(...args); - micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str2 of braces(String(pattern), options)) { - res.push(picomatch.parse(str2, options)); - } - } - return res; - }; - micromatch.braces = (pattern, options) => { - if (typeof pattern !== "string") throw new TypeError("Expected a string"); - if (options && options.nobrace === true || !hasBraces(pattern)) { - return [pattern]; - } - return braces(pattern, options); - }; - micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== "string") throw new TypeError("Expected a string"); - return micromatch.braces(pattern, { ...options, expand: true }); - }; - micromatch.hasBraces = hasBraces; - module2.exports = micromatch; - } -}); - -// node_modules/fast-glob/out/utils/pattern.js -var require_pattern = __commonJS({ - "node_modules/fast-glob/out/utils/pattern.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; - var path7 = require("path"); - var globParent = require_glob_parent(); - var micromatch = require_micromatch(); - var GLOBSTAR = "**"; - var ESCAPE_SYMBOL = "\\"; - var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; - var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; - var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; - var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; - var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; - var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; - function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); - } - exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern(pattern, options = {}) { - if (pattern === "") { - return false; - } - if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { - return true; - } - if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.braceExpansion !== false && hasBraceExpansion(pattern)) { - return true; - } - return false; - } - exports2.isDynamicPattern = isDynamicPattern; - function hasBraceExpansion(pattern) { - const openingBraceIndex = pattern.indexOf("{"); - if (openingBraceIndex === -1) { - return false; - } - const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1); - if (closingBraceIndex === -1) { - return false; - } - const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); - return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); - } - function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; - } - exports2.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports2.isNegativePattern = isNegativePattern; - function isPositivePattern(pattern) { - return !isNegativePattern(pattern); - } - exports2.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); - } - exports2.getNegativePatterns = getNegativePatterns; - function getPositivePatterns(patterns) { - return patterns.filter(isPositivePattern); - } - exports2.getPositivePatterns = getPositivePatterns; - function getPatternsInsideCurrentDirectory(patterns) { - return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); - } - exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; - function getPatternsOutsideCurrentDirectory(patterns) { - return patterns.filter(isPatternRelatedToParentDirectory); - } - exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; - function isPatternRelatedToParentDirectory(pattern) { - return pattern.startsWith("..") || pattern.startsWith("./.."); - } - exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; - function getBaseDirectory(pattern) { - return globParent(pattern, { flipBackslashes: false }); - } - exports2.getBaseDirectory = getBaseDirectory; - function hasGlobStar(pattern) { - return pattern.includes(GLOBSTAR); - } - exports2.hasGlobStar = hasGlobStar; - function endsWithSlashGlobStar(pattern) { - return pattern.endsWith("/" + GLOBSTAR); - } - exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; - function isAffectDepthOfReadingPattern(pattern) { - const basename = path7.basename(pattern); - return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); - } - exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; - function expandPatternsWithBraceExpansion(patterns) { - return patterns.reduce((collection, pattern) => { - return collection.concat(expandBraceExpansion(pattern)); - }, []); - } - exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; - function expandBraceExpansion(pattern) { - const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true }); - patterns.sort((a, b) => a.length - b.length); - return patterns.filter((pattern2) => pattern2 !== ""); - } - exports2.expandBraceExpansion = expandBraceExpansion; - function getPatternParts(pattern, options) { - let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); - if (parts.length === 0) { - parts = [pattern]; - } - if (parts[0].startsWith("/")) { - parts[0] = parts[0].slice(1); - parts.unshift(""); - } - return parts; - } - exports2.getPatternParts = getPatternParts; - function makeRe(pattern, options) { - return micromatch.makeRe(pattern, options); - } - exports2.makeRe = makeRe; - function convertPatternsToRe(patterns, options) { - return patterns.map((pattern) => makeRe(pattern, options)); - } - exports2.convertPatternsToRe = convertPatternsToRe; - function matchAny(entry, patternsRe) { - return patternsRe.some((patternRe) => patternRe.test(entry)); - } - exports2.matchAny = matchAny; - function removeDuplicateSlashes(pattern) { - return pattern.replace(DOUBLE_SLASH_RE, "/"); - } - exports2.removeDuplicateSlashes = removeDuplicateSlashes; - function partitionAbsoluteAndRelative(patterns) { - const absolute = []; - const relative = []; - for (const pattern of patterns) { - if (isAbsolute2(pattern)) { - absolute.push(pattern); - } else { - relative.push(pattern); - } - } - return [absolute, relative]; - } - exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; - function isAbsolute2(pattern) { - return path7.isAbsolute(pattern); - } - exports2.isAbsolute = isAbsolute2; - } -}); - -// node_modules/fast-glob/out/utils/stream.js -var require_stream = __commonJS({ - "node_modules/fast-glob/out/utils/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.merge = void 0; - var merge2 = require_merge2(); - function merge3(streams) { - const mergedStream = merge2(streams); - streams.forEach((stream) => { - stream.once("error", (error2) => mergedStream.emit("error", error2)); - }); - mergedStream.once("close", () => propagateCloseEventToSources(streams)); - mergedStream.once("end", () => propagateCloseEventToSources(streams)); - return mergedStream; - } - exports2.merge = merge3; - function propagateCloseEventToSources(streams) { - streams.forEach((stream) => stream.emit("close")); - } - } -}); - -// node_modules/fast-glob/out/utils/string.js -var require_string = __commonJS({ - "node_modules/fast-glob/out/utils/string.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEmpty = exports2.isString = void 0; - function isString(input) { - return typeof input === "string"; - } - exports2.isString = isString; - function isEmpty(input) { - return input === ""; - } - exports2.isEmpty = isEmpty; - } -}); - -// node_modules/fast-glob/out/utils/index.js -var require_utils7 = __commonJS({ - "node_modules/fast-glob/out/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0; - var array = require_array(); - exports2.array = array; - var errno = require_errno(); - exports2.errno = errno; - var fs7 = require_fs(); - exports2.fs = fs7; - var path7 = require_path(); - exports2.path = path7; - var pattern = require_pattern(); - exports2.pattern = pattern; - var stream = require_stream(); - exports2.stream = stream; - var string = require_string(); - exports2.string = string; - } -}); - -// node_modules/fast-glob/out/managers/tasks.js -var require_tasks = __commonJS({ - "node_modules/fast-glob/out/managers/tasks.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0; - var utils = require_utils7(); - function generate(input, settings) { - const patterns = processPatterns(input, settings); - const ignore = processPatterns(settings.ignore, settings); - const positivePatterns = getPositivePatterns(patterns); - const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); - const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); - const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); - const staticTasks = convertPatternsToTasks( - staticPatterns, - negativePatterns, - /* dynamic */ - false - ); - const dynamicTasks = convertPatternsToTasks( - dynamicPatterns, - negativePatterns, - /* dynamic */ - true - ); - return staticTasks.concat(dynamicTasks); - } - exports2.generate = generate; - function processPatterns(input, settings) { - let patterns = input; - if (settings.braceExpansion) { - patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); - } - if (settings.baseNameMatch) { - patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`); - } - return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); - } - function convertPatternsToTasks(positive, negative, dynamic) { - const tasks = []; - const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); - const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); - const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); - const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); - tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); - if ("." in insideCurrentDirectoryGroup) { - tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)); - } else { - tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); - } - return tasks; - } - exports2.convertPatternsToTasks = convertPatternsToTasks; - function getPositivePatterns(patterns) { - return utils.pattern.getPositivePatterns(patterns); - } - exports2.getPositivePatterns = getPositivePatterns; - function getNegativePatternsAsPositive(patterns, ignore) { - const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); - const positive = negative.map(utils.pattern.convertToPositivePattern); - return positive; - } - exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive; - function groupPatternsByBaseDirectory(patterns) { - const group = {}; - return patterns.reduce((collection, pattern) => { - const base = utils.pattern.getBaseDirectory(pattern); - if (base in collection) { - collection[base].push(pattern); - } else { - collection[base] = [pattern]; - } - return collection; - }, group); - } - exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; - function convertPatternGroupsToTasks(positive, negative, dynamic) { - return Object.keys(positive).map((base) => { - return convertPatternGroupToTask(base, positive[base], negative, dynamic); - }); - } - exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks; - function convertPatternGroupToTask(base, positive, negative, dynamic) { - return { - dynamic, - positive, - negative, - base, - patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) - }; - } - exports2.convertPatternGroupToTask = convertPatternGroupToTask; - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/async.js -var require_async = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.read = void 0; - function read(path7, settings, callback) { - settings.fs.lstat(path7, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path7, (statError, stat) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - callFailureCallback(callback, statError); - return; - } - callSuccessCallback(callback, lstat); - return; - } - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - callSuccessCallback(callback, stat); - }); - }); - } - exports2.read = read; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/sync.js -var require_sync = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.read = void 0; - function read(path7, settings) { - const lstat = settings.fs.lstatSync(path7); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path7); - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - return stat; - } catch (error2) { - if (!settings.throwErrorOnBrokenSymbolicLink) { - return lstat; - } - throw error2; - } - } - exports2.read = read; - } -}); - -// node_modules/@nodelib/fs.stat/out/adapters/fs.js -var require_fs2 = __commonJS({ - "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs7 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs7.lstat, - stat: fs7.stat, - lstatSync: fs7.lstatSync, - statSync: fs7.statSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports2.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports2.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.stat/out/settings.js -var require_settings = __commonJS({ - "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fs7 = require_fs2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs7.createFileSystemAdapter(this._options.fs); - this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.stat/out/index.js -var require_out = __commonJS({ - "node_modules/@nodelib/fs.stat/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.statSync = exports2.stat = exports2.Settings = void 0; - var async = require_async(); - var sync = require_sync(); - var settings_1 = require_settings(); - exports2.Settings = settings_1.default; - function stat(path7, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path7, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path7, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.stat = stat; - function statSync(path7, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path7, settings); - } - exports2.statSync = statSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/queue-microtask/index.js -var require_queue_microtask = __commonJS({ - "node_modules/queue-microtask/index.js"(exports2, module2) { - var promise; - module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { - throw err; - }, 0)); - } -}); - -// node_modules/run-parallel/index.js -var require_run_parallel = __commonJS({ - "node_modules/run-parallel/index.js"(exports2, module2) { - module2.exports = runParallel; - var queueMicrotask2 = require_queue_microtask(); - function runParallel(tasks, cb) { - let results, pending, keys; - let isSync = true; - if (Array.isArray(tasks)) { - results = []; - pending = tasks.length; - } else { - keys = Object.keys(tasks); - results = {}; - pending = keys.length; - } - function done(err) { - function end() { - if (cb) cb(err, results); - cb = null; - } - if (isSync) queueMicrotask2(end); - else end(); - } - function each(i, err, result) { - results[i] = result; - if (--pending === 0 || err) { - done(err); - } - } - if (!pending) { - done(null); - } else if (keys) { - keys.forEach(function(key) { - tasks[key](function(err, result) { - each(key, err, result); - }); - }); - } else { - tasks.forEach(function(task, i) { - task(function(err, result) { - each(i, err, result); - }); - }); - } - isSync = false; - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/constants.js -var require_constants8 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; - var NODE_PROCESS_VERSION_PARTS = process.versions.node.split("."); - if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) { - throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); - } - var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); - var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); - var SUPPORTED_MAJOR_VERSION = 10; - var SUPPORTED_MINOR_VERSION = 10; - var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; - var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; - exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/fs.js -var require_fs3 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports2.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/index.js -var require_utils8 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fs = void 0; - var fs7 = require_fs3(); - exports2.fs = fs7; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/common.js -var require_common = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.joinPathSegments = void 0; - function joinPathSegments(a, b, separator) { - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports2.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/async.js -var require_async2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; - var fsStat = require_out(); - var rpl = require_run_parallel(); - var constants_1 = require_constants8(); - var utils = require_utils8(); - var common2 = require_common(); - function read(directory, settings, callback) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - readdirWithFileTypes(directory, settings, callback); - return; - } - readdir(directory, settings, callback); - } - exports2.read = read; - function readdirWithFileTypes(directory, settings, callback) { - settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const entries = dirents.map((dirent) => ({ - dirent, - name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - })); - if (!settings.followSymbolicLinks) { - callSuccessCallback(callback, entries); - return; - } - const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); - rpl(tasks, (rplError, rplEntries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, rplEntries); - }); - }); - } - exports2.readdirWithFileTypes = readdirWithFileTypes; - function makeRplTaskEntry(entry, settings) { - return (done) => { - if (!entry.dirent.isSymbolicLink()) { - done(null, entry); - return; - } - settings.fs.stat(entry.path, (statError, stats) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - done(statError); - return; - } - done(null, entry); - return; - } - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - done(null, entry); - }); - }; - } - function readdir(directory, settings, callback) { - settings.fs.readdir(directory, (readdirError, names) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const tasks = names.map((name) => { - const path7 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path7, settings.fsStatSettings, (error2, stats) => { - if (error2 !== null) { - done(error2); - return; - } - const entry = { - name, - path: path7, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - done(null, entry); - }); - }; - }); - rpl(tasks, (rplError, entries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, entries); - }); - }); - } - exports2.readdir = readdir; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/sync.js -var require_sync2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; - var fsStat = require_out(); - var constants_1 = require_constants8(); - var utils = require_utils8(); - var common2 = require_common(); - function read(directory, settings) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings); - } - return readdir(directory, settings); - } - exports2.read = read; - function readdirWithFileTypes(directory, settings) { - const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); - return dirents.map((dirent) => { - const entry = { - dirent, - name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - }; - if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { - try { - const stats = settings.fs.statSync(entry.path); - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - } catch (error2) { - if (settings.throwErrorOnBrokenSymbolicLink) { - throw error2; - } - } - } - return entry; - }); - } - exports2.readdirWithFileTypes = readdirWithFileTypes; - function readdir(directory, settings) { - const names = settings.fs.readdirSync(directory); - return names.map((name) => { - const entryPath = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - const stats = fsStat.statSync(entryPath, settings.fsStatSettings); - const entry = { - name, - path: entryPath, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - return entry; - }); - } - exports2.readdir = readdir; - } -}); - -// node_modules/@nodelib/fs.scandir/out/adapters/fs.js -var require_fs4 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs7 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs7.lstat, - stat: fs7.stat, - lstatSync: fs7.lstatSync, - statSync: fs7.statSync, - readdir: fs7.readdir, - readdirSync: fs7.readdirSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports2.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports2.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.scandir/out/settings.js -var require_settings2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path7 = require("path"); - var fsStat = require_out(); - var fs7 = require_fs4(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs7.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path7.sep); - this.stats = this._getValue(this._options.stats, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - this.fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this.followSymbolicLinks, - fs: this.fs, - throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.scandir/out/index.js -var require_out2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Settings = exports2.scandirSync = exports2.scandir = void 0; - var async = require_async2(); - var sync = require_sync2(); - var settings_1 = require_settings2(); - exports2.Settings = settings_1.default; - function scandir(path7, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path7, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path7, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.scandir = scandir; - function scandirSync(path7, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path7, settings); - } - exports2.scandirSync = scandirSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/reusify/reusify.js -var require_reusify = __commonJS({ - "node_modules/reusify/reusify.js"(exports2, module2) { - "use strict"; - function reusify(Constructor) { - var head = new Constructor(); - var tail = head; - function get() { - var current = head; - if (current.next) { - head = current.next; - } else { - head = new Constructor(); - tail = head; - } - current.next = null; - return current; - } - function release3(obj) { - tail.next = obj; - tail = obj; - } - return { - get, - release: release3 - }; - } - module2.exports = reusify; - } -}); - -// node_modules/fastq/queue.js -var require_queue = __commonJS({ - "node_modules/fastq/queue.js"(exports2, module2) { - "use strict"; - var reusify = require_reusify(); - function fastqueue(context2, worker, concurrency) { - if (typeof context2 === "function") { - concurrency = worker; - worker = context2; - context2 = null; - } - var cache = reusify(Task); - var queueHead = null; - var queueTail = null; - var _running = 0; - var self2 = { - push, - drain: noop, - saturated: noop, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop, - kill, - killAndDrain - }; - return self2; - function running() { - return _running; - } - function pause() { - self2.paused = true; - } - function length() { - var current = queueHead; - var counter = 0; - while (current) { - current = current.next; - counter++; - } - return counter; - } - function getQueue() { - var current = queueHead; - var tasks = []; - while (current) { - tasks.push(current.value); - current = current.next; - } - return tasks; - } - function resume() { - if (!self2.paused) return; - self2.paused = false; - for (var i = 0; i < self2.concurrency; i++) { - _running++; - release3(); - } - } - function idle() { - return _running === 0 && self2.length() === 0; - } - function push(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release3; - current.value = value; - current.callback = done || noop; - if (_running === self2.concurrency || self2.paused) { - if (queueTail) { - queueTail.next = current; - queueTail = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context2, current.value, current.worked); - } - } - function unshift(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release3; - current.value = value; - current.callback = done || noop; - if (_running === self2.concurrency || self2.paused) { - if (queueHead) { - current.next = queueHead; - queueHead = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context2, current.value, current.worked); - } - } - function release3(holder) { - if (holder) { - cache.release(holder); - } - var next = queueHead; - if (next) { - if (!self2.paused) { - if (queueTail === queueHead) { - queueTail = null; - } - queueHead = next.next; - next.next = null; - worker.call(context2, next.value, next.worked); - if (queueTail === null) { - self2.empty(); - } - } else { - _running--; - } - } else if (--_running === 0) { - self2.drain(); - } - } - function kill() { - queueHead = null; - queueTail = null; - self2.drain = noop; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self2.drain(); - self2.drain = noop; - } - } - function noop() { - } - function Task() { - this.value = null; - this.callback = noop; - this.next = null; - this.release = noop; - this.context = null; - var self2 = this; - this.worked = function worked(err, result) { - var callback = self2.callback; - self2.value = null; - self2.callback = noop; - callback.call(self2.context, err, result); - self2.release(self2); - }; - } - module2.exports = fastqueue; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/common.js -var require_common2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0; - function isFatalError(settings, error2) { - if (settings.errorFilter === null) { - return true; - } - return !settings.errorFilter(error2); - } - exports2.isFatalError = isFatalError; - function isAppliedFilter(filter, value) { - return filter === null || filter(value); - } - exports2.isAppliedFilter = isAppliedFilter; - function replacePathSegmentSeparator(filepath, separator) { - return filepath.split(/[/\\]/).join(separator); - } - exports2.replacePathSegmentSeparator = replacePathSegmentSeparator; - function joinPathSegments(a, b, separator) { - if (a === "") { - return b; - } - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports2.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/reader.js -var require_reader = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var common2 = require_common2(); - var Reader = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._root = common2.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); - } - }; - exports2.default = Reader; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/async.js -var require_async3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var events_1 = require("events"); - var fsScandir = require_out2(); - var fastq = require_queue(); - var common2 = require_common2(); - var reader_1 = require_reader(); - var AsyncReader = class extends reader_1.default { - constructor(_root, _settings) { - super(_root, _settings); - this._settings = _settings; - this._scandir = fsScandir.scandir; - this._emitter = new events_1.EventEmitter(); - this._queue = fastq(this._worker.bind(this), this._settings.concurrency); - this._isFatalError = false; - this._isDestroyed = false; - this._queue.drain = () => { - if (!this._isFatalError) { - this._emitter.emit("end"); - } - }; - } - read() { - this._isFatalError = false; - this._isDestroyed = false; - setImmediate(() => { - this._pushToQueue(this._root, this._settings.basePath); - }); - return this._emitter; - } - get isDestroyed() { - return this._isDestroyed; - } - destroy() { - if (this._isDestroyed) { - throw new Error("The reader is already destroyed"); - } - this._isDestroyed = true; - this._queue.killAndDrain(); - } - onEntry(callback) { - this._emitter.on("entry", callback); - } - onError(callback) { - this._emitter.once("error", callback); - } - onEnd(callback) { - this._emitter.once("end", callback); - } - _pushToQueue(directory, base) { - const queueItem = { directory, base }; - this._queue.push(queueItem, (error2) => { - if (error2 !== null) { - this._handleError(error2); - } - }); - } - _worker(item, done) { - this._scandir(item.directory, this._settings.fsScandirSettings, (error2, entries) => { - if (error2 !== null) { - done(error2, void 0); - return; - } - for (const entry of entries) { - this._handleEntry(entry, item.base); - } - done(null, void 0); - }); - } - _handleError(error2) { - if (this._isDestroyed || !common2.isFatalError(this._settings, error2)) { - return; - } - this._isFatalError = true; - this._isDestroyed = true; - this._emitter.emit("error", error2); - } - _handleEntry(entry, base) { - if (this._isDestroyed || this._isFatalError) { - return; - } - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { - this._emitEntry(entry); - } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _emitEntry(entry) { - this._emitter.emit("entry", entry); - } - }; - exports2.default = AsyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/async.js -var require_async4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var async_1 = require_async3(); - var AsyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._storage = []; - } - read(callback) { - this._reader.onError((error2) => { - callFailureCallback(callback, error2); - }); - this._reader.onEntry((entry) => { - this._storage.push(entry); - }); - this._reader.onEnd(() => { - callSuccessCallback(callback, this._storage); - }); - this._reader.read(); - } - }; - exports2.default = AsyncProvider; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, entries) { - callback(null, entries); - } - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/stream.js -var require_stream2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var async_1 = require_async3(); - var StreamProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._stream = new stream_1.Readable({ - objectMode: true, - read: () => { - }, - destroy: () => { - if (!this._reader.isDestroyed) { - this._reader.destroy(); - } - } - }); - } - read() { - this._reader.onError((error2) => { - this._stream.emit("error", error2); - }); - this._reader.onEntry((entry) => { - this._stream.push(entry); - }); - this._reader.onEnd(() => { - this._stream.push(null); - }); - this._reader.read(); - return this._stream; - } - }; - exports2.default = StreamProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/sync.js -var require_sync3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsScandir = require_out2(); - var common2 = require_common2(); - var reader_1 = require_reader(); - var SyncReader = class extends reader_1.default { - constructor() { - super(...arguments); - this._scandir = fsScandir.scandirSync; - this._storage = []; - this._queue = /* @__PURE__ */ new Set(); - } - read() { - this._pushToQueue(this._root, this._settings.basePath); - this._handleQueue(); - return this._storage; - } - _pushToQueue(directory, base) { - this._queue.add({ directory, base }); - } - _handleQueue() { - for (const item of this._queue.values()) { - this._handleDirectory(item.directory, item.base); - } - } - _handleDirectory(directory, base) { - try { - const entries = this._scandir(directory, this._settings.fsScandirSettings); - for (const entry of entries) { - this._handleEntry(entry, base); - } - } catch (error2) { - this._handleError(error2); - } - } - _handleError(error2) { - if (!common2.isFatalError(this._settings, error2)) { - return; - } - throw error2; - } - _handleEntry(entry, base) { - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { - this._pushToStorage(entry); - } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _pushToStorage(entry) { - this._storage.push(entry); - } - }; - exports2.default = SyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/sync.js -var require_sync4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var sync_1 = require_sync3(); - var SyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new sync_1.default(this._root, this._settings); - } - read() { - return this._reader.read(); - } - }; - exports2.default = SyncProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/settings.js -var require_settings3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path7 = require("path"); - var fsScandir = require_out2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.basePath = this._getValue(this._options.basePath, void 0); - this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); - this.deepFilter = this._getValue(this._options.deepFilter, null); - this.entryFilter = this._getValue(this._options.entryFilter, null); - this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path7.sep); - this.fsScandirSettings = new fsScandir.Settings({ - followSymbolicLinks: this._options.followSymbolicLinks, - fs: this._options.fs, - pathSegmentSeparator: this._options.pathSegmentSeparator, - stats: this._options.stats, - throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.walk/out/index.js -var require_out3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0; - var async_1 = require_async4(); - var stream_1 = require_stream2(); - var sync_1 = require_sync4(); - var settings_1 = require_settings3(); - exports2.Settings = settings_1.default; - function walk(directory, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); - return; - } - new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); - } - exports2.walk = walk; - function walkSync(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new sync_1.default(directory, settings); - return provider.read(); - } - exports2.walkSync = walkSync; - function walkStream(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new stream_1.default(directory, settings); - return provider.read(); - } - exports2.walkStream = walkStream; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/fast-glob/out/readers/reader.js -var require_reader2 = __commonJS({ - "node_modules/fast-glob/out/readers/reader.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path7 = require("path"); - var fsStat = require_out(); - var utils = require_utils7(); - var Reader = class { - constructor(_settings) { - this._settings = _settings; - this._fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this._settings.followSymbolicLinks, - fs: this._settings.fs, - throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks - }); - } - _getFullEntryPath(filepath) { - return path7.resolve(this._settings.cwd, filepath); - } - _makeEntry(stats, pattern) { - const entry = { - name: pattern, - path: pattern, - dirent: utils.fs.createDirentFromStats(pattern, stats) - }; - if (this._settings.stats) { - entry.stats = stats; - } - return entry; - } - _isFatalError(error2) { - return !utils.errno.isEnoentCodeError(error2) && !this._settings.suppressErrors; - } - }; - exports2.default = Reader; - } -}); - -// node_modules/fast-glob/out/readers/stream.js -var require_stream3 = __commonJS({ - "node_modules/fast-glob/out/readers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderStream = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkStream = fsWalk.walkStream; - this._stat = fsStat.stat; - } - dynamic(root, options) { - return this._walkStream(root, options); - } - static(patterns, options) { - const filepaths = patterns.map(this._getFullEntryPath, this); - const stream = new stream_1.PassThrough({ objectMode: true }); - stream._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream.push(entry); - } - if (index === filepaths.length - 1) { - stream.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream.write(i); - } - return stream; - } - _getEntry(filepath, pattern, options) { - return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error2) => { - if (options.errorFilter(error2)) { - return null; - } - throw error2; - }); - } - _getStat(filepath) { - return new Promise((resolve5, reject) => { - this._stat(filepath, this._fsStatSettings, (error2, stats) => { - return error2 === null ? resolve5(stats) : reject(error2); - }); - }); - } - }; - exports2.default = ReaderStream; - } -}); - -// node_modules/fast-glob/out/readers/async.js -var require_async5 = __commonJS({ - "node_modules/fast-glob/out/readers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var stream_1 = require_stream3(); - var ReaderAsync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkAsync = fsWalk.walk; - this._readerStream = new stream_1.default(this._settings); - } - dynamic(root, options) { - return new Promise((resolve5, reject) => { - this._walkAsync(root, options, (error2, entries) => { - if (error2 === null) { - resolve5(entries); - } else { - reject(error2); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream = this._readerStream.static(patterns, options); - return new Promise((resolve5, reject) => { - stream.once("error", reject); - stream.on("data", (entry) => entries.push(entry)); - stream.once("end", () => resolve5(entries)); - }); - } - }; - exports2.default = ReaderAsync; - } -}); - -// node_modules/fast-glob/out/providers/matchers/matcher.js -var require_matcher = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var Matcher = class { - constructor(_patterns, _settings, _micromatchOptions) { - this._patterns = _patterns; - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this._storage = []; - this._fillStorage(); - } - _fillStorage() { - for (const pattern of this._patterns) { - const segments = this._getPatternSegments(pattern); - const sections = this._splitSegmentsIntoSections(segments); - this._storage.push({ - complete: sections.length <= 1, - pattern, - segments, - sections - }); - } - } - _getPatternSegments(pattern) { - const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); - return parts.map((part) => { - const dynamic = utils.pattern.isDynamicPattern(part, this._settings); - if (!dynamic) { - return { - dynamic: false, - pattern: part - }; - } - return { - dynamic: true, - pattern: part, - patternRe: utils.pattern.makeRe(part, this._micromatchOptions) - }; - }); - } - _splitSegmentsIntoSections(segments) { - return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); - } - }; - exports2.default = Matcher; - } -}); - -// node_modules/fast-glob/out/providers/matchers/partial.js -var require_partial = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var matcher_1 = require_matcher(); - var PartialMatcher = class extends matcher_1.default { - match(filepath) { - const parts = filepath.split("/"); - const levels = parts.length; - const patterns = this._storage.filter((info4) => !info4.complete || info4.segments.length > levels); - for (const pattern of patterns) { - const section = pattern.sections[0]; - if (!pattern.complete && levels > section.length) { - return true; - } - const match = parts.every((part, index) => { - const segment = pattern.segments[index]; - if (segment.dynamic && segment.patternRe.test(part)) { - return true; - } - if (!segment.dynamic && segment.pattern === part) { - return true; - } - return false; - }); - if (match) { - return true; - } - } - return false; - } - }; - exports2.default = PartialMatcher; - } -}); - -// node_modules/fast-glob/out/providers/filters/deep.js -var require_deep = __commonJS({ - "node_modules/fast-glob/out/providers/filters/deep.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var partial_1 = require_partial(); - var DeepFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - } - getFilter(basePath, positive, negative) { - const matcher = this._getMatcher(positive); - const negativeRe = this._getNegativePatternsRe(negative); - return (entry) => this._filter(basePath, entry, matcher, negativeRe); - } - _getMatcher(patterns) { - return new partial_1.default(patterns, this._settings, this._micromatchOptions); - } - _getNegativePatternsRe(patterns) { - const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); - return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); - } - _filter(basePath, entry, matcher, negativeRe) { - if (this._isSkippedByDeep(basePath, entry.path)) { - return false; - } - if (this._isSkippedSymbolicLink(entry)) { - return false; - } - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._isSkippedByPositivePatterns(filepath, matcher)) { - return false; - } - return this._isSkippedByNegativePatterns(filepath, negativeRe); - } - _isSkippedByDeep(basePath, entryPath) { - if (this._settings.deep === Infinity) { - return false; - } - return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; - } - _getEntryLevel(basePath, entryPath) { - const entryPathDepth = entryPath.split("/").length; - if (basePath === "") { - return entryPathDepth; - } - const basePathDepth = basePath.split("/").length; - return entryPathDepth - basePathDepth; - } - _isSkippedSymbolicLink(entry) { - return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); - } - _isSkippedByPositivePatterns(entryPath, matcher) { - return !this._settings.baseNameMatch && !matcher.match(entryPath); - } - _isSkippedByNegativePatterns(entryPath, patternsRe) { - return !utils.pattern.matchAny(entryPath, patternsRe); - } - }; - exports2.default = DeepFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/entry.js -var require_entry = __commonJS({ - "node_modules/fast-glob/out/providers/filters/entry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var EntryFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this.index = /* @__PURE__ */ new Map(); - } - getFilter(positive, negative) { - const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); - const patterns = { - positive: { - all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) - }, - negative: { - absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), - relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) - } - }; - return (entry) => this._filter(entry, patterns); - } - _filter(entry, patterns) { - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._settings.unique && this._isDuplicateEntry(filepath)) { - return false; - } - if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { - return false; - } - const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); - if (this._settings.unique && isMatched) { - this._createIndexRecord(filepath); - } - return isMatched; - } - _isDuplicateEntry(filepath) { - return this.index.has(filepath); - } - _createIndexRecord(filepath) { - this.index.set(filepath, void 0); - } - _onlyFileFilter(entry) { - return this._settings.onlyFiles && !entry.dirent.isFile(); - } - _onlyDirectoryFilter(entry) { - return this._settings.onlyDirectories && !entry.dirent.isDirectory(); - } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { - return utils.pattern.matchAny(filepath + "/", patternsRe); - } - return isMatched; - } - }; - exports2.default = EntryFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/error.js -var require_error = __commonJS({ - "node_modules/fast-glob/out/providers/filters/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var ErrorFilter = class { - constructor(_settings) { - this._settings = _settings; - } - getFilter() { - return (error2) => this._isNonFatalError(error2); - } - _isNonFatalError(error2) { - return utils.errno.isEnoentCodeError(error2) || this._settings.suppressErrors; - } - }; - exports2.default = ErrorFilter; - } -}); - -// node_modules/fast-glob/out/providers/transformers/entry.js -var require_entry2 = __commonJS({ - "node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var EntryTransformer = class { - constructor(_settings) { - this._settings = _settings; - } - getTransformer() { - return (entry) => this._transform(entry); - } - _transform(entry) { - let filepath = entry.path; - if (this._settings.absolute) { - filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); - filepath = utils.path.unixify(filepath); - } - if (this._settings.markDirectories && entry.dirent.isDirectory()) { - filepath += "/"; - } - if (!this._settings.objectMode) { - return filepath; - } - return Object.assign(Object.assign({}, entry), { path: filepath }); - } - }; - exports2.default = EntryTransformer; - } -}); - -// node_modules/fast-glob/out/providers/provider.js -var require_provider = __commonJS({ - "node_modules/fast-glob/out/providers/provider.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path7 = require("path"); - var deep_1 = require_deep(); - var entry_1 = require_entry(); - var error_1 = require_error(); - var entry_2 = require_entry2(); - var Provider = class { - constructor(_settings) { - this._settings = _settings; - this.errorFilter = new error_1.default(this._settings); - this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); - this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); - this.entryTransformer = new entry_2.default(this._settings); - } - _getRootDirectory(task) { - return path7.resolve(this._settings.cwd, task.base); - } - _getReaderOptions(task) { - const basePath = task.base === "." ? "" : task.base; - return { - basePath, - pathSegmentSeparator: "/", - concurrency: this._settings.concurrency, - deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), - entryFilter: this.entryFilter.getFilter(task.positive, task.negative), - errorFilter: this.errorFilter.getFilter(), - followSymbolicLinks: this._settings.followSymbolicLinks, - fs: this._settings.fs, - stats: this._settings.stats, - throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, - transform: this.entryTransformer.getTransformer() - }; - } - _getMicromatchOptions() { - return { - dot: this._settings.dot, - matchBase: this._settings.baseNameMatch, - nobrace: !this._settings.braceExpansion, - nocase: !this._settings.caseSensitiveMatch, - noext: !this._settings.extglob, - noglobstar: !this._settings.globstar, - posix: true, - strictSlashes: false - }; - } - }; - exports2.default = Provider; - } -}); - -// node_modules/fast-glob/out/providers/async.js -var require_async6 = __commonJS({ - "node_modules/fast-glob/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var async_1 = require_async5(); - var provider_1 = require_provider(); - var ProviderAsync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new async_1.default(this._settings); - } - async read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = await this.api(root, task, options); - return entries.map((entry) => options.transform(entry)); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderAsync; - } -}); - -// node_modules/fast-glob/out/providers/stream.js -var require_stream4 = __commonJS({ - "node_modules/fast-glob/out/providers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var stream_2 = require_stream3(); - var provider_1 = require_provider(); - var ProviderStream = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new stream_2.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const source = this.api(root, task, options); - const destination = new stream_1.Readable({ objectMode: true, read: () => { - } }); - source.once("error", (error2) => destination.emit("error", error2)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")); - destination.once("close", () => source.destroy()); - return destination; - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderStream; - } -}); - -// node_modules/fast-glob/out/readers/sync.js -var require_sync5 = __commonJS({ - "node_modules/fast-glob/out/readers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderSync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkSync = fsWalk.walkSync; - this._statSync = fsStat.statSync; - } - dynamic(root, options) { - return this._walkSync(root, options); - } - static(patterns, options) { - const entries = []; - for (const pattern of patterns) { - const filepath = this._getFullEntryPath(pattern); - const entry = this._getEntry(filepath, pattern, options); - if (entry === null || !options.entryFilter(entry)) { - continue; - } - entries.push(entry); - } - return entries; - } - _getEntry(filepath, pattern, options) { - try { - const stats = this._getStat(filepath); - return this._makeEntry(stats, pattern); - } catch (error2) { - if (options.errorFilter(error2)) { - return null; - } - throw error2; - } - } - _getStat(filepath) { - return this._statSync(filepath, this._fsStatSettings); - } - }; - exports2.default = ReaderSync; - } -}); - -// node_modules/fast-glob/out/providers/sync.js -var require_sync6 = __commonJS({ - "node_modules/fast-glob/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var sync_1 = require_sync5(); - var provider_1 = require_provider(); - var ProviderSync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new sync_1.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = this.api(root, task, options); - return entries.map(options.transform); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderSync; - } -}); - -// node_modules/fast-glob/out/settings.js -var require_settings4 = __commonJS({ - "node_modules/fast-glob/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs7 = require("fs"); - var os2 = require("os"); - var CPU_COUNT = Math.max(os2.cpus().length, 1); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs7.lstat, - lstatSync: fs7.lstatSync, - stat: fs7.stat, - statSync: fs7.statSync, - readdir: fs7.readdir, - readdirSync: fs7.readdirSync - }; - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.absolute = this._getValue(this._options.absolute, false); - this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); - this.braceExpansion = this._getValue(this._options.braceExpansion, true); - this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); - this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); - this.cwd = this._getValue(this._options.cwd, process.cwd()); - this.deep = this._getValue(this._options.deep, Infinity); - this.dot = this._getValue(this._options.dot, false); - this.extglob = this._getValue(this._options.extglob, true); - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); - this.fs = this._getFileSystemMethods(this._options.fs); - this.globstar = this._getValue(this._options.globstar, true); - this.ignore = this._getValue(this._options.ignore, []); - this.markDirectories = this._getValue(this._options.markDirectories, false); - this.objectMode = this._getValue(this._options.objectMode, false); - this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); - this.onlyFiles = this._getValue(this._options.onlyFiles, true); - this.stats = this._getValue(this._options.stats, false); - this.suppressErrors = this._getValue(this._options.suppressErrors, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); - this.unique = this._getValue(this._options.unique, true); - if (this.onlyDirectories) { - this.onlyFiles = false; - } - if (this.stats) { - this.objectMode = true; - } - this.ignore = [].concat(this.ignore); - } - _getValue(option, value) { - return option === void 0 ? value : option; - } - _getFileSystemMethods(methods = {}) { - return Object.assign(Object.assign({}, exports2.DEFAULT_FILE_SYSTEM_ADAPTER), methods); - } - }; - exports2.default = Settings; - } -}); - -// node_modules/fast-glob/out/index.js -var require_out4 = __commonJS({ - "node_modules/fast-glob/out/index.js"(exports2, module2) { - "use strict"; - var taskManager = require_tasks(); - var async_1 = require_async6(); - var stream_1 = require_stream4(); - var sync_1 = require_sync6(); - var settings_1 = require_settings4(); - var utils = require_utils7(); - async function FastGlob(source, options) { - assertPatternsInput(source); - const works = getWorks(source, async_1.default, options); - const result = await Promise.all(works); - return utils.array.flatten(result); - } - (function(FastGlob2) { - FastGlob2.glob = FastGlob2; - FastGlob2.globSync = sync; - FastGlob2.globStream = stream; - FastGlob2.async = FastGlob2; - function sync(source, options) { - assertPatternsInput(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream(source, options) { - assertPatternsInput(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream; - function generateTasks(source, options) { - assertPatternsInput(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern; - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPathToPattern(source); - } - FastGlob2.convertPathToPattern = convertPathToPattern; - let posix; - (function(posix2) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapePosixPath(source); - } - posix2.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertPosixPathToPattern(source); - } - posix2.convertPathToPattern = convertPathToPattern2; - })(posix = FastGlob2.posix || (FastGlob2.posix = {})); - let win32; - (function(win322) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapeWindowsPath(source); - } - win322.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertWindowsPathToPattern(source); - } - win322.convertPathToPattern = convertPathToPattern2; - })(win32 = FastGlob2.win32 || (FastGlob2.win32 = {})); - })(FastGlob || (FastGlob = {})); - function getWorks(source, _Provider, options) { - const patterns = [].concat(source); - const settings = new settings_1.default(options); - const tasks = taskManager.generate(patterns, settings); - const provider = new _Provider(settings); - return tasks.map(provider.read, provider); - } - function assertPatternsInput(input) { - const source = [].concat(input); - const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); - if (!isValidSource) { - throw new TypeError("Patterns must be a string (non empty) or an array of strings"); - } - } - module2.exports = FastGlob; - } -}); - -// node_modules/path-type/index.js -var require_path_type = __commonJS({ - "node_modules/path-type/index.js"(exports2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var fs7 = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify2(fs7[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - return fs7[fsStatType](filePath)[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - exports2.isFile = isType.bind(null, "stat", "isFile"); - exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// node_modules/dir-glob/index.js -var require_dir_glob = __commonJS({ - "node_modules/dir-glob/index.js"(exports2, module2) { - "use strict"; - var path7 = require("path"); - var pathType = require_path_type(); - var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; - var getPath = (filepath, cwd) => { - const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; - return path7.isAbsolute(pth) ? pth : path7.join(cwd, pth); - }; - var addExtensions = (file, extensions) => { - if (path7.extname(file)) { - return `**/${file}`; - } - return `**/${file}.${getExtensions(extensions)}`; - }; - var getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - if (options.files && options.extensions) { - return options.files.map((x) => path7.posix.join(directory, addExtensions(x, options.extensions))); - } - if (options.files) { - return options.files.map((x) => path7.posix.join(directory, `**/${x}`)); - } - if (options.extensions) { - return [path7.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - return [path7.posix.join(directory, "**")]; - }; - module2.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = await Promise.all([].concat(input).map(async (x) => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - return [].concat.apply([], globs); - }; - module2.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - return [].concat.apply([], globs); - }; - } -}); - -// node_modules/ignore/index.js -var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports2, module2) { - function makeArray(subject) { - return Array.isArray(subject) ? subject : [subject]; - } - var EMPTY = ""; - var SPACE = " "; - var ESCAPE = "\\"; - var REGEX_TEST_BLANK_LINE = /^\s+$/; - var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; - var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; - var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; - var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; - var SLASH = "/"; - var TMP_KEY_IGNORE = "node-ignore"; - if (typeof Symbol !== "undefined") { - TMP_KEY_IGNORE = Symbol.for("node-ignore"); - } - var KEY_IGNORE = TMP_KEY_IGNORE; - var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); - var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; - var RETURN_FALSE = () => false; - var sanitizeRange = (range) => range.replace( - REGEX_REGEXP_RANGE, - (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY - ); - var cleanRangeBackSlash = (slashes) => { - const { length } = slashes; - return slashes.slice(0, length - length % 2); - }; - var REPLACERS = [ - [ - // remove BOM - // TODO: - // Other similar zero-width characters? - /^\uFEFF/, - () => EMPTY - ], - // > Trailing spaces are ignored unless they are quoted with backslash ("\") - [ - // (a\ ) -> (a ) - // (a ) -> (a) - // (a \ ) -> (a ) - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY - ], - // replace (\ ) with ' ' - [ - /\\\s/g, - () => SPACE - ], - // Escape metacharacters - // which is written down by users but means special for regular expressions. - // > There are 12 characters with special meanings: - // > - the backslash \, - // > - the caret ^, - // > - the dollar sign $, - // > - the period or dot ., - // > - the vertical bar or pipe symbol |, - // > - the question mark ?, - // > - the asterisk or star *, - // > - the plus sign +, - // > - the opening parenthesis (, - // > - the closing parenthesis ), - // > - and the opening square bracket [, - // > - the opening curly brace {, - // > These special characters are often called "metacharacters". - [ - /[\\$.|*+(){^]/g, - (match) => `\\${match}` - ], - [ - // > a question mark (?) matches a single character - /(?!\\)\?/g, - () => "[^/]" - ], - // leading slash - [ - // > A leading slash matches the beginning of the pathname. - // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". - // A leading slash matches the beginning of the pathname - /^\//, - () => "^" - ], - // replace special metacharacter slash after the leading slash - [ - /\//g, - () => "\\/" - ], - [ - // > A leading "**" followed by a slash means match in all directories. - // > For example, "**/foo" matches file or directory "foo" anywhere, - // > the same as pattern "foo". - // > "**/foo/bar" matches file or directory "bar" anywhere that is directly - // > under directory "foo". - // Notice that the '*'s have been replaced as '\\*' - /^\^*\\\*\\\*\\\//, - // '**/foo' <-> 'foo' - () => "^(?:.*\\/)?" - ], - // starting - [ - // there will be no leading '/' - // (which has been replaced by section "leading slash") - // If starts with '**', adding a '^' to the regular expression also works - /^(?=[^^])/, - function startingReplacer() { - return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; - } - ], - // two globstars - [ - // Use lookahead assertions so that we could match more than one `'/**'` - /\\\/\\\*\\\*(?=\\\/|$)/g, - // Zero, one or several directories - // should not use '*', or it will be replaced by the next replacer - // Check if it is not the last `'/**'` - (_, index, str2) => index + 6 < str2.length ? "(?:\\/[^\\/]+)*" : "\\/.+" - ], - // normal intermediate wildcards - [ - // Never replace escaped '*' - // ignore rule '\*' will match the path '*' - // 'abc.*/' -> go - // 'abc.*' -> skip this rule, - // coz trailing single wildcard will be handed by [trailing wildcard] - /(^|[^\\]+)(\\\*)+(?=.+)/g, - // '*.js' matches '.js' - // '*.js' doesn't match 'abc' - (_, p1, p2) => { - const unescaped = p2.replace(/\\\*/g, "[^\\/]*"); - return p1 + unescaped; - } - ], - [ - // unescape, revert step 3 except for back slash - // For example, if a user escape a '\\*', - // after step 3, the result will be '\\\\\\*' - /\\\\\\(?=[$.|*+(){^])/g, - () => ESCAPE - ], - [ - // '\\\\' -> '\\' - /\\\\/g, - () => ESCAPE - ], - [ - // > The range notation, e.g. [a-zA-Z], - // > can be used to match one of the characters in a range. - // `\` is escaped by step 3 - /(\\)?\[([^\]/]*?)(\\*)($|\])/g, - (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" - ], - // ending - [ - // 'js' will not match 'js.' - // 'ab' will not match 'abc' - /(?:[^*])$/, - // WTF! - // https://git-scm.com/docs/gitignore - // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) - // which re-fixes #24, #38 - // > If there is a separator at the end of the pattern then the pattern - // > will only match directories, otherwise the pattern can match both - // > files and directories. - // 'js*' will not match 'a.js' - // 'js/' will not match 'a.js' - // 'js' will match 'a.js' and 'a.js/' - (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } - ] - ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; - } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); - }; - var isString = (subject) => typeof subject === "string"; - var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); - var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; - this.pattern = pattern; - this.negative = negative; - this.regex = regex; - } - }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; - let negative = false; - if (pattern.indexOf("!") === 0) { - negative = true; - pattern = pattern.substr(1); - } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); - return new IgnoreRule( - origin, - pattern, - negative, - regex - ); - }; - var throwError2 = (message, Ctor) => { - throw new Ctor(message); - }; - var checkPath = (path7, originalPath, doThrow) => { - if (!isString(path7)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path7) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path7)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; - }; - var isNotRelative = (path7) => REGEX_TEST_INVALID_PATH.test(path7); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define2(this, KEY_IGNORE, true); - this._rules = []; - this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); - } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); - } - _addPattern(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); - this._added = true; - return; - } - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignoreCase); - this._added = true; - this._rules.push(rule); - } - } - // @param {Array | string | Ignore} pattern - add(pattern) { - this._added = false; - makeArray( - isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { - this._initCache(); - } - return this; - } - // legacy - addPattern(pattern) { - return this.add(pattern); - } - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - _testOne(path7, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path7); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; - } - // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { - const path7 = originalPath && checkPath.convert(originalPath); - checkPath( - path7, - originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError2 - ); - return this._t(path7, cache, checkUnignored, slices); - } - _t(path7, cache, checkUnignored, slices) { - if (path7 in cache) { - return cache[path7]; - } - if (!slices) { - slices = path7.split(SLASH); - } - slices.pop(); - if (!slices.length) { - return cache[path7] = this._testOne(path7, checkUnignored); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path7] = parent.ignored ? parent : this._testOne(path7, checkUnignored); - } - ignores(path7) { - return this._test(path7, this._ignoreCache, false).ignored; - } - createFilter() { - return (path7) => !this.ignores(path7); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path7) { - return this._test(path7, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - var isPathValid = (path7) => checkPath(path7 && checkPath.convert(path7), path7, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module2.exports = factory; - if ( - // Detect `process` so that it can run in browsers. - typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") - ) { - const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); - checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path7) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path7) || isNotRelative(path7); - } - } -}); - -// node_modules/slash/index.js -var require_slash = __commonJS({ - "node_modules/slash/index.js"(exports2, module2) { - "use strict"; - module2.exports = (path7) => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path7); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path7); - if (isExtendedLengthPath || hasNonAscii) { - return path7; - } - return path7.replace(/\\/g, "/"); - }; - } -}); - -// node_modules/globby/gitignore.js -var require_gitignore = __commonJS({ - "node_modules/globby/gitignore.js"(exports2, module2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var fs7 = require("fs"); - var path7 = require("path"); - var fastGlob = require_out4(); - var gitIgnore = require_ignore(); - var slash = require_slash(); - var DEFAULT_IGNORE = [ - "**/node_modules/**", - "**/flow-typed/**", - "**/coverage/**", - "**/.git" - ]; - var readFileP = promisify2(fs7.readFile); - var mapGitIgnorePatternTo = (base) => (ignore) => { - if (ignore.startsWith("!")) { - return "!" + path7.posix.join(base, ignore.slice(1)); - } - return path7.posix.join(base, ignore); - }; - var parseGitIgnore = (content, options) => { - const base = slash(path7.relative(options.cwd, path7.dirname(options.fileName))); - return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); - }; - var reduceIgnore = (files) => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - return ignores; - }; - var ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path7.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - return path7.join(cwd, p); - }; - var getIsIgnoredPredecate = (ignores, cwd) => { - return (p) => ignores.ignores(slash(path7.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); - }; - var getFile = async (file, cwd) => { - const filePath = path7.join(cwd, file); - const content = await readFileP(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var getFileSync = (file, cwd) => { - const filePath = path7.join(cwd, file); - const content = fs7.readFileSync(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) - } = {}) => { - return { ignore, cwd }; - }; - module2.exports = async (options) => { - options = normalizeOptions(options); - const paths = await fastGlob("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - module2.exports.sync = (options) => { - options = normalizeOptions(options); - const paths = fastGlob.sync("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = paths.map((file) => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - } -}); - -// node_modules/globby/stream-utils.js -var require_stream_utils = __commonJS({ - "node_modules/globby/stream-utils.js"(exports2, module2) { - "use strict"; - var { Transform } = require("stream"); - var ObjectTransform = class extends Transform { - constructor() { - super({ - objectMode: true - }); - } - }; - var FilterStream = class extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - callback(); - } - }; - var UniqueStream = class extends ObjectTransform { - constructor() { - super(); - this._pushed = /* @__PURE__ */ new Set(); - } - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - callback(); - } - }; - module2.exports = { - FilterStream, - UniqueStream - }; - } -}); - -// node_modules/globby/index.js -var require_globby = __commonJS({ - "node_modules/globby/index.js"(exports2, module2) { - "use strict"; - var fs7 = require("fs"); - var arrayUnion = require_array_union(); - var merge2 = require_merge2(); - var fastGlob = require_out4(); - var dirGlob = require_dir_glob(); - var gitignore = require_gitignore(); - var { FilterStream, UniqueStream } = require_stream_utils(); - var DEFAULT_FILTER = () => false; - var isNegative = (pattern) => pattern[0] === "!"; - var assertPatternsInput = (patterns) => { - if (!patterns.every((pattern) => typeof pattern === "string")) { - throw new TypeError("Patterns must be a string or an array of strings"); - } - }; - var checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - let stat; - try { - stat = fs7.statSync(options.cwd); - } catch { - return; - } - if (!stat.isDirectory()) { - throw new Error("The `cwd` option must be a path to a directory"); - } - }; - var getPathString = (p) => p.stats instanceof fs7.Stats ? p.path : p; - var generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - const globTasks = []; - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - for (const [index, pattern] of patterns.entries()) { - if (isNegative(pattern)) { - continue; - } - const ignore = patterns.slice(index).filter((pattern2) => isNegative(pattern2)).map((pattern2) => pattern2.slice(1)); - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - globTasks.push({ pattern, options }); - } - return globTasks; - }; - var globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === "object") { - options = { - ...options, - ...task.options.expandDirectories - }; - } - return fn(task.pattern, options); - }; - var getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - var getFilterSync = (options) => { - return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - var globToTask = (task) => (glob) => { - const { options } = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - return { - pattern: glob, - options - }; - }; - module2.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const getFilter = async () => { - return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - const getTasks = async () => { - const tasks2 = await Promise.all(globTasks.map(async (task) => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - return arrayUnion(...tasks2); - }; - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); - return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); - }; - module2.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - return matches.filter((path_) => !filter(path_)); - }; - module2.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - const filterStream = new FilterStream((p) => !filter(p)); - const uniqueStream = new UniqueStream(); - return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); - }; - module2.exports.generateGlobTasks = generateGlobTasks; - module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); - module2.exports.gitignore = gitignore; - } -}); - -// node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - "node_modules/graceful-fs/polyfills.js"(exports2, module2) { - var constants = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform2 = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs7) { - if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs7); - } - if (!fs7.lutimes) { - patchLutimes(fs7); - } - fs7.chown = chownFix(fs7.chown); - fs7.fchown = chownFix(fs7.fchown); - fs7.lchown = chownFix(fs7.lchown); - fs7.chmod = chmodFix(fs7.chmod); - fs7.fchmod = chmodFix(fs7.fchmod); - fs7.lchmod = chmodFix(fs7.lchmod); - fs7.chownSync = chownFixSync(fs7.chownSync); - fs7.fchownSync = chownFixSync(fs7.fchownSync); - fs7.lchownSync = chownFixSync(fs7.lchownSync); - fs7.chmodSync = chmodFixSync(fs7.chmodSync); - fs7.fchmodSync = chmodFixSync(fs7.fchmodSync); - fs7.lchmodSync = chmodFixSync(fs7.lchmodSync); - fs7.stat = statFix(fs7.stat); - fs7.fstat = statFix(fs7.fstat); - fs7.lstat = statFix(fs7.lstat); - fs7.statSync = statFixSync(fs7.statSync); - fs7.fstatSync = statFixSync(fs7.fstatSync); - fs7.lstatSync = statFixSync(fs7.lstatSync); - if (fs7.chmod && !fs7.lchmod) { - fs7.lchmod = function(path7, mode, cb) { - if (cb) process.nextTick(cb); - }; - fs7.lchmodSync = function() { - }; - } - if (fs7.chown && !fs7.lchown) { - fs7.lchown = function(path7, uid, gid, cb) { - if (cb) process.nextTick(cb); - }; - fs7.lchownSync = function() { - }; - } - if (platform2 === "win32") { - fs7.rename = typeof fs7.rename !== "function" ? fs7.rename : (function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { - setTimeout(function() { - fs7.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er); - }); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); - return rename; - })(fs7.rename); - } - fs7.read = typeof fs7.read !== "function" ? fs7.read : (function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs7, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs7, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); - return read; - })(fs7.read); - fs7.readSync = typeof fs7.readSync !== "function" ? fs7.readSync : /* @__PURE__ */ (function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs7, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - })(fs7.readSync); - function patchLchmod(fs8) { - fs8.lchmod = function(path7, mode, callback) { - fs8.open( - path7, - constants.O_WRONLY | constants.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) callback(err); - return; - } - fs8.fchmod(fd, mode, function(err2) { - fs8.close(fd, function(err22) { - if (callback) callback(err2 || err22); - }); - }); - } - ); - }; - fs8.lchmodSync = function(path7, mode) { - var fd = fs8.openSync(path7, constants.O_WRONLY | constants.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs8.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs8.closeSync(fd); - } catch (er) { - } - } else { - fs8.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs8) { - if (constants.hasOwnProperty("O_SYMLINK") && fs8.futimes) { - fs8.lutimes = function(path7, at, mt, cb) { - fs8.open(path7, constants.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) cb(er); - return; - } - fs8.futimes(fd, at, mt, function(er2) { - fs8.close(fd, function(er22) { - if (cb) cb(er2 || er22); - }); - }); - }); - }; - fs8.lutimesSync = function(path7, at, mt) { - var fd = fs8.openSync(path7, constants.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs8.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs8.closeSync(fd); - } catch (er) { - } - } else { - fs8.closeSync(fd); - } - } - return ret; - }; - } else if (fs8.futimes) { - fs8.lutimes = function(_a, _b, _c, cb) { - if (cb) process.nextTick(cb); - }; - fs8.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) return orig; - return function(target, mode, cb) { - return orig.call(fs7, target, mode, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) return orig; - return function(target, mode) { - try { - return orig.call(fs7, target, mode); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function chownFix(orig) { - if (!orig) return orig; - return function(target, uid, gid, cb) { - return orig.call(fs7, target, uid, gid, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) return orig; - return function(target, uid, gid) { - try { - return orig.call(fs7, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function statFix(orig) { - if (!orig) return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - if (cb) cb.apply(this, arguments); - } - return options ? orig.call(fs7, target, options, callback) : orig.call(fs7, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) return orig; - return function(target, options) { - var stats = options ? orig.call(fs7, target, options) : orig.call(fs7, target); - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { - var Stream = require("stream").Stream; - module2.exports = legacy; - function legacy(fs7) { - return { - ReadStream, - WriteStream - }; - function ReadStream(path7, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path7, options); - Stream.call(this); - var self2 = this; - this.path = path7; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self2._read(); - }); - return; - } - fs7.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self2.emit("error", err); - self2.readable = false; - return; - } - self2.fd = fd; - self2.emit("open", fd); - self2._read(); - }); - } - function WriteStream(path7, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path7, options); - Stream.call(this); - this.path = path7; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs7.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - "node_modules/graceful-fs/clone.js"(exports2, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs7 = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop() { - } - function publishQueue(context2, queue2) { - Object.defineProperty(context2, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug3 = noop; - if (util.debuglog) - debug3 = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug3 = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs7[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs7, queue); - fs7.close = (function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs7, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - })(fs7.close); - fs7.closeSync = (function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs7, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - })(fs7.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug3(fs7[gracefulQueue]); - require("assert").equal(fs7[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs7[gracefulQueue]); - } - module2.exports = patch(clone(fs7)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs7.__patched) { - module2.exports = patch(fs7); - fs7.__patched = true; - } - function patch(fs8) { - polyfills(fs8); - fs8.gracefulify = patch; - fs8.createReadStream = createReadStream; - fs8.createWriteStream = createWriteStream; - var fs$readFile = fs8.readFile; - fs8.readFile = readFile; - function readFile(path7, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path7, options, cb); - function go$readFile(path8, options2, cb2, startTime) { - return fs$readFile(path8, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path8, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs8.writeFile; - fs8.writeFile = writeFile; - function writeFile(path7, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path7, data, options, cb); - function go$writeFile(path8, data2, options2, cb2, startTime) { - return fs$writeFile(path8, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path8, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs8.appendFile; - if (fs$appendFile) - fs8.appendFile = appendFile; - function appendFile(path7, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path7, data, options, cb); - function go$appendFile(path8, data2, options2, cb2, startTime) { - return fs$appendFile(path8, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path8, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs8.copyFile; - if (fs$copyFile) - fs8.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs8.readdir; - fs8.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path7, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path8, options2, cb2, startTime) { - return fs$readdir(path8, fs$readdirCallback( - path8, - options2, - cb2, - startTime - )); - } : function go$readdir2(path8, options2, cb2, startTime) { - return fs$readdir(path8, options2, fs$readdirCallback( - path8, - options2, - cb2, - startTime - )); - }; - return go$readdir(path7, options, cb); - function fs$readdirCallback(path8, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path8, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs8); - ReadStream = legStreams.ReadStream; - WriteStream = legStreams.WriteStream; - } - var fs$ReadStream = fs8.ReadStream; - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype); - ReadStream.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs8.WriteStream; - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype); - WriteStream.prototype.open = WriteStream$open; - } - Object.defineProperty(fs8, "ReadStream", { - get: function() { - return ReadStream; - }, - set: function(val2) { - ReadStream = val2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs8, "WriteStream", { - get: function() { - return WriteStream; - }, - set: function(val2) { - WriteStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream; - Object.defineProperty(fs8, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val2) { - FileReadStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream; - Object.defineProperty(fs8, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val2) { - FileWriteStream = val2; - }, - enumerable: true, - configurable: true - }); - function ReadStream(path7, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream(path7, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream(path7, options) { - return new fs8.ReadStream(path7, options); - } - function createWriteStream(path7, options) { - return new fs8.WriteStream(path7, options); - } - var fs$open = fs8.open; - fs8.open = open; - function open(path7, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path7, flags, mode, cb); - function go$open(path8, flags2, mode2, cb2, startTime) { - return fs$open(path8, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path8, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs8; - } - function enqueue(elem) { - debug3("ENQUEUE", elem[0].name, elem[1]); - fs7[gracefulQueue].push(elem); - retry3(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs7[gracefulQueue].length; ++i) { - if (fs7[gracefulQueue][i].length > 2) { - fs7[gracefulQueue][i][3] = now; - fs7[gracefulQueue][i][4] = now; - } - } - retry3(); - } - function retry3() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs7[gracefulQueue].length === 0) - return; - var elem = fs7[gracefulQueue].shift(); - var fn = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug3("RETRY", fn.name, args); - fn.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug3("TIMEOUT", fn.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug3("RETRY", fn.name, args); - fn.apply(null, args.concat([startTime])); - } else { - fs7[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry3, 0); - } - } - } -}); - -// node_modules/is-path-cwd/index.js -var require_is_path_cwd = __commonJS({ - "node_modules/is-path-cwd/index.js"(exports2, module2) { - "use strict"; - var path7 = require("path"); - module2.exports = (path_) => { - let cwd = process.cwd(); - path_ = path7.resolve(path_); - if (process.platform === "win32") { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - return path_ === cwd; - }; - } -}); - -// node_modules/is-path-inside/index.js -var require_is_path_inside = __commonJS({ - "node_modules/is-path-inside/index.js"(exports2, module2) { - "use strict"; - var path7 = require("path"); - module2.exports = (childPath, parentPath) => { - const relation = path7.relative(parentPath, childPath); - return Boolean( - relation && relation !== ".." && !relation.startsWith(`..${path7.sep}`) && relation !== path7.resolve(childPath) - ); - }; - } -}); - -// node_modules/fs.realpath/old.js -var require_old = __commonJS({ - "node_modules/fs.realpath/old.js"(exports2) { - var pathModule = require("path"); - var isWindows = process.platform === "win32"; - var fs7 = require("fs"); - var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - function rethrow() { - var callback; - if (DEBUG) { - var backtrace = new Error(); - callback = debugCallback; - } else - callback = missingCallback; - return callback; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; - else if (!process.noDeprecation) { - var msg = "fs: missing callback " + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } - } - function maybeCallback(cb) { - return typeof cb === "function" ? cb : rethrow(); - } - var normalize3 = pathModule.normalize; - if (isWindows) { - nextPartRe = /(.*?)(?:[\/\\]+|$)/g; - } else { - nextPartRe = /(.*?)(?:[\/]+|$)/g; - } - var nextPartRe; - if (isWindows) { - splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; - } else { - splitRootRe = /^[\/]*/; - } - var splitRootRe; - exports2.realpathSync = function realpathSync(p, cache) { - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs7.lstatSync(base); - knownHard[base] = true; - } - } - while (pos < p.length) { - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - continue; - } - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - resolvedLink = cache[base]; - } else { - var stat = fs7.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs7.statSync(base); - linkTarget = fs7.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - if (cache) cache[original] = p; - return p; - }; - exports2.realpath = function realpath(p, cache, cb) { - if (typeof cb !== "function") { - cb = maybeCallback(cache); - cache = null; - } - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs7.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - function LOOP() { - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - return process.nextTick(LOOP); - } - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - return gotResolvedLink(cache[base]); - } - return fs7.lstat(base, gotStat); - } - function gotStat(err, stat) { - if (err) return cb(err); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs7.stat(base, function(err2) { - if (err2) return cb(err2); - fs7.readlink(base, function(err3, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err3, target); - }); - }); - } - function gotTarget(err, target, base2) { - if (err) return cb(err); - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base2] = resolvedLink; - gotResolvedLink(resolvedLink); - } - function gotResolvedLink(resolvedLink) { - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - }; - } -}); - -// node_modules/fs.realpath/index.js -var require_fs5 = __commonJS({ - "node_modules/fs.realpath/index.js"(exports2, module2) { - module2.exports = realpath; - realpath.realpath = realpath; - realpath.sync = realpathSync; - realpath.realpathSync = realpathSync; - realpath.monkeypatch = monkeypatch; - realpath.unmonkeypatch = unmonkeypatch; - var fs7 = require("fs"); - var origRealpath = fs7.realpath; - var origRealpathSync = fs7.realpathSync; - var version = process.version; - var ok = /^v[0-5]\./.test(version); - var old = require_old(); - function newError(er) { - return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); - } - function realpath(p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb); - } - if (typeof cache === "function") { - cb = cache; - cache = null; - } - origRealpath(p, cache, function(er, result) { - if (newError(er)) { - old.realpath(p, cache, cb); - } else { - cb(er, result); - } - }); - } - function realpathSync(p, cache) { - if (ok) { - return origRealpathSync(p, cache); - } - try { - return origRealpathSync(p, cache); - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache); - } else { - throw er; - } - } - } - function monkeypatch() { - fs7.realpath = realpath; - fs7.realpathSync = realpathSync; - } - function unmonkeypatch() { - fs7.realpath = origRealpath; - fs7.realpathSync = origRealpathSync; - } - } -}); - -// node_modules/concat-map/index.js -var require_concat_map = __commonJS({ - "node_modules/concat-map/index.js"(exports2, module2) { - module2.exports = function(xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - } -}); - -// node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ - "node_modules/balanced-match/index.js"(exports2, module2) { - "use strict"; - module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r = range(a, b, str2); - return r && { - start: r[0], - end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + a.length, r[1]), - post: str2.slice(r[1] + b.length) - }; - } - function maybeMatch(reg, str2) { - var m = str2.match(reg); - return m ? m[0] : null; - } - balanced.range = range; - function range(a, b, str2) { - var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); - var i = ai; - if (ai >= 0 && bi > 0) { - begs = []; - left = str2.length; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str2.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - bi = str2.indexOf(b, i + 1); - } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length) { - result = [left, right]; - } - } - return result; - } - } -}); - -// node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ - "node_modules/brace-expansion/index.js"(exports2, module2) { - var concatMap = require_concat_map(); - var balanced = require_balanced_match(); - module2.exports = expandTop; - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) - return [""]; - var parts = []; - var m = balanced("{", "}", str2); - if (!m) - return str2.split(","); - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; - } - function expandTop(str2) { - if (!str2) - return []; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); - } - return expand(escapeBraces(str2), true).map(unescapeBraces); - } - function embrace(str2) { - return "{" + str2 + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte5(i, y) { - return i >= y; - } - function expand(str2, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2); - } - return [str2]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand(m.post, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte5; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { - return expand(el, false); - }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - return expansions; - } - } -}); - -// node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ - "node_modules/minimatch/minimatch.js"(exports2, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path7 = (function() { - try { - return require("path"); - } catch (e) { - } - })() || { - sep: "/" - }; - minimatch.sep = path7.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand = require_brace_expansion(); - var plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" } - }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set2, c) { - set2[c] = true; - return set2; - }, {}); - } - var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { - options = options || {}; - return function(p, i, list) { - return minimatch(p, pattern, options); - }; - } - function ext(a, b) { - b = b || {}; - var t = {}; - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; - } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); - }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); - }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); - }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); - }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); - }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); - }; - m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); - }; - return m; - }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); - if (!options) options = {}; - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); - } - assertValidPattern(pattern); - if (!options) options = {}; - pattern = pattern.trim(); - if (!options.allowWindowsEscape && path7.sep !== "/") { - pattern = pattern.split(path7.sep).join("/"); - } - this.options = options; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.make(); - } - Minimatch.prototype.debug = function() { - }; - Minimatch.prototype.make = make; - function make() { - var pattern = this.pattern; - var options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); - if (options.debug) this.debug = function debug3() { - console.error.apply(console, arguments); - }; - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { - return s.split(slashSplit); - }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { - return s.map(this.parse, this); - }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { - return s.indexOf(false) === -1; - }); - this.debug(this.pattern, set2); - this.set = set2; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate = false; - var options = this.options; - var negateOffset = 0; - if (options.nonegate) return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate = !negate; - negateOffset++; - } - if (negateOffset) this.pattern = pattern.substr(negateOffset); - this.negate = negate; - } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return expand(pattern); - } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); - } - }; - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - assertValidPattern(pattern); - var options = this.options; - if (pattern === "**") { - if (!options.noglobstar) - return GLOBSTAR; - else - pattern = "*"; - } - if (pattern === "") return ""; - var re = ""; - var hasMagic = !!options.nocase; - var escaping = false; - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self2 = this; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; - } - self2.debug("clearStateChar %j %j", stateChar, re); - stateChar = false; - } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; - } - switch (c) { - /* istanbul ignore next */ - case "/": { - return false; - } - case "\\": - clearStateChar(); - escaping = true; - continue; - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); - if (inClass) { - this.debug(" in class"); - if (c === "!" && i === classStart + 1) c = "^"; - re += c; - continue; - } - self2.debug("call clearStateChar %j", stateChar); - clearStateChar(); - stateChar = c; - if (options.noext) clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re); - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - re += pl.close; - if (pl.type === "!") { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - clearStateChar(); - re += "|"; - continue; - // these are mostly the same in regexp and glob - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - var cs = pattern.substring(classStart + 1, i); - try { - RegExp("[" + cs + "]"); - } catch (er) { - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; - } - } - if (inClass) { - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re, pl); - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { - if (!$2) { - $2 = "\\"; - } - return $1 + $1 + $2 + "|"; - }); - this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case "[": - case ".": - case "(": - addPatternStart = true; - } - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - nlLast += nlAfter; - var openParensBefore = nlBefore.split("(").length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); - } - nlAfter = cleanAfter; - var dollar = ""; - if (nlAfter === "" && isSub !== SUBPARSE) { - dollar = "$"; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - if (re !== "" && hasMagic) { - re = "(?=.)" + re; - } - if (addPatternStart) { - re = patternStart + re; - } - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options.nocase ? "i" : ""; - try { - var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); - } - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) re = "^(?!" + re + ").*$"; - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - minimatch.match = function(list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function(f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = function match(f, partial) { - if (typeof partial === "undefined") partial = this.partial; - this.debug("match", f, this.pattern); - if (this.comment) return false; - if (this.empty) return f === ""; - if (f === "/" && partial) return true; - var options = this.options; - if (path7.sep !== "/") { - f = f.split(path7.sep).join("/"); - } - f = f.split(slashSplit); - this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) break; - } - for (i = 0; i < set2.length; i++) { - var pattern = set2[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) return true; - return !this.negate; - } - } - if (options.flipNegate) return false; - return this.negate; - }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options = this.options; - this.debug( - "matchOne", - { "this": this, file, pattern } - ); - this.debug("matchOne", file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug("matchOne loop"); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - if (p === false) return false; - if (p === GLOBSTAR) { - this.debug("GLOBSTAR", [pattern, p, f]); - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; - } - return true; - } - while (fr < fl) { - var swallowee = file[fr]; - this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { - this.debug("dot detected!", file, fr, pattern, pr); - break; - } - this.debug("globstar swallow a segment, and continue"); - fr++; - } - } - if (partial) { - this.debug("\n>>> no match, partial?", file, fr, pattern, pr); - if (fr === fl) return true; - } - return false; - } - var hit; - if (typeof p === "string") { - hit = f === p; - this.debug("string match", p, f, hit); - } else { - hit = f.match(p); - this.debug("pattern match", p, f, hit); - } - if (!hit) return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - return fi === fl - 1 && file[fi] === ""; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/inherits/inherits_browser.js -var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports2, module2) { - if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; - } - } -}); - -// node_modules/inherits/inherits.js -var require_inherits = __commonJS({ - "node_modules/inherits/inherits.js"(exports2, module2) { - try { - util = require("util"); - if (typeof util.inherits !== "function") throw ""; - module2.exports = util.inherits; - } catch (e) { - module2.exports = require_inherits_browser(); - } - var util; - } -}); - -// node_modules/path-is-absolute/index.js -var require_path_is_absolute = __commonJS({ - "node_modules/path-is-absolute/index.js"(exports2, module2) { - "use strict"; - function posix(path7) { - return path7.charAt(0) === "/"; - } - function win32(path7) { - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path7); - var device = result[1] || ""; - var isUnc = Boolean(device && device.charAt(1) !== ":"); - return Boolean(result[2] || isUnc); - } - module2.exports = process.platform === "win32" ? win32 : posix; - module2.exports.posix = posix; - module2.exports.win32 = win32; - } -}); - -// node_modules/rimraf/node_modules/glob/common.js -var require_common3 = __commonJS({ - "node_modules/rimraf/node_modules/glob/common.js"(exports2) { - exports2.setopts = setopts; - exports2.ownProp = ownProp; - exports2.makeAbs = makeAbs; - exports2.finish = finish; - exports2.mark = mark; - exports2.isIgnored = isIgnored; - exports2.childrenIgnored = childrenIgnored; - function ownProp(obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field); - } - var fs7 = require("fs"); - var path7 = require("path"); - var minimatch = require_minimatch(); - var isAbsolute2 = require_path_is_absolute(); - var Minimatch = minimatch.Minimatch; - function alphasort(a, b) { - return a.localeCompare(b, "en"); - } - function setupIgnores(self2, options) { - self2.ignore = options.ignore || []; - if (!Array.isArray(self2.ignore)) - self2.ignore = [self2.ignore]; - if (self2.ignore.length) { - self2.ignore = self2.ignore.map(ignoreMap); - } - } - function ignoreMap(pattern) { - var gmatcher = null; - if (pattern.slice(-3) === "/**") { - var gpattern = pattern.replace(/(\/\*\*)+$/, ""); - gmatcher = new Minimatch(gpattern, { dot: true }); - } - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher - }; - } - function setopts(self2, pattern, options) { - if (!options) - options = {}; - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar"); - } - pattern = "**/" + pattern; - } - self2.silent = !!options.silent; - self2.pattern = pattern; - self2.strict = options.strict !== false; - self2.realpath = !!options.realpath; - self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); - self2.follow = !!options.follow; - self2.dot = !!options.dot; - self2.mark = !!options.mark; - self2.nodir = !!options.nodir; - if (self2.nodir) - self2.mark = true; - self2.sync = !!options.sync; - self2.nounique = !!options.nounique; - self2.nonull = !!options.nonull; - self2.nosort = !!options.nosort; - self2.nocase = !!options.nocase; - self2.stat = !!options.stat; - self2.noprocess = !!options.noprocess; - self2.absolute = !!options.absolute; - self2.fs = options.fs || fs7; - self2.maxLength = options.maxLength || Infinity; - self2.cache = options.cache || /* @__PURE__ */ Object.create(null); - self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); - self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); - setupIgnores(self2, options); - self2.changedCwd = false; - var cwd = process.cwd(); - if (!ownProp(options, "cwd")) - self2.cwd = cwd; - else { - self2.cwd = path7.resolve(options.cwd); - self2.changedCwd = self2.cwd !== cwd; - } - self2.root = options.root || path7.resolve(self2.cwd, "/"); - self2.root = path7.resolve(self2.root); - if (process.platform === "win32") - self2.root = self2.root.replace(/\\/g, "/"); - self2.cwdAbs = isAbsolute2(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); - if (process.platform === "win32") - self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); - self2.nomount = !!options.nomount; - options.nonegate = true; - options.nocomment = true; - self2.minimatch = new Minimatch(pattern, options); - self2.options = self2.minimatch.options; - } - function finish(self2) { - var nou = self2.nounique; - var all = nou ? [] : /* @__PURE__ */ Object.create(null); - for (var i = 0, l = self2.matches.length; i < l; i++) { - var matches = self2.matches[i]; - if (!matches || Object.keys(matches).length === 0) { - if (self2.nonull) { - var literal = self2.minimatch.globSet[i]; - if (nou) - all.push(literal); - else - all[literal] = true; - } - } else { - var m = Object.keys(matches); - if (nou) - all.push.apply(all, m); - else - m.forEach(function(m2) { - all[m2] = true; - }); - } - } - if (!nou) - all = Object.keys(all); - if (!self2.nosort) - all = all.sort(alphasort); - if (self2.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self2._mark(all[i]); - } - if (self2.nodir) { - all = all.filter(function(e) { - var notDir = !/\/$/.test(e); - var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; - if (notDir && c) - notDir = c !== "DIR" && !Array.isArray(c); - return notDir; - }); - } - } - if (self2.ignore.length) - all = all.filter(function(m2) { - return !isIgnored(self2, m2); - }); - self2.found = all; - } - function mark(self2, p) { - var abs = makeAbs(self2, p); - var c = self2.cache[abs]; - var m = p; - if (c) { - var isDir = c === "DIR" || Array.isArray(c); - var slash = p.slice(-1) === "/"; - if (isDir && !slash) - m += "/"; - else if (!isDir && slash) - m = m.slice(0, -1); - if (m !== p) { - var mabs = makeAbs(self2, m); - self2.statCache[mabs] = self2.statCache[abs]; - self2.cache[mabs] = self2.cache[abs]; - } - } - return m; - } - function makeAbs(self2, f) { - var abs = f; - if (f.charAt(0) === "/") { - abs = path7.join(self2.root, f); - } else if (isAbsolute2(f) || f === "") { - abs = f; - } else if (self2.changedCwd) { - abs = path7.resolve(self2.cwd, f); - } else { - abs = path7.resolve(f); - } - if (process.platform === "win32") - abs = abs.replace(/\\/g, "/"); - return abs; - } - function isIgnored(self2, path8) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return item.matcher.match(path8) || !!(item.gmatcher && item.gmatcher.match(path8)); - }); - } - function childrenIgnored(self2, path8) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path8)); - }); - } - } -}); - -// node_modules/rimraf/node_modules/glob/sync.js -var require_sync7 = __commonJS({ - "node_modules/rimraf/node_modules/glob/sync.js"(exports2, module2) { - module2.exports = globSync; - globSync.GlobSync = GlobSync; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var Glob = require_glob().Glob; - var util = require("util"); - var path7 = require("path"); - var assert = require("assert"); - var isAbsolute2 = require_path_is_absolute(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - function globSync(pattern, options) { - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - return new GlobSync(pattern, options).found; - } - function GlobSync(pattern, options) { - if (!pattern) - throw new Error("must provide pattern"); - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options); - setopts(this, pattern, options); - if (this.noprocess) - return this; - var n = this.minimatch.set.length; - this.matches = new Array(n); - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false); - } - this._finish(); - } - GlobSync.prototype._finish = function() { - assert(this instanceof GlobSync); - if (this.realpath) { - var self2 = this; - this.matches.forEach(function(matchset, index) { - var set2 = self2.matches[index] = /* @__PURE__ */ Object.create(null); - for (var p in matchset) { - try { - p = self2._makeAbs(p); - var real = rp.realpathSync(p, self2.realpathCache); - set2[real] = true; - } catch (er) { - if (er.syscall === "stat") - set2[self2._makeAbs(p)] = true; - else - throw er; - } - } - }); - } - common2.finish(this); - }; - GlobSync.prototype._process = function(pattern, index, inGlobStar) { - assert(this instanceof GlobSync); - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute2(prefix) || isAbsolute2(pattern.join("/"))) { - if (!prefix || !isAbsolute2(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return; - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar); - }; - GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path7.join(this.root, e); - } - this._emitMatch(index, e); - } - return; - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) - newPattern = [prefix, e]; - else - newPattern = [e]; - this._process(newPattern.concat(remain), index, inGlobStar); - } - }; - GlobSync.prototype._emitMatch = function(index, e) { - if (isIgnored(this, e)) - return; - var abs = this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) { - e = abs; - } - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - if (this.stat) - this._stat(e); - }; - GlobSync.prototype._readdirInGlobStar = function(abs) { - if (this.follow) - return this._readdir(abs, false); - var entries; - var lstat; - var stat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er.code === "ENOENT") { - return null; - } - } - var isSym = lstat && lstat.isSymbolicLink(); - this.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = "FILE"; - else - entries = this._readdir(abs, false); - return entries; - }; - GlobSync.prototype._readdir = function(abs, inGlobStar) { - var entries; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return null; - if (Array.isArray(c)) - return c; - } - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)); - } catch (er) { - this._readdirError(abs, er); - return null; - } - }; - GlobSync.prototype._readdirEntries = function(abs, entries) { - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return entries; - }; - GlobSync.prototype._readdirError = function(f, er) { - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - throw error2; - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) - throw er; - if (!this.silent) - console.error("glob error", er); - break; - } - }; - GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false); - var len = entries.length; - var isSym = this.symlinks[abs]; - if (isSym && inGlobStar) - return; - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true); - } - }; - GlobSync.prototype._processSimple = function(prefix, index) { - var exists = this._stat(prefix); - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return; - if (prefix && isAbsolute2(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path7.join(this.root, prefix); - } else { - prefix = path7.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - }; - GlobSync.prototype._stat = function(f) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return false; - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return c; - if (needDir && c === "FILE") - return false; - } - var exists; - var stat = this.statCache[abs]; - if (!stat) { - var lstat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return false; - } - } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs); - } catch (er) { - stat = lstat; - } - } else { - stat = lstat; - } - } - this.statCache[abs] = stat; - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return false; - return c; - }; - GlobSync.prototype._mark = function(p) { - return common2.mark(this, p); - }; - GlobSync.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - } -}); - -// node_modules/inflight/inflight.js -var require_inflight = __commonJS({ - "node_modules/inflight/inflight.js"(exports2, module2) { - var wrappy = require_wrappy(); - var reqs = /* @__PURE__ */ Object.create(null); - var once = require_once(); - module2.exports = wrappy(inflight); - function inflight(key, cb) { - if (reqs[key]) { - reqs[key].push(cb); - return null; - } else { - reqs[key] = [cb]; - return makeres(key); - } - } - function makeres(key) { - return once(function RES() { - var cbs = reqs[key]; - var len = cbs.length; - var args = slice(arguments); - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args); - } - } finally { - if (cbs.length > len) { - cbs.splice(0, len); - process.nextTick(function() { - RES.apply(null, args); - }); - } else { - delete reqs[key]; - } - } - }); - } - function slice(args) { - var length = args.length; - var array = []; - for (var i = 0; i < length; i++) array[i] = args[i]; - return array; - } - } -}); - -// node_modules/rimraf/node_modules/glob/glob.js -var require_glob = __commonJS({ - "node_modules/rimraf/node_modules/glob/glob.js"(exports2, module2) { - module2.exports = glob; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var inherits = require_inherits(); - var EE = require("events").EventEmitter; - var path7 = require("path"); - var assert = require("assert"); - var isAbsolute2 = require_path_is_absolute(); - var globSync = require_sync7(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var inflight = require_inflight(); - var util = require("util"); - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - var once = require_once(); - function glob(pattern, options, cb) { - if (typeof options === "function") cb = options, options = {}; - if (!options) options = {}; - if (options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return globSync(pattern, options); - } - return new Glob(pattern, options, cb); - } - glob.sync = globSync; - var GlobSync = glob.GlobSync = globSync.GlobSync; - glob.glob = glob; - function extend3(origin, add) { - if (add === null || typeof add !== "object") { - return origin; - } - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; - } - glob.hasMagic = function(pattern, options_) { - var options = extend3({}, options_); - options.noprocess = true; - var g = new Glob(pattern, options); - var set2 = g.minimatch.set; - if (!pattern) - return false; - if (set2.length > 1) - return true; - for (var j = 0; j < set2[0].length; j++) { - if (typeof set2[0][j] !== "string") - return true; - } - return false; - }; - glob.Glob = Glob; - inherits(Glob, EE); - function Glob(pattern, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - if (options && options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return new GlobSync(pattern, options); - } - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb); - setopts(this, pattern, options); - this._didRealPath = false; - var n = this.minimatch.set.length; - this.matches = new Array(n); - if (typeof cb === "function") { - cb = once(cb); - this.on("error", cb); - this.on("end", function(matches) { - cb(null, matches); - }); - } - var self2 = this; - this._processing = 0; - this._emitQueue = []; - this._processQueue = []; - this.paused = false; - if (this.noprocess) - return this; - if (n === 0) - return done(); - var sync = true; - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false, done); - } - sync = false; - function done() { - --self2._processing; - if (self2._processing <= 0) { - if (sync) { - process.nextTick(function() { - self2._finish(); - }); - } else { - self2._finish(); - } - } - } - } - Glob.prototype._finish = function() { - assert(this instanceof Glob); - if (this.aborted) - return; - if (this.realpath && !this._didRealpath) - return this._realpath(); - common2.finish(this); - this.emit("end", this.found); - }; - Glob.prototype._realpath = function() { - if (this._didRealpath) - return; - this._didRealpath = true; - var n = this.matches.length; - if (n === 0) - return this._finish(); - var self2 = this; - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next); - function next() { - if (--n === 0) - self2._finish(); - } - }; - Glob.prototype._realpathSet = function(index, cb) { - var matchset = this.matches[index]; - if (!matchset) - return cb(); - var found = Object.keys(matchset); - var self2 = this; - var n = found.length; - if (n === 0) - return cb(); - var set2 = this.matches[index] = /* @__PURE__ */ Object.create(null); - found.forEach(function(p, i) { - p = self2._makeAbs(p); - rp.realpath(p, self2.realpathCache, function(er, real) { - if (!er) - set2[real] = true; - else if (er.syscall === "stat") - set2[p] = true; - else - self2.emit("error", er); - if (--n === 0) { - self2.matches[index] = set2; - cb(); - } - }); - }); - }; - Glob.prototype._mark = function(p) { - return common2.mark(this, p); - }; - Glob.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - Glob.prototype.abort = function() { - this.aborted = true; - this.emit("abort"); - }; - Glob.prototype.pause = function() { - if (!this.paused) { - this.paused = true; - this.emit("pause"); - } - }; - Glob.prototype.resume = function() { - if (this.paused) { - this.emit("resume"); - this.paused = false; - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0); - this._emitQueue.length = 0; - for (var i = 0; i < eq.length; i++) { - var e = eq[i]; - this._emitMatch(e[0], e[1]); - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0); - this._processQueue.length = 0; - for (var i = 0; i < pq.length; i++) { - var p = pq[i]; - this._processing--; - this._process(p[0], p[1], p[2], p[3]); - } - } - } - }; - Glob.prototype._process = function(pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === "function"); - if (this.aborted) - return; - this._processing++; - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]); - return; - } - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index, cb); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute2(prefix) || isAbsolute2(pattern.join("/"))) { - if (!prefix || !isAbsolute2(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return cb(); - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); - }; - Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return cb(); - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path7.join(this.root, e); - } - this._emitMatch(index, e); - } - return cb(); - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - this._process([e].concat(remain), index, inGlobStar, cb); - } - cb(); - }; - Glob.prototype._emitMatch = function(index, e) { - if (this.aborted) - return; - if (isIgnored(this, e)) - return; - if (this.paused) { - this._emitQueue.push([index, e]); - return; - } - var abs = isAbsolute2(e) ? e : this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) - e = abs; - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - var st = this.statCache[abs]; - if (st) - this.emit("stat", e, st); - this.emit("match", e); - }; - Glob.prototype._readdirInGlobStar = function(abs, cb) { - if (this.aborted) - return; - if (this.follow) - return this._readdir(abs, false, cb); - var lstatkey = "lstat\0" + abs; - var self2 = this; - var lstatcb = inflight(lstatkey, lstatcb_); - if (lstatcb) - self2.fs.lstat(abs, lstatcb); - function lstatcb_(er, lstat) { - if (er && er.code === "ENOENT") - return cb(); - var isSym = lstat && lstat.isSymbolicLink(); - self2.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) { - self2.cache[abs] = "FILE"; - cb(); - } else - self2._readdir(abs, false, cb); - } - }; - Glob.prototype._readdir = function(abs, inGlobStar, cb) { - if (this.aborted) - return; - cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); - if (!cb) - return; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return cb(); - if (Array.isArray(c)) - return cb(null, c); - } - var self2 = this; - self2.fs.readdir(abs, readdirCb(this, abs, cb)); - }; - function readdirCb(self2, abs, cb) { - return function(er, entries) { - if (er) - self2._readdirError(abs, er, cb); - else - self2._readdirEntries(abs, entries, cb); - }; - } - Glob.prototype._readdirEntries = function(abs, entries, cb) { - if (this.aborted) - return; - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return cb(null, entries); - }; - Glob.prototype._readdirError = function(f, er, cb) { - if (this.aborted) - return; - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - this.emit("error", error2); - this.abort(); - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) { - this.emit("error", er); - this.abort(); - } - if (!this.silent) - console.error("glob error", er); - break; - } - return cb(); - }; - Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false, cb); - var isSym = this.symlinks[abs]; - var len = entries.length; - if (isSym && inGlobStar) - return cb(); - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true, cb); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true, cb); - } - cb(); - }; - Glob.prototype._processSimple = function(prefix, index, cb) { - var self2 = this; - this._stat(prefix, function(er, exists) { - self2._processSimple2(prefix, index, er, exists, cb); - }); - }; - Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return cb(); - if (prefix && isAbsolute2(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path7.join(this.root, prefix); - } else { - prefix = path7.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - cb(); - }; - Glob.prototype._stat = function(f, cb) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return cb(); - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return cb(null, c); - if (needDir && c === "FILE") - return cb(); - } - var exists; - var stat = this.statCache[abs]; - if (stat !== void 0) { - if (stat === false) - return cb(null, stat); - else { - var type2 = stat.isDirectory() ? "DIR" : "FILE"; - if (needDir && type2 === "FILE") - return cb(); - else - return cb(null, type2, stat); - } - } - var self2 = this; - var statcb = inflight("stat\0" + abs, lstatcb_); - if (statcb) - self2.fs.lstat(abs, statcb); - function lstatcb_(er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - return self2.fs.stat(abs, function(er2, stat2) { - if (er2) - self2._stat2(f, abs, null, lstat, cb); - else - self2._stat2(f, abs, er2, stat2, cb); - }); - } else { - self2._stat2(f, abs, er, lstat, cb); - } - } - }; - Glob.prototype._stat2 = function(f, abs, er, stat, cb) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return cb(); - } - var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat; - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) - return cb(null, false, stat); - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return cb(); - return cb(null, c, stat); - }; - } -}); - -// node_modules/rimraf/rimraf.js -var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports2, module2) { - var assert = require("assert"); - var path7 = require("path"); - var fs7 = require("fs"); - var glob = void 0; - try { - glob = require_glob(); - } catch (_err) { - } - var defaultGlobOpts = { - nosort: true, - silent: true - }; - var timeout = 0; - var isWindows = process.platform === "win32"; - var defaults = (options) => { - const methods = [ - "unlink", - "chmod", - "stat", - "lstat", - "rmdir", - "readdir" - ]; - methods.forEach((m) => { - options[m] = options[m] || fs7[m]; - m = m + "Sync"; - options[m] = options[m] || fs7[m]; - }); - options.maxBusyTries = options.maxBusyTries || 3; - options.emfileWait = options.emfileWait || 1e3; - if (options.glob === false) { - options.disableGlob = true; - } - if (options.disableGlob !== true && glob === void 0) { - throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); - } - options.disableGlob = options.disableGlob || false; - options.glob = options.glob || defaultGlobOpts; - }; - var rimraf = (p, options, cb) => { - if (typeof options === "function") { - cb = options; - options = {}; - } - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert.equal(typeof cb, "function", "rimraf: callback function required"); - assert(options, "rimraf: invalid options argument provided"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - defaults(options); - let busyTries = 0; - let errState = null; - let n = 0; - const next = (er) => { - errState = errState || er; - if (--n === 0) - cb(errState); - }; - const afterGlob = (er, results) => { - if (er) - return cb(er); - n = results.length; - if (n === 0) - return cb(); - results.forEach((p2) => { - const CB = (er2) => { - if (er2) { - if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { - busyTries++; - return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); - } - if (er2.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p2, options, CB), timeout++); - } - if (er2.code === "ENOENT") er2 = null; - } - timeout = 0; - next(er2); - }; - rimraf_(p2, options, CB); - }); - }; - if (options.disableGlob || !glob.hasMagic(p)) - return afterGlob(null, [p]); - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]); - glob(p, options.glob, afterGlob); - }); - }; - var rimraf_ = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null); - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb); - if (st && st.isDirectory()) - return rmdir(p, options, er, cb); - options.unlink(p, (er2) => { - if (er2) { - if (er2.code === "ENOENT") - return cb(null); - if (er2.code === "EPERM") - return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); - if (er2.code === "EISDIR") - return rmdir(p, options, er2, cb); - } - return cb(er2); - }); - }); - }; - var fixWinEPERM = (p, options, er, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.chmod(p, 438, (er2) => { - if (er2) - cb(er2.code === "ENOENT" ? null : er); - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er); - else if (stats.isDirectory()) - rmdir(p, options, er, cb); - else - options.unlink(p, cb); - }); - }); - }; - var fixWinEPERMSync = (p, options, er) => { - assert(p); - assert(options); - try { - options.chmodSync(p, 438); - } catch (er2) { - if (er2.code === "ENOENT") - return; - else - throw er; - } - let stats; - try { - stats = options.statSync(p); - } catch (er3) { - if (er3.code === "ENOENT") - return; - else - throw er; - } - if (stats.isDirectory()) - rmdirSync(p, options, er); - else - options.unlinkSync(p); - }; - var rmdir = (p, options, originalEr, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.rmdir(p, (er) => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb); - else if (er && er.code === "ENOTDIR") - cb(originalEr); - else - cb(er); - }); - }; - var rmkids = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.readdir(p, (er, files) => { - if (er) - return cb(er); - let n = files.length; - if (n === 0) - return options.rmdir(p, cb); - let errState; - files.forEach((f) => { - rimraf(path7.join(p, f), options, (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--n === 0) - options.rmdir(p, cb); - }); - }); - }); - }; - var rimrafSync = (p, options) => { - options = options || {}; - defaults(options); - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert(options, "rimraf: missing options"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - let results; - if (options.disableGlob || !glob.hasMagic(p)) { - results = [p]; - } else { - try { - options.lstatSync(p); - results = [p]; - } catch (er) { - results = glob.sync(p, options.glob); - } - } - if (!results.length) - return; - for (let i = 0; i < results.length; i++) { - const p2 = results[i]; - let st; - try { - st = options.lstatSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p2, options, er); - } - try { - if (st && st.isDirectory()) - rmdirSync(p2, options, null); - else - options.unlinkSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); - if (er.code !== "EISDIR") - throw er; - rmdirSync(p2, options, er); - } - } - }; - var rmdirSync = (p, options, originalEr) => { - assert(p); - assert(options); - try { - options.rmdirSync(p); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "ENOTDIR") - throw originalEr; - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options); - } - }; - var rmkidsSync = (p, options) => { - assert(p); - assert(options); - options.readdirSync(p).forEach((f) => rimrafSync(path7.join(p, f), options)); - const retries = isWindows ? 100 : 1; - let i = 0; - do { - let threw = true; - try { - const ret = options.rmdirSync(p, options); - threw = false; - return ret; - } finally { - if (++i < retries && threw) - continue; - } - } while (true); - }; - module2.exports = rimraf; - rimraf.sync = rimrafSync; - } -}); - -// node_modules/del/node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "node_modules/del/node_modules/indent-string/index.js"(exports2, module2) { - "use strict"; - module2.exports = (string, count = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count)); - }; - } -}); - -// node_modules/del/node_modules/clean-stack/index.js -var require_clean_stack = __commonJS({ - "node_modules/del/node_modules/clean-stack/index.js"(exports2, module2) { - "use strict"; - var os2 = require("os"); - var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; - var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; - var homeDir = typeof os2.homedir === "undefined" ? "" : os2.homedir(); - module2.exports = (stack, options) => { - options = Object.assign({ pretty: false }, options); - return stack.replace(/\\/g, "/").split("\n").filter((line) => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - const match = pathMatches[1]; - if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { - return false; - } - return !pathRegex.test(match); - }).filter((line) => line.trim() !== "").map((line) => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); - } - return line; - }).join("\n"); - }; - } -}); - -// node_modules/del/node_modules/aggregate-error/index.js -var require_aggregate_error = __commonJS({ - "node_modules/del/node_modules/aggregate-error/index.js"(exports2, module2) { - "use strict"; - var indentString2 = require_indent_string(); - var cleanStack = require_clean_stack(); - var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - errors = [...errors].map((error2) => { - if (error2 instanceof Error) { - return error2; - } - if (error2 !== null && typeof error2 === "object") { - return Object.assign(new Error(error2.message), error2); - } - return new Error(error2); - }); - let message = errors.map((error2) => { - return typeof error2.stack === "string" ? cleanInternalStack(cleanStack(error2.stack)) : String(error2); - }).join("\n"); - message = "\n" + indentString2(message, 4); - super(message); - this.name = "AggregateError"; - Object.defineProperty(this, "_errors", { value: errors }); - } - *[Symbol.iterator]() { - for (const error2 of this._errors) { - yield error2; - } - } - }; - module2.exports = AggregateError; - } -}); - -// node_modules/del/node_modules/p-map/index.js -var require_p_map = __commonJS({ - "node_modules/del/node_modules/p-map/index.js"(exports2, module2) { - "use strict"; - var AggregateError = require_aggregate_error(); - module2.exports = async (iterable, mapper, { - concurrency = Infinity, - stopOnError = true - } = {}) => { - return new Promise((resolve5, reject) => { - if (typeof mapper !== "function") { - throw new TypeError("Mapper function is required"); - } - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - const next = () => { - if (isRejected) { - return; - } - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - if (nextItem.done) { - isIterableDone = true; - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve5(result); - } - } - return; - } - resolvingCount++; - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error2) { - if (stopOnError) { - isRejected = true; - reject(error2); - } else { - errors.push(error2); - resolvingCount--; - next(); - } - } - })(); - }; - for (let i = 0; i < concurrency; i++) { - next(); - if (isIterableDone) { - break; - } - } - }); - }; - } -}); - -// node_modules/del/index.js -var require_del = __commonJS({ - "node_modules/del/index.js"(exports2, module2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var path7 = require("path"); - var globby = require_globby(); - var isGlob = require_is_glob(); - var slash = require_slash(); - var gracefulFs = require_graceful_fs(); - var isPathCwd = require_is_path_cwd(); - var isPathInside = require_is_path_inside(); - var rimraf = require_rimraf(); - var pMap = require_p_map(); - var rimrafP = promisify2(rimraf); - var rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync - }; - function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); - } - if (!isPathInside(file, cwd)) { - throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); - } - } - function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - patterns = patterns.map((pattern) => { - if (process.platform === "win32" && isGlob(pattern) === false) { - return slash(pattern); - } - return pattern; - }); - return patterns; - } - module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), onProgress = () => { - }, ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); - if (files.length === 0) { - onProgress({ - totalCount: 0, - deletedCount: 0, - percent: 1 - }); - } - let deletedCount = 0; - const mapper = async (file) => { - file = path7.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - deletedCount += 1; - onProgress({ - totalCount: files.length, - deletedCount, - percent: deletedCount / files.length - }); - return file; - }; - const removedFiles = await pMap(files, mapper, options); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); - const removedFiles = files.map((file) => { - file = path7.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - return file; - }); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - } -}); - // node_modules/semver/internal/constants.js -var require_constants9 = __commonJS({ +var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { "use strict"; var SEMVER_SPEC_VERSION = "2.0.0"; @@ -34386,7 +24575,7 @@ var require_re = __commonJS({ MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH - } = require_constants9(); + } = require_constants6(); var debug3 = require_debug(); exports2 = module2.exports = {}; var re = exports2.re = []; @@ -34512,7 +24701,7 @@ var require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports2, module2) { "use strict"; var debug3 = require_debug(); - var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants9(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants6(); var { safeRe: re, t } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); @@ -34769,7 +24958,7 @@ var require_semver = __commonJS({ }); // node_modules/semver/functions/parse.js -var require_parse4 = __commonJS({ +var require_parse2 = __commonJS({ "node_modules/semver/functions/parse.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); @@ -34794,7 +24983,7 @@ var require_parse4 = __commonJS({ var require_valid = __commonJS({ "node_modules/semver/functions/valid.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var valid3 = (version, options) => { const v = parse(version, options); return v ? v.version : null; @@ -34807,7 +24996,7 @@ var require_valid = __commonJS({ var require_clean = __commonJS({ "node_modules/semver/functions/clean.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var clean3 = (version, options) => { const s = parse(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; @@ -34844,7 +25033,7 @@ var require_inc = __commonJS({ var require_diff = __commonJS({ "node_modules/semver/functions/diff.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var diff = (version1, version2) => { const v1 = parse(version1, null, true); const v2 = parse(version2, null, true); @@ -34918,7 +25107,7 @@ var require_patch = __commonJS({ var require_prerelease = __commonJS({ "node_modules/semver/functions/prerelease.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var prerelease = (version, options) => { const parsed = parse(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; @@ -35106,7 +25295,7 @@ var require_coerce = __commonJS({ "node_modules/semver/functions/coerce.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); - var parse = require_parse4(); + var parse = require_parse2(); var { safeRe: re, t } = require_re(); var coerce3 = (version, options) => { if (version instanceof SemVer) { @@ -35342,7 +25531,7 @@ var require_range = __commonJS({ tildeTrimReplace, caretTrimReplace } = require_re(); - var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants9(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants6(); var isNullSet = (c) => c.value === "<0.0.0-0"; var isAny = (c) => c.value === ""; var isSatisfiable = (comparators, options) => { @@ -36154,10 +26343,10 @@ var require_semver2 = __commonJS({ "node_modules/semver/index.js"(exports2, module2) { "use strict"; var internalRe = require_re(); - var constants = require_constants9(); + var constants = require_constants6(); var SemVer = require_semver(); var identifiers = require_identifiers(); - var parse = require_parse4(); + var parse = require_parse2(); var valid3 = require_valid(); var clean3 = require_clean(); var inc = require_inc(); @@ -36287,7 +26476,7 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^6.1.1", + del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -38211,6 +28400,796 @@ var require_internal_pattern_helper = __commonJS({ } }); +// node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str2) { + if (a instanceof RegExp) a = maybeMatch(a, str2); + if (b instanceof RegExp) b = maybeMatch(b, str2); + var r = range(a, b, str2); + return r && { + start: r[0], + end: r[1], + pre: str2.slice(0, r[0]), + body: str2.slice(r[0] + a.length, r[1]), + post: str2.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str2) { + var m = str2.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str2) { + var begs, beg, left, right, result; + var ai = str2.indexOf(a); + var bi = str2.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + begs = []; + left = str2.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str2.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str2.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str2) { + return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + } + function escapeBraces(str2) { + return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str2) { + return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str2) { + if (!str2) + return [""]; + var parts = []; + var m = balanced("{", "}", str2); + if (!m) + return str2.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str2) { + if (!str2) + return []; + if (str2.substr(0, 2) === "{}") { + str2 = "\\{\\}" + str2.substr(2); + } + return expand(escapeBraces(str2), true).map(unescapeBraces); + } + function embrace(str2) { + return "{" + str2 + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte5(i, y) { + return i >= y; + } + function expand(str2, isTop) { + var expansions = []; + var m = balanced("{", "}", str2); + if (!m || /\$$/.test(m.pre)) return [str2]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str2 = m.pre + "{" + m.body + escClose + m.post; + return expand(str2); + } + return [str2]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte5; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path7 = (function() { + try { + return require("path"); + } catch (e) { + } + })() || { + sep: "/" + }; + minimatch.sep = path7.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set2, c) { + set2[c] = true; + return set2; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path7.sep !== "/") { + pattern = pattern.split(path7.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set2 = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug3() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set2); + set2 = this.globParts = set2.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set2); + set2 = set2.map(function(s, si, set3) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set2); + set2 = set2.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set2); + this.set = set2; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set2 = this.set; + if (!set2.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set2.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path7.sep !== "/") { + f = f.split(path7.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set2 = this.set; + this.debug(this.pattern, "set", set2); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set2.length; i++) { + var pattern = set2[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug( + "matchOne", + { "this": this, file, pattern } + ); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) return true; + } + return false; + } + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { @@ -38789,7 +29768,7 @@ var require_internal_globber = __commonJS({ }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ +var require_glob = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -39988,7 +30967,7 @@ var require_semver3 = __commonJS({ }); // node_modules/@actions/cache/lib/internal/constants.js -var require_constants10 = __commonJS({ +var require_constants7 = __commonJS({ "node_modules/@actions/cache/lib/internal/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40101,14 +31080,14 @@ var require_cacheUtils = __commonJS({ exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); - var glob = __importStar4(require_glob2()); + var glob = __importStar4(require_glob()); var io5 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs7 = __importStar4(require("fs")); var path7 = __importStar4(require("path")); var semver8 = __importStar4(require_semver3()); var util = __importStar4(require("util")); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { return __awaiter4(this, void 0, void 0, function* () { @@ -40786,7 +31765,7 @@ var require_object = __commonJS({ }); // node_modules/@azure/core-util/dist/commonjs/error.js -var require_error2 = __commonJS({ +var require_error = __commonJS({ "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40948,7 +31927,7 @@ var require_commonjs2 = __commonJS({ Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { return object_js_1.isObject; } }); - var error_js_1 = require_error2(); + var error_js_1 = require_error(); Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { return error_js_1.isError; } }); @@ -41746,7 +32725,7 @@ var require_userAgentPlatform = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants11 = __commonJS({ +var require_constants8 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -41764,7 +32743,7 @@ var require_userAgent = __commonJS({ exports2.getUserAgentHeaderName = getUserAgentHeaderName; exports2.getUserAgentValue = getUserAgentValue; var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { @@ -42293,7 +33272,7 @@ var require_retryPolicy = __commonJS({ var helpers_js_1 = require_helpers(); var logger_1 = require_dist(); var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); var retryPolicyName = "retryPolicy"; function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { @@ -42390,7 +33369,7 @@ var require_defaultRetryPolicy = __commonJS({ var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.defaultRetryPolicyName = "defaultRetryPolicy"; function defaultRetryPolicy(options = {}) { var _a; @@ -42699,7 +33678,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common4 = __commonJS({ +var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -43033,7 +34012,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common4()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -43321,7 +34300,7 @@ var require_node = __commonJS({ debug3.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common4()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -44392,7 +35371,7 @@ var require_tracingPolicy = __commonJS({ exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); var userAgent_js_1 = require_userAgent(); var log_js_1 = require_log(); var core_util_1 = require_commonjs2(); @@ -44909,7 +35888,7 @@ var require_exponentialRetryPolicy = __commonJS({ exports2.exponentialRetryPolicy = exponentialRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; function exponentialRetryPolicy(options = {}) { var _a; @@ -44931,7 +35910,7 @@ var require_systemErrorRetryPolicy = __commonJS({ exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; function systemErrorRetryPolicy(options = {}) { var _a; @@ -44956,7 +35935,7 @@ var require_throttlingRetryPolicy = __commonJS({ exports2.throttlingRetryPolicy = throttlingRetryPolicy; var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; function throttlingRetryPolicy(options = {}) { var _a; @@ -46708,7 +37687,7 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils9 = __commonJS({ +var require_utils5 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -46783,7 +37762,7 @@ var require_serializer = __commonJS({ var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils9(); + var utils_js_1 = require_utils5(); var SerializerImpl = class { constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; @@ -48261,7 +39240,7 @@ var require_serviceClient = __commonJS({ exports2.ServiceClient = void 0; var core_rest_pipeline_1 = require_commonjs5(); var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils9(); + var utils_js_1 = require_utils5(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); var urlHelpers_js_1 = require_urlHelpers(); @@ -75693,7 +66672,7 @@ var require_requestUtils = __commonJS({ exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { return false; @@ -75867,7 +66846,7 @@ var require_downloadUtils = __commonJS({ var stream = __importStar4(require("stream")); var util = __importStar4(require("util")); var utils = __importStar4(require_cacheUtils()); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); var abort_controller_1 = require_dist5(); function pipeResponseToStream(response, output) { @@ -81822,7 +72801,7 @@ var require_tar = __commonJS({ var fs_1 = require("fs"); var path7 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { return __awaiter4(this, void 0, void 0, function* () { @@ -82067,7 +73046,7 @@ var require_cache3 = __commonJS({ var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { @@ -83907,9 +74886,6 @@ function checkDiskSpace(directoryPath, dependencies = { return checkUnix(directoryPath); } -// src/util.ts -var import_del = __toESM(require_del()); - // node_modules/get-folder-size/index.js var import_node_path2 = require("node:path"); async function getFolderSize(itemPath, options) { @@ -89021,52 +79997,6 @@ undici/lib/fetch/body.js: undici/lib/websocket/frame.js: (*! ws. MIT License. Einar Otto Stangvik *) -is-extglob/index.js: - (*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - *) - -is-glob/index.js: - (*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - *) - -is-number/index.js: - (*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - *) - -to-regex-range/index.js: - (*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - *) - -fill-range/index.js: - (*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - *) - -queue-microtask/index.js: - (*! queue-microtask. MIT License. Feross Aboukhadijeh *) - -run-parallel/index.js: - (*! run-parallel. MIT License. Feross Aboukhadijeh *) - js-yaml/dist/js-yaml.mjs: (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) */ diff --git a/lib/init-action-post.js b/lib/init-action-post.js index e2c783654..e6c3a21ca 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -185,7 +185,7 @@ var require_file_command = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; var crypto = __importStar4(require("crypto")); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var os3 = __importStar4(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -193,10 +193,10 @@ var require_file_command = __commonJS({ if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs17.existsSync(filePath)) { + if (!fs20.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs17.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + fs20.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { encoding: "utf8" }); } @@ -999,14 +999,14 @@ var require_util = __commonJS({ } const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; - let path15 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path19 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path15 && !path15.startsWith("/")) { - path15 = `/${path15}`; + if (path19 && !path19.startsWith("/")) { + path19 = `/${path19}`; } - url2 = new URL(origin + path15); + url2 = new URL(origin + path19); } return url2; } @@ -2620,20 +2620,20 @@ var require_parseParams = __commonJS({ var require_basename = __commonJS({ "node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) { "use strict"; - module2.exports = function basename(path15) { - if (typeof path15 !== "string") { + module2.exports = function basename(path19) { + if (typeof path19 !== "string") { return ""; } - for (var i = path15.length - 1; i >= 0; --i) { - switch (path15.charCodeAt(i)) { + for (var i = path19.length - 1; i >= 0; --i) { + switch (path19.charCodeAt(i)) { case 47: // '/' case 92: - path15 = path15.slice(i + 1); - return path15 === ".." || path15 === "." ? "" : path15; + path19 = path19.slice(i + 1); + return path19 === ".." || path19 === "." ? "" : path19; } } - return path15 === ".." || path15 === "." ? "" : path15; + return path19 === ".." || path19 === "." ? "" : path19; }; } }); @@ -2673,8 +2673,8 @@ var require_multipart = __commonJS({ } } function checkFinished() { - if (nends === 0 && finished && !boy._done) { - finished = false; + if (nends === 0 && finished2 && !boy._done) { + finished2 = false; self2.end(); } } @@ -2693,7 +2693,7 @@ var require_multipart = __commonJS({ let nends = 0; let curFile; let curField; - let finished = false; + let finished2 = false; this._needDrain = false; this._pause = false; this._cb = void 0; @@ -2879,7 +2879,7 @@ var require_multipart = __commonJS({ }).on("error", function(err) { boy.emit("error", err); }).on("finish", function() { - finished = true; + finished2 = true; checkFinished(); }); } @@ -5663,7 +5663,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path15, + path: path19, method, body, headers, @@ -5677,11 +5677,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path15 !== "string") { + if (typeof path19 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path15[0] !== "/" && !(path15.startsWith("http://") || path15.startsWith("https://")) && method !== "CONNECT") { + } else if (path19[0] !== "/" && !(path19.startsWith("http://") || path19.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path15) !== null) { + } else if (invalidPathRegex.exec(path19) !== null) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -5744,7 +5744,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? util.buildURL(path15, query) : path15; + this.path = query ? util.buildURL(path19, query) : path19; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -6752,9 +6752,9 @@ var require_RedirectHandler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path15 = search ? `${pathname}${search}` : pathname; + const path19 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path15; + this.opts.path = path19; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -7994,7 +7994,7 @@ var require_client = __commonJS({ writeH2(client, client[kHTTP2Session], request); return; } - const { body, method, path: path15, host, upgrade, headers, blocking, reset } = request; + const { body, method, path: path19, host, upgrade, headers, blocking, reset } = request; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); @@ -8044,7 +8044,7 @@ var require_client = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path15} HTTP/1.1\r + let header = `${method} ${path19} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -8107,7 +8107,7 @@ upgrade: ${upgrade}\r return true; } function writeH2(client, session, request) { - const { body, method, path: path15, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + const { body, method, path: path19, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; @@ -8150,7 +8150,7 @@ upgrade: ${upgrade}\r }); return true; } - headers[HTTP2_HEADER_PATH] = path15; + headers[HTTP2_HEADER_PATH] = path19; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -8310,10 +8310,10 @@ upgrade: ${upgrade}\r }); return; } - let finished = false; + let finished2 = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { - if (finished) { + if (finished2) { return; } try { @@ -8325,7 +8325,7 @@ upgrade: ${upgrade}\r } }; const onDrain = function() { - if (finished) { + if (finished2) { return; } if (body.resume) { @@ -8333,17 +8333,17 @@ upgrade: ${upgrade}\r } }; const onAbort = function() { - if (finished) { + if (finished2) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); }; const onFinished = function(err) { - if (finished) { + if (finished2) { return; } - finished = true; + finished2 = true; assert(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); socket.off("drain", onDrain).off("error", onFinished); body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); @@ -9217,7 +9217,7 @@ var require_readable = __commonJS({ var kBody = Symbol("kBody"); var kAbort = Symbol("abort"); var kContentType = Symbol("kContentType"); - var noop = () => { + var noop2 = () => { }; module2.exports = class BodyReadable extends Readable2 { constructor({ @@ -9339,7 +9339,7 @@ var require_readable = __commonJS({ return new Promise((resolve8, reject) => { const signalListenerCleanup = signal ? util.addAbortListener(signal, () => { this.destroy(); - }) : noop; + }) : noop2; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { @@ -9347,7 +9347,7 @@ var require_readable = __commonJS({ } else { resolve8(null); } - }).on("error", noop).on("data", function(chunk) { + }).on("error", noop2).on("data", function(chunk) { limit -= chunk.length; if (limit <= 0) { this.destroy(); @@ -9704,7 +9704,7 @@ var require_api_request = __commonJS({ var require_api_stream = __commonJS({ "node_modules/undici/lib/api/api-stream.js"(exports2, module2) { "use strict"; - var { finished, PassThrough } = require("stream"); + var { finished: finished2, PassThrough } = require("stream"); var { InvalidArgumentError, InvalidReturnValueError, @@ -9802,7 +9802,7 @@ var require_api_stream = __commonJS({ if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { throw new InvalidReturnValueError("expected Writable"); } - finished(res, { readable: false }, (err) => { + finished2(res, { readable: false }, (err) => { const { callback: callback2, res: res2, opaque: opaque2, trailers, abort } = this; this.res = null; if (err || !res2.readable) { @@ -10390,20 +10390,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path15) { - if (typeof path15 !== "string") { - return path15; + function safeUrl(path19) { + if (typeof path19 !== "string") { + return path19; } - const pathSegments = path15.split("?"); + const pathSegments = path19.split("?"); if (pathSegments.length !== 2) { - return path15; + return path19; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path15, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path15); + function matchKey(mockDispatch2, { path: path19, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path19); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10421,7 +10421,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path15 }) => matchValue(safeUrl(path15), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path19 }) => matchValue(safeUrl(path19), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10458,9 +10458,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path15, method, body, headers, query } = opts; + const { path: path19, method, body, headers, query } = opts; return { - path: path15, + path: path19, method, body, headers, @@ -10754,7 +10754,7 @@ var require_mock_interceptor = __commonJS({ var require_mock_client = __commonJS({ "node_modules/undici/lib/mock/mock-client.js"(exports2, module2) { "use strict"; - var { promisify: promisify2 } = require("util"); + var { promisify: promisify3 } = require("util"); var Client = require_client(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10794,7 +10794,7 @@ var require_mock_client = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify2(this[kOriginalClose])(); + await promisify3(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10807,7 +10807,7 @@ var require_mock_client = __commonJS({ var require_mock_pool = __commonJS({ "node_modules/undici/lib/mock/mock-pool.js"(exports2, module2) { "use strict"; - var { promisify: promisify2 } = require("util"); + var { promisify: promisify3 } = require("util"); var Pool = require_pool(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10847,7 +10847,7 @@ var require_mock_pool = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify2(this[kOriginalClose])(); + await promisify3(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10909,10 +10909,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path15, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path19, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path15, + Path: path19, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -15532,8 +15532,8 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path15) { - for (const char of path15) { + function validateCookiePath(path19) { + for (const char of path19) { const code = char.charCodeAt(0); if (code < 33 || char === ";") { throw new Error("Invalid cookie path"); @@ -17213,11 +17213,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path15 = opts.path; + let path19 = opts.path; if (!opts.path.startsWith("/")) { - path15 = `/${path15}`; + path19 = `/${path19}`; } - url2 = new URL(util.parseOrigin(url2).origin + path15); + url2 = new URL(util.parseOrigin(url2).origin + path19); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -18440,7 +18440,7 @@ var require_path_utils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -18450,7 +18450,7 @@ var require_path_utils = __commonJS({ } exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path15.sep); + return pth.replace(/[/\\]/g, path19.sep); } exports2.toPlatformPath = toPlatformPath; } @@ -18513,12 +18513,12 @@ var require_io_util = __commonJS({ var _a; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs17 = __importStar4(require("fs")); - var path15 = __importStar4(require("path")); - _a = fs17.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + var fs20 = __importStar4(require("fs")); + var path19 = __importStar4(require("path")); + _a = fs20.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs17.constants.O_RDONLY; + exports2.READONLY = fs20.constants.O_RDONLY; function exists(fsPath) { return __awaiter4(this, void 0, void 0, function* () { try { @@ -18533,13 +18533,13 @@ var require_io_util = __commonJS({ }); } exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { + function isDirectory2(fsPath, useStat = false) { return __awaiter4(this, void 0, void 0, function* () { const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; + exports2.isDirectory = isDirectory2; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18563,7 +18563,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path15.extname(filePath).toUpperCase(); + const upperExt = path19.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -18587,11 +18587,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path15.dirname(filePath); - const upperName = path15.basename(filePath).toUpperCase(); + const directory = path19.dirname(filePath); + const upperName = path19.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path15.join(directory, actualName); + filePath = path19.join(directory, actualName); break; } } @@ -18686,7 +18686,7 @@ var require_io = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; var assert_1 = require("assert"); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var ioUtil = __importStar4(require_io_util()); function cp(source, dest, options = {}) { return __awaiter4(this, void 0, void 0, function* () { @@ -18695,7 +18695,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path15.join(dest, path15.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path19.join(dest, path19.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -18707,7 +18707,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path15.relative(source, newDest) === "") { + if (path19.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); @@ -18720,7 +18720,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path15.join(dest, path15.basename(source)); + dest = path19.join(dest, path19.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -18731,7 +18731,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path15.dirname(dest)); + yield mkdirP(path19.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -18794,7 +18794,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path15.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path19.delimiter)) { if (extension) { extensions.push(extension); } @@ -18807,12 +18807,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path15.sep)) { + if (tool.includes(path19.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path15.delimiter)) { + for (const p of process.env.PATH.split(path19.delimiter)) { if (p) { directories.push(p); } @@ -18820,7 +18820,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path15.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path19.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -18936,7 +18936,7 @@ var require_toolrunner = __commonJS({ var os3 = __importStar4(require("os")); var events = __importStar4(require("events")); var child = __importStar4(require("child_process")); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var io7 = __importStar4(require_io()); var ioUtil = __importStar4(require_io_util()); var timers_1 = require("timers"); @@ -19151,7 +19151,7 @@ var require_toolrunner = __commonJS({ exec() { return __awaiter4(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path15.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path19.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io7.which(this.toolPath, true); return new Promise((resolve8, reject) => __awaiter4(this, void 0, void 0, function* () { @@ -19651,7 +19651,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os3 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -19679,7 +19679,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path15.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path19.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath; function getInput2(name, options) { @@ -19835,8 +19835,8 @@ var require_context = __commonJS({ if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path15 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path15} does not exist${os_1.EOL}`); + const path19 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path19} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -20529,12 +20529,12 @@ var require_wrappy = __commonJS({ var require_once = __commonJS({ "node_modules/once/once.js"(exports2, module2) { var wrappy = require_wrappy(); - module2.exports = wrappy(once); + module2.exports = wrappy(once2); module2.exports.strict = wrappy(onceStrict); - once.proto = once(function() { + once2.proto = once2(function() { Object.defineProperty(Function.prototype, "once", { value: function() { - return once(this); + return once2(this); }, configurable: true }); @@ -20545,7 +20545,7 @@ var require_once = __commonJS({ configurable: true }); }); - function once(fn) { + function once2(fn) { var f = function() { if (f.called) return f.value; f.called = true; @@ -21759,7 +21759,7 @@ var require_dist_node11 = __commonJS({ var import_graphql = require_dist_node9(); var import_auth_token = require_dist_node10(); var VERSION = "5.2.0"; - var noop = () => { + var noop2 = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); @@ -21838,8 +21838,8 @@ var require_dist_node11 = __commonJS({ this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); this.log = Object.assign( { - debug: noop, - info: noop, + debug: noop2, + info: noop2, warn: consoleWarn, error: consoleError }, @@ -24525,135 +24525,6 @@ var require_github = __commonJS({ } }); -// node_modules/array-union/index.js -var require_array_union = __commonJS({ - "node_modules/array-union/index.js"(exports2, module2) { - "use strict"; - module2.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; - }; - } -}); - -// node_modules/merge2/index.js -var require_merge2 = __commonJS({ - "node_modules/merge2/index.js"(exports2, module2) { - "use strict"; - var Stream = require("stream"); - var PassThrough = Stream.PassThrough; - var slice = Array.prototype.slice; - module2.exports = merge2; - function merge2() { - const streamsQueue = []; - const args = slice.call(arguments); - let merging = false; - let options = args[args.length - 1]; - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop(); - } else { - options = {}; - } - const doEnd = options.end !== false; - const doPipeError = options.pipeError === true; - if (options.objectMode == null) { - options.objectMode = true; - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024; - } - const mergedStream = PassThrough(options); - function addStream() { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)); - } - mergeStream(); - return this; - } - function mergeStream() { - if (merging) { - return; - } - merging = true; - let streams = streamsQueue.shift(); - if (!streams) { - process.nextTick(endStream); - return; - } - if (!Array.isArray(streams)) { - streams = [streams]; - } - let pipesCount = streams.length + 1; - function next() { - if (--pipesCount > 0) { - return; - } - merging = false; - mergeStream(); - } - function pipe(stream2) { - function onend() { - stream2.removeListener("merge2UnpipeEnd", onend); - stream2.removeListener("end", onend); - if (doPipeError) { - stream2.removeListener("error", onerror); - } - next(); - } - function onerror(err) { - mergedStream.emit("error", err); - } - if (stream2._readableState.endEmitted) { - return next(); - } - stream2.on("merge2UnpipeEnd", onend); - stream2.on("end", onend); - if (doPipeError) { - stream2.on("error", onerror); - } - stream2.pipe(mergedStream, { end: false }); - stream2.resume(); - } - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]); - } - next(); - } - function endStream() { - merging = false; - mergedStream.emit("queueDrain"); - if (doEnd) { - mergedStream.end(); - } - } - mergedStream.setMaxListeners(0); - mergedStream.add = addStream; - mergedStream.on("unpipe", function(stream2) { - stream2.emit("merge2UnpipeEnd"); - }); - if (args.length) { - addStream.apply(null, args); - } - return mergedStream; - } - function pauseStreams(streams, options) { - if (!Array.isArray(streams)) { - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)); - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error("Only readable stream can be merged."); - } - streams.pause(); - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options); - } - } - return streams; - } - } -}); - // node_modules/fast-glob/out/utils/array.js var require_array = __commonJS({ "node_modules/fast-glob/out/utils/array.js"(exports2) { @@ -24726,7 +24597,7 @@ var require_path = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0; var os3 = require("os"); - var path15 = require("path"); + var path19 = require("path"); var IS_WINDOWS_PLATFORM = os3.platform() === "win32"; var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; @@ -24738,7 +24609,7 @@ var require_path = __commonJS({ } exports2.unixify = unixify; function makeAbsolute(cwd, filepath) { - return path15.resolve(cwd, filepath); + return path19.resolve(cwd, filepath); } exports2.makeAbsolute = makeAbsolute; function removeLeadingDotSegment(entry) { @@ -24904,7 +24775,7 @@ var require_is_glob = __commonJS({ } return false; }; - module2.exports = function isGlob(str2, options) { + module2.exports = function isGlob2(str2, options) { if (typeof str2 !== "string" || str2 === "") { return false; } @@ -24924,26 +24795,26 @@ var require_is_glob = __commonJS({ var require_glob_parent = __commonJS({ "node_modules/glob-parent/index.js"(exports2, module2) { "use strict"; - var isGlob = require_is_glob(); + var isGlob2 = require_is_glob(); var pathPosixDirname = require("path").posix.dirname; var isWin32 = require("os").platform() === "win32"; - var slash = "/"; + var slash2 = "/"; var backslash = /\\/g; var enclosure = /[\{\[].*[\}\]]$/; - var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; + var globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/; var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; module2.exports = function globParent(str2, opts) { var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); + if (options.flipBackslashes && isWin32 && str2.indexOf(slash2) < 0) { + str2 = str2.replace(backslash, slash2); } if (enclosure.test(str2)) { - str2 += slash; + str2 += slash2; } str2 += "a"; do { str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); + } while (isGlob2(str2) || globby2.test(str2)); return str2.replace(escaped, "$1"); }; } @@ -26035,7 +25906,7 @@ var require_braces = __commonJS({ var require_constants7 = __commonJS({ "node_modules/picomatch/lib/constants.js"(exports2, module2) { "use strict"; - var path15 = require("path"); + var path19 = require("path"); var WIN_SLASH = "\\\\/"; var WIN_NO_SLASH = `[^${WIN_SLASH}]`; var DOT_LITERAL = "\\."; @@ -26205,7 +26076,7 @@ var require_constants7 = __commonJS({ /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - SEP: path15.sep, + SEP: path19.sep, /** * Create EXTGLOB_CHARS */ @@ -26232,7 +26103,7 @@ var require_constants7 = __commonJS({ var require_utils6 = __commonJS({ "node_modules/picomatch/lib/utils.js"(exports2) { "use strict"; - var path15 = require("path"); + var path19 = require("path"); var win32 = process.platform === "win32"; var { REGEX_BACKSLASH, @@ -26261,7 +26132,7 @@ var require_utils6 = __commonJS({ if (options && typeof options.windows === "boolean") { return options.windows; } - return win32 === true || path15.sep === "\\"; + return win32 === true || path19.sep === "\\"; }; exports2.escapeLast = (input, char, lastIdx) => { const idx = input.lastIndexOf(char, lastIdx); @@ -26347,14 +26218,14 @@ var require_scan = __commonJS({ let lastIndex = 0; let isBrace = false; let isBracket = false; - let isGlob = false; + let isGlob2 = false; let isExtglob = false; let isGlobstar = false; let braceEscaped = false; let backslashes = false; let negated = false; let negatedExtglob = false; - let finished = false; + let finished2 = false; let braces = 0; let prev; let code; @@ -26390,8 +26261,8 @@ var require_scan = __commonJS({ } if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -26399,8 +26270,8 @@ var require_scan = __commonJS({ } if (braceEscaped !== true && code === CHAR_COMMA2) { isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -26411,7 +26282,7 @@ var require_scan = __commonJS({ if (braces === 0) { braceEscaped = false; isBrace = token.isBrace = true; - finished = true; + finished2 = true; break; } } @@ -26425,7 +26296,7 @@ var require_scan = __commonJS({ slashes.push(index); tokens.push(token); token = { value: "", depth: 0, isGlob: false }; - if (finished === true) continue; + if (finished2 === true) continue; if (prev === CHAR_DOT && index === start + 1) { start += 2; continue; @@ -26436,9 +26307,9 @@ var require_scan = __commonJS({ if (opts.noext !== true) { const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; + isGlob2 = token.isGlob = true; isExtglob = token.isExtglob = true; - finished = true; + finished2 = true; if (code === CHAR_EXCLAMATION_MARK && index === start) { negatedExtglob = true; } @@ -26450,8 +26321,8 @@ var require_scan = __commonJS({ continue; } if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; break; } } @@ -26462,16 +26333,16 @@ var require_scan = __commonJS({ } if (code === CHAR_ASTERISK2) { if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } break; } if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -26486,8 +26357,8 @@ var require_scan = __commonJS({ } if (next === CHAR_RIGHT_SQUARE_BRACKET2) { isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; break; } } @@ -26502,7 +26373,7 @@ var require_scan = __commonJS({ continue; } if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; + isGlob2 = token.isGlob = true; if (scanToEnd === true) { while (eos() !== true && (code = advance())) { if (code === CHAR_LEFT_PARENTHESES) { @@ -26511,7 +26382,7 @@ var require_scan = __commonJS({ continue; } if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; + finished2 = true; break; } } @@ -26519,8 +26390,8 @@ var require_scan = __commonJS({ } break; } - if (isGlob === true) { - finished = true; + if (isGlob2 === true) { + finished2 = true; if (scanToEnd === true) { continue; } @@ -26529,7 +26400,7 @@ var require_scan = __commonJS({ } if (opts.noext === true) { isExtglob = false; - isGlob = false; + isGlob2 = false; } let base = str2; let prefix = ""; @@ -26539,10 +26410,10 @@ var require_scan = __commonJS({ str2 = str2.slice(start); lastIndex -= start; } - if (base && isGlob === true && lastIndex > 0) { + if (base && isGlob2 === true && lastIndex > 0) { base = str2.slice(0, lastIndex); glob2 = str2.slice(lastIndex); - } else if (isGlob === true) { + } else if (isGlob2 === true) { base = ""; glob2 = str2; } else { @@ -26567,7 +26438,7 @@ var require_scan = __commonJS({ glob: glob2, isBrace, isBracket, - isGlob, + isGlob: isGlob2, isExtglob, isGlobstar, negated, @@ -27396,7 +27267,7 @@ var require_parse3 = __commonJS({ var require_picomatch = __commonJS({ "node_modules/picomatch/lib/picomatch.js"(exports2, module2) { "use strict"; - var path15 = require("path"); + var path19 = require("path"); var scan = require_scan(); var parse = require_parse3(); var utils = require_utils6(); @@ -27481,7 +27352,7 @@ var require_picomatch = __commonJS({ }; picomatch.matchBase = (input, glob2, options, posix = utils.isWindows(options)) => { const regex = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options); - return regex.test(path15.basename(input)); + return regex.test(path19.basename(input)); }; picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); picomatch.parse = (pattern, options) => { @@ -27708,7 +27579,7 @@ var require_pattern = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; - var path15 = require("path"); + var path19 = require("path"); var globParent = require_glob_parent(); var micromatch = require_micromatch(); var GLOBSTAR = "**"; @@ -27720,10 +27591,10 @@ var require_pattern = __commonJS({ var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); + return !isDynamicPattern2(pattern, options); } exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern(pattern, options = {}) { + function isDynamicPattern2(pattern, options = {}) { if (pattern === "") { return false; } @@ -27741,7 +27612,7 @@ var require_pattern = __commonJS({ } return false; } - exports2.isDynamicPattern = isDynamicPattern; + exports2.isDynamicPattern = isDynamicPattern2; function hasBraceExpansion(pattern) { const openingBraceIndex = pattern.indexOf("{"); if (openingBraceIndex === -1) { @@ -27755,23 +27626,23 @@ var require_pattern = __commonJS({ return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); } function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; + return isNegativePattern2(pattern) ? pattern.slice(1) : pattern; } exports2.convertToPositivePattern = convertToPositivePattern; function convertToNegativePattern(pattern) { return "!" + pattern; } exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern(pattern) { + function isNegativePattern2(pattern) { return pattern.startsWith("!") && pattern[1] !== "("; } - exports2.isNegativePattern = isNegativePattern; + exports2.isNegativePattern = isNegativePattern2; function isPositivePattern(pattern) { - return !isNegativePattern(pattern); + return !isNegativePattern2(pattern); } exports2.isPositivePattern = isPositivePattern; function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); + return patterns.filter(isNegativePattern2); } exports2.getNegativePatterns = getNegativePatterns; function getPositivePatterns(patterns) { @@ -27803,7 +27674,7 @@ var require_pattern = __commonJS({ } exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; function isAffectDepthOfReadingPattern(pattern) { - const basename = path15.basename(pattern); + const basename = path19.basename(pattern); return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); } exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; @@ -27861,12 +27732,131 @@ var require_pattern = __commonJS({ } exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; function isAbsolute3(pattern) { - return path15.isAbsolute(pattern); + return path19.isAbsolute(pattern); } exports2.isAbsolute = isAbsolute3; } }); +// node_modules/merge2/index.js +var require_merge2 = __commonJS({ + "node_modules/merge2/index.js"(exports2, module2) { + "use strict"; + var Stream = require("stream"); + var PassThrough = Stream.PassThrough; + var slice = Array.prototype.slice; + module2.exports = merge2; + function merge2() { + const streamsQueue = []; + const args = slice.call(arguments); + let merging = false; + let options = args[args.length - 1]; + if (options && !Array.isArray(options) && options.pipe == null) { + args.pop(); + } else { + options = {}; + } + const doEnd = options.end !== false; + const doPipeError = options.pipeError === true; + if (options.objectMode == null) { + options.objectMode = true; + } + if (options.highWaterMark == null) { + options.highWaterMark = 64 * 1024; + } + const mergedStream = PassThrough(options); + function addStream() { + for (let i = 0, len = arguments.length; i < len; i++) { + streamsQueue.push(pauseStreams(arguments[i], options)); + } + mergeStream(); + return this; + } + function mergeStream() { + if (merging) { + return; + } + merging = true; + let streams = streamsQueue.shift(); + if (!streams) { + process.nextTick(endStream2); + return; + } + if (!Array.isArray(streams)) { + streams = [streams]; + } + let pipesCount = streams.length + 1; + function next() { + if (--pipesCount > 0) { + return; + } + merging = false; + mergeStream(); + } + function pipe(stream2) { + function onend() { + stream2.removeListener("merge2UnpipeEnd", onend); + stream2.removeListener("end", onend); + if (doPipeError) { + stream2.removeListener("error", onerror); + } + next(); + } + function onerror(err) { + mergedStream.emit("error", err); + } + if (stream2._readableState.endEmitted) { + return next(); + } + stream2.on("merge2UnpipeEnd", onend); + stream2.on("end", onend); + if (doPipeError) { + stream2.on("error", onerror); + } + stream2.pipe(mergedStream, { end: false }); + stream2.resume(); + } + for (let i = 0; i < streams.length; i++) { + pipe(streams[i]); + } + next(); + } + function endStream2() { + merging = false; + mergedStream.emit("queueDrain"); + if (doEnd) { + mergedStream.end(); + } + } + mergedStream.setMaxListeners(0); + mergedStream.add = addStream; + mergedStream.on("unpipe", function(stream2) { + stream2.emit("merge2UnpipeEnd"); + }); + if (args.length) { + addStream.apply(null, args); + } + return mergedStream; + } + function pauseStreams(streams, options) { + if (!Array.isArray(streams)) { + if (!streams._readableState && streams.pipe) { + streams = streams.pipe(PassThrough(options)); + } + if (!streams._readableState || !streams.pause || !streams.pipe) { + throw new Error("Only readable stream can be merged."); + } + streams.pause(); + } else { + for (let i = 0, len = streams.length; i < len; i++) { + streams[i] = pauseStreams(streams[i], options); + } + } + return streams; + } + } +}); + // node_modules/fast-glob/out/utils/stream.js var require_stream = __commonJS({ "node_modules/fast-glob/out/utils/stream.js"(exports2) { @@ -27917,10 +27907,10 @@ var require_utils7 = __commonJS({ exports2.array = array; var errno = require_errno(); exports2.errno = errno; - var fs17 = require_fs(); - exports2.fs = fs17; - var path15 = require_path(); - exports2.path = path15; + var fs20 = require_fs(); + exports2.fs = fs20; + var path19 = require_path(); + exports2.path = path19; var pattern = require_pattern(); exports2.pattern = pattern; var stream2 = require_stream(); @@ -28032,8 +28022,8 @@ var require_async = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.read = void 0; - function read(path15, settings, callback) { - settings.fs.lstat(path15, (lstatError, lstat) => { + function read(path19, settings, callback) { + settings.fs.lstat(path19, (lstatError, lstat) => { if (lstatError !== null) { callFailureCallback(callback, lstatError); return; @@ -28042,7 +28032,7 @@ var require_async = __commonJS({ callSuccessCallback(callback, lstat); return; } - settings.fs.stat(path15, (statError, stat) => { + settings.fs.stat(path19, (statError, stat) => { if (statError !== null) { if (settings.throwErrorOnBrokenSymbolicLink) { callFailureCallback(callback, statError); @@ -28074,13 +28064,13 @@ var require_sync = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.read = void 0; - function read(path15, settings) { - const lstat = settings.fs.lstatSync(path15); + function read(path19, settings) { + const lstat = settings.fs.lstatSync(path19); if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { return lstat; } try { - const stat = settings.fs.statSync(path15); + const stat = settings.fs.statSync(path19); if (settings.markSymbolicLink) { stat.isSymbolicLink = () => true; } @@ -28102,12 +28092,12 @@ var require_fs2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs17 = require("fs"); + var fs20 = require("fs"); exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs17.lstat, - stat: fs17.stat, - lstatSync: fs17.lstatSync, - statSync: fs17.statSync + lstat: fs20.lstat, + stat: fs20.stat, + lstatSync: fs20.lstatSync, + statSync: fs20.statSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -28124,12 +28114,12 @@ var require_settings = __commonJS({ "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var fs17 = require_fs2(); + var fs20 = require_fs2(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs17.createFileSystemAdapter(this._options.fs); + this.fs = fs20.createFileSystemAdapter(this._options.fs); this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); } @@ -28151,17 +28141,17 @@ var require_out = __commonJS({ var sync = require_sync(); var settings_1 = require_settings(); exports2.Settings = settings_1.default; - function stat(path15, optionsOrSettingsOrCallback, callback) { + function stat(path19, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path15, getSettings(), optionsOrSettingsOrCallback); + async.read(path19, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path15, getSettings(optionsOrSettingsOrCallback), callback); + async.read(path19, getSettings(optionsOrSettingsOrCallback), callback); } exports2.stat = stat; - function statSync2(path15, optionsOrSettings) { + function statSync2(path19, optionsOrSettings) { const settings = getSettings(optionsOrSettings); - return sync.read(path15, settings); + return sync.read(path19, settings); } exports2.statSync = statSync2; function getSettings(settingsOrOptions = {}) { @@ -28284,8 +28274,8 @@ var require_utils8 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fs = void 0; - var fs17 = require_fs3(); - exports2.fs = fs17; + var fs20 = require_fs3(); + exports2.fs = fs20; } }); @@ -28377,16 +28367,16 @@ var require_async2 = __commonJS({ return; } const tasks = names.map((name) => { - const path15 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const path19 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); return (done) => { - fsStat.stat(path15, settings.fsStatSettings, (error2, stats) => { + fsStat.stat(path19, settings.fsStatSettings, (error2, stats) => { if (error2 !== null) { done(error2); return; } const entry = { name, - path: path15, + path: path19, dirent: utils.fs.createDirentFromStats(name, stats) }; if (settings.stats) { @@ -28480,14 +28470,14 @@ var require_fs4 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs17 = require("fs"); + var fs20 = require("fs"); exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs17.lstat, - stat: fs17.stat, - lstatSync: fs17.lstatSync, - statSync: fs17.statSync, - readdir: fs17.readdir, - readdirSync: fs17.readdirSync + lstat: fs20.lstat, + stat: fs20.stat, + lstatSync: fs20.lstatSync, + statSync: fs20.statSync, + readdir: fs20.readdir, + readdirSync: fs20.readdirSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -28504,15 +28494,15 @@ var require_settings2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path15 = require("path"); + var path19 = require("path"); var fsStat = require_out(); - var fs17 = require_fs4(); + var fs20 = require_fs4(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs17.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep); + this.fs = fs20.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path19.sep); this.stats = this._getValue(this._options.stats, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); this.fsStatSettings = new fsStat.Settings({ @@ -28539,17 +28529,17 @@ var require_out2 = __commonJS({ var sync = require_sync2(); var settings_1 = require_settings2(); exports2.Settings = settings_1.default; - function scandir(path15, optionsOrSettingsOrCallback, callback) { + function scandir(path19, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path15, getSettings(), optionsOrSettingsOrCallback); + async.read(path19, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path15, getSettings(optionsOrSettingsOrCallback), callback); + async.read(path19, getSettings(optionsOrSettingsOrCallback), callback); } exports2.scandir = scandir; - function scandirSync(path15, optionsOrSettings) { + function scandirSync(path19, optionsOrSettings) { const settings = getSettings(optionsOrSettings); - return sync.read(path15, settings); + return sync.read(path19, settings); } exports2.scandirSync = scandirSync; function getSettings(settingsOrOptions = {}) { @@ -28609,8 +28599,8 @@ var require_queue = __commonJS({ var _running = 0; var self2 = { push, - drain: noop, - saturated: noop, + drain: noop2, + saturated: noop2, pause, paused: false, concurrency, @@ -28620,7 +28610,7 @@ var require_queue = __commonJS({ length, getQueue, unshift, - empty: noop, + empty: noop2, kill, killAndDrain }; @@ -28665,7 +28655,7 @@ var require_queue = __commonJS({ current.context = context3; current.release = release3; current.value = value; - current.callback = done || noop; + current.callback = done || noop2; if (_running === self2.concurrency || self2.paused) { if (queueTail) { queueTail.next = current; @@ -28685,7 +28675,7 @@ var require_queue = __commonJS({ current.context = context3; current.release = release3; current.value = value; - current.callback = done || noop; + current.callback = done || noop2; if (_running === self2.concurrency || self2.paused) { if (queueHead) { current.next = queueHead; @@ -28726,28 +28716,28 @@ var require_queue = __commonJS({ function kill() { queueHead = null; queueTail = null; - self2.drain = noop; + self2.drain = noop2; } function killAndDrain() { queueHead = null; queueTail = null; self2.drain(); - self2.drain = noop; + self2.drain = noop2; } } - function noop() { + function noop2() { } function Task() { this.value = null; - this.callback = noop; + this.callback = noop2; this.next = null; - this.release = noop; + this.release = noop2; this.context = null; var self2 = this; this.worked = function worked(err, result) { var callback = self2.callback; self2.value = null; - self2.callback = noop; + self2.callback = noop2; callback.call(self2.context, err, result); self2.release(self2); }; @@ -29076,7 +29066,7 @@ var require_settings3 = __commonJS({ "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path15 = require("path"); + var path19 = require("path"); var fsScandir = require_out2(); var Settings = class { constructor(_options = {}) { @@ -29086,7 +29076,7 @@ var require_settings3 = __commonJS({ this.deepFilter = this._getValue(this._options.deepFilter, null); this.entryFilter = this._getValue(this._options.entryFilter, null); this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path19.sep); this.fsScandirSettings = new fsScandir.Settings({ followSymbolicLinks: this._options.followSymbolicLinks, fs: this._options.fs, @@ -29148,7 +29138,7 @@ var require_reader2 = __commonJS({ "node_modules/fast-glob/out/readers/reader.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path15 = require("path"); + var path19 = require("path"); var fsStat = require_out(); var utils = require_utils7(); var Reader = class { @@ -29161,7 +29151,7 @@ var require_reader2 = __commonJS({ }); } _getFullEntryPath(filepath) { - return path15.resolve(this._settings.cwd, filepath); + return path19.resolve(this._settings.cwd, filepath); } _makeEntry(stats, pattern) { const entry = { @@ -29482,34 +29472,34 @@ var require_entry = __commonJS({ _onlyDirectoryFilter(entry) { return this._settings.onlyDirectories && !entry.dirent.isDirectory(); } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); + _isMatchToPatternsSet(filepath, patterns, isDirectory2) { + const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2); if (!isMatched) { return false; } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); + const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2); if (isMatchedByRelativeNegative) { return false; } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); + const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2); if (isMatchedByAbsoluteNegative) { return false; } return true; } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { + _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) { if (patternsRe.length === 0) { return false; } const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); + return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2); } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { + _isMatchToPatterns(filepath, patternsRe, isDirectory2) { if (patternsRe.length === 0) { return false; } const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { + if (!isMatched && isDirectory2) { return utils.pattern.matchAny(filepath + "/", patternsRe); } return isMatched; @@ -29577,7 +29567,7 @@ var require_provider = __commonJS({ "node_modules/fast-glob/out/providers/provider.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path15 = require("path"); + var path19 = require("path"); var deep_1 = require_deep(); var entry_1 = require_entry(); var error_1 = require_error(); @@ -29591,7 +29581,7 @@ var require_provider = __commonJS({ this.entryTransformer = new entry_2.default(this._settings); } _getRootDirectory(task) { - return path15.resolve(this._settings.cwd, task.base); + return path19.resolve(this._settings.cwd, task.base); } _getReaderOptions(task) { const basePath = task.base === "." ? "" : task.base; @@ -29772,16 +29762,16 @@ var require_settings4 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs17 = require("fs"); + var fs20 = require("fs"); var os3 = require("os"); var CPU_COUNT = Math.max(os3.cpus().length, 1); exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs17.lstat, - lstatSync: fs17.lstatSync, - stat: fs17.stat, - statSync: fs17.statSync, - readdir: fs17.readdir, - readdirSync: fs17.readdirSync + lstat: fs20.lstat, + lstatSync: fs20.lstatSync, + stat: fs20.stat, + statSync: fs20.statSync, + readdir: fs20.readdir, + readdirSync: fs20.readdirSync }; var Settings = class { constructor(_options = {}) { @@ -29837,7 +29827,7 @@ var require_out4 = __commonJS({ var settings_1 = require_settings4(); var utils = require_utils7(); async function FastGlob(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, async_1.default, options); const result = await Promise.all(works); return utils.array.flatten(result); @@ -29848,65 +29838,65 @@ var require_out4 = __commonJS({ FastGlob2.globStream = stream2; FastGlob2.async = FastGlob2; function sync(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, sync_1.default, options); return utils.array.flatten(works); } FastGlob2.sync = sync; function stream2(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, stream_1.default, options); return utils.stream.merge(works); } FastGlob2.stream = stream2; - function generateTasks(source, options) { - assertPatternsInput(source); + function generateTasks2(source, options) { + assertPatternsInput2(source); const patterns = [].concat(source); const settings = new settings_1.default(options); return taskManager.generate(patterns, settings); } - FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); + FastGlob2.generateTasks = generateTasks2; + function isDynamicPattern2(source, options) { + assertPatternsInput2(source); const settings = new settings_1.default(options); return utils.pattern.isDynamicPattern(source, settings); } - FastGlob2.isDynamicPattern = isDynamicPattern; + FastGlob2.isDynamicPattern = isDynamicPattern2; function escapePath(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escape(source); } FastGlob2.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); + function convertPathToPattern2(source) { + assertPatternsInput2(source); return utils.path.convertPathToPattern(source); } - FastGlob2.convertPathToPattern = convertPathToPattern; + FastGlob2.convertPathToPattern = convertPathToPattern2; let posix; (function(posix2) { function escapePath2(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escapePosixPath(source); } posix2.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); + function convertPathToPattern3(source) { + assertPatternsInput2(source); return utils.path.convertPosixPathToPattern(source); } - posix2.convertPathToPattern = convertPathToPattern2; + posix2.convertPathToPattern = convertPathToPattern3; })(posix = FastGlob2.posix || (FastGlob2.posix = {})); let win32; (function(win322) { function escapePath2(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escapeWindowsPath(source); } win322.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); + function convertPathToPattern3(source) { + assertPatternsInput2(source); return utils.path.convertWindowsPathToPattern(source); } - win322.convertPathToPattern = convertPathToPattern2; + win322.convertPathToPattern = convertPathToPattern3; })(win32 = FastGlob2.win32 || (FastGlob2.win32 = {})); })(FastGlob || (FastGlob = {})); function getWorks(source, _Provider, options) { @@ -29916,7 +29906,7 @@ var require_out4 = __commonJS({ const provider = new _Provider(settings); return tasks.map(provider.read, provider); } - function assertPatternsInput(input) { + function assertPatternsInput2(input) { const source = [].concat(input); const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); if (!isValidSource) { @@ -29927,117 +29917,13 @@ var require_out4 = __commonJS({ } }); -// node_modules/path-type/index.js -var require_path_type = __commonJS({ - "node_modules/path-type/index.js"(exports2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var fs17 = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify2(fs17[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - return fs17[fsStatType](filePath)[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - exports2.isFile = isType.bind(null, "stat", "isFile"); - exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// node_modules/dir-glob/index.js -var require_dir_glob = __commonJS({ - "node_modules/dir-glob/index.js"(exports2, module2) { - "use strict"; - var path15 = require("path"); - var pathType = require_path_type(); - var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; - var getPath = (filepath, cwd) => { - const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; - return path15.isAbsolute(pth) ? pth : path15.join(cwd, pth); - }; - var addExtensions = (file, extensions) => { - if (path15.extname(file)) { - return `**/${file}`; - } - return `**/${file}.${getExtensions(extensions)}`; - }; - var getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - if (options.files && options.extensions) { - return options.files.map((x) => path15.posix.join(directory, addExtensions(x, options.extensions))); - } - if (options.files) { - return options.files.map((x) => path15.posix.join(directory, `**/${x}`)); - } - if (options.extensions) { - return [path15.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - return [path15.posix.join(directory, "**")]; - }; - module2.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = await Promise.all([].concat(input).map(async (x) => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - return [].concat.apply([], globs); - }; - module2.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - return [].concat.apply([], globs); - }; - } -}); - -// node_modules/ignore/index.js +// node_modules/globby/node_modules/ignore/index.js var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports2, module2) { + "node_modules/globby/node_modules/ignore/index.js"(exports2, module2) { function makeArray(subject) { return Array.isArray(subject) ? subject : [subject]; } + var UNDEFINED = void 0; var EMPTY = ""; var SPACE = " "; var ESCAPE = "\\"; @@ -30046,14 +29932,18 @@ var require_ignore = __commonJS({ var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + var REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/; + var REGEX_TEST_TRAILING_SLASH = /\/$/; var SLASH = "/"; var TMP_KEY_IGNORE = "node-ignore"; if (typeof Symbol !== "undefined") { TMP_KEY_IGNORE = Symbol.for("node-ignore"); } var KEY_IGNORE = TMP_KEY_IGNORE; - var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); + var define2 = (object, key, value) => { + Object.defineProperty(object, key, { value }); + return value; + }; var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; var RETURN_FALSE = () => false; var sanitizeRange = (range) => range.replace( @@ -30066,7 +29956,7 @@ var require_ignore = __commonJS({ }; var REPLACERS = [ [ - // remove BOM + // Remove BOM // TODO: // Other similar zero-width characters? /^\uFEFF/, @@ -30076,14 +29966,21 @@ var require_ignore = __commonJS({ [ // (a\ ) -> (a ) // (a ) -> (a) + // (a ) -> (a) // (a \ ) -> (a ) - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY + /((?:\\\\)*?)(\\?\s+)$/, + (_2, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY) ], - // replace (\ ) with ' ' + // Replace (\ ) with ' ' + // (\ ) -> ' ' + // (\\ ) -> '\\ ' + // (\\\ ) -> '\\ ' [ - /\\\s/g, - () => SPACE + /(\\+?)\s/g, + (_2, m1) => { + const { length } = m1; + return m1.slice(0, length - length % 2) + SPACE; + } ], // Escape metacharacters // which is written down by users but means special for regular expressions. @@ -30203,103 +30100,100 @@ var require_ignore = __commonJS({ // 'js/' will not match 'a.js' // 'js' will match 'a.js' and 'a.js/' (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_2, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } ] ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; + var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/; + var MODE_IGNORE = "regex"; + var MODE_CHECK_IGNORE = "checkRegex"; + var UNDERSCORE = "_"; + var TRAILING_WILD_CARD_REPLACERS = { + [MODE_IGNORE](_2, p1) { + const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; + }, + [MODE_CHECK_IGNORE](_2, p1) { + const prefix = p1 ? `${p1}[^/]*` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); }; + var makeRegexPrefix = (pattern) => REPLACERS.reduce( + (prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)), + pattern + ); var isString = (subject) => typeof subject === "string"; var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); + var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean); var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; + constructor(pattern, mark, body, ignoreCase, negative, prefix) { this.pattern = pattern; + this.mark = mark; this.negative = negative; - this.regex = regex; + define2(this, "body", body); + define2(this, "ignoreCase", ignoreCase); + define2(this, "regexPrefix", prefix); + } + get regex() { + const key = UNDERSCORE + MODE_IGNORE; + if (this[key]) { + return this[key]; + } + return this._make(MODE_IGNORE, key); + } + get checkRegex() { + const key = UNDERSCORE + MODE_CHECK_IGNORE; + if (this[key]) { + return this[key]; + } + return this._make(MODE_CHECK_IGNORE, key); + } + _make(mode, key) { + const str2 = this.regexPrefix.replace( + REGEX_REPLACE_TRAILING_WILDCARD, + // It does not need to bind pattern + TRAILING_WILD_CARD_REPLACERS[mode] + ); + const regex = this.ignoreCase ? new RegExp(str2, "i") : new RegExp(str2); + return define2(this, key, regex); } }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; + var createRule = ({ + pattern, + mark + }, ignoreCase) => { let negative = false; - if (pattern.indexOf("!") === 0) { + let body = pattern; + if (body.indexOf("!") === 0) { negative = true; - pattern = pattern.substr(1); + body = body.substr(1); } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); + body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regexPrefix = makeRegexPrefix(body); return new IgnoreRule( - origin, pattern, + mark, + body, + ignoreCase, negative, - regex + regexPrefix ); }; - var throwError2 = (message, Ctor) => { - throw new Ctor(message); - }; - var checkPath = (path15, originalPath, doThrow) => { - if (!isString(path15)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path15) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path15)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; - }; - var isNotRelative = (path15) => REGEX_TEST_INVALID_PATH.test(path15); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define2(this, KEY_IGNORE, true); - this._rules = []; + var RuleManager = class { + constructor(ignoreCase) { this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); + this._rules = []; } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); - } - _addPattern(pattern) { + _add(pattern) { if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); + this._rules = this._rules.concat(pattern._rules._rules); this._added = true; return; } - if (checkPattern(pattern)) { + if (isString(pattern)) { + pattern = { + pattern + }; + } + if (checkPattern(pattern.pattern)) { const rule = createRule(pattern, this._ignoreCase); this._added = true; this._rules.push(rule); @@ -30310,8 +30204,85 @@ var require_ignore = __commonJS({ this._added = false; makeArray( isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { + ).forEach(this._add, this); + return this._added; + } + // Test one single path without recursively checking parent directories + // + // - checkUnignored `boolean` whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE` + // @returns {TestResult} true if a file is ignored + test(path19, checkUnignored, mode) { + let ignored = false; + let unignored = false; + let matchedRule; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { + return; + } + const matched = rule[mode].test(path19); + if (!matched) { + return; + } + ignored = !negative; + unignored = negative; + matchedRule = negative ? UNDEFINED : rule; + }); + const ret = { + ignored, + unignored + }; + if (matchedRule) { + ret.rule = matchedRule; + } + return ret; + } + }; + var throwError2 = (message, Ctor) => { + throw new Ctor(message); + }; + var checkPath = (path19, originalPath, doThrow) => { + if (!isString(path19)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ); + } + if (!path19) { + return doThrow(`path must not be empty`, TypeError); + } + if (checkPath.isNotRelative(path19)) { + const r = "`path.relative()`d"; + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ); + } + return true; + }; + var isNotRelative = (path19) => REGEX_TEST_INVALID_PATH.test(path19); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ + ignorecase = true, + ignoreCase = ignorecase, + allowRelativePaths = false + } = {}) { + define2(this, KEY_IGNORE, true); + this._rules = new RuleManager(ignoreCase); + this._strictPathCheck = !allowRelativePaths; + this._initCache(); + } + _initCache() { + this._ignoreCache = /* @__PURE__ */ Object.create(null); + this._testCache = /* @__PURE__ */ Object.create(null); + } + add(pattern) { + if (this._rules.add(pattern)) { this._initCache(); } return this; @@ -30320,58 +30291,45 @@ var require_ignore = __commonJS({ addPattern(pattern) { return this.add(pattern); } - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - _testOne(path15, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path15); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; - } // @returns {TestResult} _test(originalPath, cache, checkUnignored, slices) { - const path15 = originalPath && checkPath.convert(originalPath); + const path19 = originalPath && checkPath.convert(originalPath); checkPath( - path15, + path19, originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError2 + this._strictPathCheck ? throwError2 : RETURN_FALSE ); - return this._t(path15, cache, checkUnignored, slices); + return this._t(path19, cache, checkUnignored, slices); } - _t(path15, cache, checkUnignored, slices) { - if (path15 in cache) { - return cache[path15]; + checkIgnore(path19) { + if (!REGEX_TEST_TRAILING_SLASH.test(path19)) { + return this.test(path19); + } + const slices = path19.split(SLASH).filter(Boolean); + slices.pop(); + if (slices.length) { + const parent = this._t( + slices.join(SLASH) + SLASH, + this._testCache, + true, + slices + ); + if (parent.ignored) { + return parent; + } + } + return this._rules.test(path19, false, MODE_CHECK_IGNORE); + } + _t(path19, cache, checkUnignored, slices) { + if (path19 in cache) { + return cache[path19]; } if (!slices) { - slices = path15.split(SLASH); + slices = path19.split(SLASH).filter(Boolean); } slices.pop(); if (!slices.length) { - return cache[path15] = this._testOne(path15, checkUnignored); + return cache[path19] = this._rules.test(path19, checkUnignored, MODE_IGNORE); } const parent = this._t( slices.join(SLASH) + SLASH, @@ -30379,3960 +30337,40 @@ var require_ignore = __commonJS({ checkUnignored, slices ); - return cache[path15] = parent.ignored ? parent : this._testOne(path15, checkUnignored); + return cache[path19] = parent.ignored ? parent : this._rules.test(path19, checkUnignored, MODE_IGNORE); } - ignores(path15) { - return this._test(path15, this._ignoreCache, false).ignored; + ignores(path19) { + return this._test(path19, this._ignoreCache, false).ignored; } createFilter() { - return (path15) => !this.ignores(path15); + return (path19) => !this.ignores(path19); } filter(paths) { return makeArray(paths).filter(this.createFilter()); } // @returns {TestResult} - test(path15) { - return this._test(path15, this._testCache, true); + test(path19) { + return this._test(path19, this._testCache, true); } }; var factory = (options) => new Ignore(options); - var isPathValid = (path15) => checkPath(path15 && checkPath.convert(path15), path15, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module2.exports = factory; - if ( - // Detect `process` so that it can run in browsers. - typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") - ) { + var isPathValid = (path19) => checkPath(path19 && checkPath.convert(path19), path19, RETURN_FALSE); + var setupWindows = () => { const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path15) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path15) || isNotRelative(path15); - } - } -}); - -// node_modules/slash/index.js -var require_slash = __commonJS({ - "node_modules/slash/index.js"(exports2, module2) { - "use strict"; - module2.exports = (path15) => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path15); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path15); - if (isExtendedLengthPath || hasNonAscii) { - return path15; - } - return path15.replace(/\\/g, "/"); - }; - } -}); - -// node_modules/globby/gitignore.js -var require_gitignore = __commonJS({ - "node_modules/globby/gitignore.js"(exports2, module2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var fs17 = require("fs"); - var path15 = require("path"); - var fastGlob = require_out4(); - var gitIgnore = require_ignore(); - var slash = require_slash(); - var DEFAULT_IGNORE = [ - "**/node_modules/**", - "**/flow-typed/**", - "**/coverage/**", - "**/.git" - ]; - var readFileP = promisify2(fs17.readFile); - var mapGitIgnorePatternTo = (base) => (ignore) => { - if (ignore.startsWith("!")) { - return "!" + path15.posix.join(base, ignore.slice(1)); - } - return path15.posix.join(base, ignore); - }; - var parseGitIgnore = (content, options) => { - const base = slash(path15.relative(options.cwd, path15.dirname(options.fileName))); - return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); - }; - var reduceIgnore = (files) => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - return ignores; - }; - var ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path15.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - return path15.join(cwd, p); - }; - var getIsIgnoredPredecate = (ignores, cwd) => { - return (p) => ignores.ignores(slash(path15.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); - }; - var getFile = async (file, cwd) => { - const filePath = path15.join(cwd, file); - const content = await readFileP(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var getFileSync = (file, cwd) => { - const filePath = path15.join(cwd, file); - const content = fs17.readFileSync(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) - } = {}) => { - return { ignore, cwd }; - }; - module2.exports = async (options) => { - options = normalizeOptions(options); - const paths = await fastGlob("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - module2.exports.sync = (options) => { - options = normalizeOptions(options); - const paths = fastGlob.sync("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = paths.map((file) => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - } -}); - -// node_modules/globby/stream-utils.js -var require_stream_utils = __commonJS({ - "node_modules/globby/stream-utils.js"(exports2, module2) { - "use strict"; - var { Transform } = require("stream"); - var ObjectTransform = class extends Transform { - constructor() { - super({ - objectMode: true - }); - } - }; - var FilterStream = class extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - callback(); - } - }; - var UniqueStream = class extends ObjectTransform { - constructor() { - super(); - this._pushed = /* @__PURE__ */ new Set(); - } - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - callback(); - } - }; - module2.exports = { - FilterStream, - UniqueStream - }; - } -}); - -// node_modules/globby/index.js -var require_globby = __commonJS({ - "node_modules/globby/index.js"(exports2, module2) { - "use strict"; - var fs17 = require("fs"); - var arrayUnion = require_array_union(); - var merge2 = require_merge2(); - var fastGlob = require_out4(); - var dirGlob = require_dir_glob(); - var gitignore = require_gitignore(); - var { FilterStream, UniqueStream } = require_stream_utils(); - var DEFAULT_FILTER = () => false; - var isNegative2 = (pattern) => pattern[0] === "!"; - var assertPatternsInput = (patterns) => { - if (!patterns.every((pattern) => typeof pattern === "string")) { - throw new TypeError("Patterns must be a string or an array of strings"); - } - }; - var checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - let stat; - try { - stat = fs17.statSync(options.cwd); - } catch { - return; - } - if (!stat.isDirectory()) { - throw new Error("The `cwd` option must be a path to a directory"); - } - }; - var getPathString = (p) => p.stats instanceof fs17.Stats ? p.path : p; - var generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - const globTasks = []; - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - for (const [index, pattern] of patterns.entries()) { - if (isNegative2(pattern)) { - continue; - } - const ignore = patterns.slice(index).filter((pattern2) => isNegative2(pattern2)).map((pattern2) => pattern2.slice(1)); - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - globTasks.push({ pattern, options }); - } - return globTasks; - }; - var globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === "object") { - options = { - ...options, - ...task.options.expandDirectories - }; - } - return fn(task.pattern, options); - }; - var getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - var getFilterSync = (options) => { - return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - var globToTask = (task) => (glob2) => { - const { options } = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - return { - pattern: glob2, - options - }; - }; - module2.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const getFilter = async () => { - return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - const getTasks = async () => { - const tasks2 = await Promise.all(globTasks.map(async (task) => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - return arrayUnion(...tasks2); - }; - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); - return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); - }; - module2.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - return matches.filter((path_) => !filter(path_)); - }; - module2.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - const filterStream = new FilterStream((p) => !filter(p)); - const uniqueStream = new UniqueStream(); - return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); - }; - module2.exports.generateGlobTasks = generateGlobTasks; - module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); - module2.exports.gitignore = gitignore; - } -}); - -// node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - "node_modules/graceful-fs/polyfills.js"(exports2, module2) { - var constants = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform2 = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs17) { - if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs17); - } - if (!fs17.lutimes) { - patchLutimes(fs17); - } - fs17.chown = chownFix(fs17.chown); - fs17.fchown = chownFix(fs17.fchown); - fs17.lchown = chownFix(fs17.lchown); - fs17.chmod = chmodFix(fs17.chmod); - fs17.fchmod = chmodFix(fs17.fchmod); - fs17.lchmod = chmodFix(fs17.lchmod); - fs17.chownSync = chownFixSync(fs17.chownSync); - fs17.fchownSync = chownFixSync(fs17.fchownSync); - fs17.lchownSync = chownFixSync(fs17.lchownSync); - fs17.chmodSync = chmodFixSync(fs17.chmodSync); - fs17.fchmodSync = chmodFixSync(fs17.fchmodSync); - fs17.lchmodSync = chmodFixSync(fs17.lchmodSync); - fs17.stat = statFix(fs17.stat); - fs17.fstat = statFix(fs17.fstat); - fs17.lstat = statFix(fs17.lstat); - fs17.statSync = statFixSync(fs17.statSync); - fs17.fstatSync = statFixSync(fs17.fstatSync); - fs17.lstatSync = statFixSync(fs17.lstatSync); - if (fs17.chmod && !fs17.lchmod) { - fs17.lchmod = function(path15, mode, cb) { - if (cb) process.nextTick(cb); - }; - fs17.lchmodSync = function() { - }; - } - if (fs17.chown && !fs17.lchown) { - fs17.lchown = function(path15, uid, gid, cb) { - if (cb) process.nextTick(cb); - }; - fs17.lchownSync = function() { - }; - } - if (platform2 === "win32") { - fs17.rename = typeof fs17.rename !== "function" ? fs17.rename : (function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { - setTimeout(function() { - fs17.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er); - }); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); - return rename; - })(fs17.rename); - } - fs17.read = typeof fs17.read !== "function" ? fs17.read : (function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _2, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs17, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs17, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); - return read; - })(fs17.read); - fs17.readSync = typeof fs17.readSync !== "function" ? fs17.readSync : /* @__PURE__ */ (function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs17, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - })(fs17.readSync); - function patchLchmod(fs18) { - fs18.lchmod = function(path15, mode, callback) { - fs18.open( - path15, - constants.O_WRONLY | constants.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) callback(err); - return; - } - fs18.fchmod(fd, mode, function(err2) { - fs18.close(fd, function(err22) { - if (callback) callback(err2 || err22); - }); - }); - } - ); - }; - fs18.lchmodSync = function(path15, mode) { - var fd = fs18.openSync(path15, constants.O_WRONLY | constants.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs18.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs18.closeSync(fd); - } catch (er) { - } - } else { - fs18.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs18) { - if (constants.hasOwnProperty("O_SYMLINK") && fs18.futimes) { - fs18.lutimes = function(path15, at, mt, cb) { - fs18.open(path15, constants.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) cb(er); - return; - } - fs18.futimes(fd, at, mt, function(er2) { - fs18.close(fd, function(er22) { - if (cb) cb(er2 || er22); - }); - }); - }); - }; - fs18.lutimesSync = function(path15, at, mt) { - var fd = fs18.openSync(path15, constants.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs18.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs18.closeSync(fd); - } catch (er) { - } - } else { - fs18.closeSync(fd); - } - } - return ret; - }; - } else if (fs18.futimes) { - fs18.lutimes = function(_a, _b, _c, cb) { - if (cb) process.nextTick(cb); - }; - fs18.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) return orig; - return function(target, mode, cb) { - return orig.call(fs17, target, mode, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) return orig; - return function(target, mode) { - try { - return orig.call(fs17, target, mode); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function chownFix(orig) { - if (!orig) return orig; - return function(target, uid, gid, cb) { - return orig.call(fs17, target, uid, gid, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) return orig; - return function(target, uid, gid) { - try { - return orig.call(fs17, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function statFix(orig) { - if (!orig) return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - if (cb) cb.apply(this, arguments); - } - return options ? orig.call(fs17, target, options, callback) : orig.call(fs17, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) return orig; - return function(target, options) { - var stats = options ? orig.call(fs17, target, options) : orig.call(fs17, target); - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { - var Stream = require("stream").Stream; - module2.exports = legacy; - function legacy(fs17) { - return { - ReadStream, - WriteStream - }; - function ReadStream(path15, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path15, options); - Stream.call(this); - var self2 = this; - this.path = path15; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self2._read(); - }); - return; - } - fs17.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self2.emit("error", err); - self2.readable = false; - return; - } - self2.fd = fd; - self2.emit("open", fd); - self2._read(); - }); - } - function WriteStream(path15, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path15, options); - Stream.call(this); - this.path = path15; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs17.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - "node_modules/graceful-fs/clone.js"(exports2, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs17 = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop() { - } - function publishQueue(context3, queue2) { - Object.defineProperty(context3, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug3 = noop; - if (util.debuglog) - debug3 = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug3 = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs17[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs17, queue); - fs17.close = (function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs17, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - })(fs17.close); - fs17.closeSync = (function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs17, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - })(fs17.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug3(fs17[gracefulQueue]); - require("assert").equal(fs17[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs17[gracefulQueue]); - } - module2.exports = patch(clone(fs17)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs17.__patched) { - module2.exports = patch(fs17); - fs17.__patched = true; - } - function patch(fs18) { - polyfills(fs18); - fs18.gracefulify = patch; - fs18.createReadStream = createReadStream2; - fs18.createWriteStream = createWriteStream2; - var fs$readFile = fs18.readFile; - fs18.readFile = readFile; - function readFile(path15, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path15, options, cb); - function go$readFile(path16, options2, cb2, startTime) { - return fs$readFile(path16, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path16, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs18.writeFile; - fs18.writeFile = writeFile; - function writeFile(path15, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path15, data, options, cb); - function go$writeFile(path16, data2, options2, cb2, startTime) { - return fs$writeFile(path16, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path16, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs18.appendFile; - if (fs$appendFile) - fs18.appendFile = appendFile; - function appendFile(path15, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path15, data, options, cb); - function go$appendFile(path16, data2, options2, cb2, startTime) { - return fs$appendFile(path16, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path16, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs18.copyFile; - if (fs$copyFile) - fs18.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs18.readdir; - fs18.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path15, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path16, options2, cb2, startTime) { - return fs$readdir(path16, fs$readdirCallback( - path16, - options2, - cb2, - startTime - )); - } : function go$readdir2(path16, options2, cb2, startTime) { - return fs$readdir(path16, options2, fs$readdirCallback( - path16, - options2, - cb2, - startTime - )); - }; - return go$readdir(path15, options, cb); - function fs$readdirCallback(path16, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path16, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs18); - ReadStream = legStreams.ReadStream; - WriteStream = legStreams.WriteStream; - } - var fs$ReadStream = fs18.ReadStream; - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype); - ReadStream.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs18.WriteStream; - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype); - WriteStream.prototype.open = WriteStream$open; - } - Object.defineProperty(fs18, "ReadStream", { - get: function() { - return ReadStream; - }, - set: function(val2) { - ReadStream = val2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs18, "WriteStream", { - get: function() { - return WriteStream; - }, - set: function(val2) { - WriteStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream; - Object.defineProperty(fs18, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val2) { - FileReadStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream; - Object.defineProperty(fs18, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val2) { - FileWriteStream = val2; - }, - enumerable: true, - configurable: true - }); - function ReadStream(path15, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream(path15, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream2(path15, options) { - return new fs18.ReadStream(path15, options); - } - function createWriteStream2(path15, options) { - return new fs18.WriteStream(path15, options); - } - var fs$open = fs18.open; - fs18.open = open; - function open(path15, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path15, flags, mode, cb); - function go$open(path16, flags2, mode2, cb2, startTime) { - return fs$open(path16, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path16, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs18; - } - function enqueue(elem) { - debug3("ENQUEUE", elem[0].name, elem[1]); - fs17[gracefulQueue].push(elem); - retry3(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs17[gracefulQueue].length; ++i) { - if (fs17[gracefulQueue][i].length > 2) { - fs17[gracefulQueue][i][3] = now; - fs17[gracefulQueue][i][4] = now; - } - } - retry3(); - } - function retry3() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs17[gracefulQueue].length === 0) - return; - var elem = fs17[gracefulQueue].shift(); - var fn = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug3("RETRY", fn.name, args); - fn.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug3("TIMEOUT", fn.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug3("RETRY", fn.name, args); - fn.apply(null, args.concat([startTime])); - } else { - fs17[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry3, 0); - } - } - } -}); - -// node_modules/is-path-cwd/index.js -var require_is_path_cwd = __commonJS({ - "node_modules/is-path-cwd/index.js"(exports2, module2) { - "use strict"; - var path15 = require("path"); - module2.exports = (path_) => { - let cwd = process.cwd(); - path_ = path15.resolve(path_); - if (process.platform === "win32") { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - return path_ === cwd; - }; - } -}); - -// node_modules/is-path-inside/index.js -var require_is_path_inside = __commonJS({ - "node_modules/is-path-inside/index.js"(exports2, module2) { - "use strict"; - var path15 = require("path"); - module2.exports = (childPath, parentPath) => { - const relation = path15.relative(parentPath, childPath); - return Boolean( - relation && relation !== ".." && !relation.startsWith(`..${path15.sep}`) && relation !== path15.resolve(childPath) - ); - }; - } -}); - -// node_modules/fs.realpath/old.js -var require_old = __commonJS({ - "node_modules/fs.realpath/old.js"(exports2) { - var pathModule = require("path"); - var isWindows = process.platform === "win32"; - var fs17 = require("fs"); - var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - function rethrow() { - var callback; - if (DEBUG) { - var backtrace = new Error(); - callback = debugCallback; - } else - callback = missingCallback; - return callback; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; - else if (!process.noDeprecation) { - var msg = "fs: missing callback " + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } - } - function maybeCallback(cb) { - return typeof cb === "function" ? cb : rethrow(); - } - var normalize4 = pathModule.normalize; - if (isWindows) { - nextPartRe = /(.*?)(?:[\/\\]+|$)/g; - } else { - nextPartRe = /(.*?)(?:[\/]+|$)/g; - } - var nextPartRe; - if (isWindows) { - splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; - } else { - splitRootRe = /^[\/]*/; - } - var splitRootRe; - exports2.realpathSync = function realpathSync(p, cache) { - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs17.lstatSync(base); - knownHard[base] = true; - } - } - while (pos < p.length) { - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - continue; - } - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - resolvedLink = cache[base]; - } else { - var stat = fs17.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs17.statSync(base); - linkTarget = fs17.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - if (cache) cache[original] = p; - return p; - }; - exports2.realpath = function realpath(p, cache, cb) { - if (typeof cb !== "function") { - cb = maybeCallback(cache); - cache = null; - } - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs17.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - function LOOP() { - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - return process.nextTick(LOOP); - } - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - return gotResolvedLink(cache[base]); - } - return fs17.lstat(base, gotStat); - } - function gotStat(err, stat) { - if (err) return cb(err); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs17.stat(base, function(err2) { - if (err2) return cb(err2); - fs17.readlink(base, function(err3, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err3, target); - }); - }); - } - function gotTarget(err, target, base2) { - if (err) return cb(err); - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base2] = resolvedLink; - gotResolvedLink(resolvedLink); - } - function gotResolvedLink(resolvedLink) { - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - }; - } -}); - -// node_modules/fs.realpath/index.js -var require_fs5 = __commonJS({ - "node_modules/fs.realpath/index.js"(exports2, module2) { - module2.exports = realpath; - realpath.realpath = realpath; - realpath.sync = realpathSync; - realpath.realpathSync = realpathSync; - realpath.monkeypatch = monkeypatch; - realpath.unmonkeypatch = unmonkeypatch; - var fs17 = require("fs"); - var origRealpath = fs17.realpath; - var origRealpathSync = fs17.realpathSync; - var version = process.version; - var ok = /^v[0-5]\./.test(version); - var old = require_old(); - function newError(er) { - return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); - } - function realpath(p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb); - } - if (typeof cache === "function") { - cb = cache; - cache = null; - } - origRealpath(p, cache, function(er, result) { - if (newError(er)) { - old.realpath(p, cache, cb); - } else { - cb(er, result); - } - }); - } - function realpathSync(p, cache) { - if (ok) { - return origRealpathSync(p, cache); - } - try { - return origRealpathSync(p, cache); - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache); - } else { - throw er; - } - } - } - function monkeypatch() { - fs17.realpath = realpath; - fs17.realpathSync = realpathSync; - } - function unmonkeypatch() { - fs17.realpath = origRealpath; - fs17.realpathSync = origRealpathSync; - } - } -}); - -// node_modules/concat-map/index.js -var require_concat_map = __commonJS({ - "node_modules/concat-map/index.js"(exports2, module2) { - module2.exports = function(xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - } -}); - -// node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ - "node_modules/balanced-match/index.js"(exports2, module2) { - "use strict"; - module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r = range(a, b, str2); - return r && { - start: r[0], - end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + a.length, r[1]), - post: str2.slice(r[1] + b.length) - }; - } - function maybeMatch(reg, str2) { - var m = str2.match(reg); - return m ? m[0] : null; - } - balanced.range = range; - function range(a, b, str2) { - var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); - var i = ai; - if (ai >= 0 && bi > 0) { - begs = []; - left = str2.length; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str2.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - bi = str2.indexOf(b, i + 1); - } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length) { - result = [left, right]; - } - } - return result; - } - } -}); - -// node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ - "node_modules/brace-expansion/index.js"(exports2, module2) { - var concatMap = require_concat_map(); - var balanced = require_balanced_match(); - module2.exports = expandTop; - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) - return [""]; - var parts = []; - var m = balanced("{", "}", str2); - if (!m) - return str2.split(","); - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; - } - function expandTop(str2) { - if (!str2) - return []; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); - } - return expand(escapeBraces(str2), true).map(unescapeBraces); - } - function embrace(str2) { - return "{" + str2 + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte5(i, y) { - return i >= y; - } - function expand(str2, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2); - } - return [str2]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand(m.post, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte5; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { - return expand(el, false); - }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - return expansions; - } - } -}); - -// node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ - "node_modules/minimatch/minimatch.js"(exports2, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path15 = (function() { - try { - return require("path"); - } catch (e) { - } - })() || { - sep: "/" - }; - minimatch.sep = path15.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand = require_brace_expansion(); - var plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" } - }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set2, c) { - set2[c] = true; - return set2; - }, {}); - } - var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { - options = options || {}; - return function(p, i, list) { - return minimatch(p, pattern, options); - }; - } - function ext(a, b) { - b = b || {}; - var t = {}; - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; - } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); - }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); - }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); - }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); - }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); - }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); - }; - m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); - }; - return m; - }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); - if (!options) options = {}; - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); - } - assertValidPattern(pattern); - if (!options) options = {}; - pattern = pattern.trim(); - if (!options.allowWindowsEscape && path15.sep !== "/") { - pattern = pattern.split(path15.sep).join("/"); - } - this.options = options; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.make(); - } - Minimatch.prototype.debug = function() { - }; - Minimatch.prototype.make = make; - function make() { - var pattern = this.pattern; - var options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); - if (options.debug) this.debug = function debug3() { - console.error.apply(console, arguments); - }; - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { - return s.split(slashSplit); - }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { - return s.map(this.parse, this); - }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { - return s.indexOf(false) === -1; - }); - this.debug(this.pattern, set2); - this.set = set2; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate2 = false; - var options = this.options; - var negateOffset = 0; - if (options.nonegate) return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate2 = !negate2; - negateOffset++; - } - if (negateOffset) this.pattern = pattern.substr(negateOffset); - this.negate = negate2; - } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return expand(pattern); - } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); - } - }; - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - assertValidPattern(pattern); - var options = this.options; - if (pattern === "**") { - if (!options.noglobstar) - return GLOBSTAR; - else - pattern = "*"; - } - if (pattern === "") return ""; - var re = ""; - var hasMagic = !!options.nocase; - var escaping = false; - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self2 = this; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; - } - self2.debug("clearStateChar %j %j", stateChar, re); - stateChar = false; - } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; - } - switch (c) { - /* istanbul ignore next */ - case "/": { - return false; - } - case "\\": - clearStateChar(); - escaping = true; - continue; - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); - if (inClass) { - this.debug(" in class"); - if (c === "!" && i === classStart + 1) c = "^"; - re += c; - continue; - } - self2.debug("call clearStateChar %j", stateChar); - clearStateChar(); - stateChar = c; - if (options.noext) clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re); - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - re += pl.close; - if (pl.type === "!") { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - clearStateChar(); - re += "|"; - continue; - // these are mostly the same in regexp and glob - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - var cs = pattern.substring(classStart + 1, i); - try { - RegExp("[" + cs + "]"); - } catch (er) { - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; - } - } - if (inClass) { - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re, pl); - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_2, $1, $2) { - if (!$2) { - $2 = "\\"; - } - return $1 + $1 + $2 + "|"; - }); - this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case "[": - case ".": - case "(": - addPatternStart = true; - } - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - nlLast += nlAfter; - var openParensBefore = nlBefore.split("(").length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); - } - nlAfter = cleanAfter; - var dollar = ""; - if (nlAfter === "" && isSub !== SUBPARSE) { - dollar = "$"; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - if (re !== "" && hasMagic) { - re = "(?=.)" + re; - } - if (addPatternStart) { - re = patternStart + re; - } - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options.nocase ? "i" : ""; - try { - var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); - } - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) re = "^(?!" + re + ").*$"; - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - minimatch.match = function(list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function(f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = function match(f, partial) { - if (typeof partial === "undefined") partial = this.partial; - this.debug("match", f, this.pattern); - if (this.comment) return false; - if (this.empty) return f === ""; - if (f === "/" && partial) return true; - var options = this.options; - if (path15.sep !== "/") { - f = f.split(path15.sep).join("/"); - } - f = f.split(slashSplit); - this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) break; - } - for (i = 0; i < set2.length; i++) { - var pattern = set2[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) return true; - return !this.negate; - } - } - if (options.flipNegate) return false; - return this.negate; - }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options = this.options; - this.debug( - "matchOne", - { "this": this, file, pattern } - ); - this.debug("matchOne", file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug("matchOne loop"); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - if (p === false) return false; - if (p === GLOBSTAR) { - this.debug("GLOBSTAR", [pattern, p, f]); - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; - } - return true; - } - while (fr < fl) { - var swallowee = file[fr]; - this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { - this.debug("dot detected!", file, fr, pattern, pr); - break; - } - this.debug("globstar swallow a segment, and continue"); - fr++; - } - } - if (partial) { - this.debug("\n>>> no match, partial?", file, fr, pattern, pr); - if (fr === fl) return true; - } - return false; - } - var hit; - if (typeof p === "string") { - hit = f === p; - this.debug("string match", p, f, hit); - } else { - hit = f.match(p); - this.debug("pattern match", p, f, hit); - } - if (!hit) return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - return fi === fl - 1 && file[fi] === ""; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/inherits/inherits_browser.js -var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports2, module2) { - if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; - } - } -}); - -// node_modules/inherits/inherits.js -var require_inherits = __commonJS({ - "node_modules/inherits/inherits.js"(exports2, module2) { - try { - util = require("util"); - if (typeof util.inherits !== "function") throw ""; - module2.exports = util.inherits; - } catch (e) { - module2.exports = require_inherits_browser(); - } - var util; - } -}); - -// node_modules/path-is-absolute/index.js -var require_path_is_absolute = __commonJS({ - "node_modules/path-is-absolute/index.js"(exports2, module2) { - "use strict"; - function posix(path15) { - return path15.charAt(0) === "/"; - } - function win32(path15) { - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path15); - var device = result[1] || ""; - var isUnc = Boolean(device && device.charAt(1) !== ":"); - return Boolean(result[2] || isUnc); - } - module2.exports = process.platform === "win32" ? win32 : posix; - module2.exports.posix = posix; - module2.exports.win32 = win32; - } -}); - -// node_modules/rimraf/node_modules/glob/common.js -var require_common3 = __commonJS({ - "node_modules/rimraf/node_modules/glob/common.js"(exports2) { - exports2.setopts = setopts; - exports2.ownProp = ownProp; - exports2.makeAbs = makeAbs; - exports2.finish = finish; - exports2.mark = mark; - exports2.isIgnored = isIgnored; - exports2.childrenIgnored = childrenIgnored; - function ownProp(obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field); - } - var fs17 = require("fs"); - var path15 = require("path"); - var minimatch = require_minimatch(); - var isAbsolute3 = require_path_is_absolute(); - var Minimatch = minimatch.Minimatch; - function alphasort(a, b) { - return a.localeCompare(b, "en"); - } - function setupIgnores(self2, options) { - self2.ignore = options.ignore || []; - if (!Array.isArray(self2.ignore)) - self2.ignore = [self2.ignore]; - if (self2.ignore.length) { - self2.ignore = self2.ignore.map(ignoreMap); - } - } - function ignoreMap(pattern) { - var gmatcher = null; - if (pattern.slice(-3) === "/**") { - var gpattern = pattern.replace(/(\/\*\*)+$/, ""); - gmatcher = new Minimatch(gpattern, { dot: true }); - } - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher - }; - } - function setopts(self2, pattern, options) { - if (!options) - options = {}; - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar"); - } - pattern = "**/" + pattern; - } - self2.silent = !!options.silent; - self2.pattern = pattern; - self2.strict = options.strict !== false; - self2.realpath = !!options.realpath; - self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); - self2.follow = !!options.follow; - self2.dot = !!options.dot; - self2.mark = !!options.mark; - self2.nodir = !!options.nodir; - if (self2.nodir) - self2.mark = true; - self2.sync = !!options.sync; - self2.nounique = !!options.nounique; - self2.nonull = !!options.nonull; - self2.nosort = !!options.nosort; - self2.nocase = !!options.nocase; - self2.stat = !!options.stat; - self2.noprocess = !!options.noprocess; - self2.absolute = !!options.absolute; - self2.fs = options.fs || fs17; - self2.maxLength = options.maxLength || Infinity; - self2.cache = options.cache || /* @__PURE__ */ Object.create(null); - self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); - self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); - setupIgnores(self2, options); - self2.changedCwd = false; - var cwd = process.cwd(); - if (!ownProp(options, "cwd")) - self2.cwd = cwd; - else { - self2.cwd = path15.resolve(options.cwd); - self2.changedCwd = self2.cwd !== cwd; - } - self2.root = options.root || path15.resolve(self2.cwd, "/"); - self2.root = path15.resolve(self2.root); - if (process.platform === "win32") - self2.root = self2.root.replace(/\\/g, "/"); - self2.cwdAbs = isAbsolute3(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); - if (process.platform === "win32") - self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); - self2.nomount = !!options.nomount; - options.nonegate = true; - options.nocomment = true; - self2.minimatch = new Minimatch(pattern, options); - self2.options = self2.minimatch.options; - } - function finish(self2) { - var nou = self2.nounique; - var all = nou ? [] : /* @__PURE__ */ Object.create(null); - for (var i = 0, l = self2.matches.length; i < l; i++) { - var matches = self2.matches[i]; - if (!matches || Object.keys(matches).length === 0) { - if (self2.nonull) { - var literal = self2.minimatch.globSet[i]; - if (nou) - all.push(literal); - else - all[literal] = true; - } - } else { - var m = Object.keys(matches); - if (nou) - all.push.apply(all, m); - else - m.forEach(function(m2) { - all[m2] = true; - }); - } - } - if (!nou) - all = Object.keys(all); - if (!self2.nosort) - all = all.sort(alphasort); - if (self2.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self2._mark(all[i]); - } - if (self2.nodir) { - all = all.filter(function(e) { - var notDir = !/\/$/.test(e); - var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; - if (notDir && c) - notDir = c !== "DIR" && !Array.isArray(c); - return notDir; - }); - } - } - if (self2.ignore.length) - all = all.filter(function(m2) { - return !isIgnored(self2, m2); - }); - self2.found = all; - } - function mark(self2, p) { - var abs = makeAbs(self2, p); - var c = self2.cache[abs]; - var m = p; - if (c) { - var isDir = c === "DIR" || Array.isArray(c); - var slash = p.slice(-1) === "/"; - if (isDir && !slash) - m += "/"; - else if (!isDir && slash) - m = m.slice(0, -1); - if (m !== p) { - var mabs = makeAbs(self2, m); - self2.statCache[mabs] = self2.statCache[abs]; - self2.cache[mabs] = self2.cache[abs]; - } - } - return m; - } - function makeAbs(self2, f) { - var abs = f; - if (f.charAt(0) === "/") { - abs = path15.join(self2.root, f); - } else if (isAbsolute3(f) || f === "") { - abs = f; - } else if (self2.changedCwd) { - abs = path15.resolve(self2.cwd, f); - } else { - abs = path15.resolve(f); - } - if (process.platform === "win32") - abs = abs.replace(/\\/g, "/"); - return abs; - } - function isIgnored(self2, path16) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return item.matcher.match(path16) || !!(item.gmatcher && item.gmatcher.match(path16)); - }); - } - function childrenIgnored(self2, path16) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path16)); - }); - } - } -}); - -// node_modules/rimraf/node_modules/glob/sync.js -var require_sync7 = __commonJS({ - "node_modules/rimraf/node_modules/glob/sync.js"(exports2, module2) { - module2.exports = globSync; - globSync.GlobSync = GlobSync; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var Glob = require_glob().Glob; - var util = require("util"); - var path15 = require("path"); - var assert = require("assert"); - var isAbsolute3 = require_path_is_absolute(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - function globSync(pattern, options) { - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - return new GlobSync(pattern, options).found; - } - function GlobSync(pattern, options) { - if (!pattern) - throw new Error("must provide pattern"); - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options); - setopts(this, pattern, options); - if (this.noprocess) - return this; - var n = this.minimatch.set.length; - this.matches = new Array(n); - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false); - } - this._finish(); - } - GlobSync.prototype._finish = function() { - assert(this instanceof GlobSync); - if (this.realpath) { - var self2 = this; - this.matches.forEach(function(matchset, index) { - var set2 = self2.matches[index] = /* @__PURE__ */ Object.create(null); - for (var p in matchset) { - try { - p = self2._makeAbs(p); - var real = rp.realpathSync(p, self2.realpathCache); - set2[real] = true; - } catch (er) { - if (er.syscall === "stat") - set2[self2._makeAbs(p)] = true; - else - throw er; - } - } - }); - } - common2.finish(this); - }; - GlobSync.prototype._process = function(pattern, index, inGlobStar) { - assert(this instanceof GlobSync); - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute3(prefix) || isAbsolute3(pattern.join("/"))) { - if (!prefix || !isAbsolute3(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return; - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar); - }; - GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var pn = remain[0]; - var negate2 = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate2 && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path15.join(this.root, e); - } - this._emitMatch(index, e); - } - return; - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) - newPattern = [prefix, e]; - else - newPattern = [e]; - this._process(newPattern.concat(remain), index, inGlobStar); - } - }; - GlobSync.prototype._emitMatch = function(index, e) { - if (isIgnored(this, e)) - return; - var abs = this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) { - e = abs; - } - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - if (this.stat) - this._stat(e); - }; - GlobSync.prototype._readdirInGlobStar = function(abs) { - if (this.follow) - return this._readdir(abs, false); - var entries; - var lstat; - var stat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er.code === "ENOENT") { - return null; - } - } - var isSym = lstat && lstat.isSymbolicLink(); - this.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = "FILE"; - else - entries = this._readdir(abs, false); - return entries; - }; - GlobSync.prototype._readdir = function(abs, inGlobStar) { - var entries; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return null; - if (Array.isArray(c)) - return c; - } - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)); - } catch (er) { - this._readdirError(abs, er); - return null; - } - }; - GlobSync.prototype._readdirEntries = function(abs, entries) { - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return entries; - }; - GlobSync.prototype._readdirError = function(f, er) { - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - throw error2; - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) - throw er; - if (!this.silent) - console.error("glob error", er); - break; - } - }; - GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false); - var len = entries.length; - var isSym = this.symlinks[abs]; - if (isSym && inGlobStar) - return; - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true); - } - }; - GlobSync.prototype._processSimple = function(prefix, index) { - var exists = this._stat(prefix); - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return; - if (prefix && isAbsolute3(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path15.join(this.root, prefix); - } else { - prefix = path15.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - }; - GlobSync.prototype._stat = function(f) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return false; - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return c; - if (needDir && c === "FILE") - return false; - } - var exists; - var stat = this.statCache[abs]; - if (!stat) { - var lstat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return false; - } - } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs); - } catch (er) { - stat = lstat; - } - } else { - stat = lstat; - } - } - this.statCache[abs] = stat; - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return false; - return c; - }; - GlobSync.prototype._mark = function(p) { - return common2.mark(this, p); - }; - GlobSync.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - } -}); - -// node_modules/inflight/inflight.js -var require_inflight = __commonJS({ - "node_modules/inflight/inflight.js"(exports2, module2) { - var wrappy = require_wrappy(); - var reqs = /* @__PURE__ */ Object.create(null); - var once = require_once(); - module2.exports = wrappy(inflight); - function inflight(key, cb) { - if (reqs[key]) { - reqs[key].push(cb); - return null; - } else { - reqs[key] = [cb]; - return makeres(key); - } - } - function makeres(key) { - return once(function RES() { - var cbs = reqs[key]; - var len = cbs.length; - var args = slice(arguments); - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args); - } - } finally { - if (cbs.length > len) { - cbs.splice(0, len); - process.nextTick(function() { - RES.apply(null, args); - }); - } else { - delete reqs[key]; - } - } - }); - } - function slice(args) { - var length = args.length; - var array = []; - for (var i = 0; i < length; i++) array[i] = args[i]; - return array; - } - } -}); - -// node_modules/rimraf/node_modules/glob/glob.js -var require_glob = __commonJS({ - "node_modules/rimraf/node_modules/glob/glob.js"(exports2, module2) { - module2.exports = glob2; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var inherits = require_inherits(); - var EE = require("events").EventEmitter; - var path15 = require("path"); - var assert = require("assert"); - var isAbsolute3 = require_path_is_absolute(); - var globSync = require_sync7(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var inflight = require_inflight(); - var util = require("util"); - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - var once = require_once(); - function glob2(pattern, options, cb) { - if (typeof options === "function") cb = options, options = {}; - if (!options) options = {}; - if (options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return globSync(pattern, options); - } - return new Glob(pattern, options, cb); - } - glob2.sync = globSync; - var GlobSync = glob2.GlobSync = globSync.GlobSync; - glob2.glob = glob2; - function extend3(origin, add2) { - if (add2 === null || typeof add2 !== "object") { - return origin; - } - var keys = Object.keys(add2); - var i = keys.length; - while (i--) { - origin[keys[i]] = add2[keys[i]]; - } - return origin; - } - glob2.hasMagic = function(pattern, options_) { - var options = extend3({}, options_); - options.noprocess = true; - var g = new Glob(pattern, options); - var set2 = g.minimatch.set; - if (!pattern) - return false; - if (set2.length > 1) - return true; - for (var j = 0; j < set2[0].length; j++) { - if (typeof set2[0][j] !== "string") - return true; - } - return false; - }; - glob2.Glob = Glob; - inherits(Glob, EE); - function Glob(pattern, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - if (options && options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return new GlobSync(pattern, options); - } - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb); - setopts(this, pattern, options); - this._didRealPath = false; - var n = this.minimatch.set.length; - this.matches = new Array(n); - if (typeof cb === "function") { - cb = once(cb); - this.on("error", cb); - this.on("end", function(matches) { - cb(null, matches); - }); - } - var self2 = this; - this._processing = 0; - this._emitQueue = []; - this._processQueue = []; - this.paused = false; - if (this.noprocess) - return this; - if (n === 0) - return done(); - var sync = true; - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false, done); - } - sync = false; - function done() { - --self2._processing; - if (self2._processing <= 0) { - if (sync) { - process.nextTick(function() { - self2._finish(); - }); - } else { - self2._finish(); - } - } - } - } - Glob.prototype._finish = function() { - assert(this instanceof Glob); - if (this.aborted) - return; - if (this.realpath && !this._didRealpath) - return this._realpath(); - common2.finish(this); - this.emit("end", this.found); - }; - Glob.prototype._realpath = function() { - if (this._didRealpath) - return; - this._didRealpath = true; - var n = this.matches.length; - if (n === 0) - return this._finish(); - var self2 = this; - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next); - function next() { - if (--n === 0) - self2._finish(); - } - }; - Glob.prototype._realpathSet = function(index, cb) { - var matchset = this.matches[index]; - if (!matchset) - return cb(); - var found = Object.keys(matchset); - var self2 = this; - var n = found.length; - if (n === 0) - return cb(); - var set2 = this.matches[index] = /* @__PURE__ */ Object.create(null); - found.forEach(function(p, i) { - p = self2._makeAbs(p); - rp.realpath(p, self2.realpathCache, function(er, real) { - if (!er) - set2[real] = true; - else if (er.syscall === "stat") - set2[p] = true; - else - self2.emit("error", er); - if (--n === 0) { - self2.matches[index] = set2; - cb(); - } - }); - }); - }; - Glob.prototype._mark = function(p) { - return common2.mark(this, p); - }; - Glob.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - Glob.prototype.abort = function() { - this.aborted = true; - this.emit("abort"); - }; - Glob.prototype.pause = function() { - if (!this.paused) { - this.paused = true; - this.emit("pause"); - } - }; - Glob.prototype.resume = function() { - if (this.paused) { - this.emit("resume"); - this.paused = false; - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0); - this._emitQueue.length = 0; - for (var i = 0; i < eq.length; i++) { - var e = eq[i]; - this._emitMatch(e[0], e[1]); - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0); - this._processQueue.length = 0; - for (var i = 0; i < pq.length; i++) { - var p = pq[i]; - this._processing--; - this._process(p[0], p[1], p[2], p[3]); - } - } - } - }; - Glob.prototype._process = function(pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === "function"); - if (this.aborted) - return; - this._processing++; - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]); - return; - } - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index, cb); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute3(prefix) || isAbsolute3(pattern.join("/"))) { - if (!prefix || !isAbsolute3(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return cb(); - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); - }; - Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var pn = remain[0]; - var negate2 = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate2 && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return cb(); - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path15.join(this.root, e); - } - this._emitMatch(index, e); - } - return cb(); - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - this._process([e].concat(remain), index, inGlobStar, cb); - } - cb(); - }; - Glob.prototype._emitMatch = function(index, e) { - if (this.aborted) - return; - if (isIgnored(this, e)) - return; - if (this.paused) { - this._emitQueue.push([index, e]); - return; - } - var abs = isAbsolute3(e) ? e : this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) - e = abs; - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - var st = this.statCache[abs]; - if (st) - this.emit("stat", e, st); - this.emit("match", e); - }; - Glob.prototype._readdirInGlobStar = function(abs, cb) { - if (this.aborted) - return; - if (this.follow) - return this._readdir(abs, false, cb); - var lstatkey = "lstat\0" + abs; - var self2 = this; - var lstatcb = inflight(lstatkey, lstatcb_); - if (lstatcb) - self2.fs.lstat(abs, lstatcb); - function lstatcb_(er, lstat) { - if (er && er.code === "ENOENT") - return cb(); - var isSym = lstat && lstat.isSymbolicLink(); - self2.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) { - self2.cache[abs] = "FILE"; - cb(); - } else - self2._readdir(abs, false, cb); - } - }; - Glob.prototype._readdir = function(abs, inGlobStar, cb) { - if (this.aborted) - return; - cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); - if (!cb) - return; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return cb(); - if (Array.isArray(c)) - return cb(null, c); - } - var self2 = this; - self2.fs.readdir(abs, readdirCb(this, abs, cb)); - }; - function readdirCb(self2, abs, cb) { - return function(er, entries) { - if (er) - self2._readdirError(abs, er, cb); - else - self2._readdirEntries(abs, entries, cb); - }; - } - Glob.prototype._readdirEntries = function(abs, entries, cb) { - if (this.aborted) - return; - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return cb(null, entries); - }; - Glob.prototype._readdirError = function(f, er, cb) { - if (this.aborted) - return; - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - this.emit("error", error2); - this.abort(); - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) { - this.emit("error", er); - this.abort(); - } - if (!this.silent) - console.error("glob error", er); - break; - } - return cb(); - }; - Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false, cb); - var isSym = this.symlinks[abs]; - var len = entries.length; - if (isSym && inGlobStar) - return cb(); - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true, cb); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true, cb); - } - cb(); - }; - Glob.prototype._processSimple = function(prefix, index, cb) { - var self2 = this; - this._stat(prefix, function(er, exists) { - self2._processSimple2(prefix, index, er, exists, cb); - }); - }; - Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return cb(); - if (prefix && isAbsolute3(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path15.join(this.root, prefix); - } else { - prefix = path15.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - cb(); - }; - Glob.prototype._stat = function(f, cb) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return cb(); - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return cb(null, c); - if (needDir && c === "FILE") - return cb(); - } - var exists; - var stat = this.statCache[abs]; - if (stat !== void 0) { - if (stat === false) - return cb(null, stat); - else { - var type2 = stat.isDirectory() ? "DIR" : "FILE"; - if (needDir && type2 === "FILE") - return cb(); - else - return cb(null, type2, stat); - } - } - var self2 = this; - var statcb = inflight("stat\0" + abs, lstatcb_); - if (statcb) - self2.fs.lstat(abs, statcb); - function lstatcb_(er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - return self2.fs.stat(abs, function(er2, stat2) { - if (er2) - self2._stat2(f, abs, null, lstat, cb); - else - self2._stat2(f, abs, er2, stat2, cb); - }); - } else { - self2._stat2(f, abs, er, lstat, cb); - } - } - }; - Glob.prototype._stat2 = function(f, abs, er, stat, cb) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return cb(); - } - var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat; - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) - return cb(null, false, stat); - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return cb(); - return cb(null, c, stat); - }; - } -}); - -// node_modules/rimraf/rimraf.js -var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports2, module2) { - var assert = require("assert"); - var path15 = require("path"); - var fs17 = require("fs"); - var glob2 = void 0; - try { - glob2 = require_glob(); - } catch (_err) { - } - var defaultGlobOpts = { - nosort: true, - silent: true - }; - var timeout = 0; - var isWindows = process.platform === "win32"; - var defaults = (options) => { - const methods = [ - "unlink", - "chmod", - "stat", - "lstat", - "rmdir", - "readdir" - ]; - methods.forEach((m) => { - options[m] = options[m] || fs17[m]; - m = m + "Sync"; - options[m] = options[m] || fs17[m]; - }); - options.maxBusyTries = options.maxBusyTries || 3; - options.emfileWait = options.emfileWait || 1e3; - if (options.glob === false) { - options.disableGlob = true; - } - if (options.disableGlob !== true && glob2 === void 0) { - throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); - } - options.disableGlob = options.disableGlob || false; - options.glob = options.glob || defaultGlobOpts; - }; - var rimraf = (p, options, cb) => { - if (typeof options === "function") { - cb = options; - options = {}; - } - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert.equal(typeof cb, "function", "rimraf: callback function required"); - assert(options, "rimraf: invalid options argument provided"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - defaults(options); - let busyTries = 0; - let errState = null; - let n = 0; - const next = (er) => { - errState = errState || er; - if (--n === 0) - cb(errState); - }; - const afterGlob = (er, results) => { - if (er) - return cb(er); - n = results.length; - if (n === 0) - return cb(); - results.forEach((p2) => { - const CB = (er2) => { - if (er2) { - if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { - busyTries++; - return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); - } - if (er2.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p2, options, CB), timeout++); - } - if (er2.code === "ENOENT") er2 = null; - } - timeout = 0; - next(er2); - }; - rimraf_(p2, options, CB); - }); - }; - if (options.disableGlob || !glob2.hasMagic(p)) - return afterGlob(null, [p]); - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]); - glob2(p, options.glob, afterGlob); - }); - }; - var rimraf_ = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null); - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb); - if (st && st.isDirectory()) - return rmdir(p, options, er, cb); - options.unlink(p, (er2) => { - if (er2) { - if (er2.code === "ENOENT") - return cb(null); - if (er2.code === "EPERM") - return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); - if (er2.code === "EISDIR") - return rmdir(p, options, er2, cb); - } - return cb(er2); - }); - }); - }; - var fixWinEPERM = (p, options, er, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.chmod(p, 438, (er2) => { - if (er2) - cb(er2.code === "ENOENT" ? null : er); - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er); - else if (stats.isDirectory()) - rmdir(p, options, er, cb); - else - options.unlink(p, cb); - }); - }); - }; - var fixWinEPERMSync = (p, options, er) => { - assert(p); - assert(options); - try { - options.chmodSync(p, 438); - } catch (er2) { - if (er2.code === "ENOENT") - return; - else - throw er; - } - let stats; - try { - stats = options.statSync(p); - } catch (er3) { - if (er3.code === "ENOENT") - return; - else - throw er; - } - if (stats.isDirectory()) - rmdirSync(p, options, er); - else - options.unlinkSync(p); - }; - var rmdir = (p, options, originalEr, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.rmdir(p, (er) => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb); - else if (er && er.code === "ENOTDIR") - cb(originalEr); - else - cb(er); - }); - }; - var rmkids = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.readdir(p, (er, files) => { - if (er) - return cb(er); - let n = files.length; - if (n === 0) - return options.rmdir(p, cb); - let errState; - files.forEach((f) => { - rimraf(path15.join(p, f), options, (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--n === 0) - options.rmdir(p, cb); - }); - }); - }); - }; - var rimrafSync = (p, options) => { - options = options || {}; - defaults(options); - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert(options, "rimraf: missing options"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - let results; - if (options.disableGlob || !glob2.hasMagic(p)) { - results = [p]; - } else { - try { - options.lstatSync(p); - results = [p]; - } catch (er) { - results = glob2.sync(p, options.glob); - } - } - if (!results.length) - return; - for (let i = 0; i < results.length; i++) { - const p2 = results[i]; - let st; - try { - st = options.lstatSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p2, options, er); - } - try { - if (st && st.isDirectory()) - rmdirSync(p2, options, null); - else - options.unlinkSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); - if (er.code !== "EISDIR") - throw er; - rmdirSync(p2, options, er); - } - } - }; - var rmdirSync = (p, options, originalEr) => { - assert(p); - assert(options); - try { - options.rmdirSync(p); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "ENOTDIR") - throw originalEr; - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options); - } - }; - var rmkidsSync = (p, options) => { - assert(p); - assert(options); - options.readdirSync(p).forEach((f) => rimrafSync(path15.join(p, f), options)); - const retries = isWindows ? 100 : 1; - let i = 0; - do { - let threw = true; - try { - const ret = options.rmdirSync(p, options); - threw = false; - return ret; - } finally { - if (++i < retries && threw) - continue; - } - } while (true); - }; - module2.exports = rimraf; - rimraf.sync = rimrafSync; - } -}); - -// node_modules/del/node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "node_modules/del/node_modules/indent-string/index.js"(exports2, module2) { - "use strict"; - module2.exports = (string, count = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count)); - }; - } -}); - -// node_modules/del/node_modules/clean-stack/index.js -var require_clean_stack = __commonJS({ - "node_modules/del/node_modules/clean-stack/index.js"(exports2, module2) { - "use strict"; - var os3 = require("os"); - var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; - var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; - var homeDir = typeof os3.homedir === "undefined" ? "" : os3.homedir(); - module2.exports = (stack, options) => { - options = Object.assign({ pretty: false }, options); - return stack.replace(/\\/g, "/").split("\n").filter((line) => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - const match = pathMatches[1]; - if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { - return false; - } - return !pathRegex.test(match); - }).filter((line) => line.trim() !== "").map((line) => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); - } - return line; - }).join("\n"); - }; - } -}); - -// node_modules/del/node_modules/aggregate-error/index.js -var require_aggregate_error = __commonJS({ - "node_modules/del/node_modules/aggregate-error/index.js"(exports2, module2) { - "use strict"; - var indentString2 = require_indent_string(); - var cleanStack = require_clean_stack(); - var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - errors = [...errors].map((error2) => { - if (error2 instanceof Error) { - return error2; - } - if (error2 !== null && typeof error2 === "object") { - return Object.assign(new Error(error2.message), error2); - } - return new Error(error2); - }); - let message = errors.map((error2) => { - return typeof error2.stack === "string" ? cleanInternalStack(cleanStack(error2.stack)) : String(error2); - }).join("\n"); - message = "\n" + indentString2(message, 4); - super(message); - this.name = "AggregateError"; - Object.defineProperty(this, "_errors", { value: errors }); - } - *[Symbol.iterator]() { - for (const error2 of this._errors) { - yield error2; - } - } - }; - module2.exports = AggregateError; - } -}); - -// node_modules/del/node_modules/p-map/index.js -var require_p_map = __commonJS({ - "node_modules/del/node_modules/p-map/index.js"(exports2, module2) { - "use strict"; - var AggregateError = require_aggregate_error(); - module2.exports = async (iterable, mapper, { - concurrency = Infinity, - stopOnError = true - } = {}) => { - return new Promise((resolve8, reject) => { - if (typeof mapper !== "function") { - throw new TypeError("Mapper function is required"); - } - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - const next = () => { - if (isRejected) { - return; - } - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - if (nextItem.done) { - isIterableDone = true; - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve8(result); - } - } - return; - } - resolvingCount++; - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error2) { - if (stopOnError) { - isRejected = true; - reject(error2); - } else { - errors.push(error2); - resolvingCount--; - next(); - } - } - })(); - }; - for (let i = 0; i < concurrency; i++) { - next(); - if (isIterableDone) { - break; - } - } - }); - }; - } -}); - -// node_modules/del/index.js -var require_del = __commonJS({ - "node_modules/del/index.js"(exports2, module2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var path15 = require("path"); - var globby = require_globby(); - var isGlob = require_is_glob(); - var slash = require_slash(); - var gracefulFs = require_graceful_fs(); - var isPathCwd = require_is_path_cwd(); - var isPathInside = require_is_path_inside(); - var rimraf = require_rimraf(); - var pMap = require_p_map(); - var rimrafP = promisify2(rimraf); - var rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync - }; - function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); - } - if (!isPathInside(file, cwd)) { - throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); - } - } - function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - patterns = patterns.map((pattern) => { - if (process.platform === "win32" && isGlob(pattern) === false) { - return slash(pattern); - } - return pattern; - }); - return patterns; - } - module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), onProgress = () => { - }, ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); - if (files.length === 0) { - onProgress({ - totalCount: 0, - deletedCount: 0, - percent: 1 - }); - } - let deletedCount = 0; - const mapper = async (file) => { - file = path15.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - deletedCount += 1; - onProgress({ - totalCount: files.length, - deletedCount, - percent: deletedCount / files.length - }); - return file; - }; - const removedFiles = await pMap(files, mapper, options); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); - const removedFiles = files.map((file) => { - file = path15.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - return file; - }); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; + const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path19) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path19) || isNotRelative(path19); + }; + if ( + // Detect `process` so that it can run in browsers. + typeof process !== "undefined" && process.platform === "win32" + ) { + setupWindows(); + } + module2.exports = factory; + factory.default = factory; + module2.exports.isPathValid = isPathValid; + define2(module2.exports, Symbol.for("setupWindows"), setupWindows); } }); @@ -36287,7 +32325,7 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^6.1.1", + del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -37444,18 +33482,18 @@ var require_light = __commonJS({ var done, waitForExecuting; options = parser$5.load(options, this.stopDefaults); waitForExecuting = (at) => { - var finished; - finished = () => { + var finished2; + finished2 = () => { var counts; counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; return new this.Promise((resolve8, reject) => { - if (finished()) { + if (finished2()) { return resolve8(); } else { return this.on("done", () => { - if (finished()) { + if (finished2()) { this.removeAllListeners("done"); return resolve8(); } @@ -37882,7 +33920,7 @@ var require_console_log_level = __commonJS({ "use strict"; var util = require("util"); var levels = ["trace", "debug", "info", "warn", "error", "fatal"]; - var noop = function() { + var noop2 = function() { }; module2.exports = function(opts) { opts = opts || {}; @@ -37892,7 +33930,7 @@ var require_console_log_level = __commonJS({ return levels.indexOf(level) >= levels.indexOf(opts.level); }; levels.forEach(function(level) { - logger[level] = shouldLog(level) ? log : noop; + logger[level] = shouldLog(level) ? log : noop2; function log() { var prefix = opts.prefix; var normalizedLevel; @@ -38013,7 +34051,7 @@ var require_internal_path_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -38021,7 +34059,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path15.dirname(p); + let result = path19.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -38059,7 +34097,7 @@ var require_internal_path_helper = __commonJS({ assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { - root += path15.sep; + root += path19.sep; } return root + itemPath; } @@ -38097,10 +34135,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path15.sep)) { + if (!p.endsWith(path19.sep)) { return p; } - if (p === path15.sep) { + if (p === path19.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -38211,6 +34249,796 @@ var require_internal_pattern_helper = __commonJS({ } }); +// node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str2) { + if (a instanceof RegExp) a = maybeMatch(a, str2); + if (b instanceof RegExp) b = maybeMatch(b, str2); + var r = range(a, b, str2); + return r && { + start: r[0], + end: r[1], + pre: str2.slice(0, r[0]), + body: str2.slice(r[0] + a.length, r[1]), + post: str2.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str2) { + var m = str2.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str2) { + var begs, beg, left, right, result; + var ai = str2.indexOf(a); + var bi = str2.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + begs = []; + left = str2.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str2.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str2.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str2) { + return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + } + function escapeBraces(str2) { + return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str2) { + return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str2) { + if (!str2) + return [""]; + var parts = []; + var m = balanced("{", "}", str2); + if (!m) + return str2.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str2) { + if (!str2) + return []; + if (str2.substr(0, 2) === "{}") { + str2 = "\\{\\}" + str2.substr(2); + } + return expand(escapeBraces(str2), true).map(unescapeBraces); + } + function embrace(str2) { + return "{" + str2 + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte5(i, y) { + return i >= y; + } + function expand(str2, isTop) { + var expansions = []; + var m = balanced("{", "}", str2); + if (!m || /\$$/.test(m.pre)) return [str2]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str2 = m.pre + "{" + m.body + escClose + m.post; + return expand(str2); + } + return [str2]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte5; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path19 = (function() { + try { + return require("path"); + } catch (e) { + } + })() || { + sep: "/" + }; + minimatch.sep = path19.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set2, c) { + set2[c] = true; + return set2; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path19.sep !== "/") { + pattern = pattern.split(path19.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set2 = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug3() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set2); + set2 = this.globParts = set2.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set2); + set2 = set2.map(function(s, si, set3) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set2); + set2 = set2.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set2); + this.set = set2; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate2 = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate2 = !negate2; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate2; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_2, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set2 = this.set; + if (!set2.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set2.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path19.sep !== "/") { + f = f.split(path19.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set2 = this.set; + this.debug(this.pattern, "set", set2); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set2.length; i++) { + var pattern = set2[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug( + "matchOne", + { "this": this, file, pattern } + ); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) return true; + } + return false; + } + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { @@ -38243,7 +35071,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -38258,12 +35086,12 @@ var require_internal_path = __commonJS({ assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path15.sep); + this.segments = itemPath.split(path19.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path15.basename(remaining); + const basename = path19.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -38281,7 +35109,7 @@ var require_internal_path = __commonJS({ assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path15.sep), `Parameter 'itemPath' contains unexpected path separators`); + assert_1.default(!segment.includes(path19.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -38292,12 +35120,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path15.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path19.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path15.sep; + result += path19.sep; } result += this.segments[i]; } @@ -38341,7 +35169,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os3 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -38370,7 +35198,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path15.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path19.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -38394,8 +35222,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path15.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path15.sep}`; + if (!itemPath.endsWith(path19.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path19.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -38430,9 +35258,9 @@ var require_internal_pattern = __commonJS({ assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path15.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path19.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path15.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path19.sep}`)) { homedir = homedir || os3.homedir(); assert_1.default(homedir, "Unable to determine HOME directory"); assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); @@ -38516,8 +35344,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path15, level) { - this.path = path15; + constructor(path19, level) { + this.path = path19; this.level = level; } }; @@ -38637,9 +35465,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core18 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var patternHelper = __importStar4(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); @@ -38689,7 +35517,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core18.debug(`Search path '${searchPath}'`); try { - yield __await4(fs17.promises.lstat(searchPath)); + yield __await4(fs20.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -38720,7 +35548,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path15.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs20.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path19.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await4(item.path); @@ -38755,7 +35583,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs17.promises.stat(item.path); + stats = yield fs20.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -38767,10 +35595,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs17.promises.lstat(item.path); + stats = yield fs20.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs17.promises.realpath(item.path); + const realPath = yield fs20.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -38789,7 +35617,7 @@ var require_internal_globber = __commonJS({ }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ +var require_glob = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -40101,11 +36929,11 @@ var require_cacheUtils = __commonJS({ exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; var core18 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); - var glob2 = __importStar4(require_glob2()); + var glob2 = __importStar4(require_glob()); var io7 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs17 = __importStar4(require("fs")); - var path15 = __importStar4(require("path")); + var fs20 = __importStar4(require("fs")); + var path19 = __importStar4(require("path")); var semver8 = __importStar4(require_semver3()); var util = __importStar4(require("util")); var constants_1 = require_constants10(); @@ -40125,16 +36953,16 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path15.join(baseLocation, "actions", "temp"); + tempDirectory = path19.join(baseLocation, "actions", "temp"); } - const dest = path15.join(tempDirectory, crypto.randomUUID()); + const dest = path19.join(tempDirectory, crypto.randomUUID()); yield io7.mkdirP(dest); return dest; }); } exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs17.statSync(filePath).size; + return fs20.statSync(filePath).size; } exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { @@ -40151,7 +36979,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path15.relative(workspace, file).replace(new RegExp(`\\${path15.sep}`, "g"), "/"); + const relativeFile = path19.relative(workspace, file).replace(new RegExp(`\\${path19.sep}`, "g"), "/"); core18.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -40174,7 +37002,7 @@ var require_cacheUtils = __commonJS({ exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { return __awaiter4(this, void 0, void 0, function* () { - return util.promisify(fs17.unlink)(filePath); + return util.promisify(fs20.unlink)(filePath); }); } exports2.unlinkFile = unlinkFile; @@ -40219,7 +37047,7 @@ var require_cacheUtils = __commonJS({ exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { return __awaiter4(this, void 0, void 0, function* () { - if (fs17.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs20.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -41725,13 +38553,13 @@ var require_userAgentPlatform = __commonJS({ exports2.setPlatformSpecificData = setPlatformSpecificData; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var os3 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); + var process6 = tslib_1.__importStar(require("node:process")); function getHeaderName() { return "User-Agent"; } async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; + if (process6 && process6.versions) { + const versions = process6.versions; if (versions.bun) { map2.set("Bun", versions.bun); } else if (versions.deno) { @@ -42699,7 +39527,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common4 = __commonJS({ +var require_common3 = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -43033,7 +39861,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common4()(exports2); + module2.exports = require_common3()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -43321,7 +40149,7 @@ var require_node = __commonJS({ debug3.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common4()(exports2); + module2.exports = require_common3()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -48057,15 +44885,15 @@ var require_urlHelpers = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path15 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path15.startsWith("/")) { - path15 = path15.substring(1); + let path19 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path19.startsWith("/")) { + path19 = path19.substring(1); } - if (isAbsoluteUrl(path15)) { - requestUrl = path15; + if (isAbsoluteUrl(path19)) { + requestUrl = path19; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path15); + requestUrl = appendPath(requestUrl, path19); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -48113,9 +44941,9 @@ var require_urlHelpers = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path15 = pathToAppend.substring(0, searchStart); + const path19 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path15; + newPath = newPath + path19; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -51992,7 +48820,7 @@ var require_dist7 = __commonJS({ var stream2 = require("stream"); var coreLro = require_dist6(); var events = require("events"); - var fs17 = require("fs"); + var fs20 = require("fs"); var util = require("util"); var buffer = require("buffer"); function _interopNamespaceDefault(e) { @@ -52015,7 +48843,7 @@ var require_dist7 = __commonJS({ } var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs17); + var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs20); var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); var logger = logger$1.createClientLogger("storage-blob"); var BaseRequestPolicy = class { @@ -52264,10 +49092,10 @@ var require_dist7 = __commonJS({ ]; function escapeURLPath(url3) { const urlParsed = new URL(url3); - let path15 = urlParsed.pathname; - path15 = path15 || "/"; - path15 = escape(path15); - urlParsed.pathname = path15; + let path19 = urlParsed.pathname; + path19 = path19 || "/"; + path19 = escape(path19); + urlParsed.pathname = path19; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -52352,9 +49180,9 @@ var require_dist7 = __commonJS({ } function appendToURLPath(url3, name) { const urlParsed = new URL(url3); - let path15 = urlParsed.pathname; - path15 = path15 ? path15.endsWith("/") ? `${path15}${name}` : `${path15}/${name}` : name; - urlParsed.pathname = path15; + let path19 = urlParsed.pathname; + path19 = path19 ? path19.endsWith("/") ? `${path19}${name}` : `${path19}/${name}` : name; + urlParsed.pathname = path19; return urlParsed.toString(); } function setURLParameter(url3, name, value) { @@ -53435,9 +50263,9 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path15 = getURLPath(request.url) || "/"; + const path19 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path15}`; + canonicalizedResourceString += `/${this.factory.accountName}${path19}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -53730,9 +50558,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path15 = getURLPath(request.url) || "/"; + const path19 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path15}`; + canonicalizedResourceString += `/${options.accountName}${path19}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -73034,8 +69862,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (this.operationCount >= BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path15 = getURLPath(subRequest.url); - if (!path15 || path15 === "") { + const path19 = getURLPath(subRequest.url); + if (!path19 || path19 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -73095,8 +69923,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; pipeline = newPipeline(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); - const path15 = getURLPath(url3); - if (path15 && path15 !== "/") { + const path19 = getURLPath(url3); + if (path19 && path19 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -75863,7 +72691,7 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); var utils = __importStar4(require_cacheUtils()); @@ -75974,7 +72802,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter4(this, void 0, void 0, function* () { - const writeStream = fs17.createWriteStream(archivePath); + const writeStream = fs20.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); @@ -76000,7 +72828,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { var _a; return __awaiter4(this, void 0, void 0, function* () { - const archiveDescriptor = yield fs17.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs20.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -76117,7 +72945,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs17.openSync(archivePath, "w"); + const fd = fs20.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -76135,12 +72963,12 @@ var require_downloadUtils = __commonJS({ controller.abort(); throw new Error("Aborting cache download as the download time exceeded the timeout."); } else if (Buffer.isBuffer(result)) { - fs17.writeFileSync(fd, result); + fs20.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs17.closeSync(fd); + fs20.closeSync(fd); } } }); @@ -76439,7 +73267,7 @@ var require_cacheHttpClient = __commonJS({ var core18 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var url_1 = require("url"); var utils = __importStar4(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -76577,7 +73405,7 @@ Other caches with similar key:`); return __awaiter4(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); - const fd = fs17.openSync(archivePath, "r"); + const fd = fs20.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -76591,7 +73419,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs17.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs20.createReadStream(archivePath, { fd, start, end, @@ -76602,7 +73430,7 @@ Other caches with similar key:`); } }))); } finally { - fs17.closeSync(fd); + fs20.closeSync(fd); } return; }); @@ -81820,7 +78648,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io7 = __importStar4(require_io()); var fs_1 = require("fs"); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var constants_1 = require_constants10(); var IS_WINDOWS = process.platform === "win32"; @@ -81866,13 +78694,13 @@ var require_tar = __commonJS({ const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type2) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path15.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path19.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -81918,7 +78746,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -81927,7 +78755,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -81942,7 +78770,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -81951,7 +78779,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -81991,7 +78819,7 @@ var require_tar = __commonJS({ exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter4(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path15.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path19.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -82061,7 +78889,7 @@ var require_cache3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; var core18 = __importStar4(require_core()); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); @@ -82151,7 +78979,7 @@ var require_cache3 = __commonJS({ core18.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path19.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core18.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core18.isDebug()) { @@ -82220,7 +79048,7 @@ var require_cache3 = __commonJS({ core18.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path19.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core18.debug(`Archive path: ${archivePath}`); core18.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -82283,7 +79111,7 @@ var require_cache3 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path19.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core18.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -82347,7 +79175,7 @@ var require_cache3 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path19.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core18.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -82480,7 +79308,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os3 = require("os"); var cp = require("child_process"); - var fs17 = require("fs"); + var fs20 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter4(this, void 0, void 0, function* () { const platFilter = os3.platform(); @@ -82544,10 +79372,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs17.existsSync(lsbReleaseFile)) { - contents = fs17.readFileSync(lsbReleaseFile).toString(); - } else if (fs17.existsSync(osReleaseFile)) { - contents = fs17.readFileSync(osReleaseFile).toString(); + if (fs20.existsSync(lsbReleaseFile)) { + contents = fs20.readFileSync(lsbReleaseFile).toString(); + } else if (fs20.existsSync(osReleaseFile)) { + contents = fs20.readFileSync(osReleaseFile).toString(); } return contents; } @@ -82724,10 +79552,10 @@ var require_tool_cache = __commonJS({ var core18 = __importStar4(require_core()); var io7 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); var os3 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var httpm = __importStar4(require_lib()); var semver8 = __importStar4(require_semver2()); var stream2 = __importStar4(require("stream")); @@ -82748,8 +79576,8 @@ var require_tool_cache = __commonJS({ var userAgent = "actions/tool-cache"; function downloadTool2(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path15.join(_getTempDirectory(), crypto.randomUUID()); - yield io7.mkdirP(path15.dirname(dest)); + dest = dest || path19.join(_getTempDirectory(), crypto.randomUUID()); + yield io7.mkdirP(path19.dirname(dest)); core18.debug(`Downloading ${url2}`); core18.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -82771,7 +79599,7 @@ var require_tool_cache = __commonJS({ exports2.downloadTool = downloadTool2; function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - if (fs17.existsSync(dest)) { + if (fs20.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { @@ -82795,7 +79623,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs17.createWriteStream(dest)); + yield pipeline(readStream, fs20.createWriteStream(dest)); core18.debug("download complete"); succeeded = true; return dest; @@ -82836,7 +79664,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path15.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path19.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; @@ -83007,12 +79835,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os3.arch(); core18.debug(`Caching tool ${tool} ${version} ${arch2}`); core18.debug(`source dir: ${sourceDir}`); - if (!fs17.statSync(sourceDir).isDirectory()) { + if (!fs20.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs17.readdirSync(sourceDir)) { - const s = path15.join(sourceDir, itemName); + for (const itemName of fs20.readdirSync(sourceDir)) { + const s = path19.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -83026,11 +79854,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os3.arch(); core18.debug(`Caching tool ${tool} ${version} ${arch2}`); core18.debug(`source file: ${sourceFile}`); - if (!fs17.statSync(sourceFile).isFile()) { + if (!fs20.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path15.join(destFolder, targetFile); + const destPath = path19.join(destFolder, targetFile); core18.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -83054,9 +79882,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; - const cachePath = path15.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path19.join(_getCacheDirectory(), toolName, versionSpec, arch2); core18.debug(`checking cache: ${cachePath}`); - if (fs17.existsSync(cachePath) && fs17.existsSync(`${cachePath}.complete`)) { + if (fs20.existsSync(cachePath) && fs20.existsSync(`${cachePath}.complete`)) { core18.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -83069,13 +79897,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os3.arch(); - const toolPath = path15.join(_getCacheDirectory(), toolName); - if (fs17.existsSync(toolPath)) { - const children = fs17.readdirSync(toolPath); + const toolPath = path19.join(_getCacheDirectory(), toolName); + if (fs20.existsSync(toolPath)) { + const children = fs20.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path15.join(toolPath, child, arch2 || ""); - if (fs17.existsSync(fullPath) && fs17.existsSync(`${fullPath}.complete`)) { + const fullPath = path19.join(toolPath, child, arch2 || ""); + if (fs20.existsSync(fullPath) && fs20.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -83129,7 +79957,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter4(this, void 0, void 0, function* () { if (!dest) { - dest = path15.join(_getTempDirectory(), crypto.randomUUID()); + dest = path19.join(_getTempDirectory(), crypto.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -83137,7 +79965,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { - const folderPath = path15.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path19.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core18.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -83147,9 +79975,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path15.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path19.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs17.writeFileSync(markerPath, ""); + fs20.writeFileSync(markerPath, ""); core18.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -83326,7 +80154,7 @@ var require_follow_redirects = __commonJS({ "ERR_STREAM_WRITE_AFTER_END", "write after end" ); - var destroy = Writable.prototype.destroy || noop; + var destroy = Writable.prototype.destroy || noop2; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); @@ -83655,7 +80483,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop() { + function noop2() { } function parseUrl(input) { var parsed; @@ -83731,7 +80559,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.removeListener(event, eventHandlers[event]); } - request.on("error", noop); + request.on("error", noop2); request.destroy(error2); } function isSubdomain(subdomain, domain) { @@ -85922,13 +82750,13 @@ These characters are not allowed in the artifact name due to limitations with ce (0, core_1.info)(`Artifact name is valid!`); } exports2.validateArtifactName = validateArtifactName; - function validateFilePath(path15) { - if (!path15) { + function validateFilePath(path19) { + if (!path19) { throw new Error(`Provided file path input during validation is empty`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path15.includes(invalidCharacterKey)) { - throw new Error(`The path for one of the files in artifact is not valid: ${path15}. Contains the following character: ${errorMessageForCharacter} + if (path19.includes(invalidCharacterKey)) { + throw new Error(`The path for one of the files in artifact is not valid: ${path19}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -86308,15 +83136,15 @@ var require_upload_zip_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUploadZipSpecification = exports2.validateRootDirectory = void 0; - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var core_1 = require_core(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation(); function validateRootDirectory(rootDirectory) { - if (!fs17.existsSync(rootDirectory)) { + if (!fs20.existsSync(rootDirectory)) { throw new Error(`The provided rootDirectory ${rootDirectory} does not exist`); } - if (!fs17.statSync(rootDirectory).isDirectory()) { + if (!fs20.statSync(rootDirectory).isDirectory()) { throw new Error(`The provided rootDirectory ${rootDirectory} is not a valid directory`); } (0, core_1.info)(`Root directory input is valid!`); @@ -86327,7 +83155,7 @@ var require_upload_zip_specification = __commonJS({ rootDirectory = (0, path_1.normalize)(rootDirectory); rootDirectory = (0, path_1.resolve)(rootDirectory); for (let file of filesToZip) { - const stats = fs17.lstatSync(file, { throwIfNoEntry: false }); + const stats = fs20.lstatSync(file, { throwIfNoEntry: false }); if (!stats) { throw new Error(`File ${file} does not exist`); } @@ -86793,8 +83621,8 @@ var require_minimatch2 = __commonJS({ return new Minimatch(pattern, options).match(p); }; module2.exports = minimatch; - var path15 = require_path2(); - minimatch.sep = path15.sep; + var path19 = require_path2(); + minimatch.sep = path19.sep; var GLOBSTAR = Symbol("globstar **"); minimatch.GLOBSTAR = GLOBSTAR; var expand = require_brace_expansion2(); @@ -87303,8 +84131,8 @@ var require_minimatch2 = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; const options = this.options; - if (path15.sep !== "/") { - f = f.split(path15.sep).join("/"); + if (path19.sep !== "/") { + f = f.split(path19.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -87342,13 +84170,13 @@ var require_minimatch2 = __commonJS({ var require_readdir_glob = __commonJS({ "node_modules/readdir-glob/index.js"(exports2, module2) { module2.exports = readdirGlob; - var fs17 = require("fs"); + var fs20 = require("fs"); var { EventEmitter } = require("events"); var { Minimatch } = require_minimatch2(); var { resolve: resolve8 } = require("path"); function readdir(dir, strict) { return new Promise((resolve9, reject) => { - fs17.readdir(dir, { withFileTypes: true }, (err, files) => { + fs20.readdir(dir, { withFileTypes: true }, (err, files) => { if (err) { switch (err.code) { case "ENOTDIR": @@ -87381,7 +84209,7 @@ var require_readdir_glob = __commonJS({ } function stat(file, followSymlinks) { return new Promise((resolve9, reject) => { - const statFunc = followSymlinks ? fs17.stat : fs17.lstat; + const statFunc = followSymlinks ? fs20.stat : fs20.lstat; statFunc(file, (err, stats) => { if (err) { switch (err.code) { @@ -87402,8 +84230,8 @@ var require_readdir_glob = __commonJS({ }); }); } - async function* exploreWalkAsync(dir, path15, followSymlinks, useStat, shouldSkip, strict) { - let files = await readdir(path15 + dir, strict); + async function* exploreWalkAsync(dir, path19, followSymlinks, useStat, shouldSkip, strict) { + let files = await readdir(path19 + dir, strict); for (const file of files) { let name = file.name; if (name === void 0) { @@ -87412,7 +84240,7 @@ var require_readdir_glob = __commonJS({ } const filename = dir + "/" + name; const relative2 = filename.slice(1); - const absolute = path15 + "/" + relative2; + const absolute = path19 + "/" + relative2; let stats = null; if (useStat || followSymlinks) { stats = await stat(absolute, followSymlinks); @@ -87426,15 +84254,15 @@ var require_readdir_glob = __commonJS({ if (stats.isDirectory()) { if (!shouldSkip(relative2)) { yield { relative: relative2, absolute, stats }; - yield* exploreWalkAsync(filename, path15, followSymlinks, useStat, shouldSkip, false); + yield* exploreWalkAsync(filename, path19, followSymlinks, useStat, shouldSkip, false); } } else { yield { relative: relative2, absolute, stats }; } } } - async function* explore(path15, followSymlinks, useStat, shouldSkip) { - yield* exploreWalkAsync("", path15, followSymlinks, useStat, shouldSkip, true); + async function* explore(path19, followSymlinks, useStat, shouldSkip) { + yield* exploreWalkAsync("", path19, followSymlinks, useStat, shouldSkip, true); } function readOptions(options) { return { @@ -87502,19 +84330,19 @@ var require_readdir_glob = __commonJS({ _shouldSkipDirectory(relative2) { return this.skipMatchers.some((m) => m.match(relative2)); } - _fileMatches(relative2, isDirectory) { - const file = relative2 + (isDirectory ? "/" : ""); - return (this.matchers.length === 0 || this.matchers.some((m) => m.match(file))) && !this.ignoreMatchers.some((m) => m.match(file)) && (!this.options.nodir || !isDirectory); + _fileMatches(relative2, isDirectory2) { + const file = relative2 + (isDirectory2 ? "/" : ""); + return (this.matchers.length === 0 || this.matchers.some((m) => m.match(file))) && !this.ignoreMatchers.some((m) => m.match(file)) && (!this.options.nodir || !isDirectory2); } _next() { if (!this.paused && !this.aborted) { this.iterator.next().then((obj) => { if (!obj.done) { - const isDirectory = obj.value.stats.isDirectory(); - if (this._fileMatches(obj.value.relative, isDirectory)) { + const isDirectory2 = obj.value.stats.isDirectory(); + if (this._fileMatches(obj.value.relative, isDirectory2)) { let relative2 = obj.value.relative; let absolute = obj.value.absolute; - if (this.options.mark && isDirectory) { + if (this.options.mark && isDirectory2) { relative2 += "/"; absolute += "/"; } @@ -87694,7 +84522,7 @@ var require_async7 = __commonJS({ return value && typeof value.length === "number" && value.length >= 0 && value.length % 1 === 0; } const breakLoop = {}; - function once(fn) { + function once2(fn) { function wrapper(...args) { if (fn === null) return; var callFn = fn; @@ -87801,7 +84629,7 @@ var require_async7 = __commonJS({ } var eachOfLimit$2 = (limit) => { return (obj, iteratee, callback) => { - callback = once(callback); + callback = once2(callback); if (limit <= 0) { throw new RangeError("concurrency limit cannot be less than 1"); } @@ -87859,7 +84687,7 @@ var require_async7 = __commonJS({ } var eachOfLimit$1 = awaitify(eachOfLimit, 4); function eachOfArrayLike(coll, iteratee, callback) { - callback = once(callback); + callback = once2(callback); var index2 = 0, completed = 0, { length } = coll, canceled = false; if (length === 0) { callback(null); @@ -87918,7 +84746,7 @@ var require_async7 = __commonJS({ callback = concurrency; concurrency = null; } - callback = once(callback || promiseCallback()); + callback = once2(callback || promiseCallback()); var numTasks = Object.keys(tasks).length; if (!numTasks) { return callback(null); @@ -88209,10 +85037,10 @@ var require_async7 = __commonJS({ unsaturated: [], empty: [] }; - function on(event, handler) { + function on2(event, handler) { events[event].push(handler); } - function once2(event, handler) { + function once3(event, handler) { const handleAndRemove = (...args) => { off(event, handleAndRemove); handler(...args); @@ -88297,14 +85125,14 @@ var require_async7 = __commonJS({ const eventMethod = (name) => (handler) => { if (!handler) { return new Promise((resolve8, reject2) => { - once2(name, (err, data) => { + once3(name, (err, data) => { if (err) return reject2(err); resolve8(data); }); }); } off(name); - on(name, handler); + on2(name, handler); }; var isProcessing = false; var q = { @@ -88439,7 +85267,7 @@ var require_async7 = __commonJS({ return queue$1(worker, concurrency, payload); } function reduce(coll, memo, iteratee, callback) { - callback = once(callback); + callback = once2(callback); var _iteratee = wrapAsync(iteratee); return eachOfSeries$1(coll, (x, i, iterCb) => { _iteratee(memo, x, (err, v) => { @@ -88719,7 +85547,7 @@ var require_async7 = __commonJS({ } var log = consoleFunc("log"); function mapValuesLimit(obj, limit, iteratee, callback) { - callback = once(callback); + callback = once2(callback); var newObj = {}; var _iteratee = wrapAsync(iteratee); return eachOfLimit$2(limit)(obj, (val2, key, next) => { @@ -88918,7 +85746,7 @@ var require_async7 = __commonJS({ return q; } function race(tasks, callback) { - callback = once(callback); + callback = once2(callback); if (!Array.isArray(tasks)) return callback(new TypeError("First argument to race must be an array of functions")); if (!tasks.length) return callback(); for (var i = 0, l = tasks.length; i < l; i++) { @@ -89133,7 +85961,7 @@ var require_async7 = __commonJS({ iteratee = accumulator; accumulator = Array.isArray(coll) ? [] : {}; } - callback = once(callback || promiseCallback()); + callback = once2(callback || promiseCallback()); var _iteratee = wrapAsync(iteratee); eachOf$1(coll, (v, k, cb) => { _iteratee(accumulator, v, k, cb); @@ -89187,7 +86015,7 @@ var require_async7 = __commonJS({ return whilst$1((cb) => _test((err, truth) => cb(err, !truth)), iteratee, callback); } function waterfall(tasks, callback) { - callback = once(callback); + callback = once2(callback); if (!Array.isArray(tasks)) return callback(new Error("First argument to waterfall must be an array of functions")); if (!tasks.length) return callback(); var taskIndex = 0; @@ -89420,6 +86248,783 @@ var require_async7 = __commonJS({ } }); +// node_modules/graceful-fs/polyfills.js +var require_polyfills = __commonJS({ + "node_modules/graceful-fs/polyfills.js"(exports2, module2) { + var constants = require("constants"); + var origCwd = process.cwd; + var cwd = null; + var platform2 = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process); + return cwd; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs20) { + if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs20); + } + if (!fs20.lutimes) { + patchLutimes(fs20); + } + fs20.chown = chownFix(fs20.chown); + fs20.fchown = chownFix(fs20.fchown); + fs20.lchown = chownFix(fs20.lchown); + fs20.chmod = chmodFix(fs20.chmod); + fs20.fchmod = chmodFix(fs20.fchmod); + fs20.lchmod = chmodFix(fs20.lchmod); + fs20.chownSync = chownFixSync(fs20.chownSync); + fs20.fchownSync = chownFixSync(fs20.fchownSync); + fs20.lchownSync = chownFixSync(fs20.lchownSync); + fs20.chmodSync = chmodFixSync(fs20.chmodSync); + fs20.fchmodSync = chmodFixSync(fs20.fchmodSync); + fs20.lchmodSync = chmodFixSync(fs20.lchmodSync); + fs20.stat = statFix(fs20.stat); + fs20.fstat = statFix(fs20.fstat); + fs20.lstat = statFix(fs20.lstat); + fs20.statSync = statFixSync(fs20.statSync); + fs20.fstatSync = statFixSync(fs20.fstatSync); + fs20.lstatSync = statFixSync(fs20.lstatSync); + if (fs20.chmod && !fs20.lchmod) { + fs20.lchmod = function(path19, mode, cb) { + if (cb) process.nextTick(cb); + }; + fs20.lchmodSync = function() { + }; + } + if (fs20.chown && !fs20.lchown) { + fs20.lchown = function(path19, uid, gid, cb) { + if (cb) process.nextTick(cb); + }; + fs20.lchownSync = function() { + }; + } + if (platform2 === "win32") { + fs20.rename = typeof fs20.rename !== "function" ? fs20.rename : (function(fs$rename) { + function rename(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { + setTimeout(function() { + fs20.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er); + }); + }, backoff); + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er); + }); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); + return rename; + })(fs20.rename); + } + fs20.read = typeof fs20.read !== "function" ? fs20.read : (function(fs$read) { + function read(fd, buffer, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _2, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs20, fd, buffer, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs20, fd, buffer, offset, length, position, callback); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); + return read; + })(fs20.read); + fs20.readSync = typeof fs20.readSync !== "function" ? fs20.readSync : /* @__PURE__ */ (function(fs$readSync) { + return function(fd, buffer, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs20, fd, buffer, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + })(fs20.readSync); + function patchLchmod(fs21) { + fs21.lchmod = function(path19, mode, callback) { + fs21.open( + path19, + constants.O_WRONLY | constants.O_SYMLINK, + mode, + function(err, fd) { + if (err) { + if (callback) callback(err); + return; + } + fs21.fchmod(fd, mode, function(err2) { + fs21.close(fd, function(err22) { + if (callback) callback(err2 || err22); + }); + }); + } + ); + }; + fs21.lchmodSync = function(path19, mode) { + var fd = fs21.openSync(path19, constants.O_WRONLY | constants.O_SYMLINK, mode); + var threw = true; + var ret; + try { + ret = fs21.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs21.closeSync(fd); + } catch (er) { + } + } else { + fs21.closeSync(fd); + } + } + return ret; + }; + } + function patchLutimes(fs21) { + if (constants.hasOwnProperty("O_SYMLINK") && fs21.futimes) { + fs21.lutimes = function(path19, at, mt, cb) { + fs21.open(path19, constants.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) cb(er); + return; + } + fs21.futimes(fd, at, mt, function(er2) { + fs21.close(fd, function(er22) { + if (cb) cb(er2 || er22); + }); + }); + }); + }; + fs21.lutimesSync = function(path19, at, mt) { + var fd = fs21.openSync(path19, constants.O_SYMLINK); + var ret; + var threw = true; + try { + ret = fs21.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs21.closeSync(fd); + } catch (er) { + } + } else { + fs21.closeSync(fd); + } + } + return ret; + }; + } else if (fs21.futimes) { + fs21.lutimes = function(_a, _b, _c, cb) { + if (cb) process.nextTick(cb); + }; + fs21.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) return orig; + return function(target, mode, cb) { + return orig.call(fs20, target, mode, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) return orig; + return function(target, mode) { + try { + return orig.call(fs20, target, mode); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function chownFix(orig) { + if (!orig) return orig; + return function(target, uid, gid, cb) { + return orig.call(fs20, target, uid, gid, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) return orig; + return function(target, uid, gid) { + try { + return orig.call(fs20, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function statFix(orig) { + if (!orig) return orig; + return function(target, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + if (cb) cb.apply(this, arguments); + } + return options ? orig.call(fs20, target, options, callback) : orig.call(fs20, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) return orig; + return function(target, options) { + var stats = options ? orig.call(fs20, target, options) : orig.call(fs20, target); + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + return stats; + }; + } + function chownErOk(er) { + if (!er) + return true; + if (er.code === "ENOSYS") + return true; + var nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true; + } + return false; + } + } + } +}); + +// node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = __commonJS({ + "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { + var Stream = require("stream").Stream; + module2.exports = legacy; + function legacy(fs20) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path19, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path19, options); + Stream.call(this); + var self2 = this; + this.path = path19; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.encoding) this.setEncoding(this.encoding); + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.end === void 0) { + this.end = Infinity; + } else if ("number" !== typeof this.end) { + throw TypeError("end must be a Number"); + } + if (this.start > this.end) { + throw new Error("start must be <= end"); + } + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self2._read(); + }); + return; + } + fs20.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self2.emit("error", err); + self2.readable = false; + return; + } + self2.fd = fd; + self2.emit("open", fd); + self2._read(); + }); + } + function WriteStream(path19, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path19, options); + Stream.call(this); + this.path = path19; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.start < 0) { + throw new Error("start must be >= zero"); + } + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs20.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } + } + } + } +}); + +// node_modules/graceful-fs/clone.js +var require_clone = __commonJS({ + "node_modules/graceful-fs/clone.js"(exports2, module2) { + "use strict"; + module2.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj) { + return obj.__proto__; + }; + function clone(obj) { + if (obj === null || typeof obj !== "object") + return obj; + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) }; + else + var copy = /* @__PURE__ */ Object.create(null); + Object.getOwnPropertyNames(obj).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); + }); + return copy; + } + } +}); + +// node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = __commonJS({ + "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { + var fs20 = require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util = require("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); + } else { + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop2() { + } + function publishQueue(context3, queue2) { + Object.defineProperty(context3, gracefulQueue, { + get: function() { + return queue2; + } + }); + } + var debug3 = noop2; + if (util.debuglog) + debug3 = util.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug3 = function() { + var m = util.format.apply(util, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs20[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs20, queue); + fs20.close = (function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs20, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }); + return close; + })(fs20.close); + fs20.closeSync = (function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs20, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + })(fs20.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug3(fs20[gracefulQueue]); + require("assert").equal(fs20[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs20[gracefulQueue]); + } + module2.exports = patch(clone(fs20)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs20.__patched) { + module2.exports = patch(fs20); + fs20.__patched = true; + } + function patch(fs21) { + polyfills(fs21); + fs21.gracefulify = patch; + fs21.createReadStream = createReadStream2; + fs21.createWriteStream = createWriteStream2; + var fs$readFile = fs21.readFile; + fs21.readFile = readFile; + function readFile(path19, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readFile(path19, options, cb); + function go$readFile(path20, options2, cb2, startTime) { + return fs$readFile(path20, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path20, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs21.writeFile; + fs21.writeFile = writeFile; + function writeFile(path19, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$writeFile(path19, data, options, cb); + function go$writeFile(path20, data2, options2, cb2, startTime) { + return fs$writeFile(path20, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path20, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs21.appendFile; + if (fs$appendFile) + fs21.appendFile = appendFile; + function appendFile(path19, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$appendFile(path19, data, options, cb); + function go$appendFile(path20, data2, options2, cb2, startTime) { + return fs$appendFile(path20, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path20, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs21.copyFile; + if (fs$copyFile) + fs21.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs21.readdir; + fs21.readdir = readdir; + var noReaddirOptionVersions = /^v[0-5]\./; + function readdir(path19, options, cb) { + if (typeof options === "function") + cb = options, options = null; + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path20, options2, cb2, startTime) { + return fs$readdir(path20, fs$readdirCallback( + path20, + options2, + cb2, + startTime + )); + } : function go$readdir2(path20, options2, cb2, startTime) { + return fs$readdir(path20, options2, fs$readdirCallback( + path20, + options2, + cb2, + startTime + )); + }; + return go$readdir(path19, options, cb); + function fs$readdirCallback(path20, options2, cb2, startTime) { + return function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([ + go$readdir, + [path20, options2, cb2], + err, + startTime || Date.now(), + Date.now() + ]); + else { + if (files && files.sort) + files.sort(); + if (typeof cb2 === "function") + cb2.call(this, err, files); + } + }; + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs21); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs21.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs21.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs21, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val2) { + ReadStream = val2; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs21, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val2) { + WriteStream = val2; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs21, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val2) { + FileReadStream = val2; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs21, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val2) { + FileWriteStream = val2; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path19, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this; + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream(path19, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this; + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream2(path19, options) { + return new fs21.ReadStream(path19, options); + } + function createWriteStream2(path19, options) { + return new fs21.WriteStream(path19, options); + } + var fs$open = fs21.open; + fs21.open = open; + function open(path19, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path19, flags, mode, cb); + function go$open(path20, flags2, mode2, cb2, startTime) { + return fs$open(path20, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path20, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + return fs21; + } + function enqueue(elem) { + debug3("ENQUEUE", elem[0].name, elem[1]); + fs20[gracefulQueue].push(elem); + retry3(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs20[gracefulQueue].length; ++i) { + if (fs20[gracefulQueue][i].length > 2) { + fs20[gracefulQueue][i][3] = now; + fs20[gracefulQueue][i][4] = now; + } + } + retry3(); + } + function retry3() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs20[gracefulQueue].length === 0) + return; + var elem = fs20[gracefulQueue].shift(); + var fn = elem[0]; + var args = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug3("RETRY", fn.name, args); + fn.apply(null, args); + } else if (Date.now() - startTime >= 6e4) { + debug3("TIMEOUT", fn.name, args); + var cb = args.pop(); + if (typeof cb === "function") + cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + var desiredDelay = Math.min(sinceStart * 1.2, 100); + if (sinceAttempt >= desiredDelay) { + debug3("RETRY", fn.name, args); + fn.apply(null, args.concat([startTime])); + } else { + fs20[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry3, 0); + } + } + } +}); + // node_modules/archiver-utils/node_modules/is-stream/index.js var require_is_stream = __commonJS({ "node_modules/archiver-utils/node_modules/is-stream/index.js"(exports2, module2) { @@ -89622,6 +87227,48 @@ var require_util12 = __commonJS({ } }); +// node_modules/inherits/inherits_browser.js +var require_inherits_browser = __commonJS({ + "node_modules/inherits/inherits_browser.js"(exports2, module2) { + if (typeof Object.create === "function") { + module2.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + module2.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; + } + } +}); + +// node_modules/inherits/inherits.js +var require_inherits = __commonJS({ + "node_modules/inherits/inherits.js"(exports2, module2) { + try { + util = require("util"); + if (typeof util.inherits !== "function") throw ""; + module2.exports = util.inherits; + } catch (e) { + module2.exports = require_inherits_browser(); + } + var util; + } +}); + // node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js var require_BufferList = __commonJS({ "node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports2, module2) { @@ -90046,19 +87693,19 @@ var require_stream_writable = __commonJS({ onwriteStateUpdate(state); if (er) onwriteError(stream2, state, sync, er, cb); else { - var finished = needFinish(state); - if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + var finished2 = needFinish(state); + if (!finished2 && !state.corked && !state.bufferProcessing && state.bufferedRequest) { clearBuffer(stream2, state); } if (sync) { - asyncWrite(afterWrite, stream2, state, finished, cb); + asyncWrite(afterWrite, stream2, state, finished2, cb); } else { - afterWrite(stream2, state, finished, cb); + afterWrite(stream2, state, finished2, cb); } } } - function afterWrite(stream2, state, finished, cb) { - if (!finished) onwriteDrain(stream2, state); + function afterWrite(stream2, state, finished2, cb) { + if (!finished2) onwriteDrain(stream2, state); state.pendingcb--; cb(); finishMaybe(stream2, state); @@ -91416,22 +89063,22 @@ var require_lazystream = __commonJS({ // node_modules/normalize-path/index.js var require_normalize_path = __commonJS({ "node_modules/normalize-path/index.js"(exports2, module2) { - module2.exports = function(path15, stripTrailing) { - if (typeof path15 !== "string") { + module2.exports = function(path19, stripTrailing) { + if (typeof path19 !== "string") { throw new TypeError("expected path to be a string"); } - if (path15 === "\\" || path15 === "/") return "/"; - var len = path15.length; - if (len <= 1) return path15; + if (path19 === "\\" || path19 === "/") return "/"; + var len = path19.length; + if (len <= 1) return path19; var prefix = ""; - if (len > 4 && path15[3] === "\\") { - var ch = path15[2]; - if ((ch === "?" || ch === ".") && path15.slice(0, 2) === "\\\\") { - path15 = path15.slice(2); + if (len > 4 && path19[3] === "\\") { + var ch = path19[2]; + if ((ch === "?" || ch === ".") && path19.slice(0, 2) === "\\\\") { + path19 = path19.slice(2); prefix = "//"; } } - var segs = path15.split(/[/\\]+/); + var segs = path19.split(/[/\\]+/); if (stripTrailing !== false && segs[segs.length - 1] === "") { segs.pop(); } @@ -92056,12 +89703,12 @@ var require_arrayLikeKeys = __commonJS({ var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; + var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType2 = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType2, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. - isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. + isType2 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. isIndex(key, length)))) { result.push(key); } @@ -92970,7 +90617,7 @@ var require_util13 = __commonJS({ var validateFunction = (value, name) => { if (typeof value !== "function") throw new ERR_INVALID_ARG_TYPE(name, "Function", value); }; - var AggregateError = class extends Error { + var AggregateError2 = class extends Error { constructor(errors) { if (!Array.isArray(errors)) { throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); @@ -92986,7 +90633,7 @@ var require_util13 = __commonJS({ } }; module2.exports = { - AggregateError, + AggregateError: AggregateError2, kEmptyObject: Object.freeze({}), once(callback) { let called = false; @@ -93139,7 +90786,7 @@ var require_errors4 = __commonJS({ "node_modules/readable-stream/lib/ours/errors.js"(exports2, module2) { "use strict"; var { format, inspect, AggregateError: CustomAggregateError } = require_util13(); - var AggregateError = globalThis.AggregateError || CustomAggregateError; + var AggregateError2 = globalThis.AggregateError || CustomAggregateError; var kIsNodeError = Symbol("kIsNodeError"); var kTypes = [ "string", @@ -93234,7 +90881,7 @@ var require_errors4 = __commonJS({ outerError.errors.push(innerError); return outerError; } - const err = new AggregateError([outerError, innerError], outerError.message); + const err = new AggregateError2([outerError, innerError], outerError.message); err.code = outerError.code; return err; } @@ -93933,10 +91580,10 @@ var require_utils10 = __commonJS({ // node_modules/readable-stream/lib/internal/streams/end-of-stream.js var require_end_of_stream = __commonJS({ "node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) { - var process2 = require_process(); + var process6 = require_process(); var { AbortError, codes } = require_errors4(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_STREAM_PREMATURE_CLOSE } = codes; - var { kEmptyObject, once } = require_util13(); + var { kEmptyObject, once: once2 } = require_util13(); var { validateAbortSignal, validateFunction, validateObject, validateBoolean } = require_validators(); var { Promise: Promise2, PromisePrototypeThen, SymbolDispose } = require_primordials(); var { @@ -93973,7 +91620,7 @@ var require_end_of_stream = __commonJS({ } validateFunction(callback, "callback"); validateAbortSignal(options.signal, "options.signal"); - callback = once(callback); + callback = once2(callback); if (isReadableStream(stream2) || isWritableStream(stream2)) { return eosWeb(stream2, options, callback); } @@ -94069,17 +91716,17 @@ var require_end_of_stream = __commonJS({ } stream2.on("close", onclose); if (closed) { - process2.nextTick(onclose); + process6.nextTick(onclose); } else if (wState !== null && wState !== void 0 && wState.errorEmitted || rState !== null && rState !== void 0 && rState.errorEmitted) { if (!willEmitClose) { - process2.nextTick(onclosed); + process6.nextTick(onclosed); } } else if (!readable && (!willEmitClose || isReadable(stream2)) && (writableFinished || isWritable(stream2) === false)) { - process2.nextTick(onclosed); + process6.nextTick(onclosed); } else if (!writable && (!willEmitClose || isWritable(stream2)) && (readableFinished || isReadable(stream2) === false)) { - process2.nextTick(onclosed); + process6.nextTick(onclosed); } else if (rState && stream2.req && stream2.aborted) { - process2.nextTick(onclosed); + process6.nextTick(onclosed); } const cleanup = () => { callback = nop; @@ -94107,12 +91754,12 @@ var require_end_of_stream = __commonJS({ ); }; if (options.signal.aborted) { - process2.nextTick(abort); + process6.nextTick(abort); } else { addAbortListener = addAbortListener || require_util13().addAbortListener; const disposable = addAbortListener(options.signal, abort); const originalCallback = callback; - callback = once((...args) => { + callback = once2((...args) => { disposable[SymbolDispose](); originalCallback.apply(stream2, args); }); @@ -94134,12 +91781,12 @@ var require_end_of_stream = __commonJS({ ); }; if (options.signal.aborted) { - process2.nextTick(abort); + process6.nextTick(abort); } else { addAbortListener = addAbortListener || require_util13().addAbortListener; const disposable = addAbortListener(options.signal, abort); const originalCallback = callback; - callback = once((...args) => { + callback = once2((...args) => { disposable[SymbolDispose](); originalCallback.apply(stream2, args); }); @@ -94147,13 +91794,13 @@ var require_end_of_stream = __commonJS({ } const resolverFn = (...args) => { if (!isAborted) { - process2.nextTick(() => callback.apply(stream2, args)); + process6.nextTick(() => callback.apply(stream2, args)); } }; PromisePrototypeThen(stream2[kIsClosedPromise].promise, resolverFn, resolverFn); return nop; } - function finished(stream2, opts) { + function finished2(stream2, opts) { var _opts; let autoCleanup = false; if (opts === null) { @@ -94177,7 +91824,7 @@ var require_end_of_stream = __commonJS({ }); } module2.exports = eos; - module2.exports.finished = finished; + module2.exports.finished = finished2; } }); @@ -94185,7 +91832,7 @@ var require_end_of_stream = __commonJS({ var require_destroy2 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { "use strict"; - var process2 = require_process(); + var process6 = require_process(); var { aggregateTwoErrors, codes: { ERR_MULTIPLE_CALLBACK }, @@ -94252,9 +91899,9 @@ var require_destroy2 = __commonJS({ cb(err2); } if (err2) { - process2.nextTick(emitErrorCloseNT, self2, err2); + process6.nextTick(emitErrorCloseNT, self2, err2); } else { - process2.nextTick(emitCloseNT, self2); + process6.nextTick(emitCloseNT, self2); } } try { @@ -94339,7 +91986,7 @@ var require_destroy2 = __commonJS({ r.errored = err; } if (sync) { - process2.nextTick(emitErrorNT, stream2, err); + process6.nextTick(emitErrorNT, stream2, err); } else { emitErrorNT(stream2, err); } @@ -94361,7 +92008,7 @@ var require_destroy2 = __commonJS({ if (stream2.listenerCount(kConstruct) > 1) { return; } - process2.nextTick(constructNT, stream2); + process6.nextTick(constructNT, stream2); } function constructNT(stream2) { let called = false; @@ -94385,15 +92032,15 @@ var require_destroy2 = __commonJS({ } else if (err) { errorOrDestroy(stream2, err, true); } else { - process2.nextTick(emitConstructNT, stream2); + process6.nextTick(emitConstructNT, stream2); } } try { stream2._construct((err) => { - process2.nextTick(onConstruct, err); + process6.nextTick(onConstruct, err); }); } catch (err) { - process2.nextTick(onConstruct, err); + process6.nextTick(onConstruct, err); } } function emitConstructNT(stream2) { @@ -94407,7 +92054,7 @@ var require_destroy2 = __commonJS({ } function emitErrorCloseLegacy(stream2, err) { stream2.emit("error", err); - process2.nextTick(emitCloseLegacy, stream2); + process6.nextTick(emitCloseLegacy, stream2); } function destroyer(stream2, err) { if (!stream2 || isDestroyed(stream2)) { @@ -94428,9 +92075,9 @@ var require_destroy2 = __commonJS({ } else if (typeof stream2.close === "function") { stream2.close(); } else if (err) { - process2.nextTick(emitErrorCloseLegacy, stream2, err); + process6.nextTick(emitErrorCloseLegacy, stream2, err); } else { - process2.nextTick(emitCloseLegacy, stream2); + process6.nextTick(emitCloseLegacy, stream2); } if (!stream2.destroyed) { stream2[kIsDestroyed] = true; @@ -94753,7 +92400,7 @@ var require_state3 = __commonJS({ defaultHighWaterMarkBytes = value; } } - function getHighWaterMark(state, options, duplexKey, isDuplex) { + function getHighWaterMark2(state, options, duplexKey, isDuplex) { const hwm = highWaterMarkFrom(options, isDuplex, duplexKey); if (hwm != null) { if (!NumberIsInteger(hwm) || hwm < 0) { @@ -94765,7 +92412,7 @@ var require_state3 = __commonJS({ return getDefaultHighWaterMark(state.objectMode); } module2.exports = { - getHighWaterMark, + getHighWaterMark: getHighWaterMark2, getDefaultHighWaterMark, setDefaultHighWaterMark }; @@ -94776,7 +92423,7 @@ var require_state3 = __commonJS({ var require_from = __commonJS({ "node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) { "use strict"; - var process2 = require_process(); + var process6 = require_process(); var { PromisePrototypeThen, SymbolAsyncIterator, SymbolIterator } = require_primordials(); var { Buffer: Buffer2 } = require("buffer"); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_STREAM_NULL_VALUES } = require_errors4().codes; @@ -94818,9 +92465,9 @@ var require_from = __commonJS({ readable._destroy = function(error2, cb) { PromisePrototypeThen( close(error2), - () => process2.nextTick(cb, error2), + () => process6.nextTick(cb, error2), // nextTick is here in case cb throws - (e) => process2.nextTick(cb, e || error2) + (e) => process6.nextTick(cb, e || error2) ); }; async function close(error2) { @@ -94870,7 +92517,7 @@ var require_from = __commonJS({ // node_modules/readable-stream/lib/internal/streams/readable.js var require_readable3 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/readable.js"(exports2, module2) { - var process2 = require_process(); + var process6 = require_process(); var { ArrayPrototypeIndexOf, NumberIsInteger, @@ -94897,7 +92544,7 @@ var require_readable3 = __commonJS({ }); var BufferList = require_buffer_list(); var destroyImpl = require_destroy2(); - var { getHighWaterMark, getDefaultHighWaterMark } = require_state3(); + var { getHighWaterMark: getHighWaterMark2, getDefaultHighWaterMark } = require_state3(); var { aggregateTwoErrors, codes: { @@ -94991,7 +92638,7 @@ var require_readable3 = __commonJS({ this.state = kEmitClose | kAutoDestroy | kConstructed | kSync; if (options && options.objectMode) this.state |= kObjectMode; if (isDuplex && options && options.readableObjectMode) this.state |= kObjectMode; - this.highWaterMark = options ? getHighWaterMark(this, options, "readableHighWaterMark", isDuplex) : getDefaultHighWaterMark(false); + this.highWaterMark = options ? getHighWaterMark2(this, options, "readableHighWaterMark", isDuplex) : getDefaultHighWaterMark(false); this.buffer = new BufferList(); this.length = 0; this.pipes = []; @@ -95255,7 +92902,7 @@ var require_readable3 = __commonJS({ if (!state.emittedReadable) { debug3("emitReadable", state.flowing); state.emittedReadable = true; - process2.nextTick(emitReadable_, stream2); + process6.nextTick(emitReadable_, stream2); } } function emitReadable_(stream2) { @@ -95271,7 +92918,7 @@ var require_readable3 = __commonJS({ function maybeReadMore(stream2, state) { if (!state.readingMore && state.constructed) { state.readingMore = true; - process2.nextTick(maybeReadMore_, stream2, state); + process6.nextTick(maybeReadMore_, stream2, state); } } function maybeReadMore_(stream2, state) { @@ -95298,9 +92945,9 @@ var require_readable3 = __commonJS({ } state.pipes.push(dest); debug3("pipe count=%d opts=%j", state.pipes.length, pipeOpts); - const doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process2.stdout && dest !== process2.stderr; + const doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process6.stdout && dest !== process6.stderr; const endFn = doEnd ? onend : unpipe; - if (state.endEmitted) process2.nextTick(endFn); + if (state.endEmitted) process6.nextTick(endFn); else src.once("end", endFn); dest.on("unpipe", onunpipe); function onunpipe(readable, unpipeInfo) { @@ -95450,7 +93097,7 @@ var require_readable3 = __commonJS({ if (state.length) { emitReadable(this); } else if (!state.reading) { - process2.nextTick(nReadingNextTick, this); + process6.nextTick(nReadingNextTick, this); } } } @@ -95460,7 +93107,7 @@ var require_readable3 = __commonJS({ Readable2.prototype.removeListener = function(ev, fn) { const res = Stream.prototype.removeListener.call(this, ev, fn); if (ev === "readable") { - process2.nextTick(updateReadableListening, this); + process6.nextTick(updateReadableListening, this); } return res; }; @@ -95468,7 +93115,7 @@ var require_readable3 = __commonJS({ Readable2.prototype.removeAllListeners = function(ev) { const res = Stream.prototype.removeAllListeners.apply(this, arguments); if (ev === "readable" || ev === void 0) { - process2.nextTick(updateReadableListening, this); + process6.nextTick(updateReadableListening, this); } return res; }; @@ -95500,7 +93147,7 @@ var require_readable3 = __commonJS({ function resume(stream2, state) { if (!state.resumeScheduled) { state.resumeScheduled = true; - process2.nextTick(resume_, stream2, state); + process6.nextTick(resume_, stream2, state); } } function resume_(stream2, state) { @@ -95777,7 +93424,7 @@ var require_readable3 = __commonJS({ debug3("endReadable", state.endEmitted); if (!state.endEmitted) { state.ended = true; - process2.nextTick(endReadableNT, state, stream2); + process6.nextTick(endReadableNT, state, stream2); } } function endReadableNT(state, stream2) { @@ -95786,7 +93433,7 @@ var require_readable3 = __commonJS({ state.endEmitted = true; stream2.emit("end"); if (stream2.writable && stream2.allowHalfOpen === false) { - process2.nextTick(endWritableNT, stream2); + process6.nextTick(endWritableNT, stream2); } else if (state.autoDestroy) { const wState = stream2._writableState; const autoDestroy = !wState || wState.autoDestroy && // We don't expect the writable to ever 'finish' @@ -95835,7 +93482,7 @@ var require_readable3 = __commonJS({ // node_modules/readable-stream/lib/internal/streams/writable.js var require_writable = __commonJS({ "node_modules/readable-stream/lib/internal/streams/writable.js"(exports2, module2) { - var process2 = require_process(); + var process6 = require_process(); var { ArrayPrototypeSlice, Error: Error2, @@ -95854,7 +93501,7 @@ var require_writable = __commonJS({ var { Buffer: Buffer2 } = require("buffer"); var destroyImpl = require_destroy2(); var { addAbortSignal } = require_add_abort_signal(); - var { getHighWaterMark, getDefaultHighWaterMark } = require_state3(); + var { getHighWaterMark: getHighWaterMark2, getDefaultHighWaterMark } = require_state3(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_METHOD_NOT_IMPLEMENTED, @@ -95876,7 +93523,7 @@ var require_writable = __commonJS({ if (typeof isDuplex !== "boolean") isDuplex = stream2 instanceof require_duplex(); this.objectMode = !!(options && options.objectMode); if (isDuplex) this.objectMode = this.objectMode || !!(options && options.writableObjectMode); - this.highWaterMark = options ? getHighWaterMark(this, options, "writableHighWaterMark", isDuplex) : getDefaultHighWaterMark(false); + this.highWaterMark = options ? getHighWaterMark2(this, options, "writableHighWaterMark", isDuplex) : getDefaultHighWaterMark(false); this.finalCalled = false; this.needDrain = false; this.ending = false; @@ -95988,7 +93635,7 @@ var require_writable = __commonJS({ err = new ERR_STREAM_DESTROYED("write"); } if (err) { - process2.nextTick(cb, err); + process6.nextTick(cb, err); errorOrDestroy(stream2, err, true); return err; } @@ -96078,7 +93725,7 @@ var require_writable = __commonJS({ stream2._readableState.errored = er; } if (sync) { - process2.nextTick(onwriteError, stream2, state, er, cb); + process6.nextTick(onwriteError, stream2, state, er, cb); } else { onwriteError(stream2, state, er, cb); } @@ -96096,7 +93743,7 @@ var require_writable = __commonJS({ stream: stream2, state }; - process2.nextTick(afterWriteTick, state.afterWriteTickInfo); + process6.nextTick(afterWriteTick, state.afterWriteTickInfo); } } else { afterWrite(stream2, state, 1, cb); @@ -96233,7 +93880,7 @@ var require_writable = __commonJS({ } if (typeof cb === "function") { if (err || state.finished) { - process2.nextTick(cb, err); + process6.nextTick(cb, err); } else { state[kOnFinished].push(cb); } @@ -96262,7 +93909,7 @@ var require_writable = __commonJS({ state.prefinished = true; stream2.emit("prefinish"); state.pendingcb++; - process2.nextTick(finish, stream2, state); + process6.nextTick(finish, stream2, state); } } state.sync = true; @@ -96291,7 +93938,7 @@ var require_writable = __commonJS({ if (state.pendingcb === 0) { if (sync) { state.pendingcb++; - process2.nextTick( + process6.nextTick( (stream3, state2) => { if (needFinish(state2)) { finish(stream3, state2); @@ -96426,7 +94073,7 @@ var require_writable = __commonJS({ Writable.prototype.destroy = function(err, cb) { const state = this._writableState; if (!state.destroyed && (state.bufferedIndex < state.buffered.length || state[kOnFinished].length)) { - process2.nextTick(errorBuffer, state); + process6.nextTick(errorBuffer, state); } destroy.call(this, err, cb); return this; @@ -96455,7 +94102,7 @@ var require_writable = __commonJS({ // node_modules/readable-stream/lib/internal/streams/duplexify.js var require_duplexify = __commonJS({ "node_modules/readable-stream/lib/internal/streams/duplexify.js"(exports2, module2) { - var process2 = require_process(); + var process6 = require_process(); var bufferModule = require("buffer"); var { isReadable, @@ -96568,9 +94215,9 @@ var require_duplexify = __commonJS({ final(async () => { try { await promise; - process2.nextTick(cb, null); + process6.nextTick(cb, null); } catch (err) { - process2.nextTick(cb, err); + process6.nextTick(cb, err); } }); }, @@ -96649,7 +94296,7 @@ var require_duplexify = __commonJS({ const _promise = promise; promise = null; const { chunk, done, cb } = await _promise; - process2.nextTick(cb); + process6.nextTick(cb); if (done) return; if (signal.aborted) throw new AbortError(void 0, { @@ -96924,13 +94571,13 @@ var require_transform = __commonJS({ module2.exports = Transform; var { ERR_METHOD_NOT_IMPLEMENTED } = require_errors4().codes; var Duplex = require_duplex(); - var { getHighWaterMark } = require_state3(); + var { getHighWaterMark: getHighWaterMark2 } = require_state3(); ObjectSetPrototypeOf(Transform.prototype, Duplex.prototype); ObjectSetPrototypeOf(Transform, Duplex); var kCallback = Symbol2("kCallback"); function Transform(options) { if (!(this instanceof Transform)) return new Transform(options); - const readableHighWaterMark = options ? getHighWaterMark(this, options, "readableHighWaterMark", true) : null; + const readableHighWaterMark = options ? getHighWaterMark2(this, options, "readableHighWaterMark", true) : null; if (readableHighWaterMark === 0) { options = { ...options, @@ -97040,10 +94687,10 @@ var require_passthrough2 = __commonJS({ // node_modules/readable-stream/lib/internal/streams/pipeline.js var require_pipeline3 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) { - var process2 = require_process(); + var process6 = require_process(); var { ArrayIsArray, Promise: Promise2, SymbolAsyncIterator, SymbolDispose } = require_primordials(); var eos = require_end_of_stream(); - var { once } = require_util13(); + var { once: once2 } = require_util13(); var destroyImpl = require_destroy2(); var Duplex = require_duplex(); var { @@ -97073,9 +94720,9 @@ var require_pipeline3 = __commonJS({ var Readable2; var addAbortListener; function destroyer(stream2, reading, writing) { - let finished = false; + let finished2 = false; stream2.on("close", () => { - finished = true; + finished2 = true; }); const cleanup = eos( stream2, @@ -97084,13 +94731,13 @@ var require_pipeline3 = __commonJS({ writable: writing }, (err) => { - finished = !err; + finished2 = !err; } ); return { destroy: (err) => { - if (finished) return; - finished = true; + if (finished2) return; + finished2 = true; destroyImpl.destroyer(stream2, err || new ERR_STREAM_DESTROYED("pipe")); }, cleanup @@ -97195,7 +94842,7 @@ var require_pipeline3 = __commonJS({ } } function pipeline(...streams) { - return pipelineImpl(streams, once(popCallback(streams))); + return pipelineImpl(streams, once2(popCallback(streams))); } function pipelineImpl(streams, callback, opts) { if (streams.length === 1 && ArrayIsArray(streams[0])) { @@ -97242,7 +94889,7 @@ var require_pipeline3 = __commonJS({ if (!error2) { lastStreamCleanup.forEach((fn) => fn()); } - process2.nextTick(callback, error2, value); + process6.nextTick(callback, error2, value); } } let ret; @@ -97321,11 +94968,11 @@ var require_pipeline3 = __commonJS({ if (end) { pt.end(); } - process2.nextTick(finish); + process6.nextTick(finish); }, (err) => { pt.destroy(err); - process2.nextTick(finish, err); + process6.nextTick(finish, err); } ); } else if (isIterable(ret, true)) { @@ -97406,7 +95053,7 @@ var require_pipeline3 = __commonJS({ } } if (signal !== null && signal !== void 0 && signal.aborted || outerSignal !== null && outerSignal !== void 0 && outerSignal.aborted) { - process2.nextTick(abort); + process6.nextTick(abort); } return ret; } @@ -97427,7 +95074,7 @@ var require_pipeline3 = __commonJS({ }; var endFn = endFn2; if (isReadableFinished(src)) { - process2.nextTick(endFn2); + process6.nextTick(endFn2); } else { src.once("end", endFn2); } @@ -97670,7 +95317,7 @@ var require_operators = __commonJS({ var { validateAbortSignal, validateInteger, validateObject } = require_validators(); var kWeakHandler = require_primordials().Symbol("kWeak"); var kResistStopPropagation = require_primordials().Symbol("kResistStopPropagation"); - var { finished } = require_end_of_stream(); + var { finished: finished2 } = require_end_of_stream(); var staticCompose = require_compose(); var { addAbortSignalNoValidate } = require_add_abort_signal(); var { isWritable, isNodeStream } = require_utils10(); @@ -97917,7 +95564,7 @@ var require_operators = __commonJS({ }); this.once("error", () => { }); - await finished(this.destroy(err)); + await finished2(this.destroy(err)); throw err; } const ac = new AbortController2(); @@ -98070,7 +95717,7 @@ var require_promises = __commonJS({ var { ArrayPrototypePop, Promise: Promise2 } = require_primordials(); var { isIterable, isNodeStream, isWebStream } = require_utils10(); var { pipelineImpl: pl } = require_pipeline3(); - var { finished } = require_end_of_stream(); + var { finished: finished2 } = require_end_of_stream(); require_stream6(); function pipeline(...streams) { return new Promise2((resolve8, reject) => { @@ -98099,7 +95746,7 @@ var require_promises = __commonJS({ }); } module2.exports = { - finished, + finished: finished2, pipeline }; } @@ -98942,9 +96589,9 @@ var require_Set = __commonJS({ // node_modules/lodash/noop.js var require_noop = __commonJS({ "node_modules/lodash/noop.js"(exports2, module2) { - function noop() { + function noop2() { } - module2.exports = noop; + module2.exports = noop2; } }); @@ -98966,10 +96613,10 @@ var require_setToArray = __commonJS({ var require_createSet = __commonJS({ "node_modules/lodash/_createSet.js"(exports2, module2) { var Set2 = require_Set(); - var noop = require_noop(); + var noop2 = require_noop(); var setToArray = require_setToArray(); var INFINITY = 1 / 0; - var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values) { + var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop2 : function(values) { return new Set2(values); }; module2.exports = createSet; @@ -99966,11 +97613,11 @@ var require_commonjs13 = __commonJS({ return (f) => f.length === len && f !== "." && f !== ".."; }; var defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix"; - var path15 = { + var path19 = { win32: { sep: "\\" }, posix: { sep: "/" } }; - exports2.sep = defaultPlatform === "win32" ? path15.win32.sep : path15.posix.sep; + exports2.sep = defaultPlatform === "win32" ? path19.win32.sep : path19.posix.sep; exports2.minimatch.sep = exports2.sep; exports2.GLOBSTAR = Symbol("globstar **"); exports2.minimatch.GLOBSTAR = exports2.GLOBSTAR; @@ -101694,8 +99341,8 @@ var require_commonjs14 = __commonJS({ const noDelete = allowStale || options.noDeleteOnFetchRejection; const bf2 = p; if (this.#valList[index] === p) { - const del4 = !noDelete || bf2.__staleWhileFetching === void 0; - if (del4) { + const del = !noDelete || bf2.__staleWhileFetching === void 0; + if (del) { this.#delete(k, "fetch"); } else if (!allowStaleAborted) { this.#valList[index] = bf2.__staleWhileFetching; @@ -103218,12 +100865,12 @@ var require_commonjs16 = __commonJS({ /** * Get the Path object referenced by the string path, resolved from this Path */ - resolve(path15) { - if (!path15) { + resolve(path19) { + if (!path19) { return this; } - const rootPath = this.getRootString(path15); - const dir = path15.substring(rootPath.length); + const rootPath = this.getRootString(path19); + const dir = path19.substring(rootPath.length); const dirParts = dir.split(this.splitSep); const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts); return result; @@ -103976,8 +101623,8 @@ var require_commonjs16 = __commonJS({ /** * @internal */ - getRootString(path15) { - return node_path_1.win32.parse(path15).root; + getRootString(path19) { + return node_path_1.win32.parse(path19).root; } /** * @internal @@ -104024,8 +101671,8 @@ var require_commonjs16 = __commonJS({ /** * @internal */ - getRootString(path15) { - return path15.startsWith("/") ? "/" : ""; + getRootString(path19) { + return path19.startsWith("/") ? "/" : ""; } /** * @internal @@ -104075,8 +101722,8 @@ var require_commonjs16 = __commonJS({ * * @internal */ - constructor(cwd = process.cwd(), pathImpl, sep5, { nocase, childrenCacheSize = 16 * 1024, fs: fs17 = defaultFS } = {}) { - this.#fs = fsFromOption(fs17); + constructor(cwd = process.cwd(), pathImpl, sep5, { nocase, childrenCacheSize = 16 * 1024, fs: fs20 = defaultFS } = {}) { + this.#fs = fsFromOption(fs20); if (cwd instanceof URL || cwd.startsWith("file://")) { cwd = (0, node_url_1.fileURLToPath)(cwd); } @@ -104115,11 +101762,11 @@ var require_commonjs16 = __commonJS({ /** * Get the depth of a provided path, string, or the cwd */ - depth(path15 = this.cwd) { - if (typeof path15 === "string") { - path15 = this.cwd.resolve(path15); + depth(path19 = this.cwd) { + if (typeof path19 === "string") { + path19 = this.cwd.resolve(path19); } - return path15.depth(); + return path19.depth(); } /** * Return the cache of child entries. Exposed so subclasses can create @@ -104498,7 +102145,7 @@ var require_commonjs16 = __commonJS({ const dirs = /* @__PURE__ */ new Set(); const queue = [entry]; let processing = 0; - const process2 = () => { + const process6 = () => { let paused = false; while (!paused) { const dir = queue.shift(); @@ -104539,9 +102186,9 @@ var require_commonjs16 = __commonJS({ } } if (paused && !results.flowing) { - results.once("drain", process2); + results.once("drain", process6); } else if (!sync) { - process2(); + process6(); } }; let sync = true; @@ -104549,7 +102196,7 @@ var require_commonjs16 = __commonJS({ sync = false; } }; - process2(); + process6(); return results; } streamSync(entry = this.cwd, opts = {}) { @@ -104567,7 +102214,7 @@ var require_commonjs16 = __commonJS({ } const queue = [entry]; let processing = 0; - const process2 = () => { + const process6 = () => { let paused = false; while (!paused) { const dir = queue.shift(); @@ -104601,14 +102248,14 @@ var require_commonjs16 = __commonJS({ } } if (paused && !results.flowing) - results.once("drain", process2); + results.once("drain", process6); }; - process2(); + process6(); return results; } - chdir(path15 = this.cwd) { + chdir(path19 = this.cwd) { const oldCwd = this.cwd; - this.cwd = typeof path15 === "string" ? this.cwd.resolve(path15) : path15; + this.cwd = typeof path19 === "string" ? this.cwd.resolve(path19) : path19; this.cwd[setAsCwd](oldCwd); } }; @@ -104635,8 +102282,8 @@ var require_commonjs16 = __commonJS({ /** * @internal */ - newRoot(fs17) { - return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs17 }); + newRoot(fs20) { + return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs20 }); } /** * Return true if the provided path string is an absolute path @@ -104665,8 +102312,8 @@ var require_commonjs16 = __commonJS({ /** * @internal */ - newRoot(fs17) { - return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs17 }); + newRoot(fs20) { + return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs20 }); } /** * Return true if the provided path string is an absolute path @@ -104996,8 +102643,8 @@ var require_processor = __commonJS({ } // match, absolute, ifdir entries() { - return [...this.store.entries()].map(([path15, n]) => [ - path15, + return [...this.store.entries()].map(([path19, n]) => [ + path19, !!(n & 2), !!(n & 1) ]); @@ -105215,9 +102862,9 @@ var require_walker = __commonJS({ signal; maxDepth; includeChildMatches; - constructor(patterns, path15, opts) { + constructor(patterns, path19, opts) { this.patterns = patterns; - this.path = path15; + this.path = path19; this.opts = opts; this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/"; this.includeChildMatches = opts.includeChildMatches !== false; @@ -105236,11 +102883,11 @@ var require_walker = __commonJS({ }); } } - #ignored(path15) { - return this.seen.has(path15) || !!this.#ignore?.ignored?.(path15); + #ignored(path19) { + return this.seen.has(path19) || !!this.#ignore?.ignored?.(path19); } - #childrenIgnored(path15) { - return !!this.#ignore?.childrenIgnored?.(path15); + #childrenIgnored(path19) { + return !!this.#ignore?.childrenIgnored?.(path19); } // backpressure mechanism pause() { @@ -105456,8 +103103,8 @@ var require_walker = __commonJS({ exports2.GlobUtil = GlobUtil; var GlobWalker = class extends GlobUtil { matches = /* @__PURE__ */ new Set(); - constructor(patterns, path15, opts) { - super(patterns, path15, opts); + constructor(patterns, path19, opts) { + super(patterns, path19, opts); } matchEmit(e) { this.matches.add(e); @@ -105495,8 +103142,8 @@ var require_walker = __commonJS({ exports2.GlobWalker = GlobWalker; var GlobStream = class extends GlobUtil { results; - constructor(patterns, path15, opts) { - super(patterns, path15, opts); + constructor(patterns, path19, opts) { + super(patterns, path19, opts); this.results = new minipass_1.Minipass({ signal: this.signal, objectMode: true @@ -105533,7 +103180,7 @@ var require_walker = __commonJS({ }); // node_modules/archiver-utils/node_modules/glob/dist/commonjs/glob.js -var require_glob3 = __commonJS({ +var require_glob2 = __commonJS({ "node_modules/archiver-utils/node_modules/glob/dist/commonjs/glob.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -105778,7 +103425,7 @@ var require_commonjs17 = __commonJS({ exports2.globIterateSync = globIterateSync; exports2.globIterate = globIterate; var minimatch_1 = require_commonjs13(); - var glob_js_1 = require_glob3(); + var glob_js_1 = require_glob2(); var has_magic_js_1 = require_has_magic(); var minimatch_2 = require_commonjs13(); Object.defineProperty(exports2, "escape", { enumerable: true, get: function() { @@ -105787,7 +103434,7 @@ var require_commonjs17 = __commonJS({ Object.defineProperty(exports2, "unescape", { enumerable: true, get: function() { return minimatch_2.unescape; } }); - var glob_js_2 = require_glob3(); + var glob_js_2 = require_glob2(); Object.defineProperty(exports2, "Glob", { enumerable: true, get: function() { return glob_js_2.Glob; } }); @@ -105851,8 +103498,8 @@ var require_commonjs17 = __commonJS({ // node_modules/archiver-utils/file.js var require_file3 = __commonJS({ "node_modules/archiver-utils/file.js"(exports2, module2) { - var fs17 = require_graceful_fs(); - var path15 = require("path"); + var fs20 = require_graceful_fs(); + var path19 = require("path"); var flatten = require_flatten(); var difference = require_difference(); var union = require_union(); @@ -105877,8 +103524,8 @@ var require_file3 = __commonJS({ return result; }; file.exists = function() { - var filepath = path15.join.apply(path15, arguments); - return fs17.existsSync(filepath); + var filepath = path19.join.apply(path19, arguments); + return fs20.existsSync(filepath); }; file.expand = function(...args) { var options = isPlainObject(args[0]) ? args.shift() : {}; @@ -105891,12 +103538,12 @@ var require_file3 = __commonJS({ }); if (options.filter) { matches = matches.filter(function(filepath) { - filepath = path15.join(options.cwd || "", filepath); + filepath = path19.join(options.cwd || "", filepath); try { if (typeof options.filter === "function") { return options.filter(filepath); } else { - return fs17.statSync(filepath)[options.filter](); + return fs20.statSync(filepath)[options.filter](); } } catch (e) { return false; @@ -105908,7 +103555,7 @@ var require_file3 = __commonJS({ file.expandMapping = function(patterns, destBase, options) { options = Object.assign({ rename: function(destBase2, destPath) { - return path15.join(destBase2 || "", destPath); + return path19.join(destBase2 || "", destPath); } }, options); var files = []; @@ -105916,14 +103563,14 @@ var require_file3 = __commonJS({ file.expand(options, patterns).forEach(function(src) { var destPath = src; if (options.flatten) { - destPath = path15.basename(destPath); + destPath = path19.basename(destPath); } if (options.ext) { destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext); } var dest = options.rename(destBase, destPath, options); if (options.cwd) { - src = path15.join(options.cwd, src); + src = path19.join(options.cwd, src); } dest = dest.replace(pathSeparatorRe, "/"); src = src.replace(pathSeparatorRe, "/"); @@ -106004,8 +103651,8 @@ var require_file3 = __commonJS({ // node_modules/archiver-utils/index.js var require_archiver_utils = __commonJS({ "node_modules/archiver-utils/index.js"(exports2, module2) { - var fs17 = require_graceful_fs(); - var path15 = require("path"); + var fs20 = require_graceful_fs(); + var path19 = require("path"); var isStream = require_is_stream(); var lazystream = require_lazystream(); var normalizePath = require_normalize_path(); @@ -106053,7 +103700,7 @@ var require_archiver_utils = __commonJS({ }; utils.lazyReadStream = function(filepath) { return new lazystream.Readable(function() { - return fs17.createReadStream(filepath); + return fs20.createReadStream(filepath); }); }; utils.normalizeInputSource = function(source) { @@ -106081,7 +103728,7 @@ var require_archiver_utils = __commonJS({ callback = base; base = dirpath; } - fs17.readdir(dirpath, function(err, list) { + fs20.readdir(dirpath, function(err, list) { var i = 0; var file; var filepath; @@ -106093,11 +103740,11 @@ var require_archiver_utils = __commonJS({ if (!file) { return callback(null, results); } - filepath = path15.join(dirpath, file); - fs17.stat(filepath, function(err2, stats) { + filepath = path19.join(dirpath, file); + fs20.stat(filepath, function(err2, stats) { results.push({ path: filepath, - relative: path15.relative(base, filepath).replace(/\\/g, "/"), + relative: path19.relative(base, filepath).replace(/\\/g, "/"), stats }); if (stats && stats.isDirectory()) { @@ -106156,10 +103803,10 @@ var require_error3 = __commonJS({ // node_modules/archiver/lib/core.js var require_core2 = __commonJS({ "node_modules/archiver/lib/core.js"(exports2, module2) { - var fs17 = require("fs"); + var fs20 = require("fs"); var glob2 = require_readdir_glob(); var async = require_async7(); - var path15 = require("path"); + var path19 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; var ArchiverError = require_error3(); @@ -106220,7 +103867,7 @@ var require_core2 = __commonJS({ data.sourcePath = filepath; task.data = data; this._entriesCount++; - if (data.stats && data.stats instanceof fs17.Stats) { + if (data.stats && data.stats instanceof fs20.Stats) { task = this._updateQueueTaskWithStats(task, data.stats); if (task) { if (data.stats.size) { @@ -106391,7 +104038,7 @@ var require_core2 = __commonJS({ callback(); return; } - fs17.lstat(task.filepath, function(err, stats) { + fs20.lstat(task.filepath, function(err, stats) { if (this._state.aborted) { setImmediate(callback); return; @@ -106434,10 +104081,10 @@ var require_core2 = __commonJS({ task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) { - var linkPath = fs17.readlinkSync(task.filepath); - var dirName = path15.dirname(task.filepath); + var linkPath = fs20.readlinkSync(task.filepath); + var dirName = path19.dirname(task.filepath); task.data.type = "symlink"; - task.data.linkname = path15.relative(dirName, path15.resolve(dirName, linkPath)); + task.data.linkname = path19.relative(dirName, path19.resolve(dirName, linkPath)); task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else { @@ -107583,22 +105230,22 @@ var require_zip_archive_output_stream = __commonJS({ }; ZipArchiveOutputStream.prototype._smartStream = function(ae, callback) { var deflate = ae.getMethod() === constants.METHOD_DEFLATED; - var process2 = deflate ? new DeflateCRC32Stream(this.options.zlib) : new CRC32Stream(); + var process6 = deflate ? new DeflateCRC32Stream(this.options.zlib) : new CRC32Stream(); var error2 = null; function handleStuff() { - var digest = process2.digest().readUInt32BE(0); + var digest = process6.digest().readUInt32BE(0); ae.setCrc(digest); - ae.setSize(process2.size()); - ae.setCompressedSize(process2.size(true)); + ae.setSize(process6.size()); + ae.setCompressedSize(process6.size(true)); this._afterAppend(ae); callback(error2, ae); } - process2.once("end", handleStuff.bind(this)); - process2.once("error", function(err) { + process6.once("end", handleStuff.bind(this)); + process6.once("error", function(err) { error2 = err; }); - process2.pipe(this, { end: false }); - return process2; + process6.pipe(this, { end: false }); + return process6; }; ZipArchiveOutputStream.prototype._writeCentralDirectoryEnd = function() { var records = this._entries.length; @@ -107792,17 +105439,17 @@ var require_zip_stream = __commonJS({ comment: "" }); var isDir = data.type === "directory"; - var isSymlink = data.type === "symlink"; + var isSymlink2 = data.type === "symlink"; if (data.name) { data.name = util.sanitizePath(data.name); - if (!isSymlink && data.name.slice(-1) === "/") { + if (!isSymlink2 && data.name.slice(-1) === "/") { isDir = true; data.type = "directory"; } else if (isDir) { data.name += "/"; } } - if (isDir || isSymlink) { + if (isDir || isSymlink2) { data.store = true; } data.date = util.dateify(data.date); @@ -108535,10 +106182,10 @@ var require_streamx = __commonJS({ this.stream._duplexState |= READ_PIPE_DRAINED; this.pipeTo = pipeTo; this.pipeline = new Pipeline(this.stream, pipeTo, cb); - if (cb) this.stream.on("error", noop); + if (cb) this.stream.on("error", noop2); if (isStreamx(pipeTo)) { pipeTo._writableState.pipeline = this.pipeline; - if (cb) pipeTo.on("error", noop); + if (cb) pipeTo.on("error", noop2); pipeTo.on("finish", this.pipeline.finished.bind(this.pipeline)); } else { const onerror = this.pipeline.done.bind(this.pipeline, pipeTo); @@ -109241,7 +106888,7 @@ var require_streamx = __commonJS({ function defaultByteLength(data) { return isTypedArray(data) ? data.byteLength : 1024; } - function noop() { + function noop2() { } function abort() { this.destroy(new Error("Stream aborted.")); @@ -109620,7 +107267,7 @@ var require_extract = __commonJS({ this._stream = null; this._missing = 0; this._longHeader = false; - this._callback = noop; + this._callback = noop2; this._locked = false; this._finished = false; this._pax = null; @@ -109753,7 +107400,7 @@ var require_extract = __commonJS({ } _continueWrite(err) { const cb = this._callback; - this._callback = noop; + this._callback = noop2; cb(err); } _write(data, cb) { @@ -109823,7 +107470,7 @@ var require_extract = __commonJS({ } function onentry(header, stream2, callback) { entryCallback = callback; - stream2.on("error", noop); + stream2.on("error", noop2); if (promiseResolve) { promiseResolve({ value: stream2, done: false }); promiseResolve = promiseReject = null; @@ -109854,7 +107501,7 @@ var require_extract = __commonJS({ module2.exports = function extract2(opts) { return new Extract(opts); }; - function noop() { + function noop2() { } function overflow(size) { size &= 511; @@ -109982,7 +107629,7 @@ var require_pack = __commonJS({ var Pack = class extends Readable2 { constructor(opts) { super(opts); - this._drain = noop; + this._drain = noop2; this._finalized = false; this._finalizing = false; this._pending = []; @@ -109994,7 +107641,7 @@ var require_pack = __commonJS({ callback = buffer; buffer = null; } - if (!callback) callback = noop; + if (!callback) callback = noop2; if (!header.size || header.type === "symlink") header.size = 0; if (!header.type) header.type = modeToType(header.mode); if (!header.mode) header.mode = header.type === "directory" ? DMODE : FMODE; @@ -110069,7 +107716,7 @@ var require_pack = __commonJS({ } _doDrain() { const drain = this._drain; - this._drain = noop; + this._drain = noop2; drain(); } _predestroy() { @@ -110105,7 +107752,7 @@ var require_pack = __commonJS({ } return "file"; } - function noop() { + function noop2() { } function overflow(self2, size) { size &= 511; @@ -110887,8 +108534,8 @@ var require_context2 = __commonJS({ if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path15 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path15} does not exist${os_1.EOL}`); + const path19 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path19} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -112030,14 +109677,14 @@ var require_url_state_machine = __commonJS({ return url2.replace(/\u0009|\u000A|\u000D/g, ""); } function shortenPath(url2) { - const path15 = url2.path; - if (path15.length === 0) { + const path19 = url2.path; + if (path19.length === 0) { return; } - if (url2.scheme === "file" && path15.length === 1 && isNormalizedWindowsDriveLetter(path15[0])) { + if (url2.scheme === "file" && path19.length === 1 && isNormalizedWindowsDriveLetter(path19[0])) { return; } - path15.pop(); + path19.pop(); } function includesCredentials(url2) { return url2.username !== "" || url2.password !== ""; @@ -114256,9 +111903,9 @@ var require_dist_node17 = __commonJS({ return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; } var deprecation = require_dist_node3(); - var once = _interopDefault(require_once()); - var logOnceCode = once((deprecation2) => console.warn(deprecation2)); - var logOnceHeaders = once((deprecation2) => console.warn(deprecation2)); + var once2 = _interopDefault(require_once()); + var logOnceCode = once2((deprecation2) => console.warn(deprecation2)); + var logOnceHeaders = once2((deprecation2) => console.warn(deprecation2)); var RequestError = class extends Error { constructor(message, statusCode, options) { super(message); @@ -116208,7 +113855,7 @@ var require_traverse = __commonJS({ })(this.value); }; function walk(root, cb, immutable) { - var path15 = []; + var path19 = []; var parents = []; var alive = true; return (function walker(node_) { @@ -116217,11 +113864,11 @@ var require_traverse = __commonJS({ var state = { node, node_, - path: [].concat(path15), + path: [].concat(path19), parent: parents.slice(-1)[0], - key: path15.slice(-1)[0], - isRoot: path15.length === 0, - level: path15.length, + key: path19.slice(-1)[0], + isRoot: path19.length === 0, + level: path19.length, circular: null, update: function(x) { if (!state.isRoot) { @@ -116276,7 +113923,7 @@ var require_traverse = __commonJS({ parents.push(state); var keys = Object.keys(state.node); keys.forEach(function(key, i2) { - path15.push(key); + path19.push(key); if (modifiers.pre) modifiers.pre.call(state, state.node[key], key); var child = walker(state.node[key]); if (immutable && Object.hasOwnProperty.call(state.node, key)) { @@ -116285,7 +113932,7 @@ var require_traverse = __commonJS({ child.isLast = i2 == keys.length - 1; child.isFirst = i2 == 0; if (modifiers.post) modifiers.post.call(state, child); - path15.pop(); + path19.pop(); }); parents.pop(); } @@ -117058,8 +114705,8 @@ var require_matcher_stream = __commonJS({ this.push(packet); this.bytesSoFar += matchIndex; } - var finished = this.matchFn ? this.matchFn(this.data, this.bytesSoFar) : true; - if (finished) { + var finished2 = this.matchFn ? this.matchFn(this.data, this.bytesSoFar) : true; + if (finished2) { this.data = new Buffer(""); return; } @@ -117306,26 +114953,26 @@ var require_unzip_stream = __commonJS({ return requiredLength; case states.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX: var isUtf8 = (this.parsedEntity.flags & 2048) !== 0; - var path15 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8); + var path19 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8); var extraDataBuffer = chunk.slice(this.parsedEntity.fileNameLength, this.parsedEntity.fileNameLength + this.parsedEntity.extraFieldLength); var extra = this._readExtraFields(extraDataBuffer); if (extra && extra.parsed && extra.parsed.path && !isUtf8) { - path15 = extra.parsed.path; + path19 = extra.parsed.path; } this.parsedEntity.extra = extra.parsed; var isUnix = (this.parsedEntity.versionMadeBy & 65280) >> 8 === 3; - var unixAttrs, isSymlink; + var unixAttrs, isSymlink2; if (isUnix) { unixAttrs = this.parsedEntity.externalFileAttributes >>> 16; var fileType = unixAttrs >>> 12; - isSymlink = (fileType & 10) === 10; + isSymlink2 = (fileType & 10) === 10; } if (this.options.debug) { const debugObj = Object.assign({}, this.parsedEntity, { - path: path15, + path: path19, flags: "0x" + this.parsedEntity.flags.toString(16), unixAttrs: unixAttrs && "0" + unixAttrs.toString(8), - isSymlink, + isSymlink: isSymlink2, extraFields: extra.debug }); console.log("decoded CENTRAL_DIRECTORY_FILE_HEADER:", JSON.stringify(debugObj, null, 2)); @@ -117368,10 +115015,10 @@ var require_unzip_stream = __commonJS({ }; UnzipStream.prototype._prepareOutStream = function(vars, entry) { var self2 = this; - var isDirectory = vars.uncompressedSize === 0 && /[\/\\]$/.test(entry.path); + var isDirectory2 = vars.uncompressedSize === 0 && /[\/\\]$/.test(entry.path); entry.path = entry.path.replace(/(?<=^|[/\\]+)[.][.]+(?=[/\\]+|$)/g, "."); - entry.type = isDirectory ? "Directory" : "File"; - entry.isDirectory = isDirectory; + entry.type = isDirectory2 ? "Directory" : "File"; + entry.isDirectory = isDirectory2; var fileSizeKnown = !(vars.flags & 8); if (fileSizeKnown) { entry.size = vars.uncompressedSize; @@ -117759,8 +115406,8 @@ var require_parser_stream = __commonJS({ // node_modules/mkdirp/index.js var require_mkdirp = __commonJS({ "node_modules/mkdirp/index.js"(exports2, module2) { - var path15 = require("path"); - var fs17 = require("fs"); + var path19 = require("path"); + var fs20 = require("fs"); var _0777 = parseInt("0777", 8); module2.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; function mkdirP(p, opts, f, made) { @@ -117771,7 +115418,7 @@ var require_mkdirp = __commonJS({ opts = { mode: opts }; } var mode = opts.mode; - var xfs = opts.fs || fs17; + var xfs = opts.fs || fs20; if (mode === void 0) { mode = _0777; } @@ -117779,7 +115426,7 @@ var require_mkdirp = __commonJS({ var cb = f || /* istanbul ignore next */ function() { }; - p = path15.resolve(p); + p = path19.resolve(p); xfs.mkdir(p, mode, function(er) { if (!er) { made = made || p; @@ -117787,8 +115434,8 @@ var require_mkdirp = __commonJS({ } switch (er.code) { case "ENOENT": - if (path15.dirname(p) === p) return cb(er); - mkdirP(path15.dirname(p), opts, function(er2, made2) { + if (path19.dirname(p) === p) return cb(er); + mkdirP(path19.dirname(p), opts, function(er2, made2) { if (er2) cb(er2, made2); else mkdirP(p, opts, cb, made2); }); @@ -117810,19 +115457,19 @@ var require_mkdirp = __commonJS({ opts = { mode: opts }; } var mode = opts.mode; - var xfs = opts.fs || fs17; + var xfs = opts.fs || fs20; if (mode === void 0) { mode = _0777; } if (!made) made = null; - p = path15.resolve(p); + p = path19.resolve(p); try { xfs.mkdirSync(p, mode); made = made || p; } catch (err0) { switch (err0.code) { case "ENOENT": - made = sync(path15.dirname(p), opts, made); + made = sync(path19.dirname(p), opts, made); sync(p, opts, made); break; // In the case of any other error, just see if there's a dir @@ -117847,8 +115494,8 @@ var require_mkdirp = __commonJS({ // node_modules/unzip-stream/lib/extract.js var require_extract2 = __commonJS({ "node_modules/unzip-stream/lib/extract.js"(exports2, module2) { - var fs17 = require("fs"); - var path15 = require("path"); + var fs20 = require("fs"); + var path19 = require("path"); var util = require("util"); var mkdirp = require_mkdirp(); var Transform = require("stream").Transform; @@ -117890,11 +115537,11 @@ var require_extract2 = __commonJS({ }; Extract.prototype._processEntry = function(entry) { var self2 = this; - var destPath = path15.join(this.opts.path, entry.path); - var directory = entry.isDirectory ? destPath : path15.dirname(destPath); + var destPath = path19.join(this.opts.path, entry.path); + var directory = entry.isDirectory ? destPath : path19.dirname(destPath); this.unfinishedEntries++; var writeFileFn = function() { - var pipedStream = fs17.createWriteStream(destPath); + var pipedStream = fs20.createWriteStream(destPath); pipedStream.on("close", function() { self2.unfinishedEntries--; self2._notifyAwaiter(); @@ -118018,10 +115665,10 @@ var require_download_artifact = __commonJS({ parsed.search = ""; return parsed.toString(); }; - function exists(path15) { + function exists(path19) { return __awaiter4(this, void 0, void 0, function* () { try { - yield promises_1.default.access(path15); + yield promises_1.default.access(path19); return true; } catch (error2) { if (error2.code === "ENOENT") { @@ -118252,12 +115899,12 @@ var require_dist_node24 = __commonJS({ octokit.log.debug("request", options); const start = Date.now(); const requestOptions = octokit.request.endpoint.parse(options); - const path15 = requestOptions.url.replace(options.baseUrl, ""); + const path19 = requestOptions.url.replace(options.baseUrl, ""); return request(options).then((response) => { - octokit.log.info(`${requestOptions.method} ${path15} - ${response.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path19} - ${response.status} in ${Date.now() - start}ms`); return response; }).catch((error2) => { - octokit.log.info(`${requestOptions.method} ${path15} - ${error2.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path19} - ${error2.status} in ${Date.now() - start}ms`); throw error2; }); }); @@ -118977,13 +116624,13 @@ These characters are not allowed in the artifact name due to limitations with ce (0, core_1.info)(`Artifact name is valid!`); } exports2.checkArtifactName = checkArtifactName; - function checkArtifactFilePath(path15) { - if (!path15) { - throw new Error(`Artifact path: ${path15}, is incorrectly provided`); + function checkArtifactFilePath(path19) { + if (!path19) { + throw new Error(`Artifact path: ${path19}, is incorrectly provided`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path15.includes(invalidCharacterKey)) { - throw new Error(`Artifact path is not valid: ${path15}. Contains the following character: ${errorMessageForCharacter} + if (path19.includes(invalidCharacterKey)) { + throw new Error(`Artifact path is not valid: ${path19}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -119029,25 +116676,25 @@ var require_upload_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUploadSpecification = void 0; - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var core_1 = require_core(); var path_1 = require("path"); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); function getUploadSpecification(artifactName, rootDirectory, artifactFiles) { const specifications = []; - if (!fs17.existsSync(rootDirectory)) { + if (!fs20.existsSync(rootDirectory)) { throw new Error(`Provided rootDirectory ${rootDirectory} does not exist`); } - if (!fs17.statSync(rootDirectory).isDirectory()) { + if (!fs20.statSync(rootDirectory).isDirectory()) { throw new Error(`Provided rootDirectory ${rootDirectory} is not a valid directory`); } rootDirectory = (0, path_1.normalize)(rootDirectory); rootDirectory = (0, path_1.resolve)(rootDirectory); for (let file of artifactFiles) { - if (!fs17.existsSync(file)) { + if (!fs20.existsSync(file)) { throw new Error(`File ${file} does not exist`); } - if (!fs17.statSync(file).isDirectory()) { + if (!fs20.statSync(file).isDirectory()) { file = (0, path_1.normalize)(file); file = (0, path_1.resolve)(file); if (!file.startsWith(rootDirectory)) { @@ -119072,11 +116719,11 @@ var require_upload_specification = __commonJS({ // node_modules/tmp/lib/tmp.js var require_tmp = __commonJS({ "node_modules/tmp/lib/tmp.js"(exports2, module2) { - var fs17 = require("fs"); + var fs20 = require("fs"); var os3 = require("os"); - var path15 = require("path"); + var path19 = require("path"); var crypto = require("crypto"); - var _c = { fs: fs17.constants, os: os3.constants }; + var _c = { fs: fs20.constants, os: os3.constants }; var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; var TEMPLATE_PATTERN = /XXXXXX/; var DEFAULT_TRIES = 3; @@ -119088,13 +116735,13 @@ var require_tmp = __commonJS({ var FILE_MODE = 384; var EXIT = "exit"; var _removeObjects = []; - var FN_RMDIR_SYNC = fs17.rmdirSync.bind(fs17); + var FN_RMDIR_SYNC = fs20.rmdirSync.bind(fs20); var _gracefulCleanup = false; function rimraf(dirPath, callback) { - return fs17.rm(dirPath, { recursive: true }, callback); + return fs20.rm(dirPath, { recursive: true }, callback); } function FN_RIMRAF_SYNC(dirPath) { - return fs17.rmSync(dirPath, { recursive: true }); + return fs20.rmSync(dirPath, { recursive: true }); } function tmpName(options, callback) { const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; @@ -119104,7 +116751,7 @@ var require_tmp = __commonJS({ (function _getUniqueName() { try { const name = _generateTmpName(sanitizedOptions); - fs17.stat(name, function(err2) { + fs20.stat(name, function(err2) { if (!err2) { if (tries-- > 0) return _getUniqueName(); return cb(new Error("Could not get a unique tmp filename, max tries reached " + name)); @@ -119124,7 +116771,7 @@ var require_tmp = __commonJS({ do { const name = _generateTmpName(sanitizedOptions); try { - fs17.statSync(name); + fs20.statSync(name); } catch (e) { return name; } @@ -119135,10 +116782,10 @@ var require_tmp = __commonJS({ const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; tmpName(opts, function _tmpNameCreated(err, name) { if (err) return cb(err); - fs17.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) { + fs20.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) { if (err2) return cb(err2); if (opts.discardDescriptor) { - return fs17.close(fd, function _discardCallback(possibleErr) { + return fs20.close(fd, function _discardCallback(possibleErr) { return cb(possibleErr, name, void 0, _prepareTmpFileRemoveCallback(name, -1, opts, false)); }); } else { @@ -119152,9 +116799,9 @@ var require_tmp = __commonJS({ const args = _parseArguments(options), opts = args[0]; const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; const name = tmpNameSync(opts); - let fd = fs17.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); + let fd = fs20.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); if (opts.discardDescriptor) { - fs17.closeSync(fd); + fs20.closeSync(fd); fd = void 0; } return { @@ -119167,7 +116814,7 @@ var require_tmp = __commonJS({ const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; tmpName(opts, function _tmpNameCreated(err, name) { if (err) return cb(err); - fs17.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) { + fs20.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) { if (err2) return cb(err2); cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false)); }); @@ -119176,7 +116823,7 @@ var require_tmp = __commonJS({ function dirSync(options) { const args = _parseArguments(options), opts = args[0]; const name = tmpNameSync(opts); - fs17.mkdirSync(name, opts.mode || DIR_MODE); + fs20.mkdirSync(name, opts.mode || DIR_MODE); return { name, removeCallback: _prepareTmpDirRemoveCallback(name, opts, true) @@ -119190,20 +116837,20 @@ var require_tmp = __commonJS({ next(); }; if (0 <= fdPath[0]) - fs17.close(fdPath[0], function() { - fs17.unlink(fdPath[1], _handler); + fs20.close(fdPath[0], function() { + fs20.unlink(fdPath[1], _handler); }); - else fs17.unlink(fdPath[1], _handler); + else fs20.unlink(fdPath[1], _handler); } function _removeFileSync(fdPath) { let rethrownException = null; try { - if (0 <= fdPath[0]) fs17.closeSync(fdPath[0]); + if (0 <= fdPath[0]) fs20.closeSync(fdPath[0]); } catch (e) { if (!_isEBADF(e) && !_isENOENT(e)) throw e; } finally { try { - fs17.unlinkSync(fdPath[1]); + fs20.unlinkSync(fdPath[1]); } catch (e) { if (!_isENOENT(e)) rethrownException = e; } @@ -119219,7 +116866,7 @@ var require_tmp = __commonJS({ return sync ? removeCallbackSync : removeCallback; } function _prepareTmpDirRemoveCallback(name, opts, sync) { - const removeFunction = opts.unsafeCleanup ? rimraf : fs17.rmdir.bind(fs17); + const removeFunction = opts.unsafeCleanup ? rimraf : fs20.rmdir.bind(fs20); const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC; const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync); const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync); @@ -119281,35 +116928,35 @@ var require_tmp = __commonJS({ return [actualOptions, callback]; } function _resolvePath(name, tmpDir, cb) { - const pathToResolve = path15.isAbsolute(name) ? name : path15.join(tmpDir, name); - fs17.stat(pathToResolve, function(err) { + const pathToResolve = path19.isAbsolute(name) ? name : path19.join(tmpDir, name); + fs20.stat(pathToResolve, function(err) { if (err) { - fs17.realpath(path15.dirname(pathToResolve), function(err2, parentDir) { + fs20.realpath(path19.dirname(pathToResolve), function(err2, parentDir) { if (err2) return cb(err2); - cb(null, path15.join(parentDir, path15.basename(pathToResolve))); + cb(null, path19.join(parentDir, path19.basename(pathToResolve))); }); } else { - fs17.realpath(path15, cb); + fs20.realpath(path19, cb); } }); } function _resolvePathSync(name, tmpDir) { - const pathToResolve = path15.isAbsolute(name) ? name : path15.join(tmpDir, name); + const pathToResolve = path19.isAbsolute(name) ? name : path19.join(tmpDir, name); try { - fs17.statSync(pathToResolve); - return fs17.realpathSync(pathToResolve); + fs20.statSync(pathToResolve); + return fs20.realpathSync(pathToResolve); } catch (_err) { - const parentDir = fs17.realpathSync(path15.dirname(pathToResolve)); - return path15.join(parentDir, path15.basename(pathToResolve)); + const parentDir = fs20.realpathSync(path19.dirname(pathToResolve)); + return path19.join(parentDir, path19.basename(pathToResolve)); } } function _generateTmpName(opts) { const tmpDir = opts.tmpdir; if (!_isUndefined(opts.name)) { - return path15.join(tmpDir, opts.dir, opts.name); + return path19.join(tmpDir, opts.dir, opts.name); } if (!_isUndefined(opts.template)) { - return path15.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); + return path19.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); } const name = [ opts.prefix ? opts.prefix : "tmp", @@ -119319,13 +116966,13 @@ var require_tmp = __commonJS({ _randomChars(12), opts.postfix ? "-" + opts.postfix : "" ].join(""); - return path15.join(tmpDir, opts.dir, name); + return path19.join(tmpDir, opts.dir, name); } function _assertOptionsBase(options) { if (!_isUndefined(options.name)) { const name = options.name; - if (path15.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); - const basename = path15.basename(name); + if (path19.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); + const basename = path19.basename(name); if (basename === ".." || basename === "." || basename !== name) throw new Error(`name option must not contain a path, found "${name}".`); } @@ -119347,7 +116994,7 @@ var require_tmp = __commonJS({ if (_isUndefined(name)) return cb(null); _resolvePath(name, tmpDir, function(err, resolvedPath) { if (err) return cb(err); - const relativePath = path15.relative(tmpDir, resolvedPath); + const relativePath = path19.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`)); } @@ -119357,7 +117004,7 @@ var require_tmp = __commonJS({ function _getRelativePathSync(option, name, tmpDir) { if (_isUndefined(name)) return; const resolvedPath = _resolvePathSync(name, tmpDir); - const relativePath = path15.relative(tmpDir, resolvedPath); + const relativePath = path19.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`); } @@ -119404,10 +117051,10 @@ var require_tmp = __commonJS({ _gracefulCleanup = true; } function _getTmpDir(options, cb) { - return fs17.realpath(options && options.tmpdir || os3.tmpdir(), cb); + return fs20.realpath(options && options.tmpdir || os3.tmpdir(), cb); } function _getTmpDirSync(options) { - return fs17.realpathSync(options && options.tmpdir || os3.tmpdir()); + return fs20.realpathSync(options && options.tmpdir || os3.tmpdir()); } process.addListener(EXIT, _garbageCollector); Object.defineProperty(module2.exports, "tmpdir", { @@ -119431,42 +117078,42 @@ var require_tmp = __commonJS({ var require_tmp_promise = __commonJS({ "node_modules/tmp-promise/index.js"(exports2, module2) { "use strict"; - var { promisify: promisify2 } = require("util"); + var { promisify: promisify3 } = require("util"); var tmp = require_tmp(); module2.exports.fileSync = tmp.fileSync; - var fileWithOptions = promisify2( + var fileWithOptions = promisify3( (options, cb) => tmp.file( options, - (err, path15, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path15, fd, cleanup: promisify2(cleanup) }) + (err, path19, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path19, fd, cleanup: promisify3(cleanup) }) ) ); module2.exports.file = async (options) => fileWithOptions(options); module2.exports.withFile = async function withFile(fn, options) { - const { path: path15, fd, cleanup } = await module2.exports.file(options); + const { path: path19, fd, cleanup } = await module2.exports.file(options); try { - return await fn({ path: path15, fd }); + return await fn({ path: path19, fd }); } finally { await cleanup(); } }; module2.exports.dirSync = tmp.dirSync; - var dirWithOptions = promisify2( + var dirWithOptions = promisify3( (options, cb) => tmp.dir( options, - (err, path15, cleanup) => err ? cb(err) : cb(void 0, { path: path15, cleanup: promisify2(cleanup) }) + (err, path19, cleanup) => err ? cb(err) : cb(void 0, { path: path19, cleanup: promisify3(cleanup) }) ) ); module2.exports.dir = async (options) => dirWithOptions(options); module2.exports.withDir = async function withDir(fn, options) { - const { path: path15, cleanup } = await module2.exports.dir(options); + const { path: path19, cleanup } = await module2.exports.dir(options); try { - return await fn({ path: path15 }); + return await fn({ path: path19 }); } finally { await cleanup(); } }; module2.exports.tmpNameSync = tmp.tmpNameSync; - module2.exports.tmpName = promisify2(tmp.tmpName); + module2.exports.tmpName = promisify3(tmp.tmpName); module2.exports.tmpdir = tmp.tmpdir; module2.exports.setGracefulCleanup = tmp.setGracefulCleanup; } @@ -120261,10 +117908,10 @@ var require_upload_gzip = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createGZipFileInBuffer = exports2.createGZipFileOnDisk = void 0; - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var zlib3 = __importStar4(require("zlib")); var util_1 = require("util"); - var stat = (0, util_1.promisify)(fs17.stat); + var stat = (0, util_1.promisify)(fs20.stat); var gzipExemptFileExtensions = [ ".gz", ".gzip", @@ -120297,9 +117944,9 @@ var require_upload_gzip = __commonJS({ } } return new Promise((resolve8, reject) => { - const inputStream = fs17.createReadStream(originalFilePath); + const inputStream = fs20.createReadStream(originalFilePath); const gzip = zlib3.createGzip(); - const outputStream = fs17.createWriteStream(tempFilePath); + const outputStream = fs20.createWriteStream(tempFilePath); inputStream.pipe(gzip).pipe(outputStream); outputStream.on("finish", () => __awaiter4(this, void 0, void 0, function* () { const size = (yield stat(tempFilePath)).size; @@ -120317,7 +117964,7 @@ var require_upload_gzip = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { return new Promise((resolve8) => __awaiter4(this, void 0, void 0, function* () { var _a, e_1, _b, _c; - const inputStream = fs17.createReadStream(originalFilePath); + const inputStream = fs20.createReadStream(originalFilePath); const gzip = zlib3.createGzip(); inputStream.pipe(gzip); const chunks = []; @@ -120526,7 +118173,7 @@ var require_upload_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadHttpClient = void 0; - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var core18 = __importStar4(require_core()); var tmp = __importStar4(require_tmp_promise()); var stream2 = __importStar4(require("stream")); @@ -120540,7 +118187,7 @@ var require_upload_http_client = __commonJS({ var http_manager_1 = require_http_manager(); var upload_gzip_1 = require_upload_gzip(); var requestUtils_1 = require_requestUtils2(); - var stat = (0, util_1.promisify)(fs17.stat); + var stat = (0, util_1.promisify)(fs20.stat); var UploadHttpClient = class { constructor() { this.uploadHttpManager = new http_manager_1.HttpManager((0, config_variables_1.getUploadFileConcurrency)(), "@actions/artifact-upload"); @@ -120677,7 +118324,7 @@ var require_upload_http_client = __commonJS({ let openUploadStream; if (totalFileSize < buffer.byteLength) { core18.debug(`The gzip file created for ${parameters.file} did not help with reducing the size of the file. The original file will be uploaded as-is`); - openUploadStream = () => fs17.createReadStream(parameters.file); + openUploadStream = () => fs20.createReadStream(parameters.file); isGzip = false; uploadFileSize = totalFileSize; } else { @@ -120723,7 +118370,7 @@ var require_upload_http_client = __commonJS({ failedChunkSizes += chunkSize; continue; } - const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, () => fs17.createReadStream(uploadFilePath, { + const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, () => fs20.createReadStream(uploadFilePath, { start: startChunkIndex, end: endChunkIndex, autoClose: false @@ -120918,7 +118565,7 @@ var require_download_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DownloadHttpClient = void 0; - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var core18 = __importStar4(require_core()); var zlib3 = __importStar4(require("zlib")); var utils_1 = require_utils14(); @@ -121009,7 +118656,7 @@ var require_download_http_client = __commonJS({ return __awaiter4(this, void 0, void 0, function* () { let retryCount = 0; const retryLimit = (0, config_variables_1.getRetryLimit)(); - let destinationStream = fs17.createWriteStream(downloadPath); + let destinationStream = fs20.createWriteStream(downloadPath); const headers = (0, utils_1.getDownloadHeaders)("application/json", true, true); const makeDownloadRequest = () => __awaiter4(this, void 0, void 0, function* () { const client = this.downloadHttpManager.getClient(httpClientIndex); @@ -121051,7 +118698,7 @@ var require_download_http_client = __commonJS({ } }); yield (0, utils_1.rmFile)(fileDownloadPath); - destinationStream = fs17.createWriteStream(fileDownloadPath); + destinationStream = fs20.createWriteStream(fileDownloadPath); }); while (retryCount <= retryLimit) { let response; @@ -121168,21 +118815,21 @@ var require_download_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadSpecification = void 0; - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) { const directories = /* @__PURE__ */ new Set(); const specifications = { - rootDownloadLocation: includeRootDirectory ? path15.join(downloadPath, artifactName) : downloadPath, + rootDownloadLocation: includeRootDirectory ? path19.join(downloadPath, artifactName) : downloadPath, directoryStructure: [], emptyFilesToCreate: [], filesToDownload: [] }; for (const entry of artifactEntries) { if (entry.path.startsWith(`${artifactName}/`) || entry.path.startsWith(`${artifactName}\\`)) { - const normalizedPathEntry = path15.normalize(entry.path); - const filePath = path15.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); + const normalizedPathEntry = path19.normalize(entry.path); + const filePath = path19.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); if (entry.itemType === "file") { - directories.add(path15.dirname(filePath)); + directories.add(path19.dirname(filePath)); if (entry.fileLength === 0) { specifications.emptyFilesToCreate.push(filePath); } else { @@ -121324,7 +118971,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz return uploadResponse; }); } - downloadArtifact(name, path15, options) { + downloadArtifact(name, path19, options) { return __awaiter4(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const artifacts = yield downloadHttpClient.listArtifacts(); @@ -121338,12 +118985,12 @@ Note: The size of downloaded zips can differ significantly from the reported siz throw new Error(`Unable to find an artifact with the name: ${name}`); } const items = yield downloadHttpClient.getContainerItems(artifactToDownload.name, artifactToDownload.fileContainerResourceUrl); - if (!path15) { - path15 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path19) { + path19 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path15 = (0, path_1.normalize)(path15); - path15 = (0, path_1.resolve)(path15); - const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path15, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); + path19 = (0, path_1.normalize)(path19); + path19 = (0, path_1.resolve)(path19); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(name, items.value, path19, (options === null || options === void 0 ? void 0 : options.createArtifactFolder) || false); if (downloadSpecification.filesToDownload.length === 0) { core18.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); } else { @@ -121358,7 +119005,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }; }); } - downloadAllArtifacts(path15) { + downloadAllArtifacts(path19) { return __awaiter4(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const response = []; @@ -121367,18 +119014,18 @@ Note: The size of downloaded zips can differ significantly from the reported siz core18.info("Unable to find any artifacts for the associated workflow"); return response; } - if (!path15) { - path15 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path19) { + path19 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path15 = (0, path_1.normalize)(path15); - path15 = (0, path_1.resolve)(path15); + path19 = (0, path_1.normalize)(path19); + path19 = (0, path_1.resolve)(path19); let downloadedArtifacts = 0; while (downloadedArtifacts < artifacts.count) { const currentArtifactToDownload = artifacts.value[downloadedArtifacts]; downloadedArtifacts += 1; core18.info(`starting download of artifact ${currentArtifactToDownload.name} : ${downloadedArtifacts}/${artifacts.count}`); const items = yield downloadHttpClient.getContainerItems(currentArtifactToDownload.name, currentArtifactToDownload.fileContainerResourceUrl); - const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path15, true); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path19, true); if (downloadSpecification.filesToDownload.length === 0) { core18.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); } else { @@ -121519,7 +119166,7 @@ var require_internal_path_helper2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -121527,7 +119174,7 @@ var require_internal_path_helper2 = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path15.dirname(p); + let result = path19.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -121565,7 +119212,7 @@ var require_internal_path_helper2 = __commonJS({ (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { - root += path15.sep; + root += path19.sep; } return root + itemPath; } @@ -121603,10 +119250,10 @@ var require_internal_path_helper2 = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path15.sep)) { + if (!p.endsWith(path19.sep)) { return p; } - if (p === path15.sep) { + if (p === path19.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -121757,7 +119404,7 @@ var require_internal_path2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -121772,12 +119419,12 @@ var require_internal_path2 = __commonJS({ (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path15.sep); + this.segments = itemPath.split(path19.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path15.basename(remaining); + const basename = path19.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -121795,7 +119442,7 @@ var require_internal_path2 = __commonJS({ (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - (0, assert_1.default)(!segment.includes(path15.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path19.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -121806,12 +119453,12 @@ var require_internal_path2 = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path15.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path19.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path15.sep; + result += path19.sep; } result += this.segments[i]; } @@ -121859,7 +119506,7 @@ var require_internal_pattern2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os3 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -121888,7 +119535,7 @@ var require_internal_pattern2 = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path15.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path19.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -121912,8 +119559,8 @@ var require_internal_pattern2 = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path15.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path15.sep}`; + if (!itemPath.endsWith(path19.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path19.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -121948,9 +119595,9 @@ var require_internal_pattern2 = __commonJS({ (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path15.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path19.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path15.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path19.sep}`)) { homedir = homedir || os3.homedir(); (0, assert_1.default)(homedir, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); @@ -122034,8 +119681,8 @@ var require_internal_search_state2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path15, level) { - this.path = path15; + constructor(path19, level) { + this.path = path19; this.level = level; } }; @@ -122159,9 +119806,9 @@ var require_internal_globber2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core18 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var patternHelper = __importStar4(require_internal_pattern_helper2()); var internal_match_kind_1 = require_internal_match_kind2(); var internal_pattern_1 = require_internal_pattern2(); @@ -122213,7 +119860,7 @@ var require_internal_globber2 = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core18.debug(`Search path '${searchPath}'`); try { - yield __await4(fs17.promises.lstat(searchPath)); + yield __await4(fs20.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -122237,7 +119884,7 @@ var require_internal_globber2 = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path15.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path19.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -122247,7 +119894,7 @@ var require_internal_globber2 = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs17.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path15.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs20.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path19.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await4(item.path); @@ -122282,7 +119929,7 @@ var require_internal_globber2 = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs17.promises.stat(item.path); + stats = yield fs20.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -122294,10 +119941,10 @@ var require_internal_globber2 = __commonJS({ throw err; } } else { - stats = yield fs17.promises.lstat(item.path); + stats = yield fs20.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs17.promises.realpath(item.path); + const realPath = yield fs20.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -122396,10 +120043,10 @@ var require_internal_hash_files = __commonJS({ exports2.hashFiles = void 0; var crypto = __importStar4(require("crypto")); var core18 = __importStar4(require_core()); - var fs17 = __importStar4(require("fs")); + var fs20 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); function hashFiles2(globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; var _d; @@ -122415,17 +120062,17 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path15.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path19.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } - if (fs17.statSync(file).isDirectory()) { + if (fs20.statSync(file).isDirectory()) { writeDelegate(`Skip directory '${file}'.`); continue; } const hash2 = crypto.createHash("sha256"); const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs17.createReadStream(file), hash2); + yield pipeline(fs20.createReadStream(file), hash2); result.write(hash2.digest()); count++; if (!hasMatch) { @@ -122456,7 +120103,7 @@ var require_internal_hash_files = __commonJS({ }); // node_modules/@actions/glob/lib/glob.js -var require_glob4 = __commonJS({ +var require_glob3 = __commonJS({ "node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -122515,14 +120162,14 @@ var require_helpers3 = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; var uri = require("url"); - var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path15, name, argument) { - if (Array.isArray(path15)) { - this.path = path15; - this.property = path15.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path19, name, argument) { + if (Array.isArray(path19)) { + this.path = path19; + this.property = path19.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path15 !== void 0) { - this.property = path15; + } else if (path19 !== void 0) { + this.property = path19; } if (message) { this.message = message; @@ -122613,16 +120260,16 @@ var require_helpers3 = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path15, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path19, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path15)) { - this.path = path15; - this.propertyPath = path15.reduce(function(sum, item) { + if (Array.isArray(path19)) { + this.path = path19; + this.propertyPath = path19.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path15; + this.propertyPath = path19; } this.base = base; this.schemas = schemas; @@ -122631,10 +120278,10 @@ var require_helpers3 = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path15 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path19 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); var id = schema2.$id || schema2.id; var base = uri.resolve(this.base, id || ""); - var ctx = new SchemaContext(schema2, this.options, path15, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path19, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -126707,16 +124354,16 @@ var require_sarif_schema_2_1_0 = __commonJS({ var core17 = __toESM(require_core()); // src/actions-util.ts -var fs2 = __toESM(require("fs")); -var path2 = __toESM(require("path")); +var fs5 = __toESM(require("fs")); +var path6 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts -var fs = __toESM(require("fs")); -var path = __toESM(require("path")); +var fs4 = __toESM(require("fs")); +var path5 = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -126856,36 +124503,764 @@ function checkDiskSpace(directoryPath, dependencies = { return checkUnix(directoryPath); } -// src/util.ts -var import_del = __toESM(require_del()); +// node_modules/del/index.js +var import_promises5 = __toESM(require("node:fs/promises"), 1); +var import_node_path6 = __toESM(require("node:path"), 1); +var import_node_process5 = __toESM(require("node:process"), 1); + +// node_modules/globby/index.js +var import_node_process3 = __toESM(require("node:process"), 1); +var import_node_fs3 = __toESM(require("node:fs"), 1); +var import_node_path3 = __toESM(require("node:path"), 1); + +// node_modules/globby/node_modules/@sindresorhus/merge-streams/index.js +var import_node_events = require("node:events"); +var import_node_stream = require("node:stream"); +var import_promises2 = require("node:stream/promises"); +function mergeStreams(streams) { + if (!Array.isArray(streams)) { + throw new TypeError(`Expected an array, got \`${typeof streams}\`.`); + } + for (const stream2 of streams) { + validateStream(stream2); + } + const objectMode = streams.some(({ readableObjectMode }) => readableObjectMode); + const highWaterMark = getHighWaterMark(streams, objectMode); + const passThroughStream = new MergedStream({ + objectMode, + writableHighWaterMark: highWaterMark, + readableHighWaterMark: highWaterMark + }); + for (const stream2 of streams) { + passThroughStream.add(stream2); + } + if (streams.length === 0) { + endStream(passThroughStream); + } + return passThroughStream; +} +var getHighWaterMark = (streams, objectMode) => { + if (streams.length === 0) { + return 16384; + } + const highWaterMarks = streams.filter(({ readableObjectMode }) => readableObjectMode === objectMode).map(({ readableHighWaterMark }) => readableHighWaterMark); + return Math.max(...highWaterMarks); +}; +var MergedStream = class extends import_node_stream.PassThrough { + #streams = /* @__PURE__ */ new Set([]); + #ended = /* @__PURE__ */ new Set([]); + #aborted = /* @__PURE__ */ new Set([]); + #onFinished; + add(stream2) { + validateStream(stream2); + if (this.#streams.has(stream2)) { + return; + } + this.#streams.add(stream2); + this.#onFinished ??= onMergedStreamFinished(this, this.#streams); + endWhenStreamsDone({ + passThroughStream: this, + stream: stream2, + streams: this.#streams, + ended: this.#ended, + aborted: this.#aborted, + onFinished: this.#onFinished + }); + stream2.pipe(this, { end: false }); + } + remove(stream2) { + validateStream(stream2); + if (!this.#streams.has(stream2)) { + return false; + } + stream2.unpipe(this); + return true; + } +}; +var onMergedStreamFinished = async (passThroughStream, streams) => { + updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT); + const controller = new AbortController(); + try { + await Promise.race([ + onMergedStreamEnd(passThroughStream, controller), + onInputStreamsUnpipe(passThroughStream, streams, controller) + ]); + } finally { + controller.abort(); + updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_COUNT); + } +}; +var onMergedStreamEnd = async (passThroughStream, { signal }) => { + await (0, import_promises2.finished)(passThroughStream, { signal, cleanup: true }); +}; +var onInputStreamsUnpipe = async (passThroughStream, streams, { signal }) => { + for await (const [unpipedStream] of (0, import_node_events.on)(passThroughStream, "unpipe", { signal })) { + if (streams.has(unpipedStream)) { + unpipedStream.emit(unpipeEvent); + } + } +}; +var validateStream = (stream2) => { + if (typeof stream2?.pipe !== "function") { + throw new TypeError(`Expected a readable stream, got: \`${typeof stream2}\`.`); + } +}; +var endWhenStreamsDone = async ({ passThroughStream, stream: stream2, streams, ended, aborted, onFinished }) => { + updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM); + const controller = new AbortController(); + try { + await Promise.race([ + afterMergedStreamFinished(onFinished, stream2), + onInputStreamEnd({ passThroughStream, stream: stream2, streams, ended, aborted, controller }), + onInputStreamUnpipe({ stream: stream2, streams, ended, aborted, controller }) + ]); + } finally { + controller.abort(); + updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM); + } + if (streams.size === ended.size + aborted.size) { + if (ended.size === 0 && aborted.size > 0) { + abortStream(passThroughStream); + } else { + endStream(passThroughStream); + } + } +}; +var isAbortError = (error2) => error2?.code === "ERR_STREAM_PREMATURE_CLOSE"; +var afterMergedStreamFinished = async (onFinished, stream2) => { + try { + await onFinished; + abortStream(stream2); + } catch (error2) { + if (isAbortError(error2)) { + abortStream(stream2); + } else { + errorStream(stream2, error2); + } + } +}; +var onInputStreamEnd = async ({ passThroughStream, stream: stream2, streams, ended, aborted, controller: { signal } }) => { + try { + await (0, import_promises2.finished)(stream2, { signal, cleanup: true, readable: true, writable: false }); + if (streams.has(stream2)) { + ended.add(stream2); + } + } catch (error2) { + if (signal.aborted || !streams.has(stream2)) { + return; + } + if (isAbortError(error2)) { + aborted.add(stream2); + } else { + errorStream(passThroughStream, error2); + } + } +}; +var onInputStreamUnpipe = async ({ stream: stream2, streams, ended, aborted, controller: { signal } }) => { + await (0, import_node_events.once)(stream2, unpipeEvent, { signal }); + streams.delete(stream2); + ended.delete(stream2); + aborted.delete(stream2); +}; +var unpipeEvent = Symbol("unpipe"); +var endStream = (stream2) => { + if (stream2.writable) { + stream2.end(); + } +}; +var abortStream = (stream2) => { + if (stream2.readable || stream2.writable) { + stream2.destroy(); + } +}; +var errorStream = (stream2, error2) => { + if (!stream2.destroyed) { + stream2.once("error", noop); + stream2.destroy(error2); + } +}; +var noop = () => { +}; +var updateMaxListeners = (passThroughStream, increment) => { + const maxListeners = passThroughStream.getMaxListeners(); + if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) { + passThroughStream.setMaxListeners(maxListeners + increment); + } +}; +var PASSTHROUGH_LISTENERS_COUNT = 2; +var PASSTHROUGH_LISTENERS_PER_STREAM = 1; + +// node_modules/globby/index.js +var import_fast_glob2 = __toESM(require_out4(), 1); + +// node_modules/path-type/index.js +var import_node_fs = __toESM(require("node:fs"), 1); +var import_promises3 = __toESM(require("node:fs/promises"), 1); +async function isType(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + const stats = await import_promises3.default[fsStatType](filePath); + return stats[statsMethodName](); + } catch (error2) { + if (error2.code === "ENOENT") { + return false; + } + throw error2; + } +} +function isTypeSync(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + return import_node_fs.default[fsStatType](filePath)[statsMethodName](); + } catch (error2) { + if (error2.code === "ENOENT") { + return false; + } + throw error2; + } +} +var isFile = isType.bind(void 0, "stat", "isFile"); +var isDirectory = isType.bind(void 0, "stat", "isDirectory"); +var isSymlink = isType.bind(void 0, "lstat", "isSymbolicLink"); +var isFileSync = isTypeSync.bind(void 0, "statSync", "isFile"); +var isDirectorySync = isTypeSync.bind(void 0, "statSync", "isDirectory"); +var isSymlinkSync = isTypeSync.bind(void 0, "lstatSync", "isSymbolicLink"); + +// node_modules/unicorn-magic/node.js +var import_node_util2 = require("node:util"); +var import_node_child_process2 = require("node:child_process"); +var import_node_url = require("node:url"); +var execFileOriginal = (0, import_node_util2.promisify)(import_node_child_process2.execFile); +function toPath(urlOrPath) { + return urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath; +} +var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024; + +// node_modules/globby/ignore.js +var import_node_process2 = __toESM(require("node:process"), 1); +var import_node_fs2 = __toESM(require("node:fs"), 1); +var import_promises4 = __toESM(require("node:fs/promises"), 1); +var import_node_path2 = __toESM(require("node:path"), 1); +var import_fast_glob = __toESM(require_out4(), 1); +var import_ignore = __toESM(require_ignore(), 1); + +// node_modules/slash/index.js +function slash(path19) { + const isExtendedLengthPath = path19.startsWith("\\\\?\\"); + if (isExtendedLengthPath) { + return path19; + } + return path19.replace(/\\/g, "/"); +} + +// node_modules/globby/utilities.js +var isNegativePattern = (pattern) => pattern[0] === "!"; + +// node_modules/globby/ignore.js +var defaultIgnoredDirectories = [ + "**/node_modules", + "**/flow-typed", + "**/coverage", + "**/.git" +]; +var ignoreFilesGlobOptions = { + absolute: true, + dot: true +}; +var GITIGNORE_FILES_PATTERN = "**/.gitignore"; +var applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" + import_node_path2.default.posix.join(base, pattern.slice(1)) : import_node_path2.default.posix.join(base, pattern); +var parseIgnoreFile = (file, cwd) => { + const base = slash(import_node_path2.default.relative(cwd, import_node_path2.default.dirname(file.filePath))); + return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base)); +}; +var toRelativePath = (fileOrDirectory, cwd) => { + cwd = slash(cwd); + if (import_node_path2.default.isAbsolute(fileOrDirectory)) { + if (slash(fileOrDirectory).startsWith(cwd)) { + return import_node_path2.default.relative(cwd, fileOrDirectory); + } + throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`); + } + return fileOrDirectory; +}; +var getIsIgnoredPredicate = (files, cwd) => { + const patterns = files.flatMap((file) => parseIgnoreFile(file, cwd)); + const ignores = (0, import_ignore.default)().add(patterns); + return (fileOrDirectory) => { + fileOrDirectory = toPath(fileOrDirectory); + fileOrDirectory = toRelativePath(fileOrDirectory, cwd); + return fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false; + }; +}; +var normalizeOptions = (options = {}) => ({ + cwd: toPath(options.cwd) ?? import_node_process2.default.cwd(), + suppressErrors: Boolean(options.suppressErrors), + deep: typeof options.deep === "number" ? options.deep : Number.POSITIVE_INFINITY, + ignore: [...options.ignore ?? [], ...defaultIgnoredDirectories] +}); +var isIgnoredByIgnoreFiles = async (patterns, options) => { + const { cwd, suppressErrors, deep, ignore } = normalizeOptions(options); + const paths = await (0, import_fast_glob.default)(patterns, { + cwd, + suppressErrors, + deep, + ignore, + ...ignoreFilesGlobOptions + }); + const files = await Promise.all( + paths.map(async (filePath) => ({ + filePath, + content: await import_promises4.default.readFile(filePath, "utf8") + })) + ); + return getIsIgnoredPredicate(files, cwd); +}; +var isIgnoredByIgnoreFilesSync = (patterns, options) => { + const { cwd, suppressErrors, deep, ignore } = normalizeOptions(options); + const paths = import_fast_glob.default.sync(patterns, { + cwd, + suppressErrors, + deep, + ignore, + ...ignoreFilesGlobOptions + }); + const files = paths.map((filePath) => ({ + filePath, + content: import_node_fs2.default.readFileSync(filePath, "utf8") + })); + return getIsIgnoredPredicate(files, cwd); +}; + +// node_modules/globby/index.js +var assertPatternsInput = (patterns) => { + if (patterns.some((pattern) => typeof pattern !== "string")) { + throw new TypeError("Patterns must be a string or an array of strings"); + } +}; +var normalizePathForDirectoryGlob = (filePath, cwd) => { + const path19 = isNegativePattern(filePath) ? filePath.slice(1) : filePath; + return import_node_path3.default.isAbsolute(path19) ? path19 : import_node_path3.default.join(cwd, path19); +}; +var getDirectoryGlob = ({ directoryPath, files, extensions }) => { + const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : ""; + return files ? files.map((file) => import_node_path3.default.posix.join(directoryPath, `**/${import_node_path3.default.extname(file) ? file : `${file}${extensionGlob}`}`)) : [import_node_path3.default.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)]; +}; +var directoryToGlob = async (directoryPaths, { + cwd = import_node_process3.default.cwd(), + files, + extensions +} = {}) => { + const globs = await Promise.all( + directoryPaths.map(async (directoryPath) => await isDirectory(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath) + ); + return globs.flat(); +}; +var directoryToGlobSync = (directoryPaths, { + cwd = import_node_process3.default.cwd(), + files, + extensions +} = {}) => directoryPaths.flatMap((directoryPath) => isDirectorySync(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath); +var toPatternsArray = (patterns) => { + patterns = [...new Set([patterns].flat())]; + assertPatternsInput(patterns); + return patterns; +}; +var checkCwdOption = (cwd) => { + if (!cwd) { + return; + } + let stat; + try { + stat = import_node_fs3.default.statSync(cwd); + } catch { + return; + } + if (!stat.isDirectory()) { + throw new Error("The `cwd` option must be a path to a directory"); + } +}; +var normalizeOptions2 = (options = {}) => { + options = { + ...options, + ignore: options.ignore ?? [], + expandDirectories: options.expandDirectories ?? true, + cwd: toPath(options.cwd) + }; + checkCwdOption(options.cwd); + return options; +}; +var normalizeArguments = (function_) => async (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)); +var normalizeArgumentsSync = (function_) => (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)); +var getIgnoreFilesPatterns = (options) => { + const { ignoreFiles, gitignore } = options; + const patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : []; + if (gitignore) { + patterns.push(GITIGNORE_FILES_PATTERN); + } + return patterns; +}; +var getFilter = async (options) => { + const ignoreFilesPatterns = getIgnoreFilesPatterns(options); + return createFilterFunction( + ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options) + ); +}; +var getFilterSync = (options) => { + const ignoreFilesPatterns = getIgnoreFilesPatterns(options); + return createFilterFunction( + ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options) + ); +}; +var createFilterFunction = (isIgnored) => { + const seen = /* @__PURE__ */ new Set(); + return (fastGlobResult) => { + const pathKey = import_node_path3.default.normalize(fastGlobResult.path ?? fastGlobResult); + if (seen.has(pathKey) || isIgnored && isIgnored(pathKey)) { + return false; + } + seen.add(pathKey); + return true; + }; +}; +var unionFastGlobResults = (results, filter) => results.flat().filter((fastGlobResult) => filter(fastGlobResult)); +var convertNegativePatterns = (patterns, options) => { + const tasks = []; + while (patterns.length > 0) { + const index = patterns.findIndex((pattern) => isNegativePattern(pattern)); + if (index === -1) { + tasks.push({ patterns, options }); + break; + } + const ignorePattern = patterns[index].slice(1); + for (const task of tasks) { + task.options.ignore.push(ignorePattern); + } + if (index !== 0) { + tasks.push({ + patterns: patterns.slice(0, index), + options: { + ...options, + ignore: [ + ...options.ignore, + ignorePattern + ] + } + }); + } + patterns = patterns.slice(index + 1); + } + return tasks; +}; +var normalizeExpandDirectoriesOption = (options, cwd) => ({ + ...cwd ? { cwd } : {}, + ...Array.isArray(options) ? { files: options } : options +}); +var generateTasks = async (patterns, options) => { + const globTasks = convertNegativePatterns(patterns, options); + const { cwd, expandDirectories } = options; + if (!expandDirectories) { + return globTasks; + } + const directoryToGlobOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd); + return Promise.all( + globTasks.map(async (task) => { + let { patterns: patterns2, options: options2 } = task; + [ + patterns2, + options2.ignore + ] = await Promise.all([ + directoryToGlob(patterns2, directoryToGlobOptions), + directoryToGlob(options2.ignore, { cwd }) + ]); + return { patterns: patterns2, options: options2 }; + }) + ); +}; +var generateTasksSync = (patterns, options) => { + const globTasks = convertNegativePatterns(patterns, options); + const { cwd, expandDirectories } = options; + if (!expandDirectories) { + return globTasks; + } + const directoryToGlobSyncOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd); + return globTasks.map((task) => { + let { patterns: patterns2, options: options2 } = task; + patterns2 = directoryToGlobSync(patterns2, directoryToGlobSyncOptions); + options2.ignore = directoryToGlobSync(options2.ignore, { cwd }); + return { patterns: patterns2, options: options2 }; + }); +}; +var globby = normalizeArguments(async (patterns, options) => { + const [ + tasks, + filter + ] = await Promise.all([ + generateTasks(patterns, options), + getFilter(options) + ]); + const results = await Promise.all(tasks.map((task) => (0, import_fast_glob2.default)(task.patterns, task.options))); + return unionFastGlobResults(results, filter); +}); +var globbySync = normalizeArgumentsSync((patterns, options) => { + const tasks = generateTasksSync(patterns, options); + const filter = getFilterSync(options); + const results = tasks.map((task) => import_fast_glob2.default.sync(task.patterns, task.options)); + return unionFastGlobResults(results, filter); +}); +var globbyStream = normalizeArgumentsSync((patterns, options) => { + const tasks = generateTasksSync(patterns, options); + const filter = getFilterSync(options); + const streams = tasks.map((task) => import_fast_glob2.default.stream(task.patterns, task.options)); + const stream2 = mergeStreams(streams).filter((fastGlobResult) => filter(fastGlobResult)); + return stream2; +}); +var isDynamicPattern = normalizeArgumentsSync( + (patterns, options) => patterns.some((pattern) => import_fast_glob2.default.isDynamicPattern(pattern, options)) +); +var generateGlobTasks = normalizeArguments(generateTasks); +var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync); +var { convertPathToPattern } = import_fast_glob2.default; + +// node_modules/del/index.js +var import_is_glob = __toESM(require_is_glob(), 1); + +// node_modules/is-path-cwd/index.js +var import_node_process4 = __toESM(require("node:process"), 1); +var import_node_path4 = __toESM(require("node:path"), 1); +function isPathCwd(path_) { + let cwd = import_node_process4.default.cwd(); + path_ = import_node_path4.default.resolve(path_); + if (import_node_process4.default.platform === "win32") { + cwd = cwd.toLowerCase(); + path_ = path_.toLowerCase(); + } + return path_ === cwd; +} + +// node_modules/del/node_modules/is-path-inside/index.js +var import_node_path5 = __toESM(require("node:path"), 1); +function isPathInside(childPath, parentPath) { + const relation = import_node_path5.default.relative(parentPath, childPath); + return Boolean( + relation && relation !== ".." && !relation.startsWith(`..${import_node_path5.default.sep}`) && relation !== import_node_path5.default.resolve(childPath) + ); +} + +// node_modules/p-map/index.js +async function pMap(iterable, mapper, { + concurrency = Number.POSITIVE_INFINITY, + stopOnError = true, + signal +} = {}) { + return new Promise((resolve_, reject_) => { + if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) { + throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`); + } + if (typeof mapper !== "function") { + throw new TypeError("Mapper function is required"); + } + if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) { + throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); + } + const result = []; + const errors = []; + const skippedIndexesMap = /* @__PURE__ */ new Map(); + let isRejected = false; + let isResolved = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const iterator = iterable[Symbol.iterator] === void 0 ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator](); + const signalListener = () => { + reject(signal.reason); + }; + const cleanup = () => { + signal?.removeEventListener("abort", signalListener); + }; + const resolve8 = (value) => { + resolve_(value); + cleanup(); + }; + const reject = (reason) => { + isRejected = true; + isResolved = true; + reject_(reason); + cleanup(); + }; + if (signal) { + if (signal.aborted) { + reject(signal.reason); + } + signal.addEventListener("abort", signalListener, { once: true }); + } + const next = async () => { + if (isResolved) { + return; + } + const nextItem = await iterator.next(); + const index = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0 && !isResolved) { + if (!stopOnError && errors.length > 0) { + reject(new AggregateError(errors)); + return; + } + isResolved = true; + if (skippedIndexesMap.size === 0) { + resolve8(result); + return; + } + const pureResult = []; + for (const [index2, value] of result.entries()) { + if (skippedIndexesMap.get(index2) === pMapSkip) { + continue; + } + pureResult.push(value); + } + resolve8(pureResult); + } + return; + } + resolvingCount++; + (async () => { + try { + const element = await nextItem.value; + if (isResolved) { + return; + } + const value = await mapper(element, index); + if (value === pMapSkip) { + skippedIndexesMap.set(index, value); + } + result[index] = value; + resolvingCount--; + await next(); + } catch (error2) { + if (stopOnError) { + reject(error2); + } else { + errors.push(error2); + resolvingCount--; + try { + await next(); + } catch (error3) { + reject(error3); + } + } + } + })(); + }; + (async () => { + for (let index = 0; index < concurrency; index++) { + try { + await next(); + } catch (error2) { + reject(error2); + break; + } + if (isIterableDone || isRejected) { + break; + } + } + })(); + }); +} +var pMapSkip = Symbol("skip"); + +// node_modules/del/index.js +function safeCheck(file, cwd) { + if (isPathCwd(file)) { + throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); + } + if (!isPathInside(file, cwd)) { + throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); + } +} +function normalizePatterns(patterns) { + patterns = Array.isArray(patterns) ? patterns : [patterns]; + patterns = patterns.map((pattern) => { + if (import_node_process5.default.platform === "win32" && (0, import_is_glob.default)(pattern) === false) { + return slash(pattern); + } + return pattern; + }); + return patterns; +} +async function deleteAsync(patterns, { force, dryRun, cwd = import_node_process5.default.cwd(), onProgress = () => { +}, ...options } = {}) { + options = { + expandDirectories: false, + onlyFiles: false, + followSymbolicLinks: false, + cwd, + ...options + }; + patterns = normalizePatterns(patterns); + const paths = await globby(patterns, options); + const files = paths.sort((a, b) => b.localeCompare(a)); + if (files.length === 0) { + onProgress({ + totalCount: 0, + deletedCount: 0, + percent: 1 + }); + } + let deletedCount = 0; + const mapper = async (file) => { + file = import_node_path6.default.resolve(cwd, file); + if (!force) { + safeCheck(file, cwd); + } + if (!dryRun) { + await import_promises5.default.rm(file, { recursive: true, force: true }); + } + deletedCount += 1; + onProgress({ + totalCount: files.length, + deletedCount, + percent: deletedCount / files.length, + path: file + }); + return file; + }; + const removedFiles = await pMap(files, mapper, options); + removedFiles.sort((a, b) => a.localeCompare(b)); + return removedFiles; +} // node_modules/get-folder-size/index.js -var import_node_path2 = require("node:path"); +var import_node_path7 = require("node:path"); async function getFolderSize(itemPath, options) { return await core(itemPath, options, { errors: true }); } getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); async function core(rootItemPath, options = {}, returnType = {}) { - const fs17 = options.fs || await import("node:fs/promises"); + const fs20 = options.fs || await import("node:fs/promises"); let folderSize = 0n; const foundInos = /* @__PURE__ */ new Set(); const errors = []; await processItem(rootItemPath); async function processItem(itemPath) { if (options.ignore?.test(itemPath)) return; - const stats = returnType.strict ? await fs17.lstat(itemPath, { bigint: true }) : await fs17.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + const stats = returnType.strict ? await fs20.lstat(itemPath, { bigint: true }) : await fs20.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); if (typeof stats !== "object") return; if (!foundInos.has(stats.ino)) { foundInos.add(stats.ino); folderSize += stats.size; } if (stats.isDirectory()) { - const directoryItems = returnType.strict ? await fs17.readdir(itemPath) : await fs17.readdir(itemPath).catch((error2) => errors.push(error2)); + const directoryItems = returnType.strict ? await fs20.readdir(itemPath) : await fs20.readdir(itemPath).catch((error2) => errors.push(error2)); if (typeof directoryItems !== "object") return; await Promise.all( directoryItems.map( - (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path7.join)(itemPath, directoryItem)) ) ); } @@ -129535,7 +127910,7 @@ function getToolNames(sarif) { return Object.keys(toolNames); } function getCodeQLDatabasePath(config, language) { - return path.resolve(config.dbLocation, language); + return path5.resolve(config.dbLocation, language); } function parseGitHubUrl(inputUrl) { const originalUrl = inputUrl; @@ -129637,9 +128012,9 @@ async function codeQlVersionAtLeast(codeql, requiredVersion) { } async function bundleDb(config, language, codeql, dbName) { const databasePath = getCodeQLDatabasePath(config, language); - const databaseBundlePath = path.resolve(config.dbLocation, `${dbName}.zip`); - if (fs.existsSync(databaseBundlePath)) { - await (0, import_del.default)(databaseBundlePath, { force: true }); + const databaseBundlePath = path5.resolve(config.dbLocation, `${dbName}.zip`); + if (fs4.existsSync(databaseBundlePath)) { + await deleteAsync(databaseBundlePath, { force: true }); } await codeql.databaseBundle(databasePath, databaseBundlePath, dbName); return databaseBundlePath; @@ -129668,7 +128043,7 @@ function getTestingEnvironment() { } function doesDirectoryExist(dirPath) { try { - const stats = fs.lstatSync(dirPath); + const stats = fs4.lstatSync(dirPath); return stats.isDirectory(); } catch { return false; @@ -129678,13 +128053,13 @@ function listFolder(dir) { if (!doesDirectoryExist(dir)) { return []; } - const entries = fs.readdirSync(dir, { withFileTypes: true }); + const entries = fs4.readdirSync(dir, { withFileTypes: true }); let files = []; for (const entry of entries) { if (entry.isFile()) { - files.push(path.resolve(dir, entry.name)); + files.push(path5.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - files = files.concat(listFolder(path.resolve(dir, entry.name))); + files = files.concat(listFolder(path5.resolve(dir, entry.name))); } } return files; @@ -129773,7 +128148,7 @@ async function checkSipEnablement(logger) { async function cleanUpGlob(glob2, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await (0, import_del.default)(glob2, { force: true }); + const deletedPaths = await deleteAsync(glob2, { force: true }); if (deletedPaths.length === 0) { logger.warning( `Failed to clean up ${name}: no files found matching ${glob2}.` @@ -129827,17 +128202,17 @@ function getWorkflowEventName() { } function isRunningLocalAction() { const relativeScriptPath = getRelativeScriptPath(); - return relativeScriptPath.startsWith("..") || path2.isAbsolute(relativeScriptPath); + return relativeScriptPath.startsWith("..") || path6.isAbsolute(relativeScriptPath); } function getRelativeScriptPath() { const runnerTemp = getRequiredEnvParam("RUNNER_TEMP"); - const actionsDirectory = path2.join(path2.dirname(runnerTemp), "_actions"); - return path2.relative(actionsDirectory, __filename); + const actionsDirectory = path6.join(path6.dirname(runnerTemp), "_actions"); + return path6.relative(actionsDirectory, __filename); } function getWorkflowEvent() { const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH"); try { - return JSON.parse(fs2.readFileSync(eventJsonFile, "utf-8")); + return JSON.parse(fs5.readFileSync(eventJsonFile, "utf-8")); } catch (e) { throw new Error( `Unable to read workflow event JSON from ${eventJsonFile}: ${e}` @@ -129847,26 +128222,26 @@ function getWorkflowEvent() { async function printDebugLogs(config) { for (const language of config.languages) { const databaseDirectory = getCodeQLDatabasePath(config, language); - const logsDirectory = path2.join(databaseDirectory, "log"); + const logsDirectory = path6.join(databaseDirectory, "log"); if (!doesDirectoryExist(logsDirectory)) { core4.info(`Directory ${logsDirectory} does not exist.`); continue; } const walkLogFiles = (dir) => { - const entries = fs2.readdirSync(dir, { withFileTypes: true }); + const entries = fs5.readdirSync(dir, { withFileTypes: true }); if (entries.length === 0) { core4.info(`No debug logs found at directory ${logsDirectory}.`); } for (const entry of entries) { if (entry.isFile()) { - const absolutePath = path2.resolve(dir, entry.name); + const absolutePath = path6.resolve(dir, entry.name); core4.startGroup( `CodeQL Debug Logs - ${language} - ${entry.name} from file at path ${absolutePath}` ); - process.stdout.write(fs2.readFileSync(absolutePath)); + process.stdout.write(fs5.readFileSync(absolutePath)); core4.endGroup(); } else if (entry.isDirectory()) { - walkLogFiles(path2.resolve(dir, entry.name)); + walkLogFiles(path6.resolve(dir, entry.name)); } } }; @@ -130127,8 +128502,8 @@ function wrapApiConfigurationError(e) { } // src/codeql.ts -var fs10 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var fs13 = __toESM(require("fs")); +var path13 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -130370,8 +128745,8 @@ function wrapCliConfigurationError(cliError) { } // src/config-utils.ts -var fs6 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var fs9 = __toESM(require("fs")); +var path10 = __toESM(require("path")); var semver4 = __toESM(require_semver2()); // src/analyses.ts @@ -130386,12 +128761,12 @@ var supportedAnalysisKinds = new Set(Object.values(AnalysisKind)); var core6 = __toESM(require_core()); // src/diff-informed-analysis-utils.ts -var fs5 = __toESM(require("fs")); -var path5 = __toESM(require("path")); +var fs8 = __toESM(require("fs")); +var path9 = __toESM(require("path")); // src/feature-flags.ts -var fs4 = __toESM(require("fs")); -var path4 = __toESM(require("path")); +var fs7 = __toESM(require("fs")); +var path8 = __toESM(require("path")); var semver3 = __toESM(require_semver2()); // src/defaults.json @@ -130399,8 +128774,8 @@ var bundleVersion = "codeql-bundle-v2.22.4"; var cliVersion = "2.22.4"; // src/overlay-database-utils.ts -var fs3 = __toESM(require("fs")); -var path3 = __toESM(require("path")); +var fs6 = __toESM(require("fs")); +var path7 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts @@ -130526,8 +128901,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path15 = decodeGitFilePath(match[2]); - fileOidMap[path15] = oid; + const path19 = decodeGitFilePath(match[2]); + fileOidMap[path19] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -130633,12 +129008,12 @@ async function writeBaseDatabaseOidsFile(config, sourceRoot) { const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOidsJson = JSON.stringify(gitFileOids); const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - await fs3.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); + await fs6.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); } async function readBaseDatabaseOidsFile(config, logger) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); try { - const contents = await fs3.promises.readFile( + const contents = await fs6.promises.readFile( baseDatabaseOidsFilePath, "utf-8" ); @@ -130651,7 +129026,7 @@ async function readBaseDatabaseOidsFile(config, logger) { } } function getBaseDatabaseOidsFilePath(config) { - return path3.join(config.dbLocation, "base-database-oids.json"); + return path7.join(config.dbLocation, "base-database-oids.json"); } async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); @@ -130661,14 +129036,14 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path3.join( + const overlayChangesFile = path7.join( getTemporaryDirectory(), "overlay-changes.json" ); logger.debug( `Writing overlay changed files to ${overlayChangesFile}: ${changedFilesJson}` ); - await fs3.promises.writeFile(overlayChangesFile, changedFilesJson); + await fs6.promises.writeFile(overlayChangesFile, changedFilesJson); return overlayChangesFile; } function computeChangedFiles(baseFileOids, overlayFileOids) { @@ -130865,7 +129240,7 @@ var Features = class { this.gitHubFeatureFlags = new GitHubFeatureFlags( gitHubVersion, repositoryNwo, - path4.join(tempDir, FEATURE_FLAGS_FILE_NAME), + path8.join(tempDir, FEATURE_FLAGS_FILE_NAME), logger ); } @@ -131044,12 +129419,12 @@ var GitHubFeatureFlags = class { } async readLocalFlags() { try { - if (fs4.existsSync(this.featureFlagsFile)) { + if (fs7.existsSync(this.featureFlagsFile)) { this.logger.debug( `Loading feature flags from ${this.featureFlagsFile}` ); return JSON.parse( - fs4.readFileSync(this.featureFlagsFile, "utf8") + fs7.readFileSync(this.featureFlagsFile, "utf8") ); } } catch (e) { @@ -131062,7 +129437,7 @@ var GitHubFeatureFlags = class { async writeLocalFlags(flags) { try { this.logger.debug(`Writing feature flags to ${this.featureFlagsFile}`); - fs4.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); + fs7.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); } catch (e) { this.logger.warning( `Error writing cached feature flags file ${this.featureFlagsFile}: ${e}.` @@ -131125,15 +129500,15 @@ var GitHubFeatureFlags = class { // src/diff-informed-analysis-utils.ts function getDiffRangesJsonFilePath() { - return path5.join(getTemporaryDirectory(), "pr-diff-range.json"); + return path9.join(getTemporaryDirectory(), "pr-diff-range.json"); } function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); - if (!fs5.existsSync(jsonFilePath)) { + if (!fs8.existsSync(jsonFilePath)) { logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`); return void 0; } - const jsonContents = fs5.readFileSync(jsonFilePath, "utf8"); + const jsonContents = fs8.readFileSync(jsonFilePath, "utf8"); logger.debug( `Read pr-diff-range JSON file from ${jsonFilePath}: ${jsonContents}` @@ -131186,14 +129561,14 @@ var PACK_IDENTIFIER_PATTERN = (function() { return new RegExp(`^${component}/${component}$`); })(); function getPathToParsedConfigFile(tempDir) { - return path6.join(tempDir, "config"); + return path10.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); - if (!fs6.existsSync(configFile)) { + if (!fs9.existsSync(configFile)) { return void 0; } - const configString = fs6.readFileSync(configFile, "utf8"); + const configString = fs9.readFileSync(configFile, "utf8"); logger.debug("Loaded config:"); logger.debug(configString); return JSON.parse(configString); @@ -131246,8 +129621,8 @@ function generateCodeScanningConfig(originalUserInput, augmentationProperties) { } // src/setup-codeql.ts -var fs9 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var fs12 = __toESM(require("fs")); +var path12 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver7 = __toESM(require_semver2()); @@ -131305,7 +129680,7 @@ var v4_default = v4; // src/tar.ts var import_child_process = require("child_process"); -var fs7 = __toESM(require("fs")); +var fs10 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -131378,7 +129753,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs7.mkdirSync(dest, { recursive: true }); + fs10.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -131462,9 +129837,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs8 = __toESM(require("fs")); +var fs11 = __toESM(require("fs")); var os = __toESM(require("os")); -var path7 = __toESM(require("path")); +var path11 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -131569,7 +129944,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs8.mkdirSync(dest, { recursive: true }); + fs11.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -131597,7 +129972,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path7.join( + return path11.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver6.clean(version) || version, @@ -131606,7 +129981,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs8.writeFileSync(markerFilePath, ""); + fs11.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url2) { @@ -131737,7 +130112,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs9.existsSync(path8.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs12.existsSync(path12.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -132070,7 +130445,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path8.join(tempDir, v4_default()); + return path12.join(tempDir, v4_default()); } // src/tracer-config.ts @@ -132113,7 +130488,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path9.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path13.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -132174,12 +130549,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path9.join( + const tracingConfigPath = path13.join( extractorPath, "tools", "tracing-config.lua" ); - return fs10.existsSync(tracingConfigPath); + return fs13.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -132250,7 +130625,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path9.join( + const autobuildCmd = path13.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -132638,7 +131013,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs10.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs13.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -132661,7 +131036,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path9.resolve(config.tempDir, "user-config.yaml"); + return path13.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -132682,33 +131057,31 @@ async function getJobRunUuidSarifOptions(codeql) { } // src/debug-artifacts.ts -var fs12 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var fs15 = __toESM(require("fs")); +var path15 = __toESM(require("path")); var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); -var import_del3 = __toESM(require_del()); // src/analyze.ts -var fs11 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var fs14 = __toESM(require("fs")); +var path14 = __toESM(require("path")); var io5 = __toESM(require_io()); -var import_del2 = __toESM(require_del()); // src/autobuild.ts var core11 = __toESM(require_core()); // src/dependency-caching.ts var actionsCache3 = __toESM(require_cache3()); -var glob = __toESM(require_glob4()); +var glob = __toESM(require_glob3()); // src/analyze.ts function dbIsFinalized(config, language, logger) { const dbPath = getCodeQLDatabasePath(config, language); try { const dbInfo = load( - fs11.readFileSync(path10.resolve(dbPath, "codeql-database.yml"), "utf8") + fs14.readFileSync(path14.resolve(dbPath, "codeql-database.yml"), "utf8") ); return !("inProgress" in dbInfo); } catch { @@ -132726,17 +131099,17 @@ function sanitizeArtifactName(name) { function tryPrepareSarifDebugArtifact(config, language, logger) { try { const analyzeActionOutputDir = process.env["CODEQL_ACTION_SARIF_RESULTS_OUTPUT_DIR" /* SARIF_RESULTS_OUTPUT_DIR */]; - if (analyzeActionOutputDir !== void 0 && fs12.existsSync(analyzeActionOutputDir) && fs12.lstatSync(analyzeActionOutputDir).isDirectory()) { - const sarifFile = path11.resolve( + if (analyzeActionOutputDir !== void 0 && fs15.existsSync(analyzeActionOutputDir) && fs15.lstatSync(analyzeActionOutputDir).isDirectory()) { + const sarifFile = path15.resolve( analyzeActionOutputDir, `${language}.sarif` ); - if (fs12.existsSync(sarifFile)) { - const sarifInDbLocation = path11.resolve( + if (fs15.existsSync(sarifFile)) { + const sarifInDbLocation = path15.resolve( config.dbLocation, `${language}.sarif` ); - fs12.copyFileSync(sarifFile, sarifInDbLocation); + fs15.copyFileSync(sarifFile, sarifInDbLocation); return sarifInDbLocation; } } @@ -132787,13 +131160,13 @@ async function tryUploadAllAvailableDebugArtifacts(codeql, config, logger, codeQ } logger.info("Preparing database logs debug artifact..."); const databaseDirectory = getCodeQLDatabasePath(config, language); - const logsDirectory = path11.resolve(databaseDirectory, "log"); + const logsDirectory = path15.resolve(databaseDirectory, "log"); if (doesDirectoryExist(logsDirectory)) { filesToUpload.push(...listFolder(logsDirectory)); logger.info("Database logs debug artifact ready for upload."); } logger.info("Preparing database cluster logs debug artifact..."); - const multiLanguageTracingLogsDirectory = path11.resolve( + const multiLanguageTracingLogsDirectory = path15.resolve( config.dbLocation, "log" ); @@ -132867,8 +131240,8 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV try { await artifactUploader.uploadArtifact( sanitizeArtifactName(`${artifactName}${suffix}`), - toUpload.map((file) => path11.normalize(file)), - path11.normalize(rootDir), + toUpload.map((file) => path15.normalize(file)), + path15.normalize(rootDir), { // ensure we don't keep the debug artifacts around for too long since they can be large. retentionDays: 7 @@ -132895,17 +131268,17 @@ async function getArtifactUploaderClient(logger, ghVariant) { } async function createPartialDatabaseBundle(config, language) { const databasePath = getCodeQLDatabasePath(config, language); - const databaseBundlePath = path11.resolve( + const databaseBundlePath = path15.resolve( config.dbLocation, `${config.debugDatabaseName}-${language}-partial.zip` ); core12.info( `${config.debugDatabaseName}-${language} is not finalized. Uploading partial database bundle at ${databaseBundlePath}...` ); - if (fs12.existsSync(databaseBundlePath)) { - await (0, import_del3.default)(databaseBundlePath, { force: true }); + if (fs15.existsSync(databaseBundlePath)) { + await deleteAsync(databaseBundlePath, { force: true }); } - const output = fs12.createWriteStream(databaseBundlePath); + const output = fs15.createWriteStream(databaseBundlePath); const zip = (0, import_archiver.default)("zip"); zip.on("error", (err) => { throw err; @@ -132931,7 +131304,7 @@ async function createDatabaseBundleCli(codeql, config, language) { } // src/init-action-post-helper.ts -var fs16 = __toESM(require("fs")); +var fs19 = __toESM(require("fs")); var core16 = __toESM(require_core()); var github2 = __toESM(require_github()); @@ -133132,15 +131505,15 @@ async function sendStatusReport(statusReport) { } // src/upload-lib.ts -var fs14 = __toESM(require("fs")); -var path13 = __toESM(require("path")); +var fs17 = __toESM(require("fs")); +var path17 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core14 = __toESM(require_core()); var jsonschema = __toESM(require_lib5()); // src/fingerprints.ts -var fs13 = __toESM(require("fs")); +var fs16 = __toESM(require("fs")); var import_path = __toESM(require("path")); // node_modules/long/index.js @@ -134128,7 +132501,7 @@ async function hash(callback, filepath) { } updateHash(current); }; - const readStream = fs13.createReadStream(filepath, "utf8"); + const readStream = fs16.createReadStream(filepath, "utf8"); for await (const data of readStream) { for (let i = 0; i < data.length; ++i) { processCharacter(data.charCodeAt(i)); @@ -134203,11 +132576,11 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { if (!import_path.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } - if (!fs13.existsSync(uri)) { + if (!fs16.existsSync(uri)) { logger.debug(`Unable to compute fingerprint for non-existent file: ${uri}`); return void 0; } - if (fs13.statSync(uri).isDirectory()) { + if (fs16.statSync(uri).isDirectory()) { logger.debug(`Unable to compute fingerprint for directory: ${uri}`); return void 0; } @@ -134304,7 +132677,7 @@ function combineSarifFiles(sarifFiles, logger) { for (const sarifFile of sarifFiles) { logger.debug(`Loading SARIF file: ${sarifFile}`); const sarifObject = JSON.parse( - fs14.readFileSync(sarifFile, "utf8") + fs17.readFileSync(sarifFile, "utf8") ); if (combinedSarif.version === null) { combinedSarif.version = sarifObject.version; @@ -134376,7 +132749,7 @@ async function shouldDisableCombineSarifFiles(sarifObjects, githubVersion) { async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger) { logger.info("Combining SARIF files using the CodeQL CLI"); const sarifObjects = sarifFiles.map((sarifFile) => { - return JSON.parse(fs14.readFileSync(sarifFile, "utf8")); + return JSON.parse(fs17.readFileSync(sarifFile, "utf8")); }); const deprecationWarningMessage = gitHubVersion.type === 1 /* GHES */ ? "and will be removed in GitHub Enterprise Server 3.18" : "and will be removed in July 2025"; const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-from-a-single-upload"; @@ -134446,14 +132819,14 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo } return combineSarifFiles(sarifFiles, logger); } - const baseTempDir = path13.resolve(tempDir, "combined-sarif"); - fs14.mkdirSync(baseTempDir, { recursive: true }); - const outputDirectory = fs14.mkdtempSync(path13.resolve(baseTempDir, "output-")); - const outputFile = path13.resolve(outputDirectory, "combined-sarif.sarif"); + const baseTempDir = path17.resolve(tempDir, "combined-sarif"); + fs17.mkdirSync(baseTempDir, { recursive: true }); + const outputDirectory = fs17.mkdtempSync(path17.resolve(baseTempDir, "output-")); + const outputFile = path17.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); - return JSON.parse(fs14.readFileSync(outputFile, "utf8")); + return JSON.parse(fs17.readFileSync(outputFile, "utf8")); } function populateRunAutomationDetails(sarif, category, analysis_key, environment) { const automationID = getAutomationID(category, analysis_key, environment); @@ -134482,7 +132855,7 @@ function getAutomationID(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, target) { logger.info("Uploading results"); if (isInTestMode()) { - const payloadSaveFile = path13.join( + const payloadSaveFile = path17.join( getTemporaryDirectory(), "payload.json" ); @@ -134490,7 +132863,7 @@ async function uploadPayload(payload, repositoryNwo, logger, target) { `In test mode. Results are not uploaded. Saving to ${payloadSaveFile}` ); logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`); - fs14.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); + fs17.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); return "test-mode-sarif-id"; } const client = getApiClient(); @@ -134523,12 +132896,12 @@ async function uploadPayload(payload, repositoryNwo, logger, target) { function findSarifFilesInDir(sarifPath, isSarif) { const sarifFiles = []; const walkSarifFiles = (dir) => { - const entries = fs14.readdirSync(dir, { withFileTypes: true }); + const entries = fs17.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path13.resolve(dir, entry.name)); + sarifFiles.push(path17.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path13.resolve(dir, entry.name)); + walkSarifFiles(path17.resolve(dir, entry.name)); } } }; @@ -134536,11 +132909,11 @@ function findSarifFilesInDir(sarifPath, isSarif) { return sarifFiles; } function getSarifFilePaths(sarifPath, isSarif) { - if (!fs14.existsSync(sarifPath)) { + if (!fs17.existsSync(sarifPath)) { throw new ConfigurationError(`Path does not exist: ${sarifPath}`); } let sarifFiles; - if (fs14.lstatSync(sarifPath).isDirectory()) { + if (fs17.lstatSync(sarifPath).isDirectory()) { sarifFiles = findSarifFilesInDir(sarifPath, isSarif); if (sarifFiles.length === 0) { throw new ConfigurationError( @@ -134570,7 +132943,7 @@ function countResultsInSarif(sarif) { } function readSarifFile(sarifFilePath) { try { - return JSON.parse(fs14.readFileSync(sarifFilePath, "utf8")); + return JSON.parse(fs17.readFileSync(sarifFilePath, "utf8")); } catch (e) { throw new InvalidSarifUploadError( `Invalid SARIF. JSON syntax error: ${getErrorMessage(e)}` @@ -134639,7 +133012,7 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo payloadObj.base_sha = mergeBaseCommitOid; } else if (process.env.GITHUB_EVENT_PATH) { const githubEvent = JSON.parse( - fs14.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8") + fs17.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8") ); payloadObj.base_ref = `refs/heads/${githubEvent.pull_request.base.ref}`; payloadObj.base_sha = githubEvent.pull_request.base.sha; @@ -134889,7 +133262,7 @@ function filterAlertsByDiffRange(logger, sarif) { if (!locationUri || locationStartLine === void 0) { return false; } - const locationPath = path13.join(checkoutPath, locationUri).replaceAll(path13.sep, "/"); + const locationPath = path17.join(checkoutPath, locationUri).replaceAll(path17.sep, "/"); return diffRanges.some( (range) => range.path === locationPath && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0) ); @@ -134901,8 +133274,8 @@ function filterAlertsByDiffRange(logger, sarif) { } // src/workflow.ts -var fs15 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var fs18 = __toESM(require("fs")); +var path18 = __toESM(require("path")); var import_zlib2 = __toESM(require("zlib")); var core15 = __toESM(require_core()); function toCodedErrors(errors) { @@ -134929,15 +133302,15 @@ async function getWorkflow(logger) { ); } const workflowPath = await getWorkflowAbsolutePath(logger); - return load(fs15.readFileSync(workflowPath, "utf-8")); + return load(fs18.readFileSync(workflowPath, "utf-8")); } async function getWorkflowAbsolutePath(logger) { const relativePath = await getWorkflowRelativePath(); - const absolutePath = path14.join( + const absolutePath = path18.join( getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath ); - if (fs15.existsSync(absolutePath)) { + if (fs18.existsSync(absolutePath)) { logger.debug( `Derived the following absolute path for the currently executing workflow: ${absolutePath}.` ); @@ -135150,7 +133523,7 @@ async function run(uploadAllAvailableDebugArtifacts, printDebugLogs2, codeql, co } if (isSelfHostedRunner()) { try { - fs16.rmSync(config.dbLocation, { + fs19.rmSync(config.dbLocation, { recursive: true, force: true, maxRetries: 3 diff --git a/lib/init-action.js b/lib/init-action.js index a5d822e2c..6fa09ea52 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -185,7 +185,7 @@ var require_file_command = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; var crypto = __importStar4(require("crypto")); - var fs15 = __importStar4(require("fs")); + var fs18 = __importStar4(require("fs")); var os5 = __importStar4(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -193,10 +193,10 @@ var require_file_command = __commonJS({ if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs15.existsSync(filePath)) { + if (!fs18.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs15.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os5.EOL}`, { + fs18.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os5.EOL}`, { encoding: "utf8" }); } @@ -999,14 +999,14 @@ var require_util = __commonJS({ } const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol}//${url.hostname}:${port}`; - let path15 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path19 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path15 && !path15.startsWith("/")) { - path15 = `/${path15}`; + if (path19 && !path19.startsWith("/")) { + path19 = `/${path19}`; } - url = new URL(origin + path15); + url = new URL(origin + path19); } return url; } @@ -2620,20 +2620,20 @@ var require_parseParams = __commonJS({ var require_basename = __commonJS({ "node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) { "use strict"; - module2.exports = function basename(path15) { - if (typeof path15 !== "string") { + module2.exports = function basename(path19) { + if (typeof path19 !== "string") { return ""; } - for (var i = path15.length - 1; i >= 0; --i) { - switch (path15.charCodeAt(i)) { + for (var i = path19.length - 1; i >= 0; --i) { + switch (path19.charCodeAt(i)) { case 47: // '/' case 92: - path15 = path15.slice(i + 1); - return path15 === ".." || path15 === "." ? "" : path15; + path19 = path19.slice(i + 1); + return path19 === ".." || path19 === "." ? "" : path19; } } - return path15 === ".." || path15 === "." ? "" : path15; + return path19 === ".." || path19 === "." ? "" : path19; }; } }); @@ -2673,8 +2673,8 @@ var require_multipart = __commonJS({ } } function checkFinished() { - if (nends === 0 && finished && !boy._done) { - finished = false; + if (nends === 0 && finished2 && !boy._done) { + finished2 = false; self2.end(); } } @@ -2693,7 +2693,7 @@ var require_multipart = __commonJS({ let nends = 0; let curFile; let curField; - let finished = false; + let finished2 = false; this._needDrain = false; this._pause = false; this._cb = void 0; @@ -2879,7 +2879,7 @@ var require_multipart = __commonJS({ }).on("error", function(err) { boy.emit("error", err); }).on("finish", function() { - finished = true; + finished2 = true; checkFinished(); }); } @@ -5663,7 +5663,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path15, + path: path19, method, body, headers, @@ -5677,11 +5677,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path15 !== "string") { + if (typeof path19 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path15[0] !== "/" && !(path15.startsWith("http://") || path15.startsWith("https://")) && method !== "CONNECT") { + } else if (path19[0] !== "/" && !(path19.startsWith("http://") || path19.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path15) !== null) { + } else if (invalidPathRegex.exec(path19) !== null) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -5744,7 +5744,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? util.buildURL(path15, query) : path15; + this.path = query ? util.buildURL(path19, query) : path19; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -6752,9 +6752,9 @@ var require_RedirectHandler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path15 = search ? `${pathname}${search}` : pathname; + const path19 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path15; + this.opts.path = path19; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -7994,7 +7994,7 @@ var require_client = __commonJS({ writeH2(client, client[kHTTP2Session], request); return; } - const { body, method, path: path15, host, upgrade, headers, blocking, reset } = request; + const { body, method, path: path19, host, upgrade, headers, blocking, reset } = request; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); @@ -8044,7 +8044,7 @@ var require_client = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path15} HTTP/1.1\r + let header = `${method} ${path19} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -8107,7 +8107,7 @@ upgrade: ${upgrade}\r return true; } function writeH2(client, session, request) { - const { body, method, path: path15, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + const { body, method, path: path19, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; @@ -8150,7 +8150,7 @@ upgrade: ${upgrade}\r }); return true; } - headers[HTTP2_HEADER_PATH] = path15; + headers[HTTP2_HEADER_PATH] = path19; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -8310,10 +8310,10 @@ upgrade: ${upgrade}\r }); return; } - let finished = false; + let finished2 = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { - if (finished) { + if (finished2) { return; } try { @@ -8325,7 +8325,7 @@ upgrade: ${upgrade}\r } }; const onDrain = function() { - if (finished) { + if (finished2) { return; } if (body.resume) { @@ -8333,17 +8333,17 @@ upgrade: ${upgrade}\r } }; const onAbort = function() { - if (finished) { + if (finished2) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); }; const onFinished = function(err) { - if (finished) { + if (finished2) { return; } - finished = true; + finished2 = true; assert(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); socket.off("drain", onDrain).off("error", onFinished); body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); @@ -9217,7 +9217,7 @@ var require_readable = __commonJS({ var kBody = Symbol("kBody"); var kAbort = Symbol("abort"); var kContentType = Symbol("kContentType"); - var noop = () => { + var noop2 = () => { }; module2.exports = class BodyReadable extends Readable2 { constructor({ @@ -9339,7 +9339,7 @@ var require_readable = __commonJS({ return new Promise((resolve9, reject) => { const signalListenerCleanup = signal ? util.addAbortListener(signal, () => { this.destroy(); - }) : noop; + }) : noop2; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { @@ -9347,7 +9347,7 @@ var require_readable = __commonJS({ } else { resolve9(null); } - }).on("error", noop).on("data", function(chunk) { + }).on("error", noop2).on("data", function(chunk) { limit -= chunk.length; if (limit <= 0) { this.destroy(); @@ -9704,7 +9704,7 @@ var require_api_request = __commonJS({ var require_api_stream = __commonJS({ "node_modules/undici/lib/api/api-stream.js"(exports2, module2) { "use strict"; - var { finished, PassThrough } = require("stream"); + var { finished: finished2, PassThrough } = require("stream"); var { InvalidArgumentError, InvalidReturnValueError, @@ -9802,7 +9802,7 @@ var require_api_stream = __commonJS({ if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { throw new InvalidReturnValueError("expected Writable"); } - finished(res, { readable: false }, (err) => { + finished2(res, { readable: false }, (err) => { const { callback: callback2, res: res2, opaque: opaque2, trailers, abort } = this; this.res = null; if (err || !res2.readable) { @@ -10390,20 +10390,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path15) { - if (typeof path15 !== "string") { - return path15; + function safeUrl(path19) { + if (typeof path19 !== "string") { + return path19; } - const pathSegments = path15.split("?"); + const pathSegments = path19.split("?"); if (pathSegments.length !== 2) { - return path15; + return path19; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path15, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path15); + function matchKey(mockDispatch2, { path: path19, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path19); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10421,7 +10421,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path15 }) => matchValue(safeUrl(path15), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path19 }) => matchValue(safeUrl(path19), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10458,9 +10458,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path15, method, body, headers, query } = opts; + const { path: path19, method, body, headers, query } = opts; return { - path: path15, + path: path19, method, body, headers, @@ -10754,7 +10754,7 @@ var require_mock_interceptor = __commonJS({ var require_mock_client = __commonJS({ "node_modules/undici/lib/mock/mock-client.js"(exports2, module2) { "use strict"; - var { promisify: promisify2 } = require("util"); + var { promisify: promisify3 } = require("util"); var Client = require_client(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10794,7 +10794,7 @@ var require_mock_client = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify2(this[kOriginalClose])(); + await promisify3(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10807,7 +10807,7 @@ var require_mock_client = __commonJS({ var require_mock_pool = __commonJS({ "node_modules/undici/lib/mock/mock-pool.js"(exports2, module2) { "use strict"; - var { promisify: promisify2 } = require("util"); + var { promisify: promisify3 } = require("util"); var Pool = require_pool(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10847,7 +10847,7 @@ var require_mock_pool = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify2(this[kOriginalClose])(); + await promisify3(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10909,10 +10909,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path15, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path19, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path15, + Path: path19, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -15532,8 +15532,8 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path15) { - for (const char of path15) { + function validateCookiePath(path19) { + for (const char of path19) { const code = char.charCodeAt(0); if (code < 33 || char === ";") { throw new Error("Invalid cookie path"); @@ -17213,11 +17213,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path15 = opts.path; + let path19 = opts.path; if (!opts.path.startsWith("/")) { - path15 = `/${path15}`; + path19 = `/${path19}`; } - url = new URL(util.parseOrigin(url).origin + path15); + url = new URL(util.parseOrigin(url).origin + path19); } else { if (!opts) { opts = typeof url === "object" ? url : {}; @@ -18440,7 +18440,7 @@ var require_path_utils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -18450,7 +18450,7 @@ var require_path_utils = __commonJS({ } exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path15.sep); + return pth.replace(/[/\\]/g, path19.sep); } exports2.toPlatformPath = toPlatformPath; } @@ -18513,12 +18513,12 @@ var require_io_util = __commonJS({ var _a; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs15 = __importStar4(require("fs")); - var path15 = __importStar4(require("path")); - _a = fs15.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + var fs18 = __importStar4(require("fs")); + var path19 = __importStar4(require("path")); + _a = fs18.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs15.constants.O_RDONLY; + exports2.READONLY = fs18.constants.O_RDONLY; function exists(fsPath) { return __awaiter4(this, void 0, void 0, function* () { try { @@ -18533,13 +18533,13 @@ var require_io_util = __commonJS({ }); } exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { + function isDirectory2(fsPath, useStat = false) { return __awaiter4(this, void 0, void 0, function* () { const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; + exports2.isDirectory = isDirectory2; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18563,7 +18563,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path15.extname(filePath).toUpperCase(); + const upperExt = path19.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -18587,11 +18587,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path15.dirname(filePath); - const upperName = path15.basename(filePath).toUpperCase(); + const directory = path19.dirname(filePath); + const upperName = path19.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path15.join(directory, actualName); + filePath = path19.join(directory, actualName); break; } } @@ -18686,7 +18686,7 @@ var require_io = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; var assert_1 = require("assert"); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var ioUtil = __importStar4(require_io_util()); function cp(source, dest, options = {}) { return __awaiter4(this, void 0, void 0, function* () { @@ -18695,7 +18695,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path15.join(dest, path15.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path19.join(dest, path19.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -18707,7 +18707,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path15.relative(source, newDest) === "") { + if (path19.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); @@ -18720,7 +18720,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path15.join(dest, path15.basename(source)); + dest = path19.join(dest, path19.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -18731,7 +18731,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path15.dirname(dest)); + yield mkdirP(path19.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -18794,7 +18794,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path15.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path19.delimiter)) { if (extension) { extensions.push(extension); } @@ -18807,12 +18807,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path15.sep)) { + if (tool.includes(path19.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path15.delimiter)) { + for (const p of process.env.PATH.split(path19.delimiter)) { if (p) { directories.push(p); } @@ -18820,7 +18820,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path15.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path19.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -18936,7 +18936,7 @@ var require_toolrunner = __commonJS({ var os5 = __importStar4(require("os")); var events = __importStar4(require("events")); var child = __importStar4(require("child_process")); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var io7 = __importStar4(require_io()); var ioUtil = __importStar4(require_io_util()); var timers_1 = require("timers"); @@ -19151,7 +19151,7 @@ var require_toolrunner = __commonJS({ exec() { return __awaiter4(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path15.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path19.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io7.which(this.toolPath, true); return new Promise((resolve9, reject) => __awaiter4(this, void 0, void 0, function* () { @@ -19651,7 +19651,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os5 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -19679,7 +19679,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path15.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path19.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath2; function getInput2(name, options) { @@ -21743,8 +21743,8 @@ var require_context = __commonJS({ if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path15 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path15} does not exist${os_1.EOL}`); + const path19 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path19} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -22437,12 +22437,12 @@ var require_wrappy = __commonJS({ var require_once = __commonJS({ "node_modules/once/once.js"(exports2, module2) { var wrappy = require_wrappy(); - module2.exports = wrappy(once); + module2.exports = wrappy(once2); module2.exports.strict = wrappy(onceStrict); - once.proto = once(function() { + once2.proto = once2(function() { Object.defineProperty(Function.prototype, "once", { value: function() { - return once(this); + return once2(this); }, configurable: true }); @@ -22453,7 +22453,7 @@ var require_once = __commonJS({ configurable: true }); }); - function once(fn) { + function once2(fn) { var f = function() { if (f.called) return f.value; f.called = true; @@ -23667,7 +23667,7 @@ var require_dist_node11 = __commonJS({ var import_graphql = require_dist_node9(); var import_auth_token = require_dist_node10(); var VERSION = "5.2.0"; - var noop = () => { + var noop2 = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); @@ -23746,8 +23746,8 @@ var require_dist_node11 = __commonJS({ this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); this.log = Object.assign( { - debug: noop, - info: noop, + debug: noop2, + info: noop2, warn: consoleWarn, error: consoleError }, @@ -26433,135 +26433,6 @@ var require_github = __commonJS({ } }); -// node_modules/array-union/index.js -var require_array_union = __commonJS({ - "node_modules/array-union/index.js"(exports2, module2) { - "use strict"; - module2.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; - }; - } -}); - -// node_modules/merge2/index.js -var require_merge2 = __commonJS({ - "node_modules/merge2/index.js"(exports2, module2) { - "use strict"; - var Stream = require("stream"); - var PassThrough = Stream.PassThrough; - var slice = Array.prototype.slice; - module2.exports = merge2; - function merge2() { - const streamsQueue = []; - const args = slice.call(arguments); - let merging = false; - let options = args[args.length - 1]; - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop(); - } else { - options = {}; - } - const doEnd = options.end !== false; - const doPipeError = options.pipeError === true; - if (options.objectMode == null) { - options.objectMode = true; - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024; - } - const mergedStream = PassThrough(options); - function addStream() { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)); - } - mergeStream(); - return this; - } - function mergeStream() { - if (merging) { - return; - } - merging = true; - let streams = streamsQueue.shift(); - if (!streams) { - process.nextTick(endStream); - return; - } - if (!Array.isArray(streams)) { - streams = [streams]; - } - let pipesCount = streams.length + 1; - function next() { - if (--pipesCount > 0) { - return; - } - merging = false; - mergeStream(); - } - function pipe(stream2) { - function onend() { - stream2.removeListener("merge2UnpipeEnd", onend); - stream2.removeListener("end", onend); - if (doPipeError) { - stream2.removeListener("error", onerror); - } - next(); - } - function onerror(err) { - mergedStream.emit("error", err); - } - if (stream2._readableState.endEmitted) { - return next(); - } - stream2.on("merge2UnpipeEnd", onend); - stream2.on("end", onend); - if (doPipeError) { - stream2.on("error", onerror); - } - stream2.pipe(mergedStream, { end: false }); - stream2.resume(); - } - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]); - } - next(); - } - function endStream() { - merging = false; - mergedStream.emit("queueDrain"); - if (doEnd) { - mergedStream.end(); - } - } - mergedStream.setMaxListeners(0); - mergedStream.add = addStream; - mergedStream.on("unpipe", function(stream2) { - stream2.emit("merge2UnpipeEnd"); - }); - if (args.length) { - addStream.apply(null, args); - } - return mergedStream; - } - function pauseStreams(streams, options) { - if (!Array.isArray(streams)) { - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)); - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error("Only readable stream can be merged."); - } - streams.pause(); - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options); - } - } - return streams; - } - } -}); - // node_modules/fast-glob/out/utils/array.js var require_array = __commonJS({ "node_modules/fast-glob/out/utils/array.js"(exports2) { @@ -26634,7 +26505,7 @@ var require_path = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0; var os5 = require("os"); - var path15 = require("path"); + var path19 = require("path"); var IS_WINDOWS_PLATFORM = os5.platform() === "win32"; var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; @@ -26646,7 +26517,7 @@ var require_path = __commonJS({ } exports2.unixify = unixify; function makeAbsolute(cwd, filepath) { - return path15.resolve(cwd, filepath); + return path19.resolve(cwd, filepath); } exports2.makeAbsolute = makeAbsolute; function removeLeadingDotSegment(entry) { @@ -26812,7 +26683,7 @@ var require_is_glob = __commonJS({ } return false; }; - module2.exports = function isGlob(str2, options) { + module2.exports = function isGlob2(str2, options) { if (typeof str2 !== "string" || str2 === "") { return false; } @@ -26832,26 +26703,26 @@ var require_is_glob = __commonJS({ var require_glob_parent = __commonJS({ "node_modules/glob-parent/index.js"(exports2, module2) { "use strict"; - var isGlob = require_is_glob(); + var isGlob2 = require_is_glob(); var pathPosixDirname = require("path").posix.dirname; var isWin32 = require("os").platform() === "win32"; - var slash = "/"; + var slash2 = "/"; var backslash = /\\/g; var enclosure = /[\{\[].*[\}\]]$/; - var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; + var globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/; var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; module2.exports = function globParent(str2, opts) { var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); + if (options.flipBackslashes && isWin32 && str2.indexOf(slash2) < 0) { + str2 = str2.replace(backslash, slash2); } if (enclosure.test(str2)) { - str2 += slash; + str2 += slash2; } str2 += "a"; do { str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); + } while (isGlob2(str2) || globby2.test(str2)); return str2.replace(escaped, "$1"); }; } @@ -27943,7 +27814,7 @@ var require_braces = __commonJS({ var require_constants8 = __commonJS({ "node_modules/picomatch/lib/constants.js"(exports2, module2) { "use strict"; - var path15 = require("path"); + var path19 = require("path"); var WIN_SLASH = "\\\\/"; var WIN_NO_SLASH = `[^${WIN_SLASH}]`; var DOT_LITERAL = "\\."; @@ -28113,7 +27984,7 @@ var require_constants8 = __commonJS({ /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - SEP: path15.sep, + SEP: path19.sep, /** * Create EXTGLOB_CHARS */ @@ -28140,7 +28011,7 @@ var require_constants8 = __commonJS({ var require_utils6 = __commonJS({ "node_modules/picomatch/lib/utils.js"(exports2) { "use strict"; - var path15 = require("path"); + var path19 = require("path"); var win32 = process.platform === "win32"; var { REGEX_BACKSLASH, @@ -28169,7 +28040,7 @@ var require_utils6 = __commonJS({ if (options && typeof options.windows === "boolean") { return options.windows; } - return win32 === true || path15.sep === "\\"; + return win32 === true || path19.sep === "\\"; }; exports2.escapeLast = (input, char, lastIdx) => { const idx = input.lastIndexOf(char, lastIdx); @@ -28255,14 +28126,14 @@ var require_scan = __commonJS({ let lastIndex = 0; let isBrace = false; let isBracket = false; - let isGlob = false; + let isGlob2 = false; let isExtglob = false; let isGlobstar = false; let braceEscaped = false; let backslashes = false; let negated = false; let negatedExtglob = false; - let finished = false; + let finished2 = false; let braces = 0; let prev; let code; @@ -28298,8 +28169,8 @@ var require_scan = __commonJS({ } if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -28307,8 +28178,8 @@ var require_scan = __commonJS({ } if (braceEscaped !== true && code === CHAR_COMMA2) { isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -28319,7 +28190,7 @@ var require_scan = __commonJS({ if (braces === 0) { braceEscaped = false; isBrace = token.isBrace = true; - finished = true; + finished2 = true; break; } } @@ -28333,7 +28204,7 @@ var require_scan = __commonJS({ slashes.push(index); tokens.push(token); token = { value: "", depth: 0, isGlob: false }; - if (finished === true) continue; + if (finished2 === true) continue; if (prev === CHAR_DOT && index === start + 1) { start += 2; continue; @@ -28344,9 +28215,9 @@ var require_scan = __commonJS({ if (opts.noext !== true) { const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; + isGlob2 = token.isGlob = true; isExtglob = token.isExtglob = true; - finished = true; + finished2 = true; if (code === CHAR_EXCLAMATION_MARK && index === start) { negatedExtglob = true; } @@ -28358,8 +28229,8 @@ var require_scan = __commonJS({ continue; } if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; break; } } @@ -28370,16 +28241,16 @@ var require_scan = __commonJS({ } if (code === CHAR_ASTERISK2) { if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } break; } if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -28394,8 +28265,8 @@ var require_scan = __commonJS({ } if (next === CHAR_RIGHT_SQUARE_BRACKET2) { isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; break; } } @@ -28410,7 +28281,7 @@ var require_scan = __commonJS({ continue; } if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; + isGlob2 = token.isGlob = true; if (scanToEnd === true) { while (eos() !== true && (code = advance())) { if (code === CHAR_LEFT_PARENTHESES) { @@ -28419,7 +28290,7 @@ var require_scan = __commonJS({ continue; } if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; + finished2 = true; break; } } @@ -28427,8 +28298,8 @@ var require_scan = __commonJS({ } break; } - if (isGlob === true) { - finished = true; + if (isGlob2 === true) { + finished2 = true; if (scanToEnd === true) { continue; } @@ -28437,7 +28308,7 @@ var require_scan = __commonJS({ } if (opts.noext === true) { isExtglob = false; - isGlob = false; + isGlob2 = false; } let base = str2; let prefix = ""; @@ -28447,10 +28318,10 @@ var require_scan = __commonJS({ str2 = str2.slice(start); lastIndex -= start; } - if (base && isGlob === true && lastIndex > 0) { + if (base && isGlob2 === true && lastIndex > 0) { base = str2.slice(0, lastIndex); glob2 = str2.slice(lastIndex); - } else if (isGlob === true) { + } else if (isGlob2 === true) { base = ""; glob2 = str2; } else { @@ -28475,7 +28346,7 @@ var require_scan = __commonJS({ glob: glob2, isBrace, isBracket, - isGlob, + isGlob: isGlob2, isExtglob, isGlobstar, negated, @@ -29304,7 +29175,7 @@ var require_parse4 = __commonJS({ var require_picomatch = __commonJS({ "node_modules/picomatch/lib/picomatch.js"(exports2, module2) { "use strict"; - var path15 = require("path"); + var path19 = require("path"); var scan = require_scan(); var parse = require_parse4(); var utils = require_utils6(); @@ -29389,7 +29260,7 @@ var require_picomatch = __commonJS({ }; picomatch.matchBase = (input, glob2, options, posix = utils.isWindows(options)) => { const regex = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options); - return regex.test(path15.basename(input)); + return regex.test(path19.basename(input)); }; picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); picomatch.parse = (pattern, options) => { @@ -29616,7 +29487,7 @@ var require_pattern = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; - var path15 = require("path"); + var path19 = require("path"); var globParent = require_glob_parent(); var micromatch = require_micromatch(); var GLOBSTAR = "**"; @@ -29628,10 +29499,10 @@ var require_pattern = __commonJS({ var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); + return !isDynamicPattern2(pattern, options); } exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern(pattern, options = {}) { + function isDynamicPattern2(pattern, options = {}) { if (pattern === "") { return false; } @@ -29649,7 +29520,7 @@ var require_pattern = __commonJS({ } return false; } - exports2.isDynamicPattern = isDynamicPattern; + exports2.isDynamicPattern = isDynamicPattern2; function hasBraceExpansion(pattern) { const openingBraceIndex = pattern.indexOf("{"); if (openingBraceIndex === -1) { @@ -29663,23 +29534,23 @@ var require_pattern = __commonJS({ return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); } function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; + return isNegativePattern2(pattern) ? pattern.slice(1) : pattern; } exports2.convertToPositivePattern = convertToPositivePattern; function convertToNegativePattern(pattern) { return "!" + pattern; } exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern(pattern) { + function isNegativePattern2(pattern) { return pattern.startsWith("!") && pattern[1] !== "("; } - exports2.isNegativePattern = isNegativePattern; + exports2.isNegativePattern = isNegativePattern2; function isPositivePattern(pattern) { - return !isNegativePattern(pattern); + return !isNegativePattern2(pattern); } exports2.isPositivePattern = isPositivePattern; function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); + return patterns.filter(isNegativePattern2); } exports2.getNegativePatterns = getNegativePatterns; function getPositivePatterns(patterns) { @@ -29711,7 +29582,7 @@ var require_pattern = __commonJS({ } exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; function isAffectDepthOfReadingPattern(pattern) { - const basename = path15.basename(pattern); + const basename = path19.basename(pattern); return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); } exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; @@ -29769,12 +29640,131 @@ var require_pattern = __commonJS({ } exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; function isAbsolute3(pattern) { - return path15.isAbsolute(pattern); + return path19.isAbsolute(pattern); } exports2.isAbsolute = isAbsolute3; } }); +// node_modules/merge2/index.js +var require_merge2 = __commonJS({ + "node_modules/merge2/index.js"(exports2, module2) { + "use strict"; + var Stream = require("stream"); + var PassThrough = Stream.PassThrough; + var slice = Array.prototype.slice; + module2.exports = merge2; + function merge2() { + const streamsQueue = []; + const args = slice.call(arguments); + let merging = false; + let options = args[args.length - 1]; + if (options && !Array.isArray(options) && options.pipe == null) { + args.pop(); + } else { + options = {}; + } + const doEnd = options.end !== false; + const doPipeError = options.pipeError === true; + if (options.objectMode == null) { + options.objectMode = true; + } + if (options.highWaterMark == null) { + options.highWaterMark = 64 * 1024; + } + const mergedStream = PassThrough(options); + function addStream() { + for (let i = 0, len = arguments.length; i < len; i++) { + streamsQueue.push(pauseStreams(arguments[i], options)); + } + mergeStream(); + return this; + } + function mergeStream() { + if (merging) { + return; + } + merging = true; + let streams = streamsQueue.shift(); + if (!streams) { + process.nextTick(endStream2); + return; + } + if (!Array.isArray(streams)) { + streams = [streams]; + } + let pipesCount = streams.length + 1; + function next() { + if (--pipesCount > 0) { + return; + } + merging = false; + mergeStream(); + } + function pipe(stream2) { + function onend() { + stream2.removeListener("merge2UnpipeEnd", onend); + stream2.removeListener("end", onend); + if (doPipeError) { + stream2.removeListener("error", onerror); + } + next(); + } + function onerror(err) { + mergedStream.emit("error", err); + } + if (stream2._readableState.endEmitted) { + return next(); + } + stream2.on("merge2UnpipeEnd", onend); + stream2.on("end", onend); + if (doPipeError) { + stream2.on("error", onerror); + } + stream2.pipe(mergedStream, { end: false }); + stream2.resume(); + } + for (let i = 0; i < streams.length; i++) { + pipe(streams[i]); + } + next(); + } + function endStream2() { + merging = false; + mergedStream.emit("queueDrain"); + if (doEnd) { + mergedStream.end(); + } + } + mergedStream.setMaxListeners(0); + mergedStream.add = addStream; + mergedStream.on("unpipe", function(stream2) { + stream2.emit("merge2UnpipeEnd"); + }); + if (args.length) { + addStream.apply(null, args); + } + return mergedStream; + } + function pauseStreams(streams, options) { + if (!Array.isArray(streams)) { + if (!streams._readableState && streams.pipe) { + streams = streams.pipe(PassThrough(options)); + } + if (!streams._readableState || !streams.pause || !streams.pipe) { + throw new Error("Only readable stream can be merged."); + } + streams.pause(); + } else { + for (let i = 0, len = streams.length; i < len; i++) { + streams[i] = pauseStreams(streams[i], options); + } + } + return streams; + } + } +}); + // node_modules/fast-glob/out/utils/stream.js var require_stream = __commonJS({ "node_modules/fast-glob/out/utils/stream.js"(exports2) { @@ -29825,10 +29815,10 @@ var require_utils7 = __commonJS({ exports2.array = array; var errno = require_errno(); exports2.errno = errno; - var fs15 = require_fs(); - exports2.fs = fs15; - var path15 = require_path(); - exports2.path = path15; + var fs18 = require_fs(); + exports2.fs = fs18; + var path19 = require_path(); + exports2.path = path19; var pattern = require_pattern(); exports2.pattern = pattern; var stream2 = require_stream(); @@ -29940,8 +29930,8 @@ var require_async = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.read = void 0; - function read(path15, settings, callback) { - settings.fs.lstat(path15, (lstatError, lstat) => { + function read(path19, settings, callback) { + settings.fs.lstat(path19, (lstatError, lstat) => { if (lstatError !== null) { callFailureCallback(callback, lstatError); return; @@ -29950,7 +29940,7 @@ var require_async = __commonJS({ callSuccessCallback(callback, lstat); return; } - settings.fs.stat(path15, (statError, stat) => { + settings.fs.stat(path19, (statError, stat) => { if (statError !== null) { if (settings.throwErrorOnBrokenSymbolicLink) { callFailureCallback(callback, statError); @@ -29982,13 +29972,13 @@ var require_sync = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.read = void 0; - function read(path15, settings) { - const lstat = settings.fs.lstatSync(path15); + function read(path19, settings) { + const lstat = settings.fs.lstatSync(path19); if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { return lstat; } try { - const stat = settings.fs.statSync(path15); + const stat = settings.fs.statSync(path19); if (settings.markSymbolicLink) { stat.isSymbolicLink = () => true; } @@ -30010,12 +30000,12 @@ var require_fs2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs15 = require("fs"); + var fs18 = require("fs"); exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs15.lstat, - stat: fs15.stat, - lstatSync: fs15.lstatSync, - statSync: fs15.statSync + lstat: fs18.lstat, + stat: fs18.stat, + lstatSync: fs18.lstatSync, + statSync: fs18.statSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -30032,12 +30022,12 @@ var require_settings = __commonJS({ "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var fs15 = require_fs2(); + var fs18 = require_fs2(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs15.createFileSystemAdapter(this._options.fs); + this.fs = fs18.createFileSystemAdapter(this._options.fs); this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); } @@ -30059,17 +30049,17 @@ var require_out = __commonJS({ var sync = require_sync(); var settings_1 = require_settings(); exports2.Settings = settings_1.default; - function stat(path15, optionsOrSettingsOrCallback, callback) { + function stat(path19, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path15, getSettings(), optionsOrSettingsOrCallback); + async.read(path19, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path15, getSettings(optionsOrSettingsOrCallback), callback); + async.read(path19, getSettings(optionsOrSettingsOrCallback), callback); } exports2.stat = stat; - function statSync2(path15, optionsOrSettings) { + function statSync2(path19, optionsOrSettings) { const settings = getSettings(optionsOrSettings); - return sync.read(path15, settings); + return sync.read(path19, settings); } exports2.statSync = statSync2; function getSettings(settingsOrOptions = {}) { @@ -30192,8 +30182,8 @@ var require_utils8 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fs = void 0; - var fs15 = require_fs3(); - exports2.fs = fs15; + var fs18 = require_fs3(); + exports2.fs = fs18; } }); @@ -30285,16 +30275,16 @@ var require_async2 = __commonJS({ return; } const tasks = names.map((name) => { - const path15 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const path19 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); return (done) => { - fsStat.stat(path15, settings.fsStatSettings, (error2, stats) => { + fsStat.stat(path19, settings.fsStatSettings, (error2, stats) => { if (error2 !== null) { done(error2); return; } const entry = { name, - path: path15, + path: path19, dirent: utils.fs.createDirentFromStats(name, stats) }; if (settings.stats) { @@ -30388,14 +30378,14 @@ var require_fs4 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs15 = require("fs"); + var fs18 = require("fs"); exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs15.lstat, - stat: fs15.stat, - lstatSync: fs15.lstatSync, - statSync: fs15.statSync, - readdir: fs15.readdir, - readdirSync: fs15.readdirSync + lstat: fs18.lstat, + stat: fs18.stat, + lstatSync: fs18.lstatSync, + statSync: fs18.statSync, + readdir: fs18.readdir, + readdirSync: fs18.readdirSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -30412,15 +30402,15 @@ var require_settings2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path15 = require("path"); + var path19 = require("path"); var fsStat = require_out(); - var fs15 = require_fs4(); + var fs18 = require_fs4(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs15.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep); + this.fs = fs18.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path19.sep); this.stats = this._getValue(this._options.stats, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); this.fsStatSettings = new fsStat.Settings({ @@ -30447,17 +30437,17 @@ var require_out2 = __commonJS({ var sync = require_sync2(); var settings_1 = require_settings2(); exports2.Settings = settings_1.default; - function scandir(path15, optionsOrSettingsOrCallback, callback) { + function scandir(path19, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path15, getSettings(), optionsOrSettingsOrCallback); + async.read(path19, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path15, getSettings(optionsOrSettingsOrCallback), callback); + async.read(path19, getSettings(optionsOrSettingsOrCallback), callback); } exports2.scandir = scandir; - function scandirSync(path15, optionsOrSettings) { + function scandirSync(path19, optionsOrSettings) { const settings = getSettings(optionsOrSettings); - return sync.read(path15, settings); + return sync.read(path19, settings); } exports2.scandirSync = scandirSync; function getSettings(settingsOrOptions = {}) { @@ -30517,8 +30507,8 @@ var require_queue = __commonJS({ var _running = 0; var self2 = { push, - drain: noop, - saturated: noop, + drain: noop2, + saturated: noop2, pause, paused: false, concurrency, @@ -30528,7 +30518,7 @@ var require_queue = __commonJS({ length, getQueue, unshift, - empty: noop, + empty: noop2, kill, killAndDrain }; @@ -30573,7 +30563,7 @@ var require_queue = __commonJS({ current.context = context2; current.release = release3; current.value = value; - current.callback = done || noop; + current.callback = done || noop2; if (_running === self2.concurrency || self2.paused) { if (queueTail) { queueTail.next = current; @@ -30593,7 +30583,7 @@ var require_queue = __commonJS({ current.context = context2; current.release = release3; current.value = value; - current.callback = done || noop; + current.callback = done || noop2; if (_running === self2.concurrency || self2.paused) { if (queueHead) { current.next = queueHead; @@ -30634,28 +30624,28 @@ var require_queue = __commonJS({ function kill() { queueHead = null; queueTail = null; - self2.drain = noop; + self2.drain = noop2; } function killAndDrain() { queueHead = null; queueTail = null; self2.drain(); - self2.drain = noop; + self2.drain = noop2; } } - function noop() { + function noop2() { } function Task() { this.value = null; - this.callback = noop; + this.callback = noop2; this.next = null; - this.release = noop; + this.release = noop2; this.context = null; var self2 = this; this.worked = function worked(err, result) { var callback = self2.callback; self2.value = null; - self2.callback = noop; + self2.callback = noop2; callback.call(self2.context, err, result); self2.release(self2); }; @@ -30984,7 +30974,7 @@ var require_settings3 = __commonJS({ "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path15 = require("path"); + var path19 = require("path"); var fsScandir = require_out2(); var Settings = class { constructor(_options = {}) { @@ -30994,7 +30984,7 @@ var require_settings3 = __commonJS({ this.deepFilter = this._getValue(this._options.deepFilter, null); this.entryFilter = this._getValue(this._options.entryFilter, null); this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path19.sep); this.fsScandirSettings = new fsScandir.Settings({ followSymbolicLinks: this._options.followSymbolicLinks, fs: this._options.fs, @@ -31056,7 +31046,7 @@ var require_reader2 = __commonJS({ "node_modules/fast-glob/out/readers/reader.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path15 = require("path"); + var path19 = require("path"); var fsStat = require_out(); var utils = require_utils7(); var Reader = class { @@ -31069,7 +31059,7 @@ var require_reader2 = __commonJS({ }); } _getFullEntryPath(filepath) { - return path15.resolve(this._settings.cwd, filepath); + return path19.resolve(this._settings.cwd, filepath); } _makeEntry(stats, pattern) { const entry = { @@ -31390,34 +31380,34 @@ var require_entry = __commonJS({ _onlyDirectoryFilter(entry) { return this._settings.onlyDirectories && !entry.dirent.isDirectory(); } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); + _isMatchToPatternsSet(filepath, patterns, isDirectory2) { + const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2); if (!isMatched) { return false; } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); + const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2); if (isMatchedByRelativeNegative) { return false; } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); + const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2); if (isMatchedByAbsoluteNegative) { return false; } return true; } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { + _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) { if (patternsRe.length === 0) { return false; } const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); + return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2); } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { + _isMatchToPatterns(filepath, patternsRe, isDirectory2) { if (patternsRe.length === 0) { return false; } const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { + if (!isMatched && isDirectory2) { return utils.pattern.matchAny(filepath + "/", patternsRe); } return isMatched; @@ -31485,7 +31475,7 @@ var require_provider = __commonJS({ "node_modules/fast-glob/out/providers/provider.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path15 = require("path"); + var path19 = require("path"); var deep_1 = require_deep(); var entry_1 = require_entry(); var error_1 = require_error(); @@ -31499,7 +31489,7 @@ var require_provider = __commonJS({ this.entryTransformer = new entry_2.default(this._settings); } _getRootDirectory(task) { - return path15.resolve(this._settings.cwd, task.base); + return path19.resolve(this._settings.cwd, task.base); } _getReaderOptions(task) { const basePath = task.base === "." ? "" : task.base; @@ -31680,16 +31670,16 @@ var require_settings4 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs15 = require("fs"); + var fs18 = require("fs"); var os5 = require("os"); var CPU_COUNT = Math.max(os5.cpus().length, 1); exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs15.lstat, - lstatSync: fs15.lstatSync, - stat: fs15.stat, - statSync: fs15.statSync, - readdir: fs15.readdir, - readdirSync: fs15.readdirSync + lstat: fs18.lstat, + lstatSync: fs18.lstatSync, + stat: fs18.stat, + statSync: fs18.statSync, + readdir: fs18.readdir, + readdirSync: fs18.readdirSync }; var Settings = class { constructor(_options = {}) { @@ -31745,7 +31735,7 @@ var require_out4 = __commonJS({ var settings_1 = require_settings4(); var utils = require_utils7(); async function FastGlob(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, async_1.default, options); const result = await Promise.all(works); return utils.array.flatten(result); @@ -31756,65 +31746,65 @@ var require_out4 = __commonJS({ FastGlob2.globStream = stream2; FastGlob2.async = FastGlob2; function sync(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, sync_1.default, options); return utils.array.flatten(works); } FastGlob2.sync = sync; function stream2(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, stream_1.default, options); return utils.stream.merge(works); } FastGlob2.stream = stream2; - function generateTasks(source, options) { - assertPatternsInput(source); + function generateTasks2(source, options) { + assertPatternsInput2(source); const patterns = [].concat(source); const settings = new settings_1.default(options); return taskManager.generate(patterns, settings); } - FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); + FastGlob2.generateTasks = generateTasks2; + function isDynamicPattern2(source, options) { + assertPatternsInput2(source); const settings = new settings_1.default(options); return utils.pattern.isDynamicPattern(source, settings); } - FastGlob2.isDynamicPattern = isDynamicPattern; + FastGlob2.isDynamicPattern = isDynamicPattern2; function escapePath(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escape(source); } FastGlob2.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); + function convertPathToPattern2(source) { + assertPatternsInput2(source); return utils.path.convertPathToPattern(source); } - FastGlob2.convertPathToPattern = convertPathToPattern; + FastGlob2.convertPathToPattern = convertPathToPattern2; let posix; (function(posix2) { function escapePath2(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escapePosixPath(source); } posix2.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); + function convertPathToPattern3(source) { + assertPatternsInput2(source); return utils.path.convertPosixPathToPattern(source); } - posix2.convertPathToPattern = convertPathToPattern2; + posix2.convertPathToPattern = convertPathToPattern3; })(posix = FastGlob2.posix || (FastGlob2.posix = {})); let win32; (function(win322) { function escapePath2(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escapeWindowsPath(source); } win322.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); + function convertPathToPattern3(source) { + assertPatternsInput2(source); return utils.path.convertWindowsPathToPattern(source); } - win322.convertPathToPattern = convertPathToPattern2; + win322.convertPathToPattern = convertPathToPattern3; })(win32 = FastGlob2.win32 || (FastGlob2.win32 = {})); })(FastGlob || (FastGlob = {})); function getWorks(source, _Provider, options) { @@ -31824,7 +31814,7 @@ var require_out4 = __commonJS({ const provider = new _Provider(settings); return tasks.map(provider.read, provider); } - function assertPatternsInput(input) { + function assertPatternsInput2(input) { const source = [].concat(input); const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); if (!isValidSource) { @@ -31835,117 +31825,13 @@ var require_out4 = __commonJS({ } }); -// node_modules/path-type/index.js -var require_path_type = __commonJS({ - "node_modules/path-type/index.js"(exports2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var fs15 = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify2(fs15[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - return fs15[fsStatType](filePath)[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - exports2.isFile = isType.bind(null, "stat", "isFile"); - exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// node_modules/dir-glob/index.js -var require_dir_glob = __commonJS({ - "node_modules/dir-glob/index.js"(exports2, module2) { - "use strict"; - var path15 = require("path"); - var pathType = require_path_type(); - var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; - var getPath = (filepath, cwd) => { - const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; - return path15.isAbsolute(pth) ? pth : path15.join(cwd, pth); - }; - var addExtensions = (file, extensions) => { - if (path15.extname(file)) { - return `**/${file}`; - } - return `**/${file}.${getExtensions(extensions)}`; - }; - var getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - if (options.files && options.extensions) { - return options.files.map((x) => path15.posix.join(directory, addExtensions(x, options.extensions))); - } - if (options.files) { - return options.files.map((x) => path15.posix.join(directory, `**/${x}`)); - } - if (options.extensions) { - return [path15.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - return [path15.posix.join(directory, "**")]; - }; - module2.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = await Promise.all([].concat(input).map(async (x) => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - return [].concat.apply([], globs); - }; - module2.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - return [].concat.apply([], globs); - }; - } -}); - -// node_modules/ignore/index.js +// node_modules/globby/node_modules/ignore/index.js var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports2, module2) { + "node_modules/globby/node_modules/ignore/index.js"(exports2, module2) { function makeArray(subject) { return Array.isArray(subject) ? subject : [subject]; } + var UNDEFINED = void 0; var EMPTY = ""; var SPACE = " "; var ESCAPE = "\\"; @@ -31954,14 +31840,18 @@ var require_ignore = __commonJS({ var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + var REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/; + var REGEX_TEST_TRAILING_SLASH = /\/$/; var SLASH = "/"; var TMP_KEY_IGNORE = "node-ignore"; if (typeof Symbol !== "undefined") { TMP_KEY_IGNORE = Symbol.for("node-ignore"); } var KEY_IGNORE = TMP_KEY_IGNORE; - var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); + var define2 = (object, key, value) => { + Object.defineProperty(object, key, { value }); + return value; + }; var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; var RETURN_FALSE = () => false; var sanitizeRange = (range) => range.replace( @@ -31974,7 +31864,7 @@ var require_ignore = __commonJS({ }; var REPLACERS = [ [ - // remove BOM + // Remove BOM // TODO: // Other similar zero-width characters? /^\uFEFF/, @@ -31984,14 +31874,21 @@ var require_ignore = __commonJS({ [ // (a\ ) -> (a ) // (a ) -> (a) + // (a ) -> (a) // (a \ ) -> (a ) - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY + /((?:\\\\)*?)(\\?\s+)$/, + (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY) ], - // replace (\ ) with ' ' + // Replace (\ ) with ' ' + // (\ ) -> ' ' + // (\\ ) -> '\\ ' + // (\\\ ) -> '\\ ' [ - /\\\s/g, - () => SPACE + /(\\+?)\s/g, + (_, m1) => { + const { length } = m1; + return m1.slice(0, length - length % 2) + SPACE; + } ], // Escape metacharacters // which is written down by users but means special for regular expressions. @@ -32111,103 +32008,100 @@ var require_ignore = __commonJS({ // 'js/' will not match 'a.js' // 'js' will match 'a.js' and 'a.js/' (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } ] ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; + var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/; + var MODE_IGNORE = "regex"; + var MODE_CHECK_IGNORE = "checkRegex"; + var UNDERSCORE = "_"; + var TRAILING_WILD_CARD_REPLACERS = { + [MODE_IGNORE](_, p1) { + const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; + }, + [MODE_CHECK_IGNORE](_, p1) { + const prefix = p1 ? `${p1}[^/]*` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); }; + var makeRegexPrefix = (pattern) => REPLACERS.reduce( + (prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)), + pattern + ); var isString = (subject) => typeof subject === "string"; var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); + var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean); var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; + constructor(pattern, mark, body, ignoreCase, negative, prefix) { this.pattern = pattern; + this.mark = mark; this.negative = negative; - this.regex = regex; + define2(this, "body", body); + define2(this, "ignoreCase", ignoreCase); + define2(this, "regexPrefix", prefix); + } + get regex() { + const key = UNDERSCORE + MODE_IGNORE; + if (this[key]) { + return this[key]; + } + return this._make(MODE_IGNORE, key); + } + get checkRegex() { + const key = UNDERSCORE + MODE_CHECK_IGNORE; + if (this[key]) { + return this[key]; + } + return this._make(MODE_CHECK_IGNORE, key); + } + _make(mode, key) { + const str2 = this.regexPrefix.replace( + REGEX_REPLACE_TRAILING_WILDCARD, + // It does not need to bind pattern + TRAILING_WILD_CARD_REPLACERS[mode] + ); + const regex = this.ignoreCase ? new RegExp(str2, "i") : new RegExp(str2); + return define2(this, key, regex); } }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; + var createRule = ({ + pattern, + mark + }, ignoreCase) => { let negative = false; - if (pattern.indexOf("!") === 0) { + let body = pattern; + if (body.indexOf("!") === 0) { negative = true; - pattern = pattern.substr(1); + body = body.substr(1); } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); + body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regexPrefix = makeRegexPrefix(body); return new IgnoreRule( - origin, pattern, + mark, + body, + ignoreCase, negative, - regex + regexPrefix ); }; - var throwError2 = (message, Ctor) => { - throw new Ctor(message); - }; - var checkPath = (path15, originalPath, doThrow) => { - if (!isString(path15)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path15) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path15)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; - }; - var isNotRelative = (path15) => REGEX_TEST_INVALID_PATH.test(path15); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define2(this, KEY_IGNORE, true); - this._rules = []; + var RuleManager = class { + constructor(ignoreCase) { this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); + this._rules = []; } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); - } - _addPattern(pattern) { + _add(pattern) { if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); + this._rules = this._rules.concat(pattern._rules._rules); this._added = true; return; } - if (checkPattern(pattern)) { + if (isString(pattern)) { + pattern = { + pattern + }; + } + if (checkPattern(pattern.pattern)) { const rule = createRule(pattern, this._ignoreCase); this._added = true; this._rules.push(rule); @@ -32218,8 +32112,85 @@ var require_ignore = __commonJS({ this._added = false; makeArray( isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { + ).forEach(this._add, this); + return this._added; + } + // Test one single path without recursively checking parent directories + // + // - checkUnignored `boolean` whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE` + // @returns {TestResult} true if a file is ignored + test(path19, checkUnignored, mode) { + let ignored = false; + let unignored = false; + let matchedRule; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { + return; + } + const matched = rule[mode].test(path19); + if (!matched) { + return; + } + ignored = !negative; + unignored = negative; + matchedRule = negative ? UNDEFINED : rule; + }); + const ret = { + ignored, + unignored + }; + if (matchedRule) { + ret.rule = matchedRule; + } + return ret; + } + }; + var throwError2 = (message, Ctor) => { + throw new Ctor(message); + }; + var checkPath = (path19, originalPath, doThrow) => { + if (!isString(path19)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ); + } + if (!path19) { + return doThrow(`path must not be empty`, TypeError); + } + if (checkPath.isNotRelative(path19)) { + const r = "`path.relative()`d"; + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ); + } + return true; + }; + var isNotRelative = (path19) => REGEX_TEST_INVALID_PATH.test(path19); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ + ignorecase = true, + ignoreCase = ignorecase, + allowRelativePaths = false + } = {}) { + define2(this, KEY_IGNORE, true); + this._rules = new RuleManager(ignoreCase); + this._strictPathCheck = !allowRelativePaths; + this._initCache(); + } + _initCache() { + this._ignoreCache = /* @__PURE__ */ Object.create(null); + this._testCache = /* @__PURE__ */ Object.create(null); + } + add(pattern) { + if (this._rules.add(pattern)) { this._initCache(); } return this; @@ -32228,58 +32199,45 @@ var require_ignore = __commonJS({ addPattern(pattern) { return this.add(pattern); } - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - _testOne(path15, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path15); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; - } // @returns {TestResult} _test(originalPath, cache, checkUnignored, slices) { - const path15 = originalPath && checkPath.convert(originalPath); + const path19 = originalPath && checkPath.convert(originalPath); checkPath( - path15, + path19, originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError2 + this._strictPathCheck ? throwError2 : RETURN_FALSE ); - return this._t(path15, cache, checkUnignored, slices); + return this._t(path19, cache, checkUnignored, slices); } - _t(path15, cache, checkUnignored, slices) { - if (path15 in cache) { - return cache[path15]; + checkIgnore(path19) { + if (!REGEX_TEST_TRAILING_SLASH.test(path19)) { + return this.test(path19); + } + const slices = path19.split(SLASH).filter(Boolean); + slices.pop(); + if (slices.length) { + const parent = this._t( + slices.join(SLASH) + SLASH, + this._testCache, + true, + slices + ); + if (parent.ignored) { + return parent; + } + } + return this._rules.test(path19, false, MODE_CHECK_IGNORE); + } + _t(path19, cache, checkUnignored, slices) { + if (path19 in cache) { + return cache[path19]; } if (!slices) { - slices = path15.split(SLASH); + slices = path19.split(SLASH).filter(Boolean); } slices.pop(); if (!slices.length) { - return cache[path15] = this._testOne(path15, checkUnignored); + return cache[path19] = this._rules.test(path19, checkUnignored, MODE_IGNORE); } const parent = this._t( slices.join(SLASH) + SLASH, @@ -32287,3960 +32245,40 @@ var require_ignore = __commonJS({ checkUnignored, slices ); - return cache[path15] = parent.ignored ? parent : this._testOne(path15, checkUnignored); + return cache[path19] = parent.ignored ? parent : this._rules.test(path19, checkUnignored, MODE_IGNORE); } - ignores(path15) { - return this._test(path15, this._ignoreCache, false).ignored; + ignores(path19) { + return this._test(path19, this._ignoreCache, false).ignored; } createFilter() { - return (path15) => !this.ignores(path15); + return (path19) => !this.ignores(path19); } filter(paths) { return makeArray(paths).filter(this.createFilter()); } // @returns {TestResult} - test(path15) { - return this._test(path15, this._testCache, true); + test(path19) { + return this._test(path19, this._testCache, true); } }; var factory = (options) => new Ignore(options); - var isPathValid = (path15) => checkPath(path15 && checkPath.convert(path15), path15, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module2.exports = factory; - if ( - // Detect `process` so that it can run in browsers. - typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") - ) { + var isPathValid = (path19) => checkPath(path19 && checkPath.convert(path19), path19, RETURN_FALSE); + var setupWindows = () => { const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path15) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path15) || isNotRelative(path15); - } - } -}); - -// node_modules/slash/index.js -var require_slash = __commonJS({ - "node_modules/slash/index.js"(exports2, module2) { - "use strict"; - module2.exports = (path15) => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path15); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path15); - if (isExtendedLengthPath || hasNonAscii) { - return path15; - } - return path15.replace(/\\/g, "/"); - }; - } -}); - -// node_modules/globby/gitignore.js -var require_gitignore = __commonJS({ - "node_modules/globby/gitignore.js"(exports2, module2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var fs15 = require("fs"); - var path15 = require("path"); - var fastGlob = require_out4(); - var gitIgnore = require_ignore(); - var slash = require_slash(); - var DEFAULT_IGNORE = [ - "**/node_modules/**", - "**/flow-typed/**", - "**/coverage/**", - "**/.git" - ]; - var readFileP = promisify2(fs15.readFile); - var mapGitIgnorePatternTo = (base) => (ignore) => { - if (ignore.startsWith("!")) { - return "!" + path15.posix.join(base, ignore.slice(1)); - } - return path15.posix.join(base, ignore); - }; - var parseGitIgnore = (content, options) => { - const base = slash(path15.relative(options.cwd, path15.dirname(options.fileName))); - return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); - }; - var reduceIgnore = (files) => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - return ignores; - }; - var ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path15.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - return path15.join(cwd, p); - }; - var getIsIgnoredPredecate = (ignores, cwd) => { - return (p) => ignores.ignores(slash(path15.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); - }; - var getFile = async (file, cwd) => { - const filePath = path15.join(cwd, file); - const content = await readFileP(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var getFileSync = (file, cwd) => { - const filePath = path15.join(cwd, file); - const content = fs15.readFileSync(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) - } = {}) => { - return { ignore, cwd }; - }; - module2.exports = async (options) => { - options = normalizeOptions(options); - const paths = await fastGlob("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - module2.exports.sync = (options) => { - options = normalizeOptions(options); - const paths = fastGlob.sync("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = paths.map((file) => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - } -}); - -// node_modules/globby/stream-utils.js -var require_stream_utils = __commonJS({ - "node_modules/globby/stream-utils.js"(exports2, module2) { - "use strict"; - var { Transform } = require("stream"); - var ObjectTransform = class extends Transform { - constructor() { - super({ - objectMode: true - }); - } - }; - var FilterStream = class extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - callback(); - } - }; - var UniqueStream = class extends ObjectTransform { - constructor() { - super(); - this._pushed = /* @__PURE__ */ new Set(); - } - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - callback(); - } - }; - module2.exports = { - FilterStream, - UniqueStream - }; - } -}); - -// node_modules/globby/index.js -var require_globby = __commonJS({ - "node_modules/globby/index.js"(exports2, module2) { - "use strict"; - var fs15 = require("fs"); - var arrayUnion = require_array_union(); - var merge2 = require_merge2(); - var fastGlob = require_out4(); - var dirGlob = require_dir_glob(); - var gitignore = require_gitignore(); - var { FilterStream, UniqueStream } = require_stream_utils(); - var DEFAULT_FILTER = () => false; - var isNegative = (pattern) => pattern[0] === "!"; - var assertPatternsInput = (patterns) => { - if (!patterns.every((pattern) => typeof pattern === "string")) { - throw new TypeError("Patterns must be a string or an array of strings"); - } - }; - var checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - let stat; - try { - stat = fs15.statSync(options.cwd); - } catch { - return; - } - if (!stat.isDirectory()) { - throw new Error("The `cwd` option must be a path to a directory"); - } - }; - var getPathString = (p) => p.stats instanceof fs15.Stats ? p.path : p; - var generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - const globTasks = []; - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - for (const [index, pattern] of patterns.entries()) { - if (isNegative(pattern)) { - continue; - } - const ignore = patterns.slice(index).filter((pattern2) => isNegative(pattern2)).map((pattern2) => pattern2.slice(1)); - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - globTasks.push({ pattern, options }); - } - return globTasks; - }; - var globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === "object") { - options = { - ...options, - ...task.options.expandDirectories - }; - } - return fn(task.pattern, options); - }; - var getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - var getFilterSync = (options) => { - return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - var globToTask = (task) => (glob2) => { - const { options } = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - return { - pattern: glob2, - options - }; - }; - module2.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const getFilter = async () => { - return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - const getTasks = async () => { - const tasks2 = await Promise.all(globTasks.map(async (task) => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - return arrayUnion(...tasks2); - }; - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); - return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); - }; - module2.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - return matches.filter((path_) => !filter(path_)); - }; - module2.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - const filterStream = new FilterStream((p) => !filter(p)); - const uniqueStream = new UniqueStream(); - return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); - }; - module2.exports.generateGlobTasks = generateGlobTasks; - module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); - module2.exports.gitignore = gitignore; - } -}); - -// node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - "node_modules/graceful-fs/polyfills.js"(exports2, module2) { - var constants = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform3 = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs15) { - if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs15); - } - if (!fs15.lutimes) { - patchLutimes(fs15); - } - fs15.chown = chownFix(fs15.chown); - fs15.fchown = chownFix(fs15.fchown); - fs15.lchown = chownFix(fs15.lchown); - fs15.chmod = chmodFix(fs15.chmod); - fs15.fchmod = chmodFix(fs15.fchmod); - fs15.lchmod = chmodFix(fs15.lchmod); - fs15.chownSync = chownFixSync(fs15.chownSync); - fs15.fchownSync = chownFixSync(fs15.fchownSync); - fs15.lchownSync = chownFixSync(fs15.lchownSync); - fs15.chmodSync = chmodFixSync(fs15.chmodSync); - fs15.fchmodSync = chmodFixSync(fs15.fchmodSync); - fs15.lchmodSync = chmodFixSync(fs15.lchmodSync); - fs15.stat = statFix(fs15.stat); - fs15.fstat = statFix(fs15.fstat); - fs15.lstat = statFix(fs15.lstat); - fs15.statSync = statFixSync(fs15.statSync); - fs15.fstatSync = statFixSync(fs15.fstatSync); - fs15.lstatSync = statFixSync(fs15.lstatSync); - if (fs15.chmod && !fs15.lchmod) { - fs15.lchmod = function(path15, mode, cb) { - if (cb) process.nextTick(cb); - }; - fs15.lchmodSync = function() { - }; - } - if (fs15.chown && !fs15.lchown) { - fs15.lchown = function(path15, uid, gid, cb) { - if (cb) process.nextTick(cb); - }; - fs15.lchownSync = function() { - }; - } - if (platform3 === "win32") { - fs15.rename = typeof fs15.rename !== "function" ? fs15.rename : (function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { - setTimeout(function() { - fs15.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er); - }); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); - return rename; - })(fs15.rename); - } - fs15.read = typeof fs15.read !== "function" ? fs15.read : (function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs15, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs15, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); - return read; - })(fs15.read); - fs15.readSync = typeof fs15.readSync !== "function" ? fs15.readSync : /* @__PURE__ */ (function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs15, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - })(fs15.readSync); - function patchLchmod(fs16) { - fs16.lchmod = function(path15, mode, callback) { - fs16.open( - path15, - constants.O_WRONLY | constants.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) callback(err); - return; - } - fs16.fchmod(fd, mode, function(err2) { - fs16.close(fd, function(err22) { - if (callback) callback(err2 || err22); - }); - }); - } - ); - }; - fs16.lchmodSync = function(path15, mode) { - var fd = fs16.openSync(path15, constants.O_WRONLY | constants.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs16.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs16.closeSync(fd); - } catch (er) { - } - } else { - fs16.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs16) { - if (constants.hasOwnProperty("O_SYMLINK") && fs16.futimes) { - fs16.lutimes = function(path15, at, mt, cb) { - fs16.open(path15, constants.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) cb(er); - return; - } - fs16.futimes(fd, at, mt, function(er2) { - fs16.close(fd, function(er22) { - if (cb) cb(er2 || er22); - }); - }); - }); - }; - fs16.lutimesSync = function(path15, at, mt) { - var fd = fs16.openSync(path15, constants.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs16.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs16.closeSync(fd); - } catch (er) { - } - } else { - fs16.closeSync(fd); - } - } - return ret; - }; - } else if (fs16.futimes) { - fs16.lutimes = function(_a, _b, _c, cb) { - if (cb) process.nextTick(cb); - }; - fs16.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) return orig; - return function(target, mode, cb) { - return orig.call(fs15, target, mode, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) return orig; - return function(target, mode) { - try { - return orig.call(fs15, target, mode); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function chownFix(orig) { - if (!orig) return orig; - return function(target, uid, gid, cb) { - return orig.call(fs15, target, uid, gid, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) return orig; - return function(target, uid, gid) { - try { - return orig.call(fs15, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function statFix(orig) { - if (!orig) return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - if (cb) cb.apply(this, arguments); - } - return options ? orig.call(fs15, target, options, callback) : orig.call(fs15, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) return orig; - return function(target, options) { - var stats = options ? orig.call(fs15, target, options) : orig.call(fs15, target); - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { - var Stream = require("stream").Stream; - module2.exports = legacy; - function legacy(fs15) { - return { - ReadStream, - WriteStream - }; - function ReadStream(path15, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path15, options); - Stream.call(this); - var self2 = this; - this.path = path15; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self2._read(); - }); - return; - } - fs15.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self2.emit("error", err); - self2.readable = false; - return; - } - self2.fd = fd; - self2.emit("open", fd); - self2._read(); - }); - } - function WriteStream(path15, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path15, options); - Stream.call(this); - this.path = path15; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs15.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - "node_modules/graceful-fs/clone.js"(exports2, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs15 = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop() { - } - function publishQueue(context2, queue2) { - Object.defineProperty(context2, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug3 = noop; - if (util.debuglog) - debug3 = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug3 = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs15[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs15, queue); - fs15.close = (function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs15, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - })(fs15.close); - fs15.closeSync = (function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs15, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - })(fs15.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug3(fs15[gracefulQueue]); - require("assert").equal(fs15[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs15[gracefulQueue]); - } - module2.exports = patch(clone(fs15)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs15.__patched) { - module2.exports = patch(fs15); - fs15.__patched = true; - } - function patch(fs16) { - polyfills(fs16); - fs16.gracefulify = patch; - fs16.createReadStream = createReadStream; - fs16.createWriteStream = createWriteStream; - var fs$readFile = fs16.readFile; - fs16.readFile = readFile; - function readFile(path15, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path15, options, cb); - function go$readFile(path16, options2, cb2, startTime) { - return fs$readFile(path16, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path16, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs16.writeFile; - fs16.writeFile = writeFile; - function writeFile(path15, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path15, data, options, cb); - function go$writeFile(path16, data2, options2, cb2, startTime) { - return fs$writeFile(path16, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path16, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs16.appendFile; - if (fs$appendFile) - fs16.appendFile = appendFile; - function appendFile(path15, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path15, data, options, cb); - function go$appendFile(path16, data2, options2, cb2, startTime) { - return fs$appendFile(path16, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path16, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs16.copyFile; - if (fs$copyFile) - fs16.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs16.readdir; - fs16.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path15, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path16, options2, cb2, startTime) { - return fs$readdir(path16, fs$readdirCallback( - path16, - options2, - cb2, - startTime - )); - } : function go$readdir2(path16, options2, cb2, startTime) { - return fs$readdir(path16, options2, fs$readdirCallback( - path16, - options2, - cb2, - startTime - )); - }; - return go$readdir(path15, options, cb); - function fs$readdirCallback(path16, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path16, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs16); - ReadStream = legStreams.ReadStream; - WriteStream = legStreams.WriteStream; - } - var fs$ReadStream = fs16.ReadStream; - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype); - ReadStream.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs16.WriteStream; - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype); - WriteStream.prototype.open = WriteStream$open; - } - Object.defineProperty(fs16, "ReadStream", { - get: function() { - return ReadStream; - }, - set: function(val2) { - ReadStream = val2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs16, "WriteStream", { - get: function() { - return WriteStream; - }, - set: function(val2) { - WriteStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream; - Object.defineProperty(fs16, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val2) { - FileReadStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream; - Object.defineProperty(fs16, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val2) { - FileWriteStream = val2; - }, - enumerable: true, - configurable: true - }); - function ReadStream(path15, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream(path15, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream(path15, options) { - return new fs16.ReadStream(path15, options); - } - function createWriteStream(path15, options) { - return new fs16.WriteStream(path15, options); - } - var fs$open = fs16.open; - fs16.open = open; - function open(path15, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path15, flags, mode, cb); - function go$open(path16, flags2, mode2, cb2, startTime) { - return fs$open(path16, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path16, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs16; - } - function enqueue(elem) { - debug3("ENQUEUE", elem[0].name, elem[1]); - fs15[gracefulQueue].push(elem); - retry3(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs15[gracefulQueue].length; ++i) { - if (fs15[gracefulQueue][i].length > 2) { - fs15[gracefulQueue][i][3] = now; - fs15[gracefulQueue][i][4] = now; - } - } - retry3(); - } - function retry3() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs15[gracefulQueue].length === 0) - return; - var elem = fs15[gracefulQueue].shift(); - var fn = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug3("RETRY", fn.name, args); - fn.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug3("TIMEOUT", fn.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug3("RETRY", fn.name, args); - fn.apply(null, args.concat([startTime])); - } else { - fs15[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry3, 0); - } - } - } -}); - -// node_modules/is-path-cwd/index.js -var require_is_path_cwd = __commonJS({ - "node_modules/is-path-cwd/index.js"(exports2, module2) { - "use strict"; - var path15 = require("path"); - module2.exports = (path_) => { - let cwd = process.cwd(); - path_ = path15.resolve(path_); - if (process.platform === "win32") { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - return path_ === cwd; - }; - } -}); - -// node_modules/is-path-inside/index.js -var require_is_path_inside = __commonJS({ - "node_modules/is-path-inside/index.js"(exports2, module2) { - "use strict"; - var path15 = require("path"); - module2.exports = (childPath, parentPath) => { - const relation = path15.relative(parentPath, childPath); - return Boolean( - relation && relation !== ".." && !relation.startsWith(`..${path15.sep}`) && relation !== path15.resolve(childPath) - ); - }; - } -}); - -// node_modules/fs.realpath/old.js -var require_old = __commonJS({ - "node_modules/fs.realpath/old.js"(exports2) { - var pathModule = require("path"); - var isWindows = process.platform === "win32"; - var fs15 = require("fs"); - var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - function rethrow() { - var callback; - if (DEBUG) { - var backtrace = new Error(); - callback = debugCallback; - } else - callback = missingCallback; - return callback; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; - else if (!process.noDeprecation) { - var msg = "fs: missing callback " + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } - } - function maybeCallback(cb) { - return typeof cb === "function" ? cb : rethrow(); - } - var normalize3 = pathModule.normalize; - if (isWindows) { - nextPartRe = /(.*?)(?:[\/\\]+|$)/g; - } else { - nextPartRe = /(.*?)(?:[\/]+|$)/g; - } - var nextPartRe; - if (isWindows) { - splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; - } else { - splitRootRe = /^[\/]*/; - } - var splitRootRe; - exports2.realpathSync = function realpathSync(p, cache) { - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs15.lstatSync(base); - knownHard[base] = true; - } - } - while (pos < p.length) { - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - continue; - } - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - resolvedLink = cache[base]; - } else { - var stat = fs15.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs15.statSync(base); - linkTarget = fs15.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - if (cache) cache[original] = p; - return p; - }; - exports2.realpath = function realpath(p, cache, cb) { - if (typeof cb !== "function") { - cb = maybeCallback(cache); - cache = null; - } - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs15.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - function LOOP() { - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - return process.nextTick(LOOP); - } - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - return gotResolvedLink(cache[base]); - } - return fs15.lstat(base, gotStat); - } - function gotStat(err, stat) { - if (err) return cb(err); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs15.stat(base, function(err2) { - if (err2) return cb(err2); - fs15.readlink(base, function(err3, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err3, target); - }); - }); - } - function gotTarget(err, target, base2) { - if (err) return cb(err); - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base2] = resolvedLink; - gotResolvedLink(resolvedLink); - } - function gotResolvedLink(resolvedLink) { - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - }; - } -}); - -// node_modules/fs.realpath/index.js -var require_fs5 = __commonJS({ - "node_modules/fs.realpath/index.js"(exports2, module2) { - module2.exports = realpath; - realpath.realpath = realpath; - realpath.sync = realpathSync; - realpath.realpathSync = realpathSync; - realpath.monkeypatch = monkeypatch; - realpath.unmonkeypatch = unmonkeypatch; - var fs15 = require("fs"); - var origRealpath = fs15.realpath; - var origRealpathSync = fs15.realpathSync; - var version = process.version; - var ok = /^v[0-5]\./.test(version); - var old = require_old(); - function newError(er) { - return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); - } - function realpath(p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb); - } - if (typeof cache === "function") { - cb = cache; - cache = null; - } - origRealpath(p, cache, function(er, result) { - if (newError(er)) { - old.realpath(p, cache, cb); - } else { - cb(er, result); - } - }); - } - function realpathSync(p, cache) { - if (ok) { - return origRealpathSync(p, cache); - } - try { - return origRealpathSync(p, cache); - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache); - } else { - throw er; - } - } - } - function monkeypatch() { - fs15.realpath = realpath; - fs15.realpathSync = realpathSync; - } - function unmonkeypatch() { - fs15.realpath = origRealpath; - fs15.realpathSync = origRealpathSync; - } - } -}); - -// node_modules/concat-map/index.js -var require_concat_map = __commonJS({ - "node_modules/concat-map/index.js"(exports2, module2) { - module2.exports = function(xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - } -}); - -// node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ - "node_modules/balanced-match/index.js"(exports2, module2) { - "use strict"; - module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r = range(a, b, str2); - return r && { - start: r[0], - end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + a.length, r[1]), - post: str2.slice(r[1] + b.length) - }; - } - function maybeMatch(reg, str2) { - var m = str2.match(reg); - return m ? m[0] : null; - } - balanced.range = range; - function range(a, b, str2) { - var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); - var i = ai; - if (ai >= 0 && bi > 0) { - begs = []; - left = str2.length; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str2.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - bi = str2.indexOf(b, i + 1); - } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length) { - result = [left, right]; - } - } - return result; - } - } -}); - -// node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ - "node_modules/brace-expansion/index.js"(exports2, module2) { - var concatMap = require_concat_map(); - var balanced = require_balanced_match(); - module2.exports = expandTop; - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) - return [""]; - var parts = []; - var m = balanced("{", "}", str2); - if (!m) - return str2.split(","); - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; - } - function expandTop(str2) { - if (!str2) - return []; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); - } - return expand(escapeBraces(str2), true).map(unescapeBraces); - } - function embrace(str2) { - return "{" + str2 + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte5(i, y) { - return i >= y; - } - function expand(str2, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2); - } - return [str2]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand(m.post, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte5; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { - return expand(el, false); - }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - return expansions; - } - } -}); - -// node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ - "node_modules/minimatch/minimatch.js"(exports2, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path15 = (function() { - try { - return require("path"); - } catch (e) { - } - })() || { - sep: "/" - }; - minimatch.sep = path15.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand = require_brace_expansion(); - var plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" } - }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set2, c) { - set2[c] = true; - return set2; - }, {}); - } - var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { - options = options || {}; - return function(p, i, list) { - return minimatch(p, pattern, options); - }; - } - function ext(a, b) { - b = b || {}; - var t = {}; - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; - } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); - }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); - }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); - }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); - }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); - }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); - }; - m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); - }; - return m; - }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); - if (!options) options = {}; - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); - } - assertValidPattern(pattern); - if (!options) options = {}; - pattern = pattern.trim(); - if (!options.allowWindowsEscape && path15.sep !== "/") { - pattern = pattern.split(path15.sep).join("/"); - } - this.options = options; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.make(); - } - Minimatch.prototype.debug = function() { - }; - Minimatch.prototype.make = make; - function make() { - var pattern = this.pattern; - var options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); - if (options.debug) this.debug = function debug3() { - console.error.apply(console, arguments); - }; - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { - return s.split(slashSplit); - }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { - return s.map(this.parse, this); - }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { - return s.indexOf(false) === -1; - }); - this.debug(this.pattern, set2); - this.set = set2; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate = false; - var options = this.options; - var negateOffset = 0; - if (options.nonegate) return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate = !negate; - negateOffset++; - } - if (negateOffset) this.pattern = pattern.substr(negateOffset); - this.negate = negate; - } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return expand(pattern); - } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); - } - }; - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - assertValidPattern(pattern); - var options = this.options; - if (pattern === "**") { - if (!options.noglobstar) - return GLOBSTAR; - else - pattern = "*"; - } - if (pattern === "") return ""; - var re = ""; - var hasMagic = !!options.nocase; - var escaping = false; - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self2 = this; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; - } - self2.debug("clearStateChar %j %j", stateChar, re); - stateChar = false; - } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; - } - switch (c) { - /* istanbul ignore next */ - case "/": { - return false; - } - case "\\": - clearStateChar(); - escaping = true; - continue; - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); - if (inClass) { - this.debug(" in class"); - if (c === "!" && i === classStart + 1) c = "^"; - re += c; - continue; - } - self2.debug("call clearStateChar %j", stateChar); - clearStateChar(); - stateChar = c; - if (options.noext) clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re); - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - re += pl.close; - if (pl.type === "!") { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - clearStateChar(); - re += "|"; - continue; - // these are mostly the same in regexp and glob - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - var cs = pattern.substring(classStart + 1, i); - try { - RegExp("[" + cs + "]"); - } catch (er) { - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; - } - } - if (inClass) { - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re, pl); - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { - if (!$2) { - $2 = "\\"; - } - return $1 + $1 + $2 + "|"; - }); - this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case "[": - case ".": - case "(": - addPatternStart = true; - } - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - nlLast += nlAfter; - var openParensBefore = nlBefore.split("(").length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); - } - nlAfter = cleanAfter; - var dollar = ""; - if (nlAfter === "" && isSub !== SUBPARSE) { - dollar = "$"; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - if (re !== "" && hasMagic) { - re = "(?=.)" + re; - } - if (addPatternStart) { - re = patternStart + re; - } - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options.nocase ? "i" : ""; - try { - var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); - } - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) re = "^(?!" + re + ").*$"; - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - minimatch.match = function(list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function(f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = function match(f, partial) { - if (typeof partial === "undefined") partial = this.partial; - this.debug("match", f, this.pattern); - if (this.comment) return false; - if (this.empty) return f === ""; - if (f === "/" && partial) return true; - var options = this.options; - if (path15.sep !== "/") { - f = f.split(path15.sep).join("/"); - } - f = f.split(slashSplit); - this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) break; - } - for (i = 0; i < set2.length; i++) { - var pattern = set2[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) return true; - return !this.negate; - } - } - if (options.flipNegate) return false; - return this.negate; - }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options = this.options; - this.debug( - "matchOne", - { "this": this, file, pattern } - ); - this.debug("matchOne", file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug("matchOne loop"); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - if (p === false) return false; - if (p === GLOBSTAR) { - this.debug("GLOBSTAR", [pattern, p, f]); - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; - } - return true; - } - while (fr < fl) { - var swallowee = file[fr]; - this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { - this.debug("dot detected!", file, fr, pattern, pr); - break; - } - this.debug("globstar swallow a segment, and continue"); - fr++; - } - } - if (partial) { - this.debug("\n>>> no match, partial?", file, fr, pattern, pr); - if (fr === fl) return true; - } - return false; - } - var hit; - if (typeof p === "string") { - hit = f === p; - this.debug("string match", p, f, hit); - } else { - hit = f.match(p); - this.debug("pattern match", p, f, hit); - } - if (!hit) return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - return fi === fl - 1 && file[fi] === ""; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/inherits/inherits_browser.js -var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports2, module2) { - if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; - } - } -}); - -// node_modules/inherits/inherits.js -var require_inherits = __commonJS({ - "node_modules/inherits/inherits.js"(exports2, module2) { - try { - util = require("util"); - if (typeof util.inherits !== "function") throw ""; - module2.exports = util.inherits; - } catch (e) { - module2.exports = require_inherits_browser(); - } - var util; - } -}); - -// node_modules/path-is-absolute/index.js -var require_path_is_absolute = __commonJS({ - "node_modules/path-is-absolute/index.js"(exports2, module2) { - "use strict"; - function posix(path15) { - return path15.charAt(0) === "/"; - } - function win32(path15) { - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path15); - var device = result[1] || ""; - var isUnc = Boolean(device && device.charAt(1) !== ":"); - return Boolean(result[2] || isUnc); - } - module2.exports = process.platform === "win32" ? win32 : posix; - module2.exports.posix = posix; - module2.exports.win32 = win32; - } -}); - -// node_modules/rimraf/node_modules/glob/common.js -var require_common3 = __commonJS({ - "node_modules/rimraf/node_modules/glob/common.js"(exports2) { - exports2.setopts = setopts; - exports2.ownProp = ownProp; - exports2.makeAbs = makeAbs; - exports2.finish = finish; - exports2.mark = mark; - exports2.isIgnored = isIgnored; - exports2.childrenIgnored = childrenIgnored; - function ownProp(obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field); - } - var fs15 = require("fs"); - var path15 = require("path"); - var minimatch = require_minimatch(); - var isAbsolute3 = require_path_is_absolute(); - var Minimatch = minimatch.Minimatch; - function alphasort(a, b) { - return a.localeCompare(b, "en"); - } - function setupIgnores(self2, options) { - self2.ignore = options.ignore || []; - if (!Array.isArray(self2.ignore)) - self2.ignore = [self2.ignore]; - if (self2.ignore.length) { - self2.ignore = self2.ignore.map(ignoreMap); - } - } - function ignoreMap(pattern) { - var gmatcher = null; - if (pattern.slice(-3) === "/**") { - var gpattern = pattern.replace(/(\/\*\*)+$/, ""); - gmatcher = new Minimatch(gpattern, { dot: true }); - } - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher - }; - } - function setopts(self2, pattern, options) { - if (!options) - options = {}; - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar"); - } - pattern = "**/" + pattern; - } - self2.silent = !!options.silent; - self2.pattern = pattern; - self2.strict = options.strict !== false; - self2.realpath = !!options.realpath; - self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); - self2.follow = !!options.follow; - self2.dot = !!options.dot; - self2.mark = !!options.mark; - self2.nodir = !!options.nodir; - if (self2.nodir) - self2.mark = true; - self2.sync = !!options.sync; - self2.nounique = !!options.nounique; - self2.nonull = !!options.nonull; - self2.nosort = !!options.nosort; - self2.nocase = !!options.nocase; - self2.stat = !!options.stat; - self2.noprocess = !!options.noprocess; - self2.absolute = !!options.absolute; - self2.fs = options.fs || fs15; - self2.maxLength = options.maxLength || Infinity; - self2.cache = options.cache || /* @__PURE__ */ Object.create(null); - self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); - self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); - setupIgnores(self2, options); - self2.changedCwd = false; - var cwd = process.cwd(); - if (!ownProp(options, "cwd")) - self2.cwd = cwd; - else { - self2.cwd = path15.resolve(options.cwd); - self2.changedCwd = self2.cwd !== cwd; - } - self2.root = options.root || path15.resolve(self2.cwd, "/"); - self2.root = path15.resolve(self2.root); - if (process.platform === "win32") - self2.root = self2.root.replace(/\\/g, "/"); - self2.cwdAbs = isAbsolute3(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); - if (process.platform === "win32") - self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); - self2.nomount = !!options.nomount; - options.nonegate = true; - options.nocomment = true; - self2.minimatch = new Minimatch(pattern, options); - self2.options = self2.minimatch.options; - } - function finish(self2) { - var nou = self2.nounique; - var all = nou ? [] : /* @__PURE__ */ Object.create(null); - for (var i = 0, l = self2.matches.length; i < l; i++) { - var matches = self2.matches[i]; - if (!matches || Object.keys(matches).length === 0) { - if (self2.nonull) { - var literal = self2.minimatch.globSet[i]; - if (nou) - all.push(literal); - else - all[literal] = true; - } - } else { - var m = Object.keys(matches); - if (nou) - all.push.apply(all, m); - else - m.forEach(function(m2) { - all[m2] = true; - }); - } - } - if (!nou) - all = Object.keys(all); - if (!self2.nosort) - all = all.sort(alphasort); - if (self2.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self2._mark(all[i]); - } - if (self2.nodir) { - all = all.filter(function(e) { - var notDir = !/\/$/.test(e); - var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; - if (notDir && c) - notDir = c !== "DIR" && !Array.isArray(c); - return notDir; - }); - } - } - if (self2.ignore.length) - all = all.filter(function(m2) { - return !isIgnored(self2, m2); - }); - self2.found = all; - } - function mark(self2, p) { - var abs = makeAbs(self2, p); - var c = self2.cache[abs]; - var m = p; - if (c) { - var isDir = c === "DIR" || Array.isArray(c); - var slash = p.slice(-1) === "/"; - if (isDir && !slash) - m += "/"; - else if (!isDir && slash) - m = m.slice(0, -1); - if (m !== p) { - var mabs = makeAbs(self2, m); - self2.statCache[mabs] = self2.statCache[abs]; - self2.cache[mabs] = self2.cache[abs]; - } - } - return m; - } - function makeAbs(self2, f) { - var abs = f; - if (f.charAt(0) === "/") { - abs = path15.join(self2.root, f); - } else if (isAbsolute3(f) || f === "") { - abs = f; - } else if (self2.changedCwd) { - abs = path15.resolve(self2.cwd, f); - } else { - abs = path15.resolve(f); - } - if (process.platform === "win32") - abs = abs.replace(/\\/g, "/"); - return abs; - } - function isIgnored(self2, path16) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return item.matcher.match(path16) || !!(item.gmatcher && item.gmatcher.match(path16)); - }); - } - function childrenIgnored(self2, path16) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path16)); - }); - } - } -}); - -// node_modules/rimraf/node_modules/glob/sync.js -var require_sync7 = __commonJS({ - "node_modules/rimraf/node_modules/glob/sync.js"(exports2, module2) { - module2.exports = globSync; - globSync.GlobSync = GlobSync; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var Glob = require_glob().Glob; - var util = require("util"); - var path15 = require("path"); - var assert = require("assert"); - var isAbsolute3 = require_path_is_absolute(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - function globSync(pattern, options) { - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - return new GlobSync(pattern, options).found; - } - function GlobSync(pattern, options) { - if (!pattern) - throw new Error("must provide pattern"); - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options); - setopts(this, pattern, options); - if (this.noprocess) - return this; - var n = this.minimatch.set.length; - this.matches = new Array(n); - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false); - } - this._finish(); - } - GlobSync.prototype._finish = function() { - assert(this instanceof GlobSync); - if (this.realpath) { - var self2 = this; - this.matches.forEach(function(matchset, index) { - var set2 = self2.matches[index] = /* @__PURE__ */ Object.create(null); - for (var p in matchset) { - try { - p = self2._makeAbs(p); - var real = rp.realpathSync(p, self2.realpathCache); - set2[real] = true; - } catch (er) { - if (er.syscall === "stat") - set2[self2._makeAbs(p)] = true; - else - throw er; - } - } - }); - } - common2.finish(this); - }; - GlobSync.prototype._process = function(pattern, index, inGlobStar) { - assert(this instanceof GlobSync); - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute3(prefix) || isAbsolute3(pattern.join("/"))) { - if (!prefix || !isAbsolute3(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return; - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar); - }; - GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path15.join(this.root, e); - } - this._emitMatch(index, e); - } - return; - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) - newPattern = [prefix, e]; - else - newPattern = [e]; - this._process(newPattern.concat(remain), index, inGlobStar); - } - }; - GlobSync.prototype._emitMatch = function(index, e) { - if (isIgnored(this, e)) - return; - var abs = this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) { - e = abs; - } - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - if (this.stat) - this._stat(e); - }; - GlobSync.prototype._readdirInGlobStar = function(abs) { - if (this.follow) - return this._readdir(abs, false); - var entries; - var lstat; - var stat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er.code === "ENOENT") { - return null; - } - } - var isSym = lstat && lstat.isSymbolicLink(); - this.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = "FILE"; - else - entries = this._readdir(abs, false); - return entries; - }; - GlobSync.prototype._readdir = function(abs, inGlobStar) { - var entries; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return null; - if (Array.isArray(c)) - return c; - } - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)); - } catch (er) { - this._readdirError(abs, er); - return null; - } - }; - GlobSync.prototype._readdirEntries = function(abs, entries) { - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return entries; - }; - GlobSync.prototype._readdirError = function(f, er) { - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - throw error2; - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) - throw er; - if (!this.silent) - console.error("glob error", er); - break; - } - }; - GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false); - var len = entries.length; - var isSym = this.symlinks[abs]; - if (isSym && inGlobStar) - return; - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true); - } - }; - GlobSync.prototype._processSimple = function(prefix, index) { - var exists = this._stat(prefix); - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return; - if (prefix && isAbsolute3(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path15.join(this.root, prefix); - } else { - prefix = path15.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - }; - GlobSync.prototype._stat = function(f) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return false; - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return c; - if (needDir && c === "FILE") - return false; - } - var exists; - var stat = this.statCache[abs]; - if (!stat) { - var lstat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return false; - } - } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs); - } catch (er) { - stat = lstat; - } - } else { - stat = lstat; - } - } - this.statCache[abs] = stat; - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return false; - return c; - }; - GlobSync.prototype._mark = function(p) { - return common2.mark(this, p); - }; - GlobSync.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - } -}); - -// node_modules/inflight/inflight.js -var require_inflight = __commonJS({ - "node_modules/inflight/inflight.js"(exports2, module2) { - var wrappy = require_wrappy(); - var reqs = /* @__PURE__ */ Object.create(null); - var once = require_once(); - module2.exports = wrappy(inflight); - function inflight(key, cb) { - if (reqs[key]) { - reqs[key].push(cb); - return null; - } else { - reqs[key] = [cb]; - return makeres(key); - } - } - function makeres(key) { - return once(function RES() { - var cbs = reqs[key]; - var len = cbs.length; - var args = slice(arguments); - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args); - } - } finally { - if (cbs.length > len) { - cbs.splice(0, len); - process.nextTick(function() { - RES.apply(null, args); - }); - } else { - delete reqs[key]; - } - } - }); - } - function slice(args) { - var length = args.length; - var array = []; - for (var i = 0; i < length; i++) array[i] = args[i]; - return array; - } - } -}); - -// node_modules/rimraf/node_modules/glob/glob.js -var require_glob = __commonJS({ - "node_modules/rimraf/node_modules/glob/glob.js"(exports2, module2) { - module2.exports = glob2; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var inherits = require_inherits(); - var EE = require("events").EventEmitter; - var path15 = require("path"); - var assert = require("assert"); - var isAbsolute3 = require_path_is_absolute(); - var globSync = require_sync7(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var inflight = require_inflight(); - var util = require("util"); - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - var once = require_once(); - function glob2(pattern, options, cb) { - if (typeof options === "function") cb = options, options = {}; - if (!options) options = {}; - if (options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return globSync(pattern, options); - } - return new Glob(pattern, options, cb); - } - glob2.sync = globSync; - var GlobSync = glob2.GlobSync = globSync.GlobSync; - glob2.glob = glob2; - function extend3(origin, add) { - if (add === null || typeof add !== "object") { - return origin; - } - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; - } - glob2.hasMagic = function(pattern, options_) { - var options = extend3({}, options_); - options.noprocess = true; - var g = new Glob(pattern, options); - var set2 = g.minimatch.set; - if (!pattern) - return false; - if (set2.length > 1) - return true; - for (var j = 0; j < set2[0].length; j++) { - if (typeof set2[0][j] !== "string") - return true; - } - return false; - }; - glob2.Glob = Glob; - inherits(Glob, EE); - function Glob(pattern, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - if (options && options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return new GlobSync(pattern, options); - } - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb); - setopts(this, pattern, options); - this._didRealPath = false; - var n = this.minimatch.set.length; - this.matches = new Array(n); - if (typeof cb === "function") { - cb = once(cb); - this.on("error", cb); - this.on("end", function(matches) { - cb(null, matches); - }); - } - var self2 = this; - this._processing = 0; - this._emitQueue = []; - this._processQueue = []; - this.paused = false; - if (this.noprocess) - return this; - if (n === 0) - return done(); - var sync = true; - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false, done); - } - sync = false; - function done() { - --self2._processing; - if (self2._processing <= 0) { - if (sync) { - process.nextTick(function() { - self2._finish(); - }); - } else { - self2._finish(); - } - } - } - } - Glob.prototype._finish = function() { - assert(this instanceof Glob); - if (this.aborted) - return; - if (this.realpath && !this._didRealpath) - return this._realpath(); - common2.finish(this); - this.emit("end", this.found); - }; - Glob.prototype._realpath = function() { - if (this._didRealpath) - return; - this._didRealpath = true; - var n = this.matches.length; - if (n === 0) - return this._finish(); - var self2 = this; - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next); - function next() { - if (--n === 0) - self2._finish(); - } - }; - Glob.prototype._realpathSet = function(index, cb) { - var matchset = this.matches[index]; - if (!matchset) - return cb(); - var found = Object.keys(matchset); - var self2 = this; - var n = found.length; - if (n === 0) - return cb(); - var set2 = this.matches[index] = /* @__PURE__ */ Object.create(null); - found.forEach(function(p, i) { - p = self2._makeAbs(p); - rp.realpath(p, self2.realpathCache, function(er, real) { - if (!er) - set2[real] = true; - else if (er.syscall === "stat") - set2[p] = true; - else - self2.emit("error", er); - if (--n === 0) { - self2.matches[index] = set2; - cb(); - } - }); - }); - }; - Glob.prototype._mark = function(p) { - return common2.mark(this, p); - }; - Glob.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - Glob.prototype.abort = function() { - this.aborted = true; - this.emit("abort"); - }; - Glob.prototype.pause = function() { - if (!this.paused) { - this.paused = true; - this.emit("pause"); - } - }; - Glob.prototype.resume = function() { - if (this.paused) { - this.emit("resume"); - this.paused = false; - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0); - this._emitQueue.length = 0; - for (var i = 0; i < eq.length; i++) { - var e = eq[i]; - this._emitMatch(e[0], e[1]); - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0); - this._processQueue.length = 0; - for (var i = 0; i < pq.length; i++) { - var p = pq[i]; - this._processing--; - this._process(p[0], p[1], p[2], p[3]); - } - } - } - }; - Glob.prototype._process = function(pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === "function"); - if (this.aborted) - return; - this._processing++; - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]); - return; - } - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index, cb); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute3(prefix) || isAbsolute3(pattern.join("/"))) { - if (!prefix || !isAbsolute3(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return cb(); - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); - }; - Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return cb(); - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path15.join(this.root, e); - } - this._emitMatch(index, e); - } - return cb(); - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - this._process([e].concat(remain), index, inGlobStar, cb); - } - cb(); - }; - Glob.prototype._emitMatch = function(index, e) { - if (this.aborted) - return; - if (isIgnored(this, e)) - return; - if (this.paused) { - this._emitQueue.push([index, e]); - return; - } - var abs = isAbsolute3(e) ? e : this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) - e = abs; - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - var st = this.statCache[abs]; - if (st) - this.emit("stat", e, st); - this.emit("match", e); - }; - Glob.prototype._readdirInGlobStar = function(abs, cb) { - if (this.aborted) - return; - if (this.follow) - return this._readdir(abs, false, cb); - var lstatkey = "lstat\0" + abs; - var self2 = this; - var lstatcb = inflight(lstatkey, lstatcb_); - if (lstatcb) - self2.fs.lstat(abs, lstatcb); - function lstatcb_(er, lstat) { - if (er && er.code === "ENOENT") - return cb(); - var isSym = lstat && lstat.isSymbolicLink(); - self2.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) { - self2.cache[abs] = "FILE"; - cb(); - } else - self2._readdir(abs, false, cb); - } - }; - Glob.prototype._readdir = function(abs, inGlobStar, cb) { - if (this.aborted) - return; - cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); - if (!cb) - return; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return cb(); - if (Array.isArray(c)) - return cb(null, c); - } - var self2 = this; - self2.fs.readdir(abs, readdirCb(this, abs, cb)); - }; - function readdirCb(self2, abs, cb) { - return function(er, entries) { - if (er) - self2._readdirError(abs, er, cb); - else - self2._readdirEntries(abs, entries, cb); - }; - } - Glob.prototype._readdirEntries = function(abs, entries, cb) { - if (this.aborted) - return; - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return cb(null, entries); - }; - Glob.prototype._readdirError = function(f, er, cb) { - if (this.aborted) - return; - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - this.emit("error", error2); - this.abort(); - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) { - this.emit("error", er); - this.abort(); - } - if (!this.silent) - console.error("glob error", er); - break; - } - return cb(); - }; - Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false, cb); - var isSym = this.symlinks[abs]; - var len = entries.length; - if (isSym && inGlobStar) - return cb(); - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true, cb); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true, cb); - } - cb(); - }; - Glob.prototype._processSimple = function(prefix, index, cb) { - var self2 = this; - this._stat(prefix, function(er, exists) { - self2._processSimple2(prefix, index, er, exists, cb); - }); - }; - Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return cb(); - if (prefix && isAbsolute3(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path15.join(this.root, prefix); - } else { - prefix = path15.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - cb(); - }; - Glob.prototype._stat = function(f, cb) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return cb(); - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return cb(null, c); - if (needDir && c === "FILE") - return cb(); - } - var exists; - var stat = this.statCache[abs]; - if (stat !== void 0) { - if (stat === false) - return cb(null, stat); - else { - var type2 = stat.isDirectory() ? "DIR" : "FILE"; - if (needDir && type2 === "FILE") - return cb(); - else - return cb(null, type2, stat); - } - } - var self2 = this; - var statcb = inflight("stat\0" + abs, lstatcb_); - if (statcb) - self2.fs.lstat(abs, statcb); - function lstatcb_(er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - return self2.fs.stat(abs, function(er2, stat2) { - if (er2) - self2._stat2(f, abs, null, lstat, cb); - else - self2._stat2(f, abs, er2, stat2, cb); - }); - } else { - self2._stat2(f, abs, er, lstat, cb); - } - } - }; - Glob.prototype._stat2 = function(f, abs, er, stat, cb) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return cb(); - } - var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat; - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) - return cb(null, false, stat); - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return cb(); - return cb(null, c, stat); - }; - } -}); - -// node_modules/rimraf/rimraf.js -var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports2, module2) { - var assert = require("assert"); - var path15 = require("path"); - var fs15 = require("fs"); - var glob2 = void 0; - try { - glob2 = require_glob(); - } catch (_err) { - } - var defaultGlobOpts = { - nosort: true, - silent: true - }; - var timeout = 0; - var isWindows = process.platform === "win32"; - var defaults = (options) => { - const methods = [ - "unlink", - "chmod", - "stat", - "lstat", - "rmdir", - "readdir" - ]; - methods.forEach((m) => { - options[m] = options[m] || fs15[m]; - m = m + "Sync"; - options[m] = options[m] || fs15[m]; - }); - options.maxBusyTries = options.maxBusyTries || 3; - options.emfileWait = options.emfileWait || 1e3; - if (options.glob === false) { - options.disableGlob = true; - } - if (options.disableGlob !== true && glob2 === void 0) { - throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); - } - options.disableGlob = options.disableGlob || false; - options.glob = options.glob || defaultGlobOpts; - }; - var rimraf = (p, options, cb) => { - if (typeof options === "function") { - cb = options; - options = {}; - } - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert.equal(typeof cb, "function", "rimraf: callback function required"); - assert(options, "rimraf: invalid options argument provided"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - defaults(options); - let busyTries = 0; - let errState = null; - let n = 0; - const next = (er) => { - errState = errState || er; - if (--n === 0) - cb(errState); - }; - const afterGlob = (er, results) => { - if (er) - return cb(er); - n = results.length; - if (n === 0) - return cb(); - results.forEach((p2) => { - const CB = (er2) => { - if (er2) { - if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { - busyTries++; - return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); - } - if (er2.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p2, options, CB), timeout++); - } - if (er2.code === "ENOENT") er2 = null; - } - timeout = 0; - next(er2); - }; - rimraf_(p2, options, CB); - }); - }; - if (options.disableGlob || !glob2.hasMagic(p)) - return afterGlob(null, [p]); - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]); - glob2(p, options.glob, afterGlob); - }); - }; - var rimraf_ = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null); - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb); - if (st && st.isDirectory()) - return rmdir(p, options, er, cb); - options.unlink(p, (er2) => { - if (er2) { - if (er2.code === "ENOENT") - return cb(null); - if (er2.code === "EPERM") - return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); - if (er2.code === "EISDIR") - return rmdir(p, options, er2, cb); - } - return cb(er2); - }); - }); - }; - var fixWinEPERM = (p, options, er, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.chmod(p, 438, (er2) => { - if (er2) - cb(er2.code === "ENOENT" ? null : er); - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er); - else if (stats.isDirectory()) - rmdir(p, options, er, cb); - else - options.unlink(p, cb); - }); - }); - }; - var fixWinEPERMSync = (p, options, er) => { - assert(p); - assert(options); - try { - options.chmodSync(p, 438); - } catch (er2) { - if (er2.code === "ENOENT") - return; - else - throw er; - } - let stats; - try { - stats = options.statSync(p); - } catch (er3) { - if (er3.code === "ENOENT") - return; - else - throw er; - } - if (stats.isDirectory()) - rmdirSync(p, options, er); - else - options.unlinkSync(p); - }; - var rmdir = (p, options, originalEr, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.rmdir(p, (er) => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb); - else if (er && er.code === "ENOTDIR") - cb(originalEr); - else - cb(er); - }); - }; - var rmkids = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.readdir(p, (er, files) => { - if (er) - return cb(er); - let n = files.length; - if (n === 0) - return options.rmdir(p, cb); - let errState; - files.forEach((f) => { - rimraf(path15.join(p, f), options, (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--n === 0) - options.rmdir(p, cb); - }); - }); - }); - }; - var rimrafSync = (p, options) => { - options = options || {}; - defaults(options); - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert(options, "rimraf: missing options"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - let results; - if (options.disableGlob || !glob2.hasMagic(p)) { - results = [p]; - } else { - try { - options.lstatSync(p); - results = [p]; - } catch (er) { - results = glob2.sync(p, options.glob); - } - } - if (!results.length) - return; - for (let i = 0; i < results.length; i++) { - const p2 = results[i]; - let st; - try { - st = options.lstatSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p2, options, er); - } - try { - if (st && st.isDirectory()) - rmdirSync(p2, options, null); - else - options.unlinkSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); - if (er.code !== "EISDIR") - throw er; - rmdirSync(p2, options, er); - } - } - }; - var rmdirSync = (p, options, originalEr) => { - assert(p); - assert(options); - try { - options.rmdirSync(p); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "ENOTDIR") - throw originalEr; - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options); - } - }; - var rmkidsSync = (p, options) => { - assert(p); - assert(options); - options.readdirSync(p).forEach((f) => rimrafSync(path15.join(p, f), options)); - const retries = isWindows ? 100 : 1; - let i = 0; - do { - let threw = true; - try { - const ret = options.rmdirSync(p, options); - threw = false; - return ret; - } finally { - if (++i < retries && threw) - continue; - } - } while (true); - }; - module2.exports = rimraf; - rimraf.sync = rimrafSync; - } -}); - -// node_modules/del/node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "node_modules/del/node_modules/indent-string/index.js"(exports2, module2) { - "use strict"; - module2.exports = (string, count = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count)); - }; - } -}); - -// node_modules/del/node_modules/clean-stack/index.js -var require_clean_stack = __commonJS({ - "node_modules/del/node_modules/clean-stack/index.js"(exports2, module2) { - "use strict"; - var os5 = require("os"); - var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; - var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; - var homeDir = typeof os5.homedir === "undefined" ? "" : os5.homedir(); - module2.exports = (stack, options) => { - options = Object.assign({ pretty: false }, options); - return stack.replace(/\\/g, "/").split("\n").filter((line) => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - const match = pathMatches[1]; - if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { - return false; - } - return !pathRegex.test(match); - }).filter((line) => line.trim() !== "").map((line) => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); - } - return line; - }).join("\n"); - }; - } -}); - -// node_modules/del/node_modules/aggregate-error/index.js -var require_aggregate_error = __commonJS({ - "node_modules/del/node_modules/aggregate-error/index.js"(exports2, module2) { - "use strict"; - var indentString2 = require_indent_string(); - var cleanStack = require_clean_stack(); - var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - errors = [...errors].map((error2) => { - if (error2 instanceof Error) { - return error2; - } - if (error2 !== null && typeof error2 === "object") { - return Object.assign(new Error(error2.message), error2); - } - return new Error(error2); - }); - let message = errors.map((error2) => { - return typeof error2.stack === "string" ? cleanInternalStack(cleanStack(error2.stack)) : String(error2); - }).join("\n"); - message = "\n" + indentString2(message, 4); - super(message); - this.name = "AggregateError"; - Object.defineProperty(this, "_errors", { value: errors }); - } - *[Symbol.iterator]() { - for (const error2 of this._errors) { - yield error2; - } - } - }; - module2.exports = AggregateError; - } -}); - -// node_modules/del/node_modules/p-map/index.js -var require_p_map = __commonJS({ - "node_modules/del/node_modules/p-map/index.js"(exports2, module2) { - "use strict"; - var AggregateError = require_aggregate_error(); - module2.exports = async (iterable, mapper, { - concurrency = Infinity, - stopOnError = true - } = {}) => { - return new Promise((resolve9, reject) => { - if (typeof mapper !== "function") { - throw new TypeError("Mapper function is required"); - } - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - const next = () => { - if (isRejected) { - return; - } - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - if (nextItem.done) { - isIterableDone = true; - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve9(result); - } - } - return; - } - resolvingCount++; - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error2) { - if (stopOnError) { - isRejected = true; - reject(error2); - } else { - errors.push(error2); - resolvingCount--; - next(); - } - } - })(); - }; - for (let i = 0; i < concurrency; i++) { - next(); - if (isIterableDone) { - break; - } - } - }); - }; - } -}); - -// node_modules/del/index.js -var require_del = __commonJS({ - "node_modules/del/index.js"(exports2, module2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var path15 = require("path"); - var globby = require_globby(); - var isGlob = require_is_glob(); - var slash = require_slash(); - var gracefulFs = require_graceful_fs(); - var isPathCwd = require_is_path_cwd(); - var isPathInside = require_is_path_inside(); - var rimraf = require_rimraf(); - var pMap = require_p_map(); - var rimrafP = promisify2(rimraf); - var rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync - }; - function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); - } - if (!isPathInside(file, cwd)) { - throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); - } - } - function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - patterns = patterns.map((pattern) => { - if (process.platform === "win32" && isGlob(pattern) === false) { - return slash(pattern); - } - return pattern; - }); - return patterns; - } - module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), onProgress = () => { - }, ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); - if (files.length === 0) { - onProgress({ - totalCount: 0, - deletedCount: 0, - percent: 1 - }); - } - let deletedCount = 0; - const mapper = async (file) => { - file = path15.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - deletedCount += 1; - onProgress({ - totalCount: files.length, - deletedCount, - percent: deletedCount / files.length - }); - return file; - }; - const removedFiles = await pMap(files, mapper, options); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); - const removedFiles = files.map((file) => { - file = path15.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - return file; - }); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; + const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path19) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path19) || isNotRelative(path19); + }; + if ( + // Detect `process` so that it can run in browsers. + typeof process !== "undefined" && process.platform === "win32" + ) { + setupWindows(); + } + module2.exports = factory; + factory.default = factory; + module2.exports.isPathValid = isPathValid; + define2(module2.exports, Symbol.for("setupWindows"), setupWindows); } }); @@ -36287,7 +32325,7 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^6.1.1", + del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -37444,18 +33482,18 @@ var require_light = __commonJS({ var done, waitForExecuting; options = parser$5.load(options, this.stopDefaults); waitForExecuting = (at) => { - var finished; - finished = () => { + var finished2; + finished2 = () => { var counts; counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; return new this.Promise((resolve9, reject) => { - if (finished()) { + if (finished2()) { return resolve9(); } else { return this.on("done", () => { - if (finished()) { + if (finished2()) { this.removeAllListeners("done"); return resolve9(); } @@ -37882,7 +33920,7 @@ var require_console_log_level = __commonJS({ "use strict"; var util = require("util"); var levels = ["trace", "debug", "info", "warn", "error", "fatal"]; - var noop = function() { + var noop2 = function() { }; module2.exports = function(opts) { opts = opts || {}; @@ -37892,7 +33930,7 @@ var require_console_log_level = __commonJS({ return levels.indexOf(level) >= levels.indexOf(opts.level); }; levels.forEach(function(level) { - logger[level] = shouldLog(level) ? log : noop; + logger[level] = shouldLog(level) ? log : noop2; function log() { var prefix = opts.prefix; var normalizedLevel; @@ -38013,7 +34051,7 @@ var require_internal_path_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -38021,7 +34059,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path15.dirname(p); + let result = path19.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -38059,7 +34097,7 @@ var require_internal_path_helper = __commonJS({ assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { - root += path15.sep; + root += path19.sep; } return root + itemPath; } @@ -38097,10 +34135,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path15.sep)) { + if (!p.endsWith(path19.sep)) { return p; } - if (p === path15.sep) { + if (p === path19.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -38211,6 +34249,796 @@ var require_internal_pattern_helper = __commonJS({ } }); +// node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str2) { + if (a instanceof RegExp) a = maybeMatch(a, str2); + if (b instanceof RegExp) b = maybeMatch(b, str2); + var r = range(a, b, str2); + return r && { + start: r[0], + end: r[1], + pre: str2.slice(0, r[0]), + body: str2.slice(r[0] + a.length, r[1]), + post: str2.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str2) { + var m = str2.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str2) { + var begs, beg, left, right, result; + var ai = str2.indexOf(a); + var bi = str2.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + begs = []; + left = str2.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str2.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str2.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str2) { + return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + } + function escapeBraces(str2) { + return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str2) { + return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str2) { + if (!str2) + return [""]; + var parts = []; + var m = balanced("{", "}", str2); + if (!m) + return str2.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str2) { + if (!str2) + return []; + if (str2.substr(0, 2) === "{}") { + str2 = "\\{\\}" + str2.substr(2); + } + return expand(escapeBraces(str2), true).map(unescapeBraces); + } + function embrace(str2) { + return "{" + str2 + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte5(i, y) { + return i >= y; + } + function expand(str2, isTop) { + var expansions = []; + var m = balanced("{", "}", str2); + if (!m || /\$$/.test(m.pre)) return [str2]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str2 = m.pre + "{" + m.body + escClose + m.post; + return expand(str2); + } + return [str2]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte5; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path19 = (function() { + try { + return require("path"); + } catch (e) { + } + })() || { + sep: "/" + }; + minimatch.sep = path19.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set2, c) { + set2[c] = true; + return set2; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path19.sep !== "/") { + pattern = pattern.split(path19.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set2 = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug3() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set2); + set2 = this.globParts = set2.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set2); + set2 = set2.map(function(s, si, set3) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set2); + set2 = set2.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set2); + this.set = set2; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set2 = this.set; + if (!set2.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set2.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path19.sep !== "/") { + f = f.split(path19.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set2 = this.set; + this.debug(this.pattern, "set", set2); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set2.length; i++) { + var pattern = set2[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug( + "matchOne", + { "this": this, file, pattern } + ); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) return true; + } + return false; + } + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { @@ -38243,7 +35071,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -38258,12 +35086,12 @@ var require_internal_path = __commonJS({ assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path15.sep); + this.segments = itemPath.split(path19.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path15.basename(remaining); + const basename = path19.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -38281,7 +35109,7 @@ var require_internal_path = __commonJS({ assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path15.sep), `Parameter 'itemPath' contains unexpected path separators`); + assert_1.default(!segment.includes(path19.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -38292,12 +35120,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path15.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path19.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path15.sep; + result += path19.sep; } result += this.segments[i]; } @@ -38341,7 +35169,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os5 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -38370,7 +35198,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir2); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path15.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path19.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -38394,8 +35222,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path15.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path15.sep}`; + if (!itemPath.endsWith(path19.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path19.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -38430,9 +35258,9 @@ var require_internal_pattern = __commonJS({ assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path15.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path19.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path15.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path19.sep}`)) { homedir2 = homedir2 || os5.homedir(); assert_1.default(homedir2, "Unable to determine HOME directory"); assert_1.default(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); @@ -38516,8 +35344,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path15, level) { - this.path = path15; + constructor(path19, level) { + this.path = path19; this.level = level; } }; @@ -38637,9 +35465,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core14 = __importStar4(require_core()); - var fs15 = __importStar4(require("fs")); + var fs18 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var patternHelper = __importStar4(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); @@ -38689,7 +35517,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await4(fs15.promises.lstat(searchPath)); + yield __await4(fs18.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -38720,7 +35548,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs15.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path15.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs18.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path19.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await4(item.path); @@ -38755,7 +35583,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs15.promises.stat(item.path); + stats = yield fs18.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -38767,10 +35595,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs15.promises.lstat(item.path); + stats = yield fs18.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs15.promises.realpath(item.path); + const realPath = yield fs18.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -38789,7 +35617,7 @@ var require_internal_globber = __commonJS({ }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ +var require_glob = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -40101,11 +36929,11 @@ var require_cacheUtils = __commonJS({ exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); - var glob2 = __importStar4(require_glob2()); + var glob2 = __importStar4(require_glob()); var io7 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs15 = __importStar4(require("fs")); - var path15 = __importStar4(require("path")); + var fs18 = __importStar4(require("fs")); + var path19 = __importStar4(require("path")); var semver9 = __importStar4(require_semver3()); var util = __importStar4(require("util")); var constants_1 = require_constants10(); @@ -40125,16 +36953,16 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path15.join(baseLocation, "actions", "temp"); + tempDirectory = path19.join(baseLocation, "actions", "temp"); } - const dest = path15.join(tempDirectory, crypto.randomUUID()); + const dest = path19.join(tempDirectory, crypto.randomUUID()); yield io7.mkdirP(dest); return dest; }); } exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs15.statSync(filePath).size; + return fs18.statSync(filePath).size; } exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { @@ -40151,7 +36979,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path15.relative(workspace, file).replace(new RegExp(`\\${path15.sep}`, "g"), "/"); + const relativeFile = path19.relative(workspace, file).replace(new RegExp(`\\${path19.sep}`, "g"), "/"); core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -40174,7 +37002,7 @@ var require_cacheUtils = __commonJS({ exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { return __awaiter4(this, void 0, void 0, function* () { - return util.promisify(fs15.unlink)(filePath); + return util.promisify(fs18.unlink)(filePath); }); } exports2.unlinkFile = unlinkFile; @@ -40219,7 +37047,7 @@ var require_cacheUtils = __commonJS({ exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { return __awaiter4(this, void 0, void 0, function* () { - if (fs15.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs18.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -41725,13 +38553,13 @@ var require_userAgentPlatform = __commonJS({ exports2.setPlatformSpecificData = setPlatformSpecificData; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var os5 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); + var process6 = tslib_1.__importStar(require("node:process")); function getHeaderName() { return "User-Agent"; } async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; + if (process6 && process6.versions) { + const versions = process6.versions; if (versions.bun) { map2.set("Bun", versions.bun); } else if (versions.deno) { @@ -42699,7 +39527,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common4 = __commonJS({ +var require_common3 = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -43033,7 +39861,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common4()(exports2); + module2.exports = require_common3()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -43321,7 +40149,7 @@ var require_node = __commonJS({ debug3.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common4()(exports2); + module2.exports = require_common3()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -48057,15 +44885,15 @@ var require_urlHelpers = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path15 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path15.startsWith("/")) { - path15 = path15.substring(1); + let path19 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path19.startsWith("/")) { + path19 = path19.substring(1); } - if (isAbsoluteUrl(path15)) { - requestUrl = path15; + if (isAbsoluteUrl(path19)) { + requestUrl = path19; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path15); + requestUrl = appendPath(requestUrl, path19); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -48113,9 +44941,9 @@ var require_urlHelpers = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path15 = pathToAppend.substring(0, searchStart); + const path19 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path15; + newPath = newPath + path19; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -51992,7 +48820,7 @@ var require_dist7 = __commonJS({ var stream2 = require("stream"); var coreLro = require_dist6(); var events = require("events"); - var fs15 = require("fs"); + var fs18 = require("fs"); var util = require("util"); var buffer = require("buffer"); function _interopNamespaceDefault(e) { @@ -52015,7 +48843,7 @@ var require_dist7 = __commonJS({ } var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs15); + var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs18); var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); var logger = logger$1.createClientLogger("storage-blob"); var BaseRequestPolicy = class { @@ -52264,10 +49092,10 @@ var require_dist7 = __commonJS({ ]; function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path15 = urlParsed.pathname; - path15 = path15 || "/"; - path15 = escape(path15); - urlParsed.pathname = path15; + let path19 = urlParsed.pathname; + path19 = path19 || "/"; + path19 = escape(path19); + urlParsed.pathname = path19; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -52352,9 +49180,9 @@ var require_dist7 = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path15 = urlParsed.pathname; - path15 = path15 ? path15.endsWith("/") ? `${path15}${name}` : `${path15}/${name}` : name; - urlParsed.pathname = path15; + let path19 = urlParsed.pathname; + path19 = path19 ? path19.endsWith("/") ? `${path19}${name}` : `${path19}/${name}` : name; + urlParsed.pathname = path19; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -53435,9 +50263,9 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path15 = getURLPath(request.url) || "/"; + const path19 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path15}`; + canonicalizedResourceString += `/${this.factory.accountName}${path19}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -53730,9 +50558,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path15 = getURLPath(request.url) || "/"; + const path19 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path15}`; + canonicalizedResourceString += `/${options.accountName}${path19}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -73034,8 +69862,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (this.operationCount >= BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path15 = getURLPath(subRequest.url); - if (!path15 || path15 === "") { + const path19 = getURLPath(subRequest.url); + if (!path19 || path19 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -73095,8 +69923,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; pipeline = newPipeline(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path15 = getURLPath(url2); - if (path15 && path15 !== "/") { + const path19 = getURLPath(url2); + if (path19 && path19 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -75863,7 +72691,7 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); - var fs15 = __importStar4(require("fs")); + var fs18 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); var utils = __importStar4(require_cacheUtils()); @@ -75974,7 +72802,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter4(this, void 0, void 0, function* () { - const writeStream = fs15.createWriteStream(archivePath); + const writeStream = fs18.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); @@ -76000,7 +72828,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { var _a; return __awaiter4(this, void 0, void 0, function* () { - const archiveDescriptor = yield fs15.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs18.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -76117,7 +72945,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs15.openSync(archivePath, "w"); + const fd = fs18.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -76135,12 +72963,12 @@ var require_downloadUtils = __commonJS({ controller.abort(); throw new Error("Aborting cache download as the download time exceeded the timeout."); } else if (Buffer.isBuffer(result)) { - fs15.writeFileSync(fd, result); + fs18.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs15.closeSync(fd); + fs18.closeSync(fd); } } }); @@ -76439,7 +73267,7 @@ var require_cacheHttpClient = __commonJS({ var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs15 = __importStar4(require("fs")); + var fs18 = __importStar4(require("fs")); var url_1 = require("url"); var utils = __importStar4(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -76577,7 +73405,7 @@ Other caches with similar key:`); return __awaiter4(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); - const fd = fs15.openSync(archivePath, "r"); + const fd = fs18.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -76591,7 +73419,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs15.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs18.createReadStream(archivePath, { fd, start, end, @@ -76602,7 +73430,7 @@ Other caches with similar key:`); } }))); } finally { - fs15.closeSync(fd); + fs18.closeSync(fd); } return; }); @@ -81820,7 +78648,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io7 = __importStar4(require_io()); var fs_1 = require("fs"); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var constants_1 = require_constants10(); var IS_WINDOWS = process.platform === "win32"; @@ -81866,13 +78694,13 @@ var require_tar = __commonJS({ const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type2) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path15.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path19.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -81918,7 +78746,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -81927,7 +78755,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -81942,7 +78770,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -81951,7 +78779,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -81991,7 +78819,7 @@ var require_tar = __commonJS({ exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter4(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path15.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path19.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -82061,7 +78889,7 @@ var require_cache3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; var core14 = __importStar4(require_core()); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); @@ -82151,7 +78979,7 @@ var require_cache3 = __commonJS({ core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path19.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core14.isDebug()) { @@ -82220,7 +79048,7 @@ var require_cache3 = __commonJS({ core14.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path19.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core14.debug(`Archive path: ${archivePath}`); core14.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -82283,7 +79111,7 @@ var require_cache3 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path19.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -82347,7 +79175,7 @@ var require_cache3 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path19.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -82522,7 +79350,7 @@ var require_internal_path_helper2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -82530,7 +79358,7 @@ var require_internal_path_helper2 = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path15.dirname(p); + let result = path19.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -82568,7 +79396,7 @@ var require_internal_path_helper2 = __commonJS({ (0, assert_1.default)(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { - root += path15.sep; + root += path19.sep; } return root + itemPath; } @@ -82606,10 +79434,10 @@ var require_internal_path_helper2 = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path15.sep)) { + if (!p.endsWith(path19.sep)) { return p; } - if (p === path15.sep) { + if (p === path19.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -82760,7 +79588,7 @@ var require_internal_path2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -82775,12 +79603,12 @@ var require_internal_path2 = __commonJS({ (0, assert_1.default)(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path15.sep); + this.segments = itemPath.split(path19.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path15.basename(remaining); + const basename = path19.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -82798,7 +79626,7 @@ var require_internal_path2 = __commonJS({ (0, assert_1.default)(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - (0, assert_1.default)(!segment.includes(path15.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path19.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -82809,12 +79637,12 @@ var require_internal_path2 = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path15.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path19.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path15.sep; + result += path19.sep; } result += this.segments[i]; } @@ -82862,7 +79690,7 @@ var require_internal_pattern2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os5 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -82891,7 +79719,7 @@ var require_internal_pattern2 = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir2); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path15.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path19.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -82915,8 +79743,8 @@ var require_internal_pattern2 = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path15.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path15.sep}`; + if (!itemPath.endsWith(path19.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path19.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -82951,9 +79779,9 @@ var require_internal_pattern2 = __commonJS({ (0, assert_1.default)(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); (0, assert_1.default)(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path15.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path19.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path15.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path19.sep}`)) { homedir2 = homedir2 || os5.homedir(); (0, assert_1.default)(homedir2, "Unable to determine HOME directory"); (0, assert_1.default)(pathHelper.hasAbsoluteRoot(homedir2), `Expected HOME directory to be a rooted path. Actual '${homedir2}'`); @@ -83037,8 +79865,8 @@ var require_internal_search_state2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path15, level) { - this.path = path15; + constructor(path19, level) { + this.path = path19; this.level = level; } }; @@ -83162,9 +79990,9 @@ var require_internal_globber2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core14 = __importStar4(require_core()); - var fs15 = __importStar4(require("fs")); + var fs18 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var patternHelper = __importStar4(require_internal_pattern_helper2()); var internal_match_kind_1 = require_internal_match_kind2(); var internal_pattern_1 = require_internal_pattern2(); @@ -83216,7 +80044,7 @@ var require_internal_globber2 = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await4(fs15.promises.lstat(searchPath)); + yield __await4(fs18.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -83240,7 +80068,7 @@ var require_internal_globber2 = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path15.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path19.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -83250,7 +80078,7 @@ var require_internal_globber2 = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs15.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path15.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs18.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path19.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await4(item.path); @@ -83285,7 +80113,7 @@ var require_internal_globber2 = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs15.promises.stat(item.path); + stats = yield fs18.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -83297,10 +80125,10 @@ var require_internal_globber2 = __commonJS({ throw err; } } else { - stats = yield fs15.promises.lstat(item.path); + stats = yield fs18.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs15.promises.realpath(item.path); + const realPath = yield fs18.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -83399,10 +80227,10 @@ var require_internal_hash_files = __commonJS({ exports2.hashFiles = void 0; var crypto = __importStar4(require("crypto")); var core14 = __importStar4(require_core()); - var fs15 = __importStar4(require("fs")); + var fs18 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); function hashFiles2(globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; var _d; @@ -83418,17 +80246,17 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path15.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path19.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } - if (fs15.statSync(file).isDirectory()) { + if (fs18.statSync(file).isDirectory()) { writeDelegate(`Skip directory '${file}'.`); continue; } const hash = crypto.createHash("sha256"); const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs15.createReadStream(file), hash); + yield pipeline(fs18.createReadStream(file), hash); result.write(hash.digest()); count++; if (!hasMatch) { @@ -83459,7 +80287,7 @@ var require_internal_hash_files = __commonJS({ }); // node_modules/@actions/glob/lib/glob.js -var require_glob3 = __commonJS({ +var require_glob2 = __commonJS({ "node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -83577,7 +80405,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os5 = require("os"); var cp = require("child_process"); - var fs15 = require("fs"); + var fs18 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter4(this, void 0, void 0, function* () { const platFilter = os5.platform(); @@ -83641,10 +80469,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs15.existsSync(lsbReleaseFile)) { - contents = fs15.readFileSync(lsbReleaseFile).toString(); - } else if (fs15.existsSync(osReleaseFile)) { - contents = fs15.readFileSync(osReleaseFile).toString(); + if (fs18.existsSync(lsbReleaseFile)) { + contents = fs18.readFileSync(lsbReleaseFile).toString(); + } else if (fs18.existsSync(osReleaseFile)) { + contents = fs18.readFileSync(osReleaseFile).toString(); } return contents; } @@ -83821,10 +80649,10 @@ var require_tool_cache = __commonJS({ var core14 = __importStar4(require_core()); var io7 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs15 = __importStar4(require("fs")); + var fs18 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); var os5 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); + var path19 = __importStar4(require("path")); var httpm = __importStar4(require_lib()); var semver9 = __importStar4(require_semver2()); var stream2 = __importStar4(require("stream")); @@ -83845,8 +80673,8 @@ var require_tool_cache = __commonJS({ var userAgent = "actions/tool-cache"; function downloadTool2(url, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path15.join(_getTempDirectory(), crypto.randomUUID()); - yield io7.mkdirP(path15.dirname(dest)); + dest = dest || path19.join(_getTempDirectory(), crypto.randomUUID()); + yield io7.mkdirP(path19.dirname(dest)); core14.debug(`Downloading ${url}`); core14.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -83868,7 +80696,7 @@ var require_tool_cache = __commonJS({ exports2.downloadTool = downloadTool2; function downloadToolAttempt(url, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - if (fs15.existsSync(dest)) { + if (fs18.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { @@ -83892,7 +80720,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs15.createWriteStream(dest)); + yield pipeline(readStream, fs18.createWriteStream(dest)); core14.debug("download complete"); succeeded = true; return dest; @@ -83933,7 +80761,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path15.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path19.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; @@ -84104,12 +80932,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os5.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); core14.debug(`source dir: ${sourceDir}`); - if (!fs15.statSync(sourceDir).isDirectory()) { + if (!fs18.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs15.readdirSync(sourceDir)) { - const s = path15.join(sourceDir, itemName); + for (const itemName of fs18.readdirSync(sourceDir)) { + const s = path19.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -84123,11 +80951,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os5.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); core14.debug(`source file: ${sourceFile}`); - if (!fs15.statSync(sourceFile).isFile()) { + if (!fs18.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path15.join(destFolder, targetFile); + const destPath = path19.join(destFolder, targetFile); core14.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -84151,9 +80979,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path15.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path19.join(_getCacheDirectory(), toolName, versionSpec, arch2); core14.debug(`checking cache: ${cachePath}`); - if (fs15.existsSync(cachePath) && fs15.existsSync(`${cachePath}.complete`)) { + if (fs18.existsSync(cachePath) && fs18.existsSync(`${cachePath}.complete`)) { core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -84166,13 +80994,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os5.arch(); - const toolPath = path15.join(_getCacheDirectory(), toolName); - if (fs15.existsSync(toolPath)) { - const children = fs15.readdirSync(toolPath); + const toolPath = path19.join(_getCacheDirectory(), toolName); + if (fs18.existsSync(toolPath)) { + const children = fs18.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path15.join(toolPath, child, arch2 || ""); - if (fs15.existsSync(fullPath) && fs15.existsSync(`${fullPath}.complete`)) { + const fullPath = path19.join(toolPath, child, arch2 || ""); + if (fs18.existsSync(fullPath) && fs18.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -84226,7 +81054,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter4(this, void 0, void 0, function* () { if (!dest) { - dest = path15.join(_getTempDirectory(), crypto.randomUUID()); + dest = path19.join(_getTempDirectory(), crypto.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -84234,7 +81062,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { - const folderPath = path15.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path19.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -84244,9 +81072,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path15.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path19.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs15.writeFileSync(markerPath, ""); + fs18.writeFileSync(markerPath, ""); core14.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -84423,7 +81251,7 @@ var require_follow_redirects = __commonJS({ "ERR_STREAM_WRITE_AFTER_END", "write after end" ); - var destroy = Writable.prototype.destroy || noop; + var destroy = Writable.prototype.destroy || noop2; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); @@ -84752,7 +81580,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop() { + function noop2() { } function parseUrl(input) { var parsed; @@ -84828,7 +81656,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.removeListener(event, eventHandlers[event]); } - request.on("error", noop); + request.on("error", noop2); request.destroy(error2); } function isSubdomain(subdomain, domain) { @@ -84854,8 +81682,8 @@ var require_follow_redirects = __commonJS({ }); // src/init-action.ts -var fs14 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var fs17 = __toESM(require("fs")); +var path18 = __toESM(require("path")); var core13 = __toESM(require_core()); var io6 = __toESM(require_io()); var semver8 = __toESM(require_semver2()); @@ -84912,17 +81740,17 @@ function v4(options, buf, offset) { var v4_default = v4; // src/actions-util.ts -var fs2 = __toESM(require("fs")); -var path2 = __toESM(require("path")); +var fs5 = __toESM(require("fs")); +var path6 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts -var fs = __toESM(require("fs")); +var fs4 = __toESM(require("fs")); var os = __toESM(require("os")); -var path = __toESM(require("path")); +var path5 = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -85062,36 +81890,764 @@ function checkDiskSpace(directoryPath, dependencies = { return checkUnix(directoryPath); } -// src/util.ts -var import_del = __toESM(require_del()); +// node_modules/del/index.js +var import_promises5 = __toESM(require("node:fs/promises"), 1); +var import_node_path6 = __toESM(require("node:path"), 1); +var import_node_process5 = __toESM(require("node:process"), 1); + +// node_modules/globby/index.js +var import_node_process3 = __toESM(require("node:process"), 1); +var import_node_fs3 = __toESM(require("node:fs"), 1); +var import_node_path3 = __toESM(require("node:path"), 1); + +// node_modules/globby/node_modules/@sindresorhus/merge-streams/index.js +var import_node_events = require("node:events"); +var import_node_stream = require("node:stream"); +var import_promises2 = require("node:stream/promises"); +function mergeStreams(streams) { + if (!Array.isArray(streams)) { + throw new TypeError(`Expected an array, got \`${typeof streams}\`.`); + } + for (const stream2 of streams) { + validateStream(stream2); + } + const objectMode = streams.some(({ readableObjectMode }) => readableObjectMode); + const highWaterMark = getHighWaterMark(streams, objectMode); + const passThroughStream = new MergedStream({ + objectMode, + writableHighWaterMark: highWaterMark, + readableHighWaterMark: highWaterMark + }); + for (const stream2 of streams) { + passThroughStream.add(stream2); + } + if (streams.length === 0) { + endStream(passThroughStream); + } + return passThroughStream; +} +var getHighWaterMark = (streams, objectMode) => { + if (streams.length === 0) { + return 16384; + } + const highWaterMarks = streams.filter(({ readableObjectMode }) => readableObjectMode === objectMode).map(({ readableHighWaterMark }) => readableHighWaterMark); + return Math.max(...highWaterMarks); +}; +var MergedStream = class extends import_node_stream.PassThrough { + #streams = /* @__PURE__ */ new Set([]); + #ended = /* @__PURE__ */ new Set([]); + #aborted = /* @__PURE__ */ new Set([]); + #onFinished; + add(stream2) { + validateStream(stream2); + if (this.#streams.has(stream2)) { + return; + } + this.#streams.add(stream2); + this.#onFinished ??= onMergedStreamFinished(this, this.#streams); + endWhenStreamsDone({ + passThroughStream: this, + stream: stream2, + streams: this.#streams, + ended: this.#ended, + aborted: this.#aborted, + onFinished: this.#onFinished + }); + stream2.pipe(this, { end: false }); + } + remove(stream2) { + validateStream(stream2); + if (!this.#streams.has(stream2)) { + return false; + } + stream2.unpipe(this); + return true; + } +}; +var onMergedStreamFinished = async (passThroughStream, streams) => { + updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT); + const controller = new AbortController(); + try { + await Promise.race([ + onMergedStreamEnd(passThroughStream, controller), + onInputStreamsUnpipe(passThroughStream, streams, controller) + ]); + } finally { + controller.abort(); + updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_COUNT); + } +}; +var onMergedStreamEnd = async (passThroughStream, { signal }) => { + await (0, import_promises2.finished)(passThroughStream, { signal, cleanup: true }); +}; +var onInputStreamsUnpipe = async (passThroughStream, streams, { signal }) => { + for await (const [unpipedStream] of (0, import_node_events.on)(passThroughStream, "unpipe", { signal })) { + if (streams.has(unpipedStream)) { + unpipedStream.emit(unpipeEvent); + } + } +}; +var validateStream = (stream2) => { + if (typeof stream2?.pipe !== "function") { + throw new TypeError(`Expected a readable stream, got: \`${typeof stream2}\`.`); + } +}; +var endWhenStreamsDone = async ({ passThroughStream, stream: stream2, streams, ended, aborted, onFinished }) => { + updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM); + const controller = new AbortController(); + try { + await Promise.race([ + afterMergedStreamFinished(onFinished, stream2), + onInputStreamEnd({ passThroughStream, stream: stream2, streams, ended, aborted, controller }), + onInputStreamUnpipe({ stream: stream2, streams, ended, aborted, controller }) + ]); + } finally { + controller.abort(); + updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM); + } + if (streams.size === ended.size + aborted.size) { + if (ended.size === 0 && aborted.size > 0) { + abortStream(passThroughStream); + } else { + endStream(passThroughStream); + } + } +}; +var isAbortError = (error2) => error2?.code === "ERR_STREAM_PREMATURE_CLOSE"; +var afterMergedStreamFinished = async (onFinished, stream2) => { + try { + await onFinished; + abortStream(stream2); + } catch (error2) { + if (isAbortError(error2)) { + abortStream(stream2); + } else { + errorStream(stream2, error2); + } + } +}; +var onInputStreamEnd = async ({ passThroughStream, stream: stream2, streams, ended, aborted, controller: { signal } }) => { + try { + await (0, import_promises2.finished)(stream2, { signal, cleanup: true, readable: true, writable: false }); + if (streams.has(stream2)) { + ended.add(stream2); + } + } catch (error2) { + if (signal.aborted || !streams.has(stream2)) { + return; + } + if (isAbortError(error2)) { + aborted.add(stream2); + } else { + errorStream(passThroughStream, error2); + } + } +}; +var onInputStreamUnpipe = async ({ stream: stream2, streams, ended, aborted, controller: { signal } }) => { + await (0, import_node_events.once)(stream2, unpipeEvent, { signal }); + streams.delete(stream2); + ended.delete(stream2); + aborted.delete(stream2); +}; +var unpipeEvent = Symbol("unpipe"); +var endStream = (stream2) => { + if (stream2.writable) { + stream2.end(); + } +}; +var abortStream = (stream2) => { + if (stream2.readable || stream2.writable) { + stream2.destroy(); + } +}; +var errorStream = (stream2, error2) => { + if (!stream2.destroyed) { + stream2.once("error", noop); + stream2.destroy(error2); + } +}; +var noop = () => { +}; +var updateMaxListeners = (passThroughStream, increment) => { + const maxListeners = passThroughStream.getMaxListeners(); + if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) { + passThroughStream.setMaxListeners(maxListeners + increment); + } +}; +var PASSTHROUGH_LISTENERS_COUNT = 2; +var PASSTHROUGH_LISTENERS_PER_STREAM = 1; + +// node_modules/globby/index.js +var import_fast_glob2 = __toESM(require_out4(), 1); + +// node_modules/path-type/index.js +var import_node_fs = __toESM(require("node:fs"), 1); +var import_promises3 = __toESM(require("node:fs/promises"), 1); +async function isType(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + const stats = await import_promises3.default[fsStatType](filePath); + return stats[statsMethodName](); + } catch (error2) { + if (error2.code === "ENOENT") { + return false; + } + throw error2; + } +} +function isTypeSync(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + return import_node_fs.default[fsStatType](filePath)[statsMethodName](); + } catch (error2) { + if (error2.code === "ENOENT") { + return false; + } + throw error2; + } +} +var isFile = isType.bind(void 0, "stat", "isFile"); +var isDirectory = isType.bind(void 0, "stat", "isDirectory"); +var isSymlink = isType.bind(void 0, "lstat", "isSymbolicLink"); +var isFileSync = isTypeSync.bind(void 0, "statSync", "isFile"); +var isDirectorySync = isTypeSync.bind(void 0, "statSync", "isDirectory"); +var isSymlinkSync = isTypeSync.bind(void 0, "lstatSync", "isSymbolicLink"); + +// node_modules/unicorn-magic/node.js +var import_node_util2 = require("node:util"); +var import_node_child_process2 = require("node:child_process"); +var import_node_url = require("node:url"); +var execFileOriginal = (0, import_node_util2.promisify)(import_node_child_process2.execFile); +function toPath(urlOrPath) { + return urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath; +} +var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024; + +// node_modules/globby/ignore.js +var import_node_process2 = __toESM(require("node:process"), 1); +var import_node_fs2 = __toESM(require("node:fs"), 1); +var import_promises4 = __toESM(require("node:fs/promises"), 1); +var import_node_path2 = __toESM(require("node:path"), 1); +var import_fast_glob = __toESM(require_out4(), 1); +var import_ignore = __toESM(require_ignore(), 1); + +// node_modules/slash/index.js +function slash(path19) { + const isExtendedLengthPath = path19.startsWith("\\\\?\\"); + if (isExtendedLengthPath) { + return path19; + } + return path19.replace(/\\/g, "/"); +} + +// node_modules/globby/utilities.js +var isNegativePattern = (pattern) => pattern[0] === "!"; + +// node_modules/globby/ignore.js +var defaultIgnoredDirectories = [ + "**/node_modules", + "**/flow-typed", + "**/coverage", + "**/.git" +]; +var ignoreFilesGlobOptions = { + absolute: true, + dot: true +}; +var GITIGNORE_FILES_PATTERN = "**/.gitignore"; +var applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" + import_node_path2.default.posix.join(base, pattern.slice(1)) : import_node_path2.default.posix.join(base, pattern); +var parseIgnoreFile = (file, cwd) => { + const base = slash(import_node_path2.default.relative(cwd, import_node_path2.default.dirname(file.filePath))); + return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base)); +}; +var toRelativePath = (fileOrDirectory, cwd) => { + cwd = slash(cwd); + if (import_node_path2.default.isAbsolute(fileOrDirectory)) { + if (slash(fileOrDirectory).startsWith(cwd)) { + return import_node_path2.default.relative(cwd, fileOrDirectory); + } + throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`); + } + return fileOrDirectory; +}; +var getIsIgnoredPredicate = (files, cwd) => { + const patterns = files.flatMap((file) => parseIgnoreFile(file, cwd)); + const ignores = (0, import_ignore.default)().add(patterns); + return (fileOrDirectory) => { + fileOrDirectory = toPath(fileOrDirectory); + fileOrDirectory = toRelativePath(fileOrDirectory, cwd); + return fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false; + }; +}; +var normalizeOptions = (options = {}) => ({ + cwd: toPath(options.cwd) ?? import_node_process2.default.cwd(), + suppressErrors: Boolean(options.suppressErrors), + deep: typeof options.deep === "number" ? options.deep : Number.POSITIVE_INFINITY, + ignore: [...options.ignore ?? [], ...defaultIgnoredDirectories] +}); +var isIgnoredByIgnoreFiles = async (patterns, options) => { + const { cwd, suppressErrors, deep, ignore } = normalizeOptions(options); + const paths = await (0, import_fast_glob.default)(patterns, { + cwd, + suppressErrors, + deep, + ignore, + ...ignoreFilesGlobOptions + }); + const files = await Promise.all( + paths.map(async (filePath) => ({ + filePath, + content: await import_promises4.default.readFile(filePath, "utf8") + })) + ); + return getIsIgnoredPredicate(files, cwd); +}; +var isIgnoredByIgnoreFilesSync = (patterns, options) => { + const { cwd, suppressErrors, deep, ignore } = normalizeOptions(options); + const paths = import_fast_glob.default.sync(patterns, { + cwd, + suppressErrors, + deep, + ignore, + ...ignoreFilesGlobOptions + }); + const files = paths.map((filePath) => ({ + filePath, + content: import_node_fs2.default.readFileSync(filePath, "utf8") + })); + return getIsIgnoredPredicate(files, cwd); +}; + +// node_modules/globby/index.js +var assertPatternsInput = (patterns) => { + if (patterns.some((pattern) => typeof pattern !== "string")) { + throw new TypeError("Patterns must be a string or an array of strings"); + } +}; +var normalizePathForDirectoryGlob = (filePath, cwd) => { + const path19 = isNegativePattern(filePath) ? filePath.slice(1) : filePath; + return import_node_path3.default.isAbsolute(path19) ? path19 : import_node_path3.default.join(cwd, path19); +}; +var getDirectoryGlob = ({ directoryPath, files, extensions }) => { + const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : ""; + return files ? files.map((file) => import_node_path3.default.posix.join(directoryPath, `**/${import_node_path3.default.extname(file) ? file : `${file}${extensionGlob}`}`)) : [import_node_path3.default.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)]; +}; +var directoryToGlob = async (directoryPaths, { + cwd = import_node_process3.default.cwd(), + files, + extensions +} = {}) => { + const globs = await Promise.all( + directoryPaths.map(async (directoryPath) => await isDirectory(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath) + ); + return globs.flat(); +}; +var directoryToGlobSync = (directoryPaths, { + cwd = import_node_process3.default.cwd(), + files, + extensions +} = {}) => directoryPaths.flatMap((directoryPath) => isDirectorySync(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath); +var toPatternsArray = (patterns) => { + patterns = [...new Set([patterns].flat())]; + assertPatternsInput(patterns); + return patterns; +}; +var checkCwdOption = (cwd) => { + if (!cwd) { + return; + } + let stat; + try { + stat = import_node_fs3.default.statSync(cwd); + } catch { + return; + } + if (!stat.isDirectory()) { + throw new Error("The `cwd` option must be a path to a directory"); + } +}; +var normalizeOptions2 = (options = {}) => { + options = { + ...options, + ignore: options.ignore ?? [], + expandDirectories: options.expandDirectories ?? true, + cwd: toPath(options.cwd) + }; + checkCwdOption(options.cwd); + return options; +}; +var normalizeArguments = (function_) => async (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)); +var normalizeArgumentsSync = (function_) => (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)); +var getIgnoreFilesPatterns = (options) => { + const { ignoreFiles, gitignore } = options; + const patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : []; + if (gitignore) { + patterns.push(GITIGNORE_FILES_PATTERN); + } + return patterns; +}; +var getFilter = async (options) => { + const ignoreFilesPatterns = getIgnoreFilesPatterns(options); + return createFilterFunction( + ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options) + ); +}; +var getFilterSync = (options) => { + const ignoreFilesPatterns = getIgnoreFilesPatterns(options); + return createFilterFunction( + ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options) + ); +}; +var createFilterFunction = (isIgnored) => { + const seen = /* @__PURE__ */ new Set(); + return (fastGlobResult) => { + const pathKey = import_node_path3.default.normalize(fastGlobResult.path ?? fastGlobResult); + if (seen.has(pathKey) || isIgnored && isIgnored(pathKey)) { + return false; + } + seen.add(pathKey); + return true; + }; +}; +var unionFastGlobResults = (results, filter) => results.flat().filter((fastGlobResult) => filter(fastGlobResult)); +var convertNegativePatterns = (patterns, options) => { + const tasks = []; + while (patterns.length > 0) { + const index = patterns.findIndex((pattern) => isNegativePattern(pattern)); + if (index === -1) { + tasks.push({ patterns, options }); + break; + } + const ignorePattern = patterns[index].slice(1); + for (const task of tasks) { + task.options.ignore.push(ignorePattern); + } + if (index !== 0) { + tasks.push({ + patterns: patterns.slice(0, index), + options: { + ...options, + ignore: [ + ...options.ignore, + ignorePattern + ] + } + }); + } + patterns = patterns.slice(index + 1); + } + return tasks; +}; +var normalizeExpandDirectoriesOption = (options, cwd) => ({ + ...cwd ? { cwd } : {}, + ...Array.isArray(options) ? { files: options } : options +}); +var generateTasks = async (patterns, options) => { + const globTasks = convertNegativePatterns(patterns, options); + const { cwd, expandDirectories } = options; + if (!expandDirectories) { + return globTasks; + } + const directoryToGlobOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd); + return Promise.all( + globTasks.map(async (task) => { + let { patterns: patterns2, options: options2 } = task; + [ + patterns2, + options2.ignore + ] = await Promise.all([ + directoryToGlob(patterns2, directoryToGlobOptions), + directoryToGlob(options2.ignore, { cwd }) + ]); + return { patterns: patterns2, options: options2 }; + }) + ); +}; +var generateTasksSync = (patterns, options) => { + const globTasks = convertNegativePatterns(patterns, options); + const { cwd, expandDirectories } = options; + if (!expandDirectories) { + return globTasks; + } + const directoryToGlobSyncOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd); + return globTasks.map((task) => { + let { patterns: patterns2, options: options2 } = task; + patterns2 = directoryToGlobSync(patterns2, directoryToGlobSyncOptions); + options2.ignore = directoryToGlobSync(options2.ignore, { cwd }); + return { patterns: patterns2, options: options2 }; + }); +}; +var globby = normalizeArguments(async (patterns, options) => { + const [ + tasks, + filter + ] = await Promise.all([ + generateTasks(patterns, options), + getFilter(options) + ]); + const results = await Promise.all(tasks.map((task) => (0, import_fast_glob2.default)(task.patterns, task.options))); + return unionFastGlobResults(results, filter); +}); +var globbySync = normalizeArgumentsSync((patterns, options) => { + const tasks = generateTasksSync(patterns, options); + const filter = getFilterSync(options); + const results = tasks.map((task) => import_fast_glob2.default.sync(task.patterns, task.options)); + return unionFastGlobResults(results, filter); +}); +var globbyStream = normalizeArgumentsSync((patterns, options) => { + const tasks = generateTasksSync(patterns, options); + const filter = getFilterSync(options); + const streams = tasks.map((task) => import_fast_glob2.default.stream(task.patterns, task.options)); + const stream2 = mergeStreams(streams).filter((fastGlobResult) => filter(fastGlobResult)); + return stream2; +}); +var isDynamicPattern = normalizeArgumentsSync( + (patterns, options) => patterns.some((pattern) => import_fast_glob2.default.isDynamicPattern(pattern, options)) +); +var generateGlobTasks = normalizeArguments(generateTasks); +var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync); +var { convertPathToPattern } = import_fast_glob2.default; + +// node_modules/del/index.js +var import_is_glob = __toESM(require_is_glob(), 1); + +// node_modules/is-path-cwd/index.js +var import_node_process4 = __toESM(require("node:process"), 1); +var import_node_path4 = __toESM(require("node:path"), 1); +function isPathCwd(path_) { + let cwd = import_node_process4.default.cwd(); + path_ = import_node_path4.default.resolve(path_); + if (import_node_process4.default.platform === "win32") { + cwd = cwd.toLowerCase(); + path_ = path_.toLowerCase(); + } + return path_ === cwd; +} + +// node_modules/del/node_modules/is-path-inside/index.js +var import_node_path5 = __toESM(require("node:path"), 1); +function isPathInside(childPath, parentPath) { + const relation = import_node_path5.default.relative(parentPath, childPath); + return Boolean( + relation && relation !== ".." && !relation.startsWith(`..${import_node_path5.default.sep}`) && relation !== import_node_path5.default.resolve(childPath) + ); +} + +// node_modules/p-map/index.js +async function pMap(iterable, mapper, { + concurrency = Number.POSITIVE_INFINITY, + stopOnError = true, + signal +} = {}) { + return new Promise((resolve_, reject_) => { + if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) { + throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`); + } + if (typeof mapper !== "function") { + throw new TypeError("Mapper function is required"); + } + if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) { + throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); + } + const result = []; + const errors = []; + const skippedIndexesMap = /* @__PURE__ */ new Map(); + let isRejected = false; + let isResolved = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const iterator = iterable[Symbol.iterator] === void 0 ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator](); + const signalListener = () => { + reject(signal.reason); + }; + const cleanup = () => { + signal?.removeEventListener("abort", signalListener); + }; + const resolve9 = (value) => { + resolve_(value); + cleanup(); + }; + const reject = (reason) => { + isRejected = true; + isResolved = true; + reject_(reason); + cleanup(); + }; + if (signal) { + if (signal.aborted) { + reject(signal.reason); + } + signal.addEventListener("abort", signalListener, { once: true }); + } + const next = async () => { + if (isResolved) { + return; + } + const nextItem = await iterator.next(); + const index = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0 && !isResolved) { + if (!stopOnError && errors.length > 0) { + reject(new AggregateError(errors)); + return; + } + isResolved = true; + if (skippedIndexesMap.size === 0) { + resolve9(result); + return; + } + const pureResult = []; + for (const [index2, value] of result.entries()) { + if (skippedIndexesMap.get(index2) === pMapSkip) { + continue; + } + pureResult.push(value); + } + resolve9(pureResult); + } + return; + } + resolvingCount++; + (async () => { + try { + const element = await nextItem.value; + if (isResolved) { + return; + } + const value = await mapper(element, index); + if (value === pMapSkip) { + skippedIndexesMap.set(index, value); + } + result[index] = value; + resolvingCount--; + await next(); + } catch (error2) { + if (stopOnError) { + reject(error2); + } else { + errors.push(error2); + resolvingCount--; + try { + await next(); + } catch (error3) { + reject(error3); + } + } + } + })(); + }; + (async () => { + for (let index = 0; index < concurrency; index++) { + try { + await next(); + } catch (error2) { + reject(error2); + break; + } + if (isIterableDone || isRejected) { + break; + } + } + })(); + }); +} +var pMapSkip = Symbol("skip"); + +// node_modules/del/index.js +function safeCheck(file, cwd) { + if (isPathCwd(file)) { + throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); + } + if (!isPathInside(file, cwd)) { + throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); + } +} +function normalizePatterns(patterns) { + patterns = Array.isArray(patterns) ? patterns : [patterns]; + patterns = patterns.map((pattern) => { + if (import_node_process5.default.platform === "win32" && (0, import_is_glob.default)(pattern) === false) { + return slash(pattern); + } + return pattern; + }); + return patterns; +} +async function deleteAsync(patterns, { force, dryRun, cwd = import_node_process5.default.cwd(), onProgress = () => { +}, ...options } = {}) { + options = { + expandDirectories: false, + onlyFiles: false, + followSymbolicLinks: false, + cwd, + ...options + }; + patterns = normalizePatterns(patterns); + const paths = await globby(patterns, options); + const files = paths.sort((a, b) => b.localeCompare(a)); + if (files.length === 0) { + onProgress({ + totalCount: 0, + deletedCount: 0, + percent: 1 + }); + } + let deletedCount = 0; + const mapper = async (file) => { + file = import_node_path6.default.resolve(cwd, file); + if (!force) { + safeCheck(file, cwd); + } + if (!dryRun) { + await import_promises5.default.rm(file, { recursive: true, force: true }); + } + deletedCount += 1; + onProgress({ + totalCount: files.length, + deletedCount, + percent: deletedCount / files.length, + path: file + }); + return file; + }; + const removedFiles = await pMap(files, mapper, options); + removedFiles.sort((a, b) => a.localeCompare(b)); + return removedFiles; +} // node_modules/get-folder-size/index.js -var import_node_path2 = require("node:path"); +var import_node_path7 = require("node:path"); async function getFolderSize(itemPath, options) { return await core(itemPath, options, { errors: true }); } getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); async function core(rootItemPath, options = {}, returnType = {}) { - const fs15 = options.fs || await import("node:fs/promises"); + const fs18 = options.fs || await import("node:fs/promises"); let folderSize = 0n; const foundInos = /* @__PURE__ */ new Set(); const errors = []; await processItem(rootItemPath); async function processItem(itemPath) { if (options.ignore?.test(itemPath)) return; - const stats = returnType.strict ? await fs15.lstat(itemPath, { bigint: true }) : await fs15.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + const stats = returnType.strict ? await fs18.lstat(itemPath, { bigint: true }) : await fs18.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); if (typeof stats !== "object") return; if (!foundInos.has(stats.ino)) { foundInos.add(stats.ino); folderSize += stats.size; } if (stats.isDirectory()) { - const directoryItems = returnType.strict ? await fs15.readdir(itemPath) : await fs15.readdir(itemPath).catch((error2) => errors.push(error2)); + const directoryItems = returnType.strict ? await fs18.readdir(itemPath) : await fs18.readdir(itemPath).catch((error2) => errors.push(error2)); if (typeof directoryItems !== "object") return; await Promise.all( directoryItems.map( - (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path7.join)(itemPath, directoryItem)) ) ); } @@ -87783,13 +85339,13 @@ function getTotalMemoryBytes(logger) { return limit; } function getCgroupMemoryLimitBytes(limitFile, logger) { - if (!fs.existsSync(limitFile)) { + if (!fs4.existsSync(limitFile)) { logger.debug( `While resolving RAM, did not find a cgroup memory limit at ${limitFile}.` ); return void 0; } - const limit = Number(fs.readFileSync(limitFile, "utf8")); + const limit = Number(fs4.readFileSync(limitFile, "utf8")); if (!Number.isInteger(limit)) { logger.debug( `While resolving RAM, ignored the file ${limitFile} that may contain a cgroup memory limit as this file did not contain an integer.` @@ -87859,13 +85415,13 @@ function getThreadsFlagValue(userInput, logger) { return numThreads; } function getCgroupCpuCountFromCpuMax(cpuMaxFile, logger) { - if (!fs.existsSync(cpuMaxFile)) { + if (!fs4.existsSync(cpuMaxFile)) { logger.debug( `While resolving threads, did not find a cgroup CPU file at ${cpuMaxFile}.` ); return void 0; } - const cpuMaxString = fs.readFileSync(cpuMaxFile, "utf-8"); + const cpuMaxString = fs4.readFileSync(cpuMaxFile, "utf-8"); const cpuMaxStringSplit = cpuMaxString.split(" "); if (cpuMaxStringSplit.length !== 2) { logger.debug( @@ -87885,14 +85441,14 @@ function getCgroupCpuCountFromCpuMax(cpuMaxFile, logger) { return cpuCount; } function getCgroupCpuCountFromCpus(cpusFile, logger) { - if (!fs.existsSync(cpusFile)) { + if (!fs4.existsSync(cpusFile)) { logger.debug( `While resolving threads, did not find a cgroup CPUs file at ${cpusFile}.` ); return void 0; } let cpuCount = 0; - const cpusString = fs.readFileSync(cpusFile, "utf-8").trim(); + const cpusString = fs4.readFileSync(cpusFile, "utf-8").trim(); if (cpusString.length === 0) { return void 0; } @@ -87911,10 +85467,10 @@ function getCgroupCpuCountFromCpus(cpusFile, logger) { return cpuCount; } function getCodeQLDatabasePath(config, language) { - return path.resolve(config.dbLocation, language); + return path5.resolve(config.dbLocation, language); } function getGeneratedSuitePath(config, language) { - return path.resolve( + return path5.resolve( config.dbLocation, language, "temp", @@ -88062,15 +85618,15 @@ async function tryGetFolderBytes(cacheDir, logger, quiet = false) { } var hadTimeout = false; async function withTimeout(timeoutMs, promise, onTimeout) { - let finished = false; + let finished2 = false; const mainTask = async () => { const result = await promise; - finished = true; + finished2 = true; return result; }; const timeoutTask = async () => { await delay(timeoutMs, { allowProcessExit: true }); - if (!finished) { + if (!finished2) { hadTimeout = true; onTimeout(); } @@ -88196,7 +85752,7 @@ async function checkSipEnablement(logger) { async function cleanUpGlob(glob2, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await (0, import_del.default)(glob2, { force: true }); + const deletedPaths = await deleteAsync(glob2, { force: true }); if (deletedPaths.length === 0) { logger.warning( `Failed to clean up ${name}: no files found matching ${glob2}.` @@ -88250,17 +85806,17 @@ function getWorkflowEventName() { } function isRunningLocalAction() { const relativeScriptPath = getRelativeScriptPath(); - return relativeScriptPath.startsWith("..") || path2.isAbsolute(relativeScriptPath); + return relativeScriptPath.startsWith("..") || path6.isAbsolute(relativeScriptPath); } function getRelativeScriptPath() { const runnerTemp = getRequiredEnvParam("RUNNER_TEMP"); - const actionsDirectory = path2.join(path2.dirname(runnerTemp), "_actions"); - return path2.relative(actionsDirectory, __filename); + const actionsDirectory = path6.join(path6.dirname(runnerTemp), "_actions"); + return path6.relative(actionsDirectory, __filename); } function getWorkflowEvent() { const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH"); try { - return JSON.parse(fs2.readFileSync(eventJsonFile, "utf-8")); + return JSON.parse(fs5.readFileSync(eventJsonFile, "utf-8")); } catch (e) { throw new Error( `Unable to read workflow event JSON from ${eventJsonFile}: ${e}` @@ -88585,8 +86141,8 @@ function getDependencyCachingEnabled() { } // src/config-utils.ts -var fs6 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var fs9 = __toESM(require("fs")); +var path10 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var semver4 = __toESM(require_semver2()); @@ -88615,8 +86171,8 @@ async function parseAnalysisKinds(input) { } // src/feature-flags.ts -var fs4 = __toESM(require("fs")); -var path4 = __toESM(require("path")); +var fs7 = __toESM(require("fs")); +var path8 = __toESM(require("path")); var semver3 = __toESM(require_semver2()); // src/defaults.json @@ -88624,8 +86180,8 @@ var bundleVersion = "codeql-bundle-v2.22.4"; var cliVersion = "2.22.4"; // src/overlay-database-utils.ts -var fs3 = __toESM(require("fs")); -var path3 = __toESM(require("path")); +var fs6 = __toESM(require("fs")); +var path7 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts @@ -88729,8 +86285,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path15 = decodeGitFilePath(match[2]); - fileOidMap[path15] = oid; + const path19 = decodeGitFilePath(match[2]); + fileOidMap[path19] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -88836,12 +86392,12 @@ async function writeBaseDatabaseOidsFile(config, sourceRoot) { const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOidsJson = JSON.stringify(gitFileOids); const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - await fs3.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); + await fs6.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); } async function readBaseDatabaseOidsFile(config, logger) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); try { - const contents = await fs3.promises.readFile( + const contents = await fs6.promises.readFile( baseDatabaseOidsFilePath, "utf-8" ); @@ -88854,7 +86410,7 @@ async function readBaseDatabaseOidsFile(config, logger) { } } function getBaseDatabaseOidsFilePath(config) { - return path3.join(config.dbLocation, "base-database-oids.json"); + return path7.join(config.dbLocation, "base-database-oids.json"); } async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); @@ -88864,14 +86420,14 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path3.join( + const overlayChangesFile = path7.join( getTemporaryDirectory(), "overlay-changes.json" ); logger.debug( `Writing overlay changed files to ${overlayChangesFile}: ${changedFilesJson}` ); - await fs3.promises.writeFile(overlayChangesFile, changedFilesJson); + await fs6.promises.writeFile(overlayChangesFile, changedFilesJson); return overlayChangesFile; } function computeChangedFiles(baseFileOids, overlayFileOids) { @@ -88893,7 +86449,7 @@ var CACHE_PREFIX = "codeql-overlay-base-database"; var MAX_CACHE_OPERATION_MS = 12e4; function checkOverlayBaseDatabase(config, logger, warningPrefix) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - if (!fs3.existsSync(baseDatabaseOidsFilePath)) { + if (!fs6.existsSync(baseDatabaseOidsFilePath)) { logger.warning( `${warningPrefix}: ${baseDatabaseOidsFilePath} does not exist` ); @@ -89155,7 +86711,7 @@ var Features = class { this.gitHubFeatureFlags = new GitHubFeatureFlags( gitHubVersion, repositoryNwo, - path4.join(tempDir, FEATURE_FLAGS_FILE_NAME), + path8.join(tempDir, FEATURE_FLAGS_FILE_NAME), logger ); } @@ -89334,12 +86890,12 @@ var GitHubFeatureFlags = class { } async readLocalFlags() { try { - if (fs4.existsSync(this.featureFlagsFile)) { + if (fs7.existsSync(this.featureFlagsFile)) { this.logger.debug( `Loading feature flags from ${this.featureFlagsFile}` ); return JSON.parse( - fs4.readFileSync(this.featureFlagsFile, "utf8") + fs7.readFileSync(this.featureFlagsFile, "utf8") ); } } catch (e) { @@ -89352,7 +86908,7 @@ var GitHubFeatureFlags = class { async writeLocalFlags(flags) { try { this.logger.debug(`Writing feature flags to ${this.featureFlagsFile}`); - fs4.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); + fs7.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); } catch (e) { this.logger.warning( `Error writing cached feature flags file ${this.featureFlagsFile}: ${e}.` @@ -89450,8 +87006,8 @@ var KnownLanguage = /* @__PURE__ */ ((KnownLanguage2) => { })(KnownLanguage || {}); // src/trap-caching.ts -var fs5 = __toESM(require("fs")); -var path5 = __toESM(require("path")); +var fs8 = __toESM(require("fs")); +var path9 = __toESM(require("path")); var actionsCache2 = __toESM(require_cache3()); var CACHE_VERSION2 = 1; var CODEQL_TRAP_CACHE_PREFIX = "codeql-trap"; @@ -89467,13 +87023,13 @@ async function downloadTrapCaches(codeql, languages, logger) { `Found ${languagesSupportingCaching.length} languages that support TRAP caching` ); if (languagesSupportingCaching.length === 0) return result; - const cachesDir = path5.join( + const cachesDir = path9.join( getTemporaryDirectory(), "trapCaches" ); for (const language of languagesSupportingCaching) { - const cacheDir = path5.join(cachesDir, language); - fs5.mkdirSync(cacheDir, { recursive: true }); + const cacheDir = path9.join(cachesDir, language); + fs8.mkdirSync(cacheDir, { recursive: true }); result[language] = cacheDir; } if (await isAnalyzingDefaultBranch()) { @@ -89485,7 +87041,7 @@ async function downloadTrapCaches(codeql, languages, logger) { let baseSha = "unknown"; const eventPath = process.env.GITHUB_EVENT_PATH; if (getWorkflowEventName() === "pull_request" && eventPath !== void 0) { - const event = JSON.parse(fs5.readFileSync(path5.resolve(eventPath), "utf-8")); + const event = JSON.parse(fs8.readFileSync(path9.resolve(eventPath), "utf-8")); baseSha = event.pull_request?.base?.sha || baseSha; } for (const language of languages) { @@ -89624,9 +87180,9 @@ async function getSupportedLanguageMap(codeql) { } var baseWorkflowsPath = ".github/workflows"; function hasActionsWorkflows(sourceRoot) { - const workflowsPath = path6.resolve(sourceRoot, baseWorkflowsPath); - const stats = fs6.lstatSync(workflowsPath); - return stats !== void 0 && stats.isDirectory() && fs6.readdirSync(workflowsPath).length > 0; + const workflowsPath = path10.resolve(sourceRoot, baseWorkflowsPath); + const stats = fs9.lstatSync(workflowsPath); + return stats !== void 0 && stats.isDirectory() && fs9.readdirSync(workflowsPath).length > 0; } async function getRawLanguagesInRepo(repository, sourceRoot, logger) { logger.debug( @@ -89773,8 +87329,8 @@ async function downloadCacheWithTime(trapCachingEnabled, codeQL, languages, logg async function loadUserConfig(configFile, workspacePath, apiDetails, tempDir) { if (isLocal(configFile)) { if (configFile !== userConfigFromActionPath(tempDir)) { - configFile = path6.resolve(workspacePath, configFile); - if (!(configFile + path6.sep).startsWith(workspacePath + path6.sep)) { + configFile = path10.resolve(workspacePath, configFile); + if (!(configFile + path10.sep).startsWith(workspacePath + path10.sep)) { throw new ConfigurationError( getConfigFileOutsideWorkspaceErrorMessage(configFile) ); @@ -90008,11 +87564,11 @@ function parsePacksSpecification(packStr) { throw new ConfigurationError(getPacksStrInvalid(packStr)); } } - if (packPath && (path6.isAbsolute(packPath) || // Permit using "/" instead of "\" on Windows + if (packPath && (path10.isAbsolute(packPath) || // Permit using "/" instead of "\" on Windows // Use `x.split(y).join(z)` as a polyfill for `x.replaceAll(y, z)` since // if we used a regex we'd need to escape the path separator on Windows // which seems more awkward. - path6.normalize(packPath).split(path6.sep).join("/") !== packPath.split(path6.sep).join("/"))) { + path10.normalize(packPath).split(path10.sep).join("/") !== packPath.split(path10.sep).join("/"))) { throw new ConfigurationError(getPacksStrInvalid(packStr)); } if (!packPath && pathStart) { @@ -90031,10 +87587,10 @@ function shouldCombine(inputValue) { return !!inputValue?.trim().startsWith("+"); } function dbLocationOrDefault(dbLocation, tempDir) { - return dbLocation || path6.resolve(tempDir, "codeql_databases"); + return dbLocation || path10.resolve(tempDir, "codeql_databases"); } function userConfigFromActionPath(tempDir) { - return path6.resolve(tempDir, "user-config-from-action.yml"); + return path10.resolve(tempDir, "user-config-from-action.yml"); } async function initConfig(inputs) { const { logger, tempDir } = inputs; @@ -90045,7 +87601,7 @@ async function initConfig(inputs) { ); } inputs.configFile = userConfigFromActionPath(tempDir); - fs6.writeFileSync(inputs.configFile, inputs.configInput); + fs9.writeFileSync(inputs.configFile, inputs.configInput); logger.debug(`Using config from action input: ${inputs.configFile}`); } let userConfig = {}; @@ -90112,12 +87668,12 @@ function isLocal(configPath) { return configPath.indexOf("@") === -1; } function getLocalConfig(configFile) { - if (!fs6.existsSync(configFile)) { + if (!fs9.existsSync(configFile)) { throw new ConfigurationError( getConfigFileDoesNotExistErrorMessage(configFile) ); } - return load(fs6.readFileSync(configFile, "utf8")); + return load(fs9.readFileSync(configFile, "utf8")); } async function getRemoteConfig(configFile, apiDetails) { const format = new RegExp( @@ -90150,13 +87706,13 @@ async function getRemoteConfig(configFile, apiDetails) { ); } function getPathToParsedConfigFile(tempDir) { - return path6.join(tempDir, "config"); + return path10.join(tempDir, "config"); } async function saveConfig(config, logger) { const configString = JSON.stringify(config); const configFile = getPathToParsedConfigFile(config.tempDir); - fs6.mkdirSync(path6.dirname(configFile), { recursive: true }); - fs6.writeFileSync(configFile, configString, "utf8"); + fs9.mkdirSync(path10.dirname(configFile), { recursive: true }); + fs9.writeFileSync(configFile, configString, "utf8"); logger.debug("Saved config:"); logger.debug(configString); } @@ -90166,9 +87722,9 @@ async function generateRegistries(registriesInput, tempDir, logger) { let qlconfigFile; if (registries) { const qlconfig = createRegistriesBlock(registries); - qlconfigFile = path6.join(tempDir, "qlconfig.yml"); + qlconfigFile = path10.join(tempDir, "qlconfig.yml"); const qlconfigContents = dump(qlconfig); - fs6.writeFileSync(qlconfigFile, qlconfigContents, "utf8"); + fs9.writeFileSync(qlconfigFile, qlconfigContents, "utf8"); logger.debug("Generated qlconfig.yml:"); logger.debug(qlconfigContents); registriesAuthTokens = registries.map((registry) => `${registry.url}=${registry.token}`).join(","); @@ -90294,7 +87850,7 @@ function generateCodeScanningConfig(originalUserInput, augmentationProperties) { var os2 = __toESM(require("os")); var import_path = require("path"); var actionsCache3 = __toESM(require_cache3()); -var glob = __toESM(require_glob3()); +var glob = __toESM(require_glob2()); var CODEQL_DEPENDENCY_CACHE_PREFIX = "codeql-dependencies"; var CODEQL_DEPENDENCY_CACHE_VERSION = 1; function getJavaTempDependencyDir() { @@ -90461,14 +88017,14 @@ function flushDiagnostics(config) { } // src/init.ts -var fs12 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var fs15 = __toESM(require("fs")); +var path16 = __toESM(require("path")); var toolrunner4 = __toESM(require_toolrunner()); var io5 = __toESM(require_io()); // src/codeql.ts -var fs11 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var fs14 = __toESM(require("fs")); +var path15 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -90710,15 +88266,15 @@ function wrapCliConfigurationError(cliError) { } // src/setup-codeql.ts -var fs9 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var fs12 = __toESM(require("fs")); +var path13 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver7 = __toESM(require_semver2()); // src/tar.ts var import_child_process = require("child_process"); -var fs7 = __toESM(require("fs")); +var fs10 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -90791,7 +88347,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs7.mkdirSync(dest, { recursive: true }); + fs10.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -90875,9 +88431,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs8 = __toESM(require("fs")); +var fs11 = __toESM(require("fs")); var os3 = __toESM(require("os")); -var path8 = __toESM(require("path")); +var path12 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -90982,7 +88538,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs8.mkdirSync(dest, { recursive: true }); + fs11.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -91010,7 +88566,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path8.join( + return path12.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver6.clean(version) || version, @@ -91019,7 +88575,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs8.writeFileSync(markerFilePath, ""); + fs11.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url) { @@ -91150,7 +88706,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs9.existsSync(path9.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs12.existsSync(path13.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -91483,12 +89039,12 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path9.join(tempDir, v4_default()); + return path13.join(tempDir, v4_default()); } // src/tracer-config.ts -var fs10 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var fs13 = __toESM(require("fs")); +var path14 = __toESM(require("path")); async function shouldEnableIndirectTracing(codeql, config) { if (config.buildMode === "none" /* None */) { return false; @@ -91500,8 +89056,8 @@ async function shouldEnableIndirectTracing(codeql, config) { } async function getTracerConfigForCluster(config) { const tracingEnvVariables = JSON.parse( - fs10.readFileSync( - path10.resolve( + fs13.readFileSync( + path14.resolve( config.dbLocation, "temp/tracingEnvironment/start-tracing.json" ), @@ -91548,7 +89104,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path11.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path15.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -91603,12 +89159,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path11.join( + const tracingConfigPath = path15.join( extractorPath, "tools", "tracing-config.lua" ); - return fs11.existsSync(tracingConfigPath); + return fs14.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -91679,7 +89235,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path11.join( + const autobuildCmd = path15.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -92067,7 +89623,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs11.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs14.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -92090,7 +89646,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path11.resolve(config.tempDir, "user-config.yaml"); + return path15.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -92144,7 +89700,7 @@ async function initConfig2(inputs) { }); } async function runDatabaseInitCluster(databaseInitEnvironment, codeql, config, sourceRoot, processName, qlconfigFile, logger) { - fs12.mkdirSync(config.dbLocation, { recursive: true }); + fs15.mkdirSync(config.dbLocation, { recursive: true }); await wrapEnvironment( databaseInitEnvironment, async () => await codeql.databaseInitCluster( @@ -92179,25 +89735,25 @@ async function checkPacksForOverlayCompatibility(codeql, config, logger) { } function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger) { try { - let qlpackPath = path12.join(packDir, "qlpack.yml"); - if (!fs12.existsSync(qlpackPath)) { - qlpackPath = path12.join(packDir, "codeql-pack.yml"); + let qlpackPath = path16.join(packDir, "qlpack.yml"); + if (!fs15.existsSync(qlpackPath)) { + qlpackPath = path16.join(packDir, "codeql-pack.yml"); } const qlpackContents = load( - fs12.readFileSync(qlpackPath, "utf8") + fs15.readFileSync(qlpackPath, "utf8") ); if (!qlpackContents.buildMetadata) { return true; } - const packInfoPath = path12.join(packDir, ".packinfo"); - if (!fs12.existsSync(packInfoPath)) { + const packInfoPath = path16.join(packDir, ".packinfo"); + if (!fs15.existsSync(packInfoPath)) { logger.warning( `The query pack at ${packDir} does not have a .packinfo file, so it cannot support overlay analysis. Recompiling the query pack with the latest CodeQL CLI should solve this problem.` ); return false; } const packInfoFileContents = JSON.parse( - fs12.readFileSync(packInfoPath, "utf8") + fs15.readFileSync(packInfoPath, "utf8") ); const packOverlayVersion = packInfoFileContents.overlayVersion; if (typeof packOverlayVersion !== "number") { @@ -92222,7 +89778,7 @@ function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger) } async function checkInstallPython311(languages, codeql) { if (languages.includes("python" /* python */) && process.platform === "win32" && !(await codeql.getVersion()).features?.supportsPython312) { - const script = path12.resolve( + const script = path16.resolve( __dirname, "../python-setup", "check_python12.ps1" @@ -92232,8 +89788,8 @@ async function checkInstallPython311(languages, codeql) { ]).exec(); } } -function cleanupDatabaseClusterDirectory(config, logger, options = {}, rmSync2 = fs12.rmSync) { - if (fs12.existsSync(config.dbLocation) && (fs12.statSync(config.dbLocation).isFile() || fs12.readdirSync(config.dbLocation).length > 0)) { +function cleanupDatabaseClusterDirectory(config, logger, options = {}, rmSync2 = fs15.rmSync) { + if (fs15.existsSync(config.dbLocation) && (fs15.statSync(config.dbLocation).isFile() || fs15.readdirSync(config.dbLocation).length > 0)) { if (!options.disableExistingDirectoryWarning) { logger.warning( `The database cluster directory ${config.dbLocation} must be empty. Attempting to clean it up.` @@ -92441,8 +89997,8 @@ async function sendStatusReport(statusReport) { } // src/workflow.ts -var fs13 = __toESM(require("fs")); -var path13 = __toESM(require("path")); +var fs16 = __toESM(require("fs")); +var path17 = __toESM(require("path")); var import_zlib = __toESM(require("zlib")); var core12 = __toESM(require_core()); function toCodedErrors(errors) { @@ -92576,15 +90132,15 @@ async function getWorkflow(logger) { ); } const workflowPath = await getWorkflowAbsolutePath(logger); - return load(fs13.readFileSync(workflowPath, "utf-8")); + return load(fs16.readFileSync(workflowPath, "utf-8")); } async function getWorkflowAbsolutePath(logger) { const relativePath = await getWorkflowRelativePath(); - const absolutePath = path13.join( + const absolutePath = path17.join( getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath ); - if (fs13.existsSync(absolutePath)) { + if (fs16.existsSync(absolutePath)) { logger.debug( `Derived the following absolute path for the currently executing workflow: ${absolutePath}.` ); @@ -92725,7 +90281,7 @@ async function run() { core13.exportVariable("JOB_RUN_UUID" /* JOB_RUN_UUID */, jobRunUuid); core13.exportVariable("CODEQL_ACTION_INIT_HAS_RUN" /* INIT_ACTION_HAS_RUN */, "true"); const configFile = getOptionalInput("config-file"); - const sourceRoot = path14.resolve( + const sourceRoot = path18.resolve( getRequiredEnvParam("GITHUB_WORKSPACE"), getOptionalInput("source-root") || "" ); @@ -92896,21 +90452,21 @@ async function run() { )) { try { logger.debug(`Applying static binary workaround for Go`); - const tempBinPath = path14.resolve( + const tempBinPath = path18.resolve( getTemporaryDirectory(), "codeql-action-go-tracing", "bin" ); - fs14.mkdirSync(tempBinPath, { recursive: true }); + fs17.mkdirSync(tempBinPath, { recursive: true }); core13.addPath(tempBinPath); - const goWrapperPath = path14.resolve(tempBinPath, "go"); - fs14.writeFileSync( + const goWrapperPath = path18.resolve(tempBinPath, "go"); + fs17.writeFileSync( goWrapperPath, `#!/bin/bash exec ${goBinaryPath} "$@"` ); - fs14.chmodSync(goWrapperPath, "755"); + fs17.chmodSync(goWrapperPath, "755"); core13.exportVariable("CODEQL_ACTION_GO_BINARY" /* GO_BINARY_LOCATION */, goWrapperPath); } catch (e) { logger.warning( diff --git a/lib/resolve-environment-action.js b/lib/resolve-environment-action.js index a9c1568a8..6daf0e75f 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -24525,9819 +24525,8 @@ var require_github = __commonJS({ } }); -// node_modules/array-union/index.js -var require_array_union = __commonJS({ - "node_modules/array-union/index.js"(exports2, module2) { - "use strict"; - module2.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; - }; - } -}); - -// node_modules/merge2/index.js -var require_merge2 = __commonJS({ - "node_modules/merge2/index.js"(exports2, module2) { - "use strict"; - var Stream = require("stream"); - var PassThrough = Stream.PassThrough; - var slice = Array.prototype.slice; - module2.exports = merge2; - function merge2() { - const streamsQueue = []; - const args = slice.call(arguments); - let merging = false; - let options = args[args.length - 1]; - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop(); - } else { - options = {}; - } - const doEnd = options.end !== false; - const doPipeError = options.pipeError === true; - if (options.objectMode == null) { - options.objectMode = true; - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024; - } - const mergedStream = PassThrough(options); - function addStream() { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)); - } - mergeStream(); - return this; - } - function mergeStream() { - if (merging) { - return; - } - merging = true; - let streams = streamsQueue.shift(); - if (!streams) { - process.nextTick(endStream); - return; - } - if (!Array.isArray(streams)) { - streams = [streams]; - } - let pipesCount = streams.length + 1; - function next() { - if (--pipesCount > 0) { - return; - } - merging = false; - mergeStream(); - } - function pipe(stream) { - function onend() { - stream.removeListener("merge2UnpipeEnd", onend); - stream.removeListener("end", onend); - if (doPipeError) { - stream.removeListener("error", onerror); - } - next(); - } - function onerror(err) { - mergedStream.emit("error", err); - } - if (stream._readableState.endEmitted) { - return next(); - } - stream.on("merge2UnpipeEnd", onend); - stream.on("end", onend); - if (doPipeError) { - stream.on("error", onerror); - } - stream.pipe(mergedStream, { end: false }); - stream.resume(); - } - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]); - } - next(); - } - function endStream() { - merging = false; - mergedStream.emit("queueDrain"); - if (doEnd) { - mergedStream.end(); - } - } - mergedStream.setMaxListeners(0); - mergedStream.add = addStream; - mergedStream.on("unpipe", function(stream) { - stream.emit("merge2UnpipeEnd"); - }); - if (args.length) { - addStream.apply(null, args); - } - return mergedStream; - } - function pauseStreams(streams, options) { - if (!Array.isArray(streams)) { - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)); - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error("Only readable stream can be merged."); - } - streams.pause(); - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options); - } - } - return streams; - } - } -}); - -// node_modules/fast-glob/out/utils/array.js -var require_array = __commonJS({ - "node_modules/fast-glob/out/utils/array.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.splitWhen = exports2.flatten = void 0; - function flatten(items) { - return items.reduce((collection, item) => [].concat(collection, item), []); - } - exports2.flatten = flatten; - function splitWhen(items, predicate) { - const result = [[]]; - let groupIndex = 0; - for (const item of items) { - if (predicate(item)) { - groupIndex++; - result[groupIndex] = []; - } else { - result[groupIndex].push(item); - } - } - return result; - } - exports2.splitWhen = splitWhen; - } -}); - -// node_modules/fast-glob/out/utils/errno.js -var require_errno = __commonJS({ - "node_modules/fast-glob/out/utils/errno.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEnoentCodeError = void 0; - function isEnoentCodeError(error2) { - return error2.code === "ENOENT"; - } - exports2.isEnoentCodeError = isEnoentCodeError; - } -}); - -// node_modules/fast-glob/out/utils/fs.js -var require_fs = __commonJS({ - "node_modules/fast-glob/out/utils/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports2.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/fast-glob/out/utils/path.js -var require_path = __commonJS({ - "node_modules/fast-glob/out/utils/path.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0; - var os2 = require("os"); - var path5 = require("path"); - var IS_WINDOWS_PLATFORM = os2.platform() === "win32"; - var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; - var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; - var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; - var DOS_DEVICE_PATH_RE = /^\\\\([.?])/; - var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; - function unixify(filepath) { - return filepath.replace(/\\/g, "/"); - } - exports2.unixify = unixify; - function makeAbsolute(cwd, filepath) { - return path5.resolve(cwd, filepath); - } - exports2.makeAbsolute = makeAbsolute; - function removeLeadingDotSegment(entry) { - if (entry.charAt(0) === ".") { - const secondCharactery = entry.charAt(1); - if (secondCharactery === "/" || secondCharactery === "\\") { - return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); - } - } - return entry; - } - exports2.removeLeadingDotSegment = removeLeadingDotSegment; - exports2.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; - function escapeWindowsPath(pattern) { - return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports2.escapeWindowsPath = escapeWindowsPath; - function escapePosixPath(pattern) { - return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports2.escapePosixPath = escapePosixPath; - exports2.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; - function convertWindowsPathToPattern(filepath) { - return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/"); - } - exports2.convertWindowsPathToPattern = convertWindowsPathToPattern; - function convertPosixPathToPattern(filepath) { - return escapePosixPath(filepath); - } - exports2.convertPosixPathToPattern = convertPosixPathToPattern; - } -}); - -// node_modules/is-extglob/index.js -var require_is_extglob = __commonJS({ - "node_modules/is-extglob/index.js"(exports2, module2) { - module2.exports = function isExtglob(str2) { - if (typeof str2 !== "string" || str2 === "") { - return false; - } - var match; - while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str2)) { - if (match[2]) return true; - str2 = str2.slice(match.index + match[0].length); - } - return false; - }; - } -}); - -// node_modules/is-glob/index.js -var require_is_glob = __commonJS({ - "node_modules/is-glob/index.js"(exports2, module2) { - var isExtglob = require_is_extglob(); - var chars = { "{": "}", "(": ")", "[": "]" }; - var strictCheck = function(str2) { - if (str2[0] === "!") { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str2.length) { - if (str2[index] === "*") { - return true; - } - if (str2[index + 1] === "?" && /[\].+)]/.test(str2[index])) { - return true; - } - if (closeSquareIndex !== -1 && str2[index] === "[" && str2[index + 1] !== "]") { - if (closeSquareIndex < index) { - closeSquareIndex = str2.indexOf("]", index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - if (closeCurlyIndex !== -1 && str2[index] === "{" && str2[index + 1] !== "}") { - closeCurlyIndex = str2.indexOf("}", index); - if (closeCurlyIndex > index) { - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - if (closeParenIndex !== -1 && str2[index] === "(" && str2[index + 1] === "?" && /[:!=]/.test(str2[index + 2]) && str2[index + 3] !== ")") { - closeParenIndex = str2.indexOf(")", index); - if (closeParenIndex > index) { - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - if (pipeIndex !== -1 && str2[index] === "(" && str2[index + 1] !== "|") { - if (pipeIndex < index) { - pipeIndex = str2.indexOf("|", index); - } - if (pipeIndex !== -1 && str2[pipeIndex + 1] !== ")") { - closeParenIndex = str2.indexOf(")", pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str2.indexOf("\\", pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - if (str2[index] === "\\") { - var open = str2[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str2.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str2[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - var relaxedCheck = function(str2) { - if (str2[0] === "!") { - return true; - } - var index = 0; - while (index < str2.length) { - if (/[*?{}()[\]]/.test(str2[index])) { - return true; - } - if (str2[index] === "\\") { - var open = str2[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str2.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str2[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - module2.exports = function isGlob(str2, options) { - if (typeof str2 !== "string" || str2 === "") { - return false; - } - if (isExtglob(str2)) { - return true; - } - var check = strictCheck; - if (options && options.strict === false) { - check = relaxedCheck; - } - return check(str2); - }; - } -}); - -// node_modules/glob-parent/index.js -var require_glob_parent = __commonJS({ - "node_modules/glob-parent/index.js"(exports2, module2) { - "use strict"; - var isGlob = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str2, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); - } - if (enclosure.test(str2)) { - str2 += slash; - } - str2 += "a"; - do { - str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); - return str2.replace(escaped, "$1"); - }; - } -}); - -// node_modules/braces/lib/utils.js -var require_utils5 = __commonJS({ - "node_modules/braces/lib/utils.js"(exports2) { - "use strict"; - exports2.isInteger = (num) => { - if (typeof num === "number") { - return Number.isInteger(num); - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isInteger(Number(num)); - } - return false; - }; - exports2.find = (node, type2) => node.nodes.find((node2) => node2.type === type2); - exports2.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports2.isInteger(min) || !exports2.isInteger(max)) return false; - return (Number(max) - Number(min)) / Number(step) >= limit; - }; - exports2.escapeNode = (block, n = 0, type2) => { - const node = block.nodes[n]; - if (!node) return; - if (type2 && node.type === type2 || node.type === "open" || node.type === "close") { - if (node.escaped !== true) { - node.value = "\\" + node.value; - node.escaped = true; - } - } - }; - exports2.encloseBrace = (node) => { - if (node.type !== "brace") return false; - if (node.commas >> 0 + node.ranges >> 0 === 0) { - node.invalid = true; - return true; - } - return false; - }; - exports2.isInvalidBrace = (block) => { - if (block.type !== "brace") return false; - if (block.invalid === true || block.dollar) return true; - if (block.commas >> 0 + block.ranges >> 0 === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; - }; - exports2.isOpenOrClose = (node) => { - if (node.type === "open" || node.type === "close") { - return true; - } - return node.open === true || node.close === true; - }; - exports2.reduce = (nodes) => nodes.reduce((acc, node) => { - if (node.type === "text") acc.push(node.value); - if (node.type === "range") node.type = "text"; - return acc; - }, []); - exports2.flatten = (...args) => { - const result = []; - const flat = (arr) => { - for (let i = 0; i < arr.length; i++) { - const ele = arr[i]; - if (Array.isArray(ele)) { - flat(ele); - continue; - } - if (ele !== void 0) { - result.push(ele); - } - } - return result; - }; - flat(args); - return result; - }; - } -}); - -// node_modules/braces/lib/stringify.js -var require_stringify = __commonJS({ - "node_modules/braces/lib/stringify.js"(exports2, module2) { - "use strict"; - var utils = require_utils5(); - module2.exports = (ast, options = {}) => { - const stringify = (node, parent = {}) => { - const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ""; - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return "\\" + node.value; - } - return node.value; - } - if (node.value) { - return node.value; - } - if (node.nodes) { - for (const child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - return stringify(ast); - }; - } -}); - -// node_modules/is-number/index.js -var require_is_number = __commonJS({ - "node_modules/is-number/index.js"(exports2, module2) { - "use strict"; - module2.exports = function(num) { - if (typeof num === "number") { - return num - num === 0; - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; - }; - } -}); - -// node_modules/to-regex-range/index.js -var require_to_regex_range = __commonJS({ - "node_modules/to-regex-range/index.js"(exports2, module2) { - "use strict"; - var isNumber = require_is_number(); - var toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError("toRegexRange: expected the first argument to be a number"); - } - if (max === void 0 || min === max) { - return String(min); - } - if (isNumber(max) === false) { - throw new TypeError("toRegexRange: expected the second argument to be a number."); - } - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === "boolean") { - opts.relaxZeros = opts.strictZeros === false; - } - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap; - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - let a = Math.min(min, max); - let b = Math.max(min, max); - if (Math.abs(a - b) === 1) { - let result = min + "|" + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && positives.length + negatives.length > 1) { - state.result = `(?:${state.result})`; - } - toRegexRange.cache[cacheKey] = state; - return state.result; - }; - function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, "-", false, options) || []; - let onlyPositive = filterPatterns(pos, neg, "", false, options) || []; - let intersected = filterPatterns(neg, pos, "-?", true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join("|"); - } - function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - let stop = countNines(min, nines); - let stops = /* @__PURE__ */ new Set([max]); - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - stop = countZeros(max + 1, zeros) - 1; - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - stops = [...stops]; - stops.sort(compare); - return stops; - } - function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ""; - let count = 0; - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - if (startDigit === stopDigit) { - pattern += startDigit; - } else if (startDigit !== "0" || stopDigit !== "9") { - pattern += toCharacterClass(startDigit, stopDigit, options); - } else { - count++; - } - } - if (count) { - pattern += options.shorthand === true ? "\\d" : "[0-9]"; - } - return { pattern, count: [count], digits }; - } - function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - for (let i = 0; i < ranges.length; i++) { - let max2 = ranges[i]; - let obj = rangeToPattern(String(start), String(max2), options); - let zeros = ""; - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max2 + 1; - continue; - } - if (tok.isPadded) { - zeros = padZeros(max2, tok, options); - } - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max2 + 1; - prev = obj; - } - return tokens; - } - function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - for (let ele of arr) { - let { string } = ele; - if (!intersection && !contains(comparison, "string", string)) { - result.push(prefix + string); - } - if (intersection && contains(comparison, "string", string)) { - result.push(prefix + string); - } - } - return result; - } - function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; - } - function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; - } - function contains(arr, key, val2) { - return arr.some((ele) => ele[key] === val2); - } - function countNines(min, len) { - return Number(String(min).slice(0, -len) + "9".repeat(len)); - } - function countZeros(integer, zeros) { - return integer - integer % Math.pow(10, zeros); - } - function toQuantifier(digits) { - let [start = 0, stop = ""] = digits; - if (stop || start > 1) { - return `{${start + (stop ? "," + stop : "")}}`; - } - return ""; - } - function toCharacterClass(a, b, options) { - return `[${a}${b - a === 1 ? "" : "-"}${b}]`; - } - function hasPadding(str2) { - return /^-?(0+)\d/.test(str2); - } - function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - switch (diff) { - case 0: - return ""; - case 1: - return relax ? "0?" : "0"; - case 2: - return relax ? "0{0,2}" : "00"; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } - } - toRegexRange.cache = {}; - toRegexRange.clearCache = () => toRegexRange.cache = {}; - module2.exports = toRegexRange; - } -}); - -// node_modules/fill-range/index.js -var require_fill_range = __commonJS({ - "node_modules/fill-range/index.js"(exports2, module2) { - "use strict"; - var util = require("util"); - var toRegexRange = require_to_regex_range(); - var isObject2 = (val2) => val2 !== null && typeof val2 === "object" && !Array.isArray(val2); - var transform = (toNumber) => { - return (value) => toNumber === true ? Number(value) : String(value); - }; - var isValidValue = (value) => { - return typeof value === "number" || typeof value === "string" && value !== ""; - }; - var isNumber = (num) => Number.isInteger(+num); - var zeros = (input) => { - let value = `${input}`; - let index = -1; - if (value[0] === "-") value = value.slice(1); - if (value === "0") return false; - while (value[++index] === "0") ; - return index > 0; - }; - var stringify = (start, end, options) => { - if (typeof start === "string" || typeof end === "string") { - return true; - } - return options.stringify === true; - }; - var pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === "-" ? "-" : ""; - if (dash) input = input.slice(1); - input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); - } - if (toNumber === false) { - return String(input); - } - return input; - }; - var toMaxLen = (input, maxLength) => { - let negative = input[0] === "-" ? "-" : ""; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = "0" + input; - return negative ? "-" + input : input; - }; - var toSequence = (parts, options, maxLen) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - let prefix = options.capture ? "" : "?:"; - let positives = ""; - let negatives = ""; - let result; - if (parts.positives.length) { - positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|"); - } - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`; - } - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - if (options.wrap) { - return `(${prefix}${result})`; - } - return result; - }; - var toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - let start = String.fromCharCode(a); - if (a === b) return start; - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; - }; - var toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? "" : "?:"; - return wrap ? `(${prefix}${start.join("|")})` : start.join("|"); - } - return toRegexRange(start, end, options); - }; - var rangeError = (...args) => { - return new RangeError("Invalid range arguments: " + util.inspect(...args)); - }; - var invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - }; - var invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; - }; - var fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - if (a === 0) a = 0; - if (b === 0) b = 0; - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - let parts = { negatives: [], positives: [] }; - let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: false, ...options }); - } - return range; - }; - var fillLetters = (start, end, step = 1, options = {}) => { - if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) { - return invalidRange(start, end, options); - } - let format = options.transform || ((val2) => String.fromCharCode(val2)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - return range; - }; - var fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - if (typeof step === "function") { - return fill(start, end, 1, { transform: step }); - } - if (isObject2(step)) { - return fill(start, end, 0, step); - } - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - if (!isNumber(step)) { - if (step != null && !isObject2(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); - }; - module2.exports = fill; - } -}); - -// node_modules/braces/lib/compile.js -var require_compile = __commonJS({ - "node_modules/braces/lib/compile.js"(exports2, module2) { - "use strict"; - var fill = require_fill_range(); - var utils = require_utils5(); - var compile = (ast, options = {}) => { - const walk = (node, parent = {}) => { - const invalidBlock = utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - const invalid = invalidBlock === true || invalidNode === true; - const prefix = options.escapeInvalid === true ? "\\" : ""; - let output = ""; - if (node.isOpen === true) { - return prefix + node.value; - } - if (node.isClose === true) { - console.log("node.isClose", prefix, node.value); - return prefix + node.value; - } - if (node.type === "open") { - return invalid ? prefix + node.value : "("; - } - if (node.type === "close") { - return invalid ? prefix + node.value : ")"; - } - if (node.type === "comma") { - return node.prev.type === "comma" ? "" : invalid ? node.value : "|"; - } - if (node.value) { - return node.value; - } - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - if (node.nodes) { - for (const child of node.nodes) { - output += walk(child, node); - } - } - return output; - }; - return walk(ast); - }; - module2.exports = compile; - } -}); - -// node_modules/braces/lib/expand.js -var require_expand = __commonJS({ - "node_modules/braces/lib/expand.js"(exports2, module2) { - "use strict"; - var fill = require_fill_range(); - var stringify = require_stringify(); - var utils = require_utils5(); - var append = (queue = "", stash = "", enclose = false) => { - const result = []; - queue = [].concat(queue); - stash = [].concat(stash); - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash; - } - for (const item of queue) { - if (Array.isArray(item)) { - for (const value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === "string") ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); - } - } - } - return utils.flatten(result); - }; - var expand = (ast, options = {}) => { - const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit; - const walk = (node, parent = {}) => { - node.queue = []; - let p = parent; - let q = parent.queue; - while (p.type !== "brace" && p.type !== "root" && p.parent) { - p = p.parent; - q = p.queue; - } - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ["{}"])); - return; - } - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); - } - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - const enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - while (block.type !== "brace" && block.type !== "root" && block.parent) { - block = block.parent; - queue = block.queue; - } - for (let i = 0; i < node.nodes.length; i++) { - const child = node.nodes[i]; - if (child.type === "comma" && node.type === "brace") { - if (i === 1) queue.push(""); - queue.push(""); - continue; - } - if (child.type === "close") { - q.push(append(q.pop(), queue, enclose)); - continue; - } - if (child.value && child.type !== "open") { - queue.push(append(queue.pop(), child.value)); - continue; - } - if (child.nodes) { - walk(child, node); - } - } - return queue; - }; - return utils.flatten(walk(ast)); - }; - module2.exports = expand; - } -}); - -// node_modules/braces/lib/constants.js -var require_constants6 = __commonJS({ - "node_modules/braces/lib/constants.js"(exports2, module2) { - "use strict"; - module2.exports = { - MAX_LENGTH: 1e4, - // Digits - CHAR_0: "0", - /* 0 */ - CHAR_9: "9", - /* 9 */ - // Alphabet chars. - CHAR_UPPERCASE_A: "A", - /* A */ - CHAR_LOWERCASE_A: "a", - /* a */ - CHAR_UPPERCASE_Z: "Z", - /* Z */ - CHAR_LOWERCASE_Z: "z", - /* z */ - CHAR_LEFT_PARENTHESES: "(", - /* ( */ - CHAR_RIGHT_PARENTHESES: ")", - /* ) */ - CHAR_ASTERISK: "*", - /* * */ - // Non-alphabetic chars. - CHAR_AMPERSAND: "&", - /* & */ - CHAR_AT: "@", - /* @ */ - CHAR_BACKSLASH: "\\", - /* \ */ - CHAR_BACKTICK: "`", - /* ` */ - CHAR_CARRIAGE_RETURN: "\r", - /* \r */ - CHAR_CIRCUMFLEX_ACCENT: "^", - /* ^ */ - CHAR_COLON: ":", - /* : */ - CHAR_COMMA: ",", - /* , */ - CHAR_DOLLAR: "$", - /* . */ - CHAR_DOT: ".", - /* . */ - CHAR_DOUBLE_QUOTE: '"', - /* " */ - CHAR_EQUAL: "=", - /* = */ - CHAR_EXCLAMATION_MARK: "!", - /* ! */ - CHAR_FORM_FEED: "\f", - /* \f */ - CHAR_FORWARD_SLASH: "/", - /* / */ - CHAR_HASH: "#", - /* # */ - CHAR_HYPHEN_MINUS: "-", - /* - */ - CHAR_LEFT_ANGLE_BRACKET: "<", - /* < */ - CHAR_LEFT_CURLY_BRACE: "{", - /* { */ - CHAR_LEFT_SQUARE_BRACKET: "[", - /* [ */ - CHAR_LINE_FEED: "\n", - /* \n */ - CHAR_NO_BREAK_SPACE: "\xA0", - /* \u00A0 */ - CHAR_PERCENT: "%", - /* % */ - CHAR_PLUS: "+", - /* + */ - CHAR_QUESTION_MARK: "?", - /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: ">", - /* > */ - CHAR_RIGHT_CURLY_BRACE: "}", - /* } */ - CHAR_RIGHT_SQUARE_BRACKET: "]", - /* ] */ - CHAR_SEMICOLON: ";", - /* ; */ - CHAR_SINGLE_QUOTE: "'", - /* ' */ - CHAR_SPACE: " ", - /* */ - CHAR_TAB: " ", - /* \t */ - CHAR_UNDERSCORE: "_", - /* _ */ - CHAR_VERTICAL_LINE: "|", - /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF" - /* \uFEFF */ - }; - } -}); - -// node_modules/braces/lib/parse.js -var require_parse2 = __commonJS({ - "node_modules/braces/lib/parse.js"(exports2, module2) { - "use strict"; - var stringify = require_stringify(); - var { - MAX_LENGTH, - CHAR_BACKSLASH, - /* \ */ - CHAR_BACKTICK, - /* ` */ - CHAR_COMMA: CHAR_COMMA2, - /* , */ - CHAR_DOT, - /* . */ - CHAR_LEFT_PARENTHESES, - /* ( */ - CHAR_RIGHT_PARENTHESES, - /* ) */ - CHAR_LEFT_CURLY_BRACE, - /* { */ - CHAR_RIGHT_CURLY_BRACE, - /* } */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, - /* [ */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2, - /* ] */ - CHAR_DOUBLE_QUOTE: CHAR_DOUBLE_QUOTE2, - /* " */ - CHAR_SINGLE_QUOTE: CHAR_SINGLE_QUOTE2, - /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE - } = require_constants6(); - var parse = (input, options = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - const opts = options || {}; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - const ast = { type: "root", input, nodes: [] }; - const stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - const length = input.length; - let index = 0; - let depth = 0; - let value; - const advance = () => input[index++]; - const push = (node) => { - if (node.type === "text" && prev.type === "dot") { - prev.type = "text"; - } - if (prev && prev.type === "text" && node.type === "text") { - prev.value += node.value; - return; - } - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - push({ type: "bos" }); - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - if (value === CHAR_BACKSLASH) { - push({ type: "text", value: (options.keepEscaping ? value : "") + advance() }); - continue; - } - if (value === CHAR_RIGHT_SQUARE_BRACKET2) { - push({ type: "text", value: "\\" + value }); - continue; - } - if (value === CHAR_LEFT_SQUARE_BRACKET2) { - brackets++; - let next; - while (index < length && (next = advance())) { - value += next; - if (next === CHAR_LEFT_SQUARE_BRACKET2) { - brackets++; - continue; - } - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { - brackets--; - if (brackets === 0) { - break; - } - } - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: "paren", nodes: [] }); - stack.push(block); - push({ type: "text", value }); - continue; - } - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== "paren") { - push({ type: "text", value }); - continue; - } - block = stack.pop(); - push({ type: "text", value }); - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_DOUBLE_QUOTE2 || value === CHAR_SINGLE_QUOTE2 || value === CHAR_BACKTICK) { - const open = value; - let next; - if (options.keepQuotes !== true) { - value = ""; - } - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - value += next; - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true; - const brace = { - type: "brace", - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - block = push(brace); - stack.push(block); - push({ type: "open", value }); - continue; - } - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== "brace") { - push({ type: "text", value }); - continue; - } - const type2 = "close"; - block = stack.pop(); - block.close = true; - push({ type: type2, value }); - depth--; - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_COMMA2 && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - const open = block.nodes.shift(); - block.nodes = [open, { type: "text", value: stringify(block) }]; - } - push({ type: "comma", value }); - block.commas++; - continue; - } - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - const siblings = block.nodes; - if (depth === 0 || siblings.length === 0) { - push({ type: "text", value }); - continue; - } - if (prev.type === "dot") { - block.range = []; - prev.value += value; - prev.type = "range"; - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = "text"; - continue; - } - block.ranges++; - block.args = []; - continue; - } - if (prev.type === "range") { - siblings.pop(); - const before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - push({ type: "dot", value }); - continue; - } - push({ type: "text", value }); - } - do { - block = stack.pop(); - if (block.type !== "root") { - block.nodes.forEach((node) => { - if (!node.nodes) { - if (node.type === "open") node.isOpen = true; - if (node.type === "close") node.isClose = true; - if (!node.nodes) node.type = "text"; - node.invalid = true; - } - }); - const parent = stack[stack.length - 1]; - const index2 = parent.nodes.indexOf(block); - parent.nodes.splice(index2, 1, ...block.nodes); - } - } while (stack.length > 0); - push({ type: "eos" }); - return ast; - }; - module2.exports = parse; - } -}); - -// node_modules/braces/index.js -var require_braces = __commonJS({ - "node_modules/braces/index.js"(exports2, module2) { - "use strict"; - var stringify = require_stringify(); - var compile = require_compile(); - var expand = require_expand(); - var parse = require_parse2(); - var braces = (input, options = {}) => { - let output = []; - if (Array.isArray(input)) { - for (const pattern of input) { - const result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; - }; - braces.parse = (input, options = {}) => parse(input, options); - braces.stringify = (input, options = {}) => { - if (typeof input === "string") { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); - }; - braces.compile = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - return compile(input, options); - }; - braces.expand = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - let result = expand(input, options); - if (options.noempty === true) { - result = result.filter(Boolean); - } - if (options.nodupes === true) { - result = [...new Set(result)]; - } - return result; - }; - braces.create = (input, options = {}) => { - if (input === "" || input.length < 3) { - return [input]; - } - return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); - }; - module2.exports = braces; - } -}); - -// node_modules/picomatch/lib/constants.js -var require_constants7 = __commonJS({ - "node_modules/picomatch/lib/constants.js"(exports2, module2) { - "use strict"; - var path5 = require("path"); - var WIN_SLASH = "\\\\/"; - var WIN_NO_SLASH = `[^${WIN_SLASH}]`; - var DOT_LITERAL = "\\."; - var PLUS_LITERAL = "\\+"; - var QMARK_LITERAL = "\\?"; - var SLASH_LITERAL = "\\/"; - var ONE_CHAR = "(?=.)"; - var QMARK = "[^/]"; - var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; - var START_ANCHOR = `(?:^|${SLASH_LITERAL})`; - var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; - var NO_DOT = `(?!${DOT_LITERAL})`; - var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; - var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; - var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; - var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; - var STAR = `${QMARK}*?`; - var POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR - }; - var WINDOWS_CHARS = { - ...POSIX_CHARS, - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` - }; - var POSIX_REGEX_SOURCE = { - alnum: "a-zA-Z0-9", - alpha: "a-zA-Z", - ascii: "\\x00-\\x7F", - blank: " \\t", - cntrl: "\\x00-\\x1F\\x7F", - digit: "0-9", - graph: "\\x21-\\x7E", - lower: "a-z", - print: "\\x20-\\x7E ", - punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", - space: " \\t\\r\\n\\v\\f", - upper: "A-Z", - word: "A-Za-z0-9_", - xdigit: "A-Fa-f0-9" - }; - module2.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - "***": "*", - "**/**": "**", - "**/**/**": "**" - }, - // Digits - CHAR_0: 48, - /* 0 */ - CHAR_9: 57, - /* 9 */ - // Alphabet chars. - CHAR_UPPERCASE_A: 65, - /* A */ - CHAR_LOWERCASE_A: 97, - /* a */ - CHAR_UPPERCASE_Z: 90, - /* Z */ - CHAR_LOWERCASE_Z: 122, - /* z */ - CHAR_LEFT_PARENTHESES: 40, - /* ( */ - CHAR_RIGHT_PARENTHESES: 41, - /* ) */ - CHAR_ASTERISK: 42, - /* * */ - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, - /* & */ - CHAR_AT: 64, - /* @ */ - CHAR_BACKWARD_SLASH: 92, - /* \ */ - CHAR_CARRIAGE_RETURN: 13, - /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, - /* ^ */ - CHAR_COLON: 58, - /* : */ - CHAR_COMMA: 44, - /* , */ - CHAR_DOT: 46, - /* . */ - CHAR_DOUBLE_QUOTE: 34, - /* " */ - CHAR_EQUAL: 61, - /* = */ - CHAR_EXCLAMATION_MARK: 33, - /* ! */ - CHAR_FORM_FEED: 12, - /* \f */ - CHAR_FORWARD_SLASH: 47, - /* / */ - CHAR_GRAVE_ACCENT: 96, - /* ` */ - CHAR_HASH: 35, - /* # */ - CHAR_HYPHEN_MINUS: 45, - /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, - /* < */ - CHAR_LEFT_CURLY_BRACE: 123, - /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, - /* [ */ - CHAR_LINE_FEED: 10, - /* \n */ - CHAR_NO_BREAK_SPACE: 160, - /* \u00A0 */ - CHAR_PERCENT: 37, - /* % */ - CHAR_PLUS: 43, - /* + */ - CHAR_QUESTION_MARK: 63, - /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, - /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, - /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, - /* ] */ - CHAR_SEMICOLON: 59, - /* ; */ - CHAR_SINGLE_QUOTE: 39, - /* ' */ - CHAR_SPACE: 32, - /* */ - CHAR_TAB: 9, - /* \t */ - CHAR_UNDERSCORE: 95, - /* _ */ - CHAR_VERTICAL_LINE: 124, - /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, - /* \uFEFF */ - SEP: path5.sep, - /** - * Create EXTGLOB_CHARS - */ - extglobChars(chars) { - return { - "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` }, - "?": { type: "qmark", open: "(?:", close: ")?" }, - "+": { type: "plus", open: "(?:", close: ")+" }, - "*": { type: "star", open: "(?:", close: ")*" }, - "@": { type: "at", open: "(?:", close: ")" } - }; - }, - /** - * Create GLOB_CHARS - */ - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } - }; - } -}); - -// node_modules/picomatch/lib/utils.js -var require_utils6 = __commonJS({ - "node_modules/picomatch/lib/utils.js"(exports2) { - "use strict"; - var path5 = require("path"); - var win32 = process.platform === "win32"; - var { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL - } = require_constants7(); - exports2.isObject = (val2) => val2 !== null && typeof val2 === "object" && !Array.isArray(val2); - exports2.hasRegexChars = (str2) => REGEX_SPECIAL_CHARS.test(str2); - exports2.isRegexChar = (str2) => str2.length === 1 && exports2.hasRegexChars(str2); - exports2.escapeRegex = (str2) => str2.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); - exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/"); - exports2.removeBackslashes = (str2) => { - return str2.replace(REGEX_REMOVE_BACKSLASH, (match) => { - return match === "\\" ? "" : match; - }); - }; - exports2.supportsLookbehinds = () => { - const segs = process.version.slice(1).split(".").map(Number); - if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) { - return true; - } - return false; - }; - exports2.isWindows = (options) => { - if (options && typeof options.windows === "boolean") { - return options.windows; - } - return win32 === true || path5.sep === "\\"; - }; - exports2.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === "\\") return exports2.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; - }; - exports2.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith("./")) { - output = output.slice(2); - state.prefix = "./"; - } - return output; - }; - exports2.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? "" : "^"; - const append = options.contains ? "" : "$"; - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; - }; - } -}); - -// node_modules/picomatch/lib/scan.js -var require_scan = __commonJS({ - "node_modules/picomatch/lib/scan.js"(exports2, module2) { - "use strict"; - var utils = require_utils6(); - var { - CHAR_ASTERISK: CHAR_ASTERISK2, - /* * */ - CHAR_AT, - /* @ */ - CHAR_BACKWARD_SLASH, - /* \ */ - CHAR_COMMA: CHAR_COMMA2, - /* , */ - CHAR_DOT, - /* . */ - CHAR_EXCLAMATION_MARK, - /* ! */ - CHAR_FORWARD_SLASH, - /* / */ - CHAR_LEFT_CURLY_BRACE, - /* { */ - CHAR_LEFT_PARENTHESES, - /* ( */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, - /* [ */ - CHAR_PLUS, - /* + */ - CHAR_QUESTION_MARK, - /* ? */ - CHAR_RIGHT_CURLY_BRACE, - /* } */ - CHAR_RIGHT_PARENTHESES, - /* ) */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2 - /* ] */ - } = require_constants7(); - var isPathSeparator = (code) => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; - }; - var depth = (token) => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } - }; - var scan = (input, options) => { - const opts = options || {}; - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - let str2 = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: "", depth: 0, isGlob: false }; - const eos = () => index >= length; - const peek = () => str2.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str2.charCodeAt(++index); - }; - while (index < length) { - code = advance(); - let next; - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA2) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: "", depth: 0, isGlob: false }; - if (finished === true) continue; - if (prev === CHAR_DOT && index === start + 1) { - start += 2; - continue; - } - lastIndex = index + 1; - continue; - } - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_LEFT_SQUARE_BRACKET2) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - if (isGlob === true) { - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - let base = str2; - let prefix = ""; - let glob = ""; - if (start > 0) { - prefix = str2.slice(0, start); - str2 = str2.slice(start); - lastIndex -= start; - } - if (base && isGlob === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob = str2.slice(lastIndex); - } else if (isGlob === true) { - base = ""; - glob = str2; - } else { - base = str2; - } - if (base && base !== "" && base !== "/" && base !== str2) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== "") { - parts.push(value); - } - prevIndex = i; - } - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - state.slashes = slashes; - state.parts = parts; - } - return state; - }; - module2.exports = scan; - } -}); - -// node_modules/picomatch/lib/parse.js -var require_parse3 = __commonJS({ - "node_modules/picomatch/lib/parse.js"(exports2, module2) { - "use strict"; - var constants = require_constants7(); - var utils = require_utils6(); - var { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS - } = constants; - var expandRange = (args, options) => { - if (typeof options.expandRange === "function") { - return options.expandRange(...args, options); - } - args.sort(); - const value = `[${args.join("-")}]`; - try { - new RegExp(value); - } catch (ex) { - return args.map((v) => utils.escapeRegex(v)).join(".."); - } - return value; - }; - var syntaxError = (type2, char) => { - return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; - }; - var parse = (input, options) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - input = REPLACEMENTS[input] || input; - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - const bos = { type: "bos", value: "", output: opts.prepend || "" }; - const tokens = [bos]; - const capture = opts.capture ? "" : "?:"; - const win32 = utils.isWindows(options); - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - const globstar = (opts2) => { - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const nodot = opts.dot ? "" : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - if (opts.capture) { - star = `(${star})`; - } - if (typeof opts.noext === "boolean") { - opts.noextglob = opts.noext; - } - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: "", - output: "", - prefix: "", - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - input = utils.removePrefix(input, state); - len = input.length; - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ""; - const remaining = () => input.slice(state.index + 1); - const consume = (value2 = "", num = 0) => { - state.consumed += value2; - state.index += num; - }; - const append = (token) => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - const negate = () => { - let count = 1; - while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { - advance(); - state.start++; - count++; - } - if (count % 2 === 0) { - return false; - } - state.negated = true; - state.start++; - return true; - }; - const increment = (type2) => { - state[type2]++; - stack.push(type2); - }; - const decrement = (type2) => { - state[type2]--; - stack.pop(); - }; - const push = (tok) => { - if (prev.type === "globstar") { - const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); - const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); - if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = "star"; - prev.value = "*"; - prev.output = star; - state.output += prev.output; - } - } - if (extglobs.length && tok.type !== "paren") { - extglobs[extglobs.length - 1].inner += tok.value; - } - if (tok.value || tok.output) append(tok); - if (prev && prev.type === "text" && tok.type === "text") { - prev.value += tok.value; - prev.output = (prev.output || "") + tok.value; - return; - } - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - const extglobOpen = (type2, value2) => { - const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? "(" : "") + token.open; - increment("parens"); - push({ type: type2, value: value2, output: state.output ? "" : ONE_CHAR }); - push({ type: "paren", extglob: true, value: advance(), output }); - extglobs.push(token); - }; - const extglobClose = (token) => { - let output = token.close + (opts.capture ? ")" : ""); - let rest; - if (token.type === "negate") { - let extglobStar = star; - if (token.inner && token.inner.length > 1 && token.inner.includes("/")) { - extglobStar = globstar(opts); - } - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - const expression = parse(rest, { ...options, fastpaths: false }).output; - output = token.close = `)${expression})${extglobStar})`; - } - if (token.prev.type === "bos") { - state.negatedExtglob = true; - } - } - push({ type: "paren", extglob: true, value, output }); - decrement("parens"); - }; - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === "\\") { - backslashes = true; - return m; - } - if (first === "?") { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ""); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); - } - return QMARK.repeat(chars.length); - } - if (first === ".") { - return DOT_LITERAL.repeat(chars.length); - } - if (first === "*") { - if (esc) { - return esc + first + (rest ? star : ""); - } - return star; - } - return esc ? m : `\\${m}`; - }); - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ""); - } else { - output = output.replace(/\\+/g, (m) => { - return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; - }); - } - } - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - state.output = utils.wrapOutput(output, state, options); - return state; - } - while (!eos()) { - value = advance(); - if (value === "\0") { - continue; - } - if (value === "\\") { - const next = peek(); - if (next === "/" && opts.bash !== true) { - continue; - } - if (next === "." || next === ";") { - continue; - } - if (!next) { - value += "\\"; - push({ type: "text", value }); - continue; - } - const match = /^\\+/.exec(remaining()); - let slashes = 0; - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += "\\"; - } - } - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - if (state.brackets === 0) { - push({ type: "text", value }); - continue; - } - } - if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { - if (opts.posix !== false && value === ":") { - const inner = prev.value.slice(1); - if (inner.includes("[")) { - prev.posix = true; - if (inner.includes(":")) { - const idx = prev.value.lastIndexOf("["); - const pre = prev.value.slice(0, idx); - const rest2 = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest2]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") { - value = `\\${value}`; - } - if (value === "]" && (prev.value === "[" || prev.value === "[^")) { - value = `\\${value}`; - } - if (opts.posix === true && value === "!" && prev.value === "[") { - value = "^"; - } - prev.value += value; - append({ value }); - continue; - } - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: "text", value }); - } - continue; - } - if (value === "(") { - increment("parens"); - push({ type: "paren", value }); - continue; - } - if (value === ")") { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "(")); - } - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - push({ type: "paren", value, output: state.parens ? ")" : "\\)" }); - decrement("parens"); - continue; - } - if (value === "[") { - if (opts.nobracket === true || !remaining().includes("]")) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("closing", "]")); - } - value = `\\${value}`; - } else { - increment("brackets"); - } - push({ type: "bracket", value }); - continue; - } - if (value === "]") { - if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { - push({ type: "text", value, output: `\\${value}` }); - continue; - } - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "[")); - } - push({ type: "text", value, output: `\\${value}` }); - continue; - } - decrement("brackets"); - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) { - value = `/${value}`; - } - prev.value += value; - append({ value }); - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - if (value === "{" && opts.nobrace !== true) { - increment("braces"); - const open = { - type: "brace", - value, - output: "(", - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - braces.push(open); - push(open); - continue; - } - if (value === "}") { - const brace = braces[braces.length - 1]; - if (opts.nobrace === true || !brace) { - push({ type: "text", value, output: value }); - continue; - } - let output = ")"; - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === "brace") { - break; - } - if (arr[i].type !== "dots") { - range.unshift(arr[i].value); - } - } - output = expandRange(range, opts); - state.backtrack = true; - } - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = "\\{"; - value = output = "\\}"; - state.output = out; - for (const t of toks) { - state.output += t.output || t.value; - } - } - push({ type: "brace", value, output }); - decrement("braces"); - braces.pop(); - continue; - } - if (value === "|") { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: "text", value }); - continue; - } - if (value === ",") { - let output = value; - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === "braces") { - brace.comma = true; - output = "|"; - } - push({ type: "comma", value, output }); - continue; - } - if (value === "/") { - if (prev.type === "dot" && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ""; - state.output = ""; - tokens.pop(); - prev = bos; - continue; - } - push({ type: "slash", value, output: SLASH_LITERAL }); - continue; - } - if (value === ".") { - if (state.braces > 0 && prev.type === "dot") { - if (prev.value === ".") prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = "dots"; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { - push({ type: "text", value, output: DOT_LITERAL }); - continue; - } - push({ type: "dot", value, output: DOT_LITERAL }); - continue; - } - if (value === "?") { - const isGroup = prev && prev.value === "("; - if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("qmark", value); - continue; - } - if (prev && prev.type === "paren") { - const next = peek(); - let output = value; - if (next === "<" && !utils.supportsLookbehinds()) { - throw new Error("Node.js v10 or higher is required for regex lookbehinds"); - } - if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) { - output = `\\${value}`; - } - push({ type: "text", value, output }); - continue; - } - if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { - push({ type: "qmark", value, output: QMARK_NO_DOT }); - continue; - } - push({ type: "qmark", value, output: QMARK }); - continue; - } - if (value === "!") { - if (opts.noextglob !== true && peek() === "(") { - if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { - extglobOpen("negate", value); - continue; - } - } - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - if (value === "+") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("plus", value); - continue; - } - if (prev && prev.value === "(" || opts.regex === false) { - push({ type: "plus", value, output: PLUS_LITERAL }); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { - push({ type: "plus", value }); - continue; - } - push({ type: "plus", value: PLUS_LITERAL }); - continue; - } - if (value === "@") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - push({ type: "at", extglob: true, value, output: "" }); - continue; - } - push({ type: "text", value }); - continue; - } - if (value !== "*") { - if (value === "$" || value === "^") { - value = `\\${value}`; - } - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - push({ type: "text", value }); - continue; - } - if (prev && (prev.type === "globstar" || prev.star === true)) { - prev.type = "star"; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen("star", value); - continue; - } - if (prev.type === "star") { - if (opts.noglobstar === true) { - consume(value); - continue; - } - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === "slash" || prior.type === "bos"; - const afterStar = before && (before.type === "star" || before.type === "globstar"); - if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { - push({ type: "star", value, output: "" }); - continue; - } - const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); - const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); - if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { - push({ type: "star", value, output: "" }); - continue; - } - while (rest.slice(0, 3) === "/**") { - const after = input[state.index + 4]; - if (after && after !== "/") { - break; - } - rest = rest.slice(3); - consume("/**", 3); - } - if (prior.type === "bos" && eos()) { - prev.type = "globstar"; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { - const end = rest[1] !== void 0 ? "|$" : ""; - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - state.output += prior.output + prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - if (prior.type === "bos" && rest[0] === "/") { - prev.type = "globstar"; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - state.output = state.output.slice(0, -prev.output.length); - prev.type = "globstar"; - prev.output = globstar(opts); - prev.value += value; - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - const token = { type: "star", value, output: star }; - if (opts.bash === true) { - token.output = ".*?"; - if (prev.type === "bos" || prev.type === "slash") { - token.output = nodot + token.output; - } - push(token); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { - token.output = value; - push(token); - continue; - } - if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { - if (prev.type === "dot") { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - } else { - state.output += nodot; - prev.output += nodot; - } - if (peek() !== "*") { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - push(token); - } - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]")); - state.output = utils.escapeLast(state.output, "["); - decrement("brackets"); - } - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")")); - state.output = utils.escapeLast(state.output, "("); - decrement("parens"); - } - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}")); - state.output = utils.escapeLast(state.output, "{"); - decrement("braces"); - } - if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) { - push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); - } - if (state.backtrack === true) { - state.output = ""; - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - if (token.suffix) { - state.output += token.suffix; - } - } - } - return state; - }; - parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? "" : "?:"; - const state = { negated: false, prefix: "" }; - let star = opts.bash === true ? ".*?" : STAR; - if (opts.capture) { - star = `(${star})`; - } - const globstar = (opts2) => { - if (opts2.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const create = (str2) => { - switch (str2) { - case "*": - return `${nodot}${ONE_CHAR}${star}`; - case ".*": - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*.*": - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*/*": - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - case "**": - return nodot + globstar(opts); - case "**/*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - case "**/*.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "**/.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - default: { - const match = /^(.*?)\.(\w+)$/.exec(str2); - if (!match) return; - const source2 = create(match[1]); - if (!source2) return; - return source2 + DOT_LITERAL + match[2]; - } - } - }; - const output = utils.removePrefix(input, state); - let source = create(output); - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - return source; - }; - module2.exports = parse; - } -}); - -// node_modules/picomatch/lib/picomatch.js -var require_picomatch = __commonJS({ - "node_modules/picomatch/lib/picomatch.js"(exports2, module2) { - "use strict"; - var path5 = require("path"); - var scan = require_scan(); - var parse = require_parse3(); - var utils = require_utils6(); - var constants = require_constants7(); - var isObject2 = (val2) => val2 && typeof val2 === "object" && !Array.isArray(val2); - var picomatch = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map((input) => picomatch(input, options, returnState)); - const arrayMatcher = (str2) => { - for (const isMatch of fns) { - const state2 = isMatch(str2); - if (state2) return state2; - } - return false; - }; - return arrayMatcher; - } - const isState = isObject2(glob) && glob.tokens && glob.input; - if (glob === "" || typeof glob !== "string" && !isState) { - throw new TypeError("Expected pattern to be a non-empty string"); - } - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true); - const state = regex.state; - delete regex.state; - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - if (typeof opts.onResult === "function") { - opts.onResult(result); - } - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - if (isIgnored(input)) { - if (typeof opts.onIgnore === "function") { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - if (typeof opts.onMatch === "function") { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - if (returnState) { - matcher.state = state; - } - return matcher; - }; - picomatch.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected input to be a string"); - } - if (input === "") { - return { isMatch: false, output: "" }; - } - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = match && format ? format(input) : input; - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - return { isMatch: Boolean(match), match, output }; - }; - picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path5.basename(input)); - }; - picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); - picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); - }; - picomatch.scan = (input, options) => scan(input, options); - picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - const opts = options || {}; - const prepend = opts.contains ? "" : "^"; - const append = opts.contains ? "" : "$"; - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - return regex; - }; - picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== "string") { - throw new TypeError("Expected a non-empty string"); - } - let parsed = { negated: false, fastpaths: true }; - if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) { - parsed.output = parse.fastpaths(input, options); - } - if (!parsed.output) { - parsed = parse(input, options); - } - return picomatch.compileRe(parsed, options, returnOutput, returnState); - }; - picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } - }; - picomatch.constants = constants; - module2.exports = picomatch; - } -}); - -// node_modules/picomatch/index.js -var require_picomatch2 = __commonJS({ - "node_modules/picomatch/index.js"(exports2, module2) { - "use strict"; - module2.exports = require_picomatch(); - } -}); - -// node_modules/micromatch/index.js -var require_micromatch = __commonJS({ - "node_modules/micromatch/index.js"(exports2, module2) { - "use strict"; - var util = require("util"); - var braces = require_braces(); - var picomatch = require_picomatch2(); - var utils = require_utils6(); - var isEmptyString = (v) => v === "" || v === "./"; - var hasBraces = (v) => { - const index = v.indexOf("{"); - return index > -1 && v.indexOf("}", index) > -1; - }; - var micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - let omit = /* @__PURE__ */ new Set(); - let keep = /* @__PURE__ */ new Set(); - let items = /* @__PURE__ */ new Set(); - let negatives = 0; - let onResult = (state) => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) negatives++; - for (let item of list) { - let matched = isMatch(item, true); - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) continue; - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter((item) => !omit.has(item)); - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(", ")}"`); - } - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns; - } - } - return matches; - }; - micromatch.match = micromatch; - micromatch.matcher = (pattern, options) => picomatch(pattern, options); - micromatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); - micromatch.any = micromatch.isMatch; - micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = /* @__PURE__ */ new Set(); - let items = []; - let onResult = (state) => { - if (options.onResult) options.onResult(state); - items.push(state.output); - }; - let matches = new Set(micromatch(list, patterns, { ...options, onResult })); - for (let item of items) { - if (!matches.has(item)) { - result.add(item); - } - } - return [...result]; - }; - micromatch.contains = (str2, pattern, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str2)}"`); - } - if (Array.isArray(pattern)) { - return pattern.some((p) => micromatch.contains(str2, p, options)); - } - if (typeof pattern === "string") { - if (isEmptyString(str2) || isEmptyString(pattern)) { - return false; - } - if (str2.includes(pattern) || str2.startsWith("./") && str2.slice(2).includes(pattern)) { - return true; - } - } - return micromatch.isMatch(str2, pattern, { ...options, contains: true }); - }; - micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError("Expected the first argument to be an object"); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) res[key] = obj[key]; - return res; - }; - micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some((item) => isMatch(item))) { - return true; - } - } - return false; - }; - micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every((item) => isMatch(item))) { - return false; - } - } - return true; - }; - micromatch.all = (str2, patterns, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str2)}"`); - } - return [].concat(patterns).every((p) => picomatch(p, options)(str2)); - }; - micromatch.capture = (glob, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - if (match) { - return match.slice(1).map((v) => v === void 0 ? "" : v); - } - }; - micromatch.makeRe = (...args) => picomatch.makeRe(...args); - micromatch.scan = (...args) => picomatch.scan(...args); - micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str2 of braces(String(pattern), options)) { - res.push(picomatch.parse(str2, options)); - } - } - return res; - }; - micromatch.braces = (pattern, options) => { - if (typeof pattern !== "string") throw new TypeError("Expected a string"); - if (options && options.nobrace === true || !hasBraces(pattern)) { - return [pattern]; - } - return braces(pattern, options); - }; - micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== "string") throw new TypeError("Expected a string"); - return micromatch.braces(pattern, { ...options, expand: true }); - }; - micromatch.hasBraces = hasBraces; - module2.exports = micromatch; - } -}); - -// node_modules/fast-glob/out/utils/pattern.js -var require_pattern = __commonJS({ - "node_modules/fast-glob/out/utils/pattern.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; - var path5 = require("path"); - var globParent = require_glob_parent(); - var micromatch = require_micromatch(); - var GLOBSTAR = "**"; - var ESCAPE_SYMBOL = "\\"; - var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; - var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; - var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; - var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; - var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; - var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; - function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); - } - exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern(pattern, options = {}) { - if (pattern === "") { - return false; - } - if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { - return true; - } - if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.braceExpansion !== false && hasBraceExpansion(pattern)) { - return true; - } - return false; - } - exports2.isDynamicPattern = isDynamicPattern; - function hasBraceExpansion(pattern) { - const openingBraceIndex = pattern.indexOf("{"); - if (openingBraceIndex === -1) { - return false; - } - const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1); - if (closingBraceIndex === -1) { - return false; - } - const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); - return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); - } - function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; - } - exports2.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports2.isNegativePattern = isNegativePattern; - function isPositivePattern(pattern) { - return !isNegativePattern(pattern); - } - exports2.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); - } - exports2.getNegativePatterns = getNegativePatterns; - function getPositivePatterns(patterns) { - return patterns.filter(isPositivePattern); - } - exports2.getPositivePatterns = getPositivePatterns; - function getPatternsInsideCurrentDirectory(patterns) { - return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); - } - exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; - function getPatternsOutsideCurrentDirectory(patterns) { - return patterns.filter(isPatternRelatedToParentDirectory); - } - exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; - function isPatternRelatedToParentDirectory(pattern) { - return pattern.startsWith("..") || pattern.startsWith("./.."); - } - exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; - function getBaseDirectory(pattern) { - return globParent(pattern, { flipBackslashes: false }); - } - exports2.getBaseDirectory = getBaseDirectory; - function hasGlobStar(pattern) { - return pattern.includes(GLOBSTAR); - } - exports2.hasGlobStar = hasGlobStar; - function endsWithSlashGlobStar(pattern) { - return pattern.endsWith("/" + GLOBSTAR); - } - exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; - function isAffectDepthOfReadingPattern(pattern) { - const basename = path5.basename(pattern); - return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); - } - exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; - function expandPatternsWithBraceExpansion(patterns) { - return patterns.reduce((collection, pattern) => { - return collection.concat(expandBraceExpansion(pattern)); - }, []); - } - exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; - function expandBraceExpansion(pattern) { - const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true }); - patterns.sort((a, b) => a.length - b.length); - return patterns.filter((pattern2) => pattern2 !== ""); - } - exports2.expandBraceExpansion = expandBraceExpansion; - function getPatternParts(pattern, options) { - let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); - if (parts.length === 0) { - parts = [pattern]; - } - if (parts[0].startsWith("/")) { - parts[0] = parts[0].slice(1); - parts.unshift(""); - } - return parts; - } - exports2.getPatternParts = getPatternParts; - function makeRe(pattern, options) { - return micromatch.makeRe(pattern, options); - } - exports2.makeRe = makeRe; - function convertPatternsToRe(patterns, options) { - return patterns.map((pattern) => makeRe(pattern, options)); - } - exports2.convertPatternsToRe = convertPatternsToRe; - function matchAny(entry, patternsRe) { - return patternsRe.some((patternRe) => patternRe.test(entry)); - } - exports2.matchAny = matchAny; - function removeDuplicateSlashes(pattern) { - return pattern.replace(DOUBLE_SLASH_RE, "/"); - } - exports2.removeDuplicateSlashes = removeDuplicateSlashes; - function partitionAbsoluteAndRelative(patterns) { - const absolute = []; - const relative = []; - for (const pattern of patterns) { - if (isAbsolute2(pattern)) { - absolute.push(pattern); - } else { - relative.push(pattern); - } - } - return [absolute, relative]; - } - exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; - function isAbsolute2(pattern) { - return path5.isAbsolute(pattern); - } - exports2.isAbsolute = isAbsolute2; - } -}); - -// node_modules/fast-glob/out/utils/stream.js -var require_stream = __commonJS({ - "node_modules/fast-glob/out/utils/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.merge = void 0; - var merge2 = require_merge2(); - function merge3(streams) { - const mergedStream = merge2(streams); - streams.forEach((stream) => { - stream.once("error", (error2) => mergedStream.emit("error", error2)); - }); - mergedStream.once("close", () => propagateCloseEventToSources(streams)); - mergedStream.once("end", () => propagateCloseEventToSources(streams)); - return mergedStream; - } - exports2.merge = merge3; - function propagateCloseEventToSources(streams) { - streams.forEach((stream) => stream.emit("close")); - } - } -}); - -// node_modules/fast-glob/out/utils/string.js -var require_string = __commonJS({ - "node_modules/fast-glob/out/utils/string.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEmpty = exports2.isString = void 0; - function isString(input) { - return typeof input === "string"; - } - exports2.isString = isString; - function isEmpty(input) { - return input === ""; - } - exports2.isEmpty = isEmpty; - } -}); - -// node_modules/fast-glob/out/utils/index.js -var require_utils7 = __commonJS({ - "node_modules/fast-glob/out/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0; - var array = require_array(); - exports2.array = array; - var errno = require_errno(); - exports2.errno = errno; - var fs5 = require_fs(); - exports2.fs = fs5; - var path5 = require_path(); - exports2.path = path5; - var pattern = require_pattern(); - exports2.pattern = pattern; - var stream = require_stream(); - exports2.stream = stream; - var string = require_string(); - exports2.string = string; - } -}); - -// node_modules/fast-glob/out/managers/tasks.js -var require_tasks = __commonJS({ - "node_modules/fast-glob/out/managers/tasks.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0; - var utils = require_utils7(); - function generate(input, settings) { - const patterns = processPatterns(input, settings); - const ignore = processPatterns(settings.ignore, settings); - const positivePatterns = getPositivePatterns(patterns); - const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); - const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); - const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); - const staticTasks = convertPatternsToTasks( - staticPatterns, - negativePatterns, - /* dynamic */ - false - ); - const dynamicTasks = convertPatternsToTasks( - dynamicPatterns, - negativePatterns, - /* dynamic */ - true - ); - return staticTasks.concat(dynamicTasks); - } - exports2.generate = generate; - function processPatterns(input, settings) { - let patterns = input; - if (settings.braceExpansion) { - patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); - } - if (settings.baseNameMatch) { - patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`); - } - return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); - } - function convertPatternsToTasks(positive, negative, dynamic) { - const tasks = []; - const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); - const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); - const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); - const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); - tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); - if ("." in insideCurrentDirectoryGroup) { - tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)); - } else { - tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); - } - return tasks; - } - exports2.convertPatternsToTasks = convertPatternsToTasks; - function getPositivePatterns(patterns) { - return utils.pattern.getPositivePatterns(patterns); - } - exports2.getPositivePatterns = getPositivePatterns; - function getNegativePatternsAsPositive(patterns, ignore) { - const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); - const positive = negative.map(utils.pattern.convertToPositivePattern); - return positive; - } - exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive; - function groupPatternsByBaseDirectory(patterns) { - const group = {}; - return patterns.reduce((collection, pattern) => { - const base = utils.pattern.getBaseDirectory(pattern); - if (base in collection) { - collection[base].push(pattern); - } else { - collection[base] = [pattern]; - } - return collection; - }, group); - } - exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; - function convertPatternGroupsToTasks(positive, negative, dynamic) { - return Object.keys(positive).map((base) => { - return convertPatternGroupToTask(base, positive[base], negative, dynamic); - }); - } - exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks; - function convertPatternGroupToTask(base, positive, negative, dynamic) { - return { - dynamic, - positive, - negative, - base, - patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) - }; - } - exports2.convertPatternGroupToTask = convertPatternGroupToTask; - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/async.js -var require_async = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.read = void 0; - function read(path5, settings, callback) { - settings.fs.lstat(path5, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path5, (statError, stat) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - callFailureCallback(callback, statError); - return; - } - callSuccessCallback(callback, lstat); - return; - } - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - callSuccessCallback(callback, stat); - }); - }); - } - exports2.read = read; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/sync.js -var require_sync = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.read = void 0; - function read(path5, settings) { - const lstat = settings.fs.lstatSync(path5); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path5); - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - return stat; - } catch (error2) { - if (!settings.throwErrorOnBrokenSymbolicLink) { - return lstat; - } - throw error2; - } - } - exports2.read = read; - } -}); - -// node_modules/@nodelib/fs.stat/out/adapters/fs.js -var require_fs2 = __commonJS({ - "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs5 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs5.lstat, - stat: fs5.stat, - lstatSync: fs5.lstatSync, - statSync: fs5.statSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports2.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports2.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.stat/out/settings.js -var require_settings = __commonJS({ - "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fs5 = require_fs2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs5.createFileSystemAdapter(this._options.fs); - this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.stat/out/index.js -var require_out = __commonJS({ - "node_modules/@nodelib/fs.stat/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.statSync = exports2.stat = exports2.Settings = void 0; - var async = require_async(); - var sync = require_sync(); - var settings_1 = require_settings(); - exports2.Settings = settings_1.default; - function stat(path5, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path5, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path5, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.stat = stat; - function statSync(path5, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path5, settings); - } - exports2.statSync = statSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/queue-microtask/index.js -var require_queue_microtask = __commonJS({ - "node_modules/queue-microtask/index.js"(exports2, module2) { - var promise; - module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { - throw err; - }, 0)); - } -}); - -// node_modules/run-parallel/index.js -var require_run_parallel = __commonJS({ - "node_modules/run-parallel/index.js"(exports2, module2) { - module2.exports = runParallel; - var queueMicrotask2 = require_queue_microtask(); - function runParallel(tasks, cb) { - let results, pending, keys; - let isSync = true; - if (Array.isArray(tasks)) { - results = []; - pending = tasks.length; - } else { - keys = Object.keys(tasks); - results = {}; - pending = keys.length; - } - function done(err) { - function end() { - if (cb) cb(err, results); - cb = null; - } - if (isSync) queueMicrotask2(end); - else end(); - } - function each(i, err, result) { - results[i] = result; - if (--pending === 0 || err) { - done(err); - } - } - if (!pending) { - done(null); - } else if (keys) { - keys.forEach(function(key) { - tasks[key](function(err, result) { - each(key, err, result); - }); - }); - } else { - tasks.forEach(function(task, i) { - task(function(err, result) { - each(i, err, result); - }); - }); - } - isSync = false; - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/constants.js -var require_constants8 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; - var NODE_PROCESS_VERSION_PARTS = process.versions.node.split("."); - if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) { - throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); - } - var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); - var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); - var SUPPORTED_MAJOR_VERSION = 10; - var SUPPORTED_MINOR_VERSION = 10; - var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; - var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; - exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/fs.js -var require_fs3 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports2.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/index.js -var require_utils8 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fs = void 0; - var fs5 = require_fs3(); - exports2.fs = fs5; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/common.js -var require_common = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.joinPathSegments = void 0; - function joinPathSegments(a, b, separator) { - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports2.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/async.js -var require_async2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; - var fsStat = require_out(); - var rpl = require_run_parallel(); - var constants_1 = require_constants8(); - var utils = require_utils8(); - var common2 = require_common(); - function read(directory, settings, callback) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - readdirWithFileTypes(directory, settings, callback); - return; - } - readdir(directory, settings, callback); - } - exports2.read = read; - function readdirWithFileTypes(directory, settings, callback) { - settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const entries = dirents.map((dirent) => ({ - dirent, - name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - })); - if (!settings.followSymbolicLinks) { - callSuccessCallback(callback, entries); - return; - } - const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); - rpl(tasks, (rplError, rplEntries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, rplEntries); - }); - }); - } - exports2.readdirWithFileTypes = readdirWithFileTypes; - function makeRplTaskEntry(entry, settings) { - return (done) => { - if (!entry.dirent.isSymbolicLink()) { - done(null, entry); - return; - } - settings.fs.stat(entry.path, (statError, stats) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - done(statError); - return; - } - done(null, entry); - return; - } - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - done(null, entry); - }); - }; - } - function readdir(directory, settings, callback) { - settings.fs.readdir(directory, (readdirError, names) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const tasks = names.map((name) => { - const path5 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path5, settings.fsStatSettings, (error2, stats) => { - if (error2 !== null) { - done(error2); - return; - } - const entry = { - name, - path: path5, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - done(null, entry); - }); - }; - }); - rpl(tasks, (rplError, entries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, entries); - }); - }); - } - exports2.readdir = readdir; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/sync.js -var require_sync2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; - var fsStat = require_out(); - var constants_1 = require_constants8(); - var utils = require_utils8(); - var common2 = require_common(); - function read(directory, settings) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings); - } - return readdir(directory, settings); - } - exports2.read = read; - function readdirWithFileTypes(directory, settings) { - const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); - return dirents.map((dirent) => { - const entry = { - dirent, - name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - }; - if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { - try { - const stats = settings.fs.statSync(entry.path); - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - } catch (error2) { - if (settings.throwErrorOnBrokenSymbolicLink) { - throw error2; - } - } - } - return entry; - }); - } - exports2.readdirWithFileTypes = readdirWithFileTypes; - function readdir(directory, settings) { - const names = settings.fs.readdirSync(directory); - return names.map((name) => { - const entryPath = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - const stats = fsStat.statSync(entryPath, settings.fsStatSettings); - const entry = { - name, - path: entryPath, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - return entry; - }); - } - exports2.readdir = readdir; - } -}); - -// node_modules/@nodelib/fs.scandir/out/adapters/fs.js -var require_fs4 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs5 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs5.lstat, - stat: fs5.stat, - lstatSync: fs5.lstatSync, - statSync: fs5.statSync, - readdir: fs5.readdir, - readdirSync: fs5.readdirSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports2.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports2.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.scandir/out/settings.js -var require_settings2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path5 = require("path"); - var fsStat = require_out(); - var fs5 = require_fs4(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs5.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path5.sep); - this.stats = this._getValue(this._options.stats, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - this.fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this.followSymbolicLinks, - fs: this.fs, - throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.scandir/out/index.js -var require_out2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Settings = exports2.scandirSync = exports2.scandir = void 0; - var async = require_async2(); - var sync = require_sync2(); - var settings_1 = require_settings2(); - exports2.Settings = settings_1.default; - function scandir(path5, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path5, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path5, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.scandir = scandir; - function scandirSync(path5, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path5, settings); - } - exports2.scandirSync = scandirSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/reusify/reusify.js -var require_reusify = __commonJS({ - "node_modules/reusify/reusify.js"(exports2, module2) { - "use strict"; - function reusify(Constructor) { - var head = new Constructor(); - var tail = head; - function get() { - var current = head; - if (current.next) { - head = current.next; - } else { - head = new Constructor(); - tail = head; - } - current.next = null; - return current; - } - function release3(obj) { - tail.next = obj; - tail = obj; - } - return { - get, - release: release3 - }; - } - module2.exports = reusify; - } -}); - -// node_modules/fastq/queue.js -var require_queue = __commonJS({ - "node_modules/fastq/queue.js"(exports2, module2) { - "use strict"; - var reusify = require_reusify(); - function fastqueue(context2, worker, concurrency) { - if (typeof context2 === "function") { - concurrency = worker; - worker = context2; - context2 = null; - } - var cache = reusify(Task); - var queueHead = null; - var queueTail = null; - var _running = 0; - var self2 = { - push, - drain: noop, - saturated: noop, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop, - kill, - killAndDrain - }; - return self2; - function running() { - return _running; - } - function pause() { - self2.paused = true; - } - function length() { - var current = queueHead; - var counter = 0; - while (current) { - current = current.next; - counter++; - } - return counter; - } - function getQueue() { - var current = queueHead; - var tasks = []; - while (current) { - tasks.push(current.value); - current = current.next; - } - return tasks; - } - function resume() { - if (!self2.paused) return; - self2.paused = false; - for (var i = 0; i < self2.concurrency; i++) { - _running++; - release3(); - } - } - function idle() { - return _running === 0 && self2.length() === 0; - } - function push(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release3; - current.value = value; - current.callback = done || noop; - if (_running === self2.concurrency || self2.paused) { - if (queueTail) { - queueTail.next = current; - queueTail = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context2, current.value, current.worked); - } - } - function unshift(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release3; - current.value = value; - current.callback = done || noop; - if (_running === self2.concurrency || self2.paused) { - if (queueHead) { - current.next = queueHead; - queueHead = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context2, current.value, current.worked); - } - } - function release3(holder) { - if (holder) { - cache.release(holder); - } - var next = queueHead; - if (next) { - if (!self2.paused) { - if (queueTail === queueHead) { - queueTail = null; - } - queueHead = next.next; - next.next = null; - worker.call(context2, next.value, next.worked); - if (queueTail === null) { - self2.empty(); - } - } else { - _running--; - } - } else if (--_running === 0) { - self2.drain(); - } - } - function kill() { - queueHead = null; - queueTail = null; - self2.drain = noop; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self2.drain(); - self2.drain = noop; - } - } - function noop() { - } - function Task() { - this.value = null; - this.callback = noop; - this.next = null; - this.release = noop; - this.context = null; - var self2 = this; - this.worked = function worked(err, result) { - var callback = self2.callback; - self2.value = null; - self2.callback = noop; - callback.call(self2.context, err, result); - self2.release(self2); - }; - } - module2.exports = fastqueue; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/common.js -var require_common2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0; - function isFatalError(settings, error2) { - if (settings.errorFilter === null) { - return true; - } - return !settings.errorFilter(error2); - } - exports2.isFatalError = isFatalError; - function isAppliedFilter(filter, value) { - return filter === null || filter(value); - } - exports2.isAppliedFilter = isAppliedFilter; - function replacePathSegmentSeparator(filepath, separator) { - return filepath.split(/[/\\]/).join(separator); - } - exports2.replacePathSegmentSeparator = replacePathSegmentSeparator; - function joinPathSegments(a, b, separator) { - if (a === "") { - return b; - } - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports2.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/reader.js -var require_reader = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var common2 = require_common2(); - var Reader = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._root = common2.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); - } - }; - exports2.default = Reader; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/async.js -var require_async3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var events_1 = require("events"); - var fsScandir = require_out2(); - var fastq = require_queue(); - var common2 = require_common2(); - var reader_1 = require_reader(); - var AsyncReader = class extends reader_1.default { - constructor(_root, _settings) { - super(_root, _settings); - this._settings = _settings; - this._scandir = fsScandir.scandir; - this._emitter = new events_1.EventEmitter(); - this._queue = fastq(this._worker.bind(this), this._settings.concurrency); - this._isFatalError = false; - this._isDestroyed = false; - this._queue.drain = () => { - if (!this._isFatalError) { - this._emitter.emit("end"); - } - }; - } - read() { - this._isFatalError = false; - this._isDestroyed = false; - setImmediate(() => { - this._pushToQueue(this._root, this._settings.basePath); - }); - return this._emitter; - } - get isDestroyed() { - return this._isDestroyed; - } - destroy() { - if (this._isDestroyed) { - throw new Error("The reader is already destroyed"); - } - this._isDestroyed = true; - this._queue.killAndDrain(); - } - onEntry(callback) { - this._emitter.on("entry", callback); - } - onError(callback) { - this._emitter.once("error", callback); - } - onEnd(callback) { - this._emitter.once("end", callback); - } - _pushToQueue(directory, base) { - const queueItem = { directory, base }; - this._queue.push(queueItem, (error2) => { - if (error2 !== null) { - this._handleError(error2); - } - }); - } - _worker(item, done) { - this._scandir(item.directory, this._settings.fsScandirSettings, (error2, entries) => { - if (error2 !== null) { - done(error2, void 0); - return; - } - for (const entry of entries) { - this._handleEntry(entry, item.base); - } - done(null, void 0); - }); - } - _handleError(error2) { - if (this._isDestroyed || !common2.isFatalError(this._settings, error2)) { - return; - } - this._isFatalError = true; - this._isDestroyed = true; - this._emitter.emit("error", error2); - } - _handleEntry(entry, base) { - if (this._isDestroyed || this._isFatalError) { - return; - } - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { - this._emitEntry(entry); - } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _emitEntry(entry) { - this._emitter.emit("entry", entry); - } - }; - exports2.default = AsyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/async.js -var require_async4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var async_1 = require_async3(); - var AsyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._storage = []; - } - read(callback) { - this._reader.onError((error2) => { - callFailureCallback(callback, error2); - }); - this._reader.onEntry((entry) => { - this._storage.push(entry); - }); - this._reader.onEnd(() => { - callSuccessCallback(callback, this._storage); - }); - this._reader.read(); - } - }; - exports2.default = AsyncProvider; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, entries) { - callback(null, entries); - } - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/stream.js -var require_stream2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var async_1 = require_async3(); - var StreamProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._stream = new stream_1.Readable({ - objectMode: true, - read: () => { - }, - destroy: () => { - if (!this._reader.isDestroyed) { - this._reader.destroy(); - } - } - }); - } - read() { - this._reader.onError((error2) => { - this._stream.emit("error", error2); - }); - this._reader.onEntry((entry) => { - this._stream.push(entry); - }); - this._reader.onEnd(() => { - this._stream.push(null); - }); - this._reader.read(); - return this._stream; - } - }; - exports2.default = StreamProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/sync.js -var require_sync3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsScandir = require_out2(); - var common2 = require_common2(); - var reader_1 = require_reader(); - var SyncReader = class extends reader_1.default { - constructor() { - super(...arguments); - this._scandir = fsScandir.scandirSync; - this._storage = []; - this._queue = /* @__PURE__ */ new Set(); - } - read() { - this._pushToQueue(this._root, this._settings.basePath); - this._handleQueue(); - return this._storage; - } - _pushToQueue(directory, base) { - this._queue.add({ directory, base }); - } - _handleQueue() { - for (const item of this._queue.values()) { - this._handleDirectory(item.directory, item.base); - } - } - _handleDirectory(directory, base) { - try { - const entries = this._scandir(directory, this._settings.fsScandirSettings); - for (const entry of entries) { - this._handleEntry(entry, base); - } - } catch (error2) { - this._handleError(error2); - } - } - _handleError(error2) { - if (!common2.isFatalError(this._settings, error2)) { - return; - } - throw error2; - } - _handleEntry(entry, base) { - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { - this._pushToStorage(entry); - } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _pushToStorage(entry) { - this._storage.push(entry); - } - }; - exports2.default = SyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/sync.js -var require_sync4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var sync_1 = require_sync3(); - var SyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new sync_1.default(this._root, this._settings); - } - read() { - return this._reader.read(); - } - }; - exports2.default = SyncProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/settings.js -var require_settings3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path5 = require("path"); - var fsScandir = require_out2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.basePath = this._getValue(this._options.basePath, void 0); - this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); - this.deepFilter = this._getValue(this._options.deepFilter, null); - this.entryFilter = this._getValue(this._options.entryFilter, null); - this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path5.sep); - this.fsScandirSettings = new fsScandir.Settings({ - followSymbolicLinks: this._options.followSymbolicLinks, - fs: this._options.fs, - pathSegmentSeparator: this._options.pathSegmentSeparator, - stats: this._options.stats, - throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.walk/out/index.js -var require_out3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0; - var async_1 = require_async4(); - var stream_1 = require_stream2(); - var sync_1 = require_sync4(); - var settings_1 = require_settings3(); - exports2.Settings = settings_1.default; - function walk(directory, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); - return; - } - new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); - } - exports2.walk = walk; - function walkSync(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new sync_1.default(directory, settings); - return provider.read(); - } - exports2.walkSync = walkSync; - function walkStream(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new stream_1.default(directory, settings); - return provider.read(); - } - exports2.walkStream = walkStream; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/fast-glob/out/readers/reader.js -var require_reader2 = __commonJS({ - "node_modules/fast-glob/out/readers/reader.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path5 = require("path"); - var fsStat = require_out(); - var utils = require_utils7(); - var Reader = class { - constructor(_settings) { - this._settings = _settings; - this._fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this._settings.followSymbolicLinks, - fs: this._settings.fs, - throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks - }); - } - _getFullEntryPath(filepath) { - return path5.resolve(this._settings.cwd, filepath); - } - _makeEntry(stats, pattern) { - const entry = { - name: pattern, - path: pattern, - dirent: utils.fs.createDirentFromStats(pattern, stats) - }; - if (this._settings.stats) { - entry.stats = stats; - } - return entry; - } - _isFatalError(error2) { - return !utils.errno.isEnoentCodeError(error2) && !this._settings.suppressErrors; - } - }; - exports2.default = Reader; - } -}); - -// node_modules/fast-glob/out/readers/stream.js -var require_stream3 = __commonJS({ - "node_modules/fast-glob/out/readers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderStream = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkStream = fsWalk.walkStream; - this._stat = fsStat.stat; - } - dynamic(root, options) { - return this._walkStream(root, options); - } - static(patterns, options) { - const filepaths = patterns.map(this._getFullEntryPath, this); - const stream = new stream_1.PassThrough({ objectMode: true }); - stream._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream.push(entry); - } - if (index === filepaths.length - 1) { - stream.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream.write(i); - } - return stream; - } - _getEntry(filepath, pattern, options) { - return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error2) => { - if (options.errorFilter(error2)) { - return null; - } - throw error2; - }); - } - _getStat(filepath) { - return new Promise((resolve4, reject) => { - this._stat(filepath, this._fsStatSettings, (error2, stats) => { - return error2 === null ? resolve4(stats) : reject(error2); - }); - }); - } - }; - exports2.default = ReaderStream; - } -}); - -// node_modules/fast-glob/out/readers/async.js -var require_async5 = __commonJS({ - "node_modules/fast-glob/out/readers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var stream_1 = require_stream3(); - var ReaderAsync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkAsync = fsWalk.walk; - this._readerStream = new stream_1.default(this._settings); - } - dynamic(root, options) { - return new Promise((resolve4, reject) => { - this._walkAsync(root, options, (error2, entries) => { - if (error2 === null) { - resolve4(entries); - } else { - reject(error2); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream = this._readerStream.static(patterns, options); - return new Promise((resolve4, reject) => { - stream.once("error", reject); - stream.on("data", (entry) => entries.push(entry)); - stream.once("end", () => resolve4(entries)); - }); - } - }; - exports2.default = ReaderAsync; - } -}); - -// node_modules/fast-glob/out/providers/matchers/matcher.js -var require_matcher = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var Matcher = class { - constructor(_patterns, _settings, _micromatchOptions) { - this._patterns = _patterns; - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this._storage = []; - this._fillStorage(); - } - _fillStorage() { - for (const pattern of this._patterns) { - const segments = this._getPatternSegments(pattern); - const sections = this._splitSegmentsIntoSections(segments); - this._storage.push({ - complete: sections.length <= 1, - pattern, - segments, - sections - }); - } - } - _getPatternSegments(pattern) { - const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); - return parts.map((part) => { - const dynamic = utils.pattern.isDynamicPattern(part, this._settings); - if (!dynamic) { - return { - dynamic: false, - pattern: part - }; - } - return { - dynamic: true, - pattern: part, - patternRe: utils.pattern.makeRe(part, this._micromatchOptions) - }; - }); - } - _splitSegmentsIntoSections(segments) { - return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); - } - }; - exports2.default = Matcher; - } -}); - -// node_modules/fast-glob/out/providers/matchers/partial.js -var require_partial = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var matcher_1 = require_matcher(); - var PartialMatcher = class extends matcher_1.default { - match(filepath) { - const parts = filepath.split("/"); - const levels = parts.length; - const patterns = this._storage.filter((info4) => !info4.complete || info4.segments.length > levels); - for (const pattern of patterns) { - const section = pattern.sections[0]; - if (!pattern.complete && levels > section.length) { - return true; - } - const match = parts.every((part, index) => { - const segment = pattern.segments[index]; - if (segment.dynamic && segment.patternRe.test(part)) { - return true; - } - if (!segment.dynamic && segment.pattern === part) { - return true; - } - return false; - }); - if (match) { - return true; - } - } - return false; - } - }; - exports2.default = PartialMatcher; - } -}); - -// node_modules/fast-glob/out/providers/filters/deep.js -var require_deep = __commonJS({ - "node_modules/fast-glob/out/providers/filters/deep.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var partial_1 = require_partial(); - var DeepFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - } - getFilter(basePath, positive, negative) { - const matcher = this._getMatcher(positive); - const negativeRe = this._getNegativePatternsRe(negative); - return (entry) => this._filter(basePath, entry, matcher, negativeRe); - } - _getMatcher(patterns) { - return new partial_1.default(patterns, this._settings, this._micromatchOptions); - } - _getNegativePatternsRe(patterns) { - const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); - return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); - } - _filter(basePath, entry, matcher, negativeRe) { - if (this._isSkippedByDeep(basePath, entry.path)) { - return false; - } - if (this._isSkippedSymbolicLink(entry)) { - return false; - } - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._isSkippedByPositivePatterns(filepath, matcher)) { - return false; - } - return this._isSkippedByNegativePatterns(filepath, negativeRe); - } - _isSkippedByDeep(basePath, entryPath) { - if (this._settings.deep === Infinity) { - return false; - } - return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; - } - _getEntryLevel(basePath, entryPath) { - const entryPathDepth = entryPath.split("/").length; - if (basePath === "") { - return entryPathDepth; - } - const basePathDepth = basePath.split("/").length; - return entryPathDepth - basePathDepth; - } - _isSkippedSymbolicLink(entry) { - return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); - } - _isSkippedByPositivePatterns(entryPath, matcher) { - return !this._settings.baseNameMatch && !matcher.match(entryPath); - } - _isSkippedByNegativePatterns(entryPath, patternsRe) { - return !utils.pattern.matchAny(entryPath, patternsRe); - } - }; - exports2.default = DeepFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/entry.js -var require_entry = __commonJS({ - "node_modules/fast-glob/out/providers/filters/entry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var EntryFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this.index = /* @__PURE__ */ new Map(); - } - getFilter(positive, negative) { - const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); - const patterns = { - positive: { - all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) - }, - negative: { - absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), - relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) - } - }; - return (entry) => this._filter(entry, patterns); - } - _filter(entry, patterns) { - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._settings.unique && this._isDuplicateEntry(filepath)) { - return false; - } - if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { - return false; - } - const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); - if (this._settings.unique && isMatched) { - this._createIndexRecord(filepath); - } - return isMatched; - } - _isDuplicateEntry(filepath) { - return this.index.has(filepath); - } - _createIndexRecord(filepath) { - this.index.set(filepath, void 0); - } - _onlyFileFilter(entry) { - return this._settings.onlyFiles && !entry.dirent.isFile(); - } - _onlyDirectoryFilter(entry) { - return this._settings.onlyDirectories && !entry.dirent.isDirectory(); - } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { - return utils.pattern.matchAny(filepath + "/", patternsRe); - } - return isMatched; - } - }; - exports2.default = EntryFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/error.js -var require_error = __commonJS({ - "node_modules/fast-glob/out/providers/filters/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var ErrorFilter = class { - constructor(_settings) { - this._settings = _settings; - } - getFilter() { - return (error2) => this._isNonFatalError(error2); - } - _isNonFatalError(error2) { - return utils.errno.isEnoentCodeError(error2) || this._settings.suppressErrors; - } - }; - exports2.default = ErrorFilter; - } -}); - -// node_modules/fast-glob/out/providers/transformers/entry.js -var require_entry2 = __commonJS({ - "node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var EntryTransformer = class { - constructor(_settings) { - this._settings = _settings; - } - getTransformer() { - return (entry) => this._transform(entry); - } - _transform(entry) { - let filepath = entry.path; - if (this._settings.absolute) { - filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); - filepath = utils.path.unixify(filepath); - } - if (this._settings.markDirectories && entry.dirent.isDirectory()) { - filepath += "/"; - } - if (!this._settings.objectMode) { - return filepath; - } - return Object.assign(Object.assign({}, entry), { path: filepath }); - } - }; - exports2.default = EntryTransformer; - } -}); - -// node_modules/fast-glob/out/providers/provider.js -var require_provider = __commonJS({ - "node_modules/fast-glob/out/providers/provider.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path5 = require("path"); - var deep_1 = require_deep(); - var entry_1 = require_entry(); - var error_1 = require_error(); - var entry_2 = require_entry2(); - var Provider = class { - constructor(_settings) { - this._settings = _settings; - this.errorFilter = new error_1.default(this._settings); - this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); - this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); - this.entryTransformer = new entry_2.default(this._settings); - } - _getRootDirectory(task) { - return path5.resolve(this._settings.cwd, task.base); - } - _getReaderOptions(task) { - const basePath = task.base === "." ? "" : task.base; - return { - basePath, - pathSegmentSeparator: "/", - concurrency: this._settings.concurrency, - deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), - entryFilter: this.entryFilter.getFilter(task.positive, task.negative), - errorFilter: this.errorFilter.getFilter(), - followSymbolicLinks: this._settings.followSymbolicLinks, - fs: this._settings.fs, - stats: this._settings.stats, - throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, - transform: this.entryTransformer.getTransformer() - }; - } - _getMicromatchOptions() { - return { - dot: this._settings.dot, - matchBase: this._settings.baseNameMatch, - nobrace: !this._settings.braceExpansion, - nocase: !this._settings.caseSensitiveMatch, - noext: !this._settings.extglob, - noglobstar: !this._settings.globstar, - posix: true, - strictSlashes: false - }; - } - }; - exports2.default = Provider; - } -}); - -// node_modules/fast-glob/out/providers/async.js -var require_async6 = __commonJS({ - "node_modules/fast-glob/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var async_1 = require_async5(); - var provider_1 = require_provider(); - var ProviderAsync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new async_1.default(this._settings); - } - async read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = await this.api(root, task, options); - return entries.map((entry) => options.transform(entry)); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderAsync; - } -}); - -// node_modules/fast-glob/out/providers/stream.js -var require_stream4 = __commonJS({ - "node_modules/fast-glob/out/providers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var stream_2 = require_stream3(); - var provider_1 = require_provider(); - var ProviderStream = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new stream_2.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const source = this.api(root, task, options); - const destination = new stream_1.Readable({ objectMode: true, read: () => { - } }); - source.once("error", (error2) => destination.emit("error", error2)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")); - destination.once("close", () => source.destroy()); - return destination; - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderStream; - } -}); - -// node_modules/fast-glob/out/readers/sync.js -var require_sync5 = __commonJS({ - "node_modules/fast-glob/out/readers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderSync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkSync = fsWalk.walkSync; - this._statSync = fsStat.statSync; - } - dynamic(root, options) { - return this._walkSync(root, options); - } - static(patterns, options) { - const entries = []; - for (const pattern of patterns) { - const filepath = this._getFullEntryPath(pattern); - const entry = this._getEntry(filepath, pattern, options); - if (entry === null || !options.entryFilter(entry)) { - continue; - } - entries.push(entry); - } - return entries; - } - _getEntry(filepath, pattern, options) { - try { - const stats = this._getStat(filepath); - return this._makeEntry(stats, pattern); - } catch (error2) { - if (options.errorFilter(error2)) { - return null; - } - throw error2; - } - } - _getStat(filepath) { - return this._statSync(filepath, this._fsStatSettings); - } - }; - exports2.default = ReaderSync; - } -}); - -// node_modules/fast-glob/out/providers/sync.js -var require_sync6 = __commonJS({ - "node_modules/fast-glob/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var sync_1 = require_sync5(); - var provider_1 = require_provider(); - var ProviderSync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new sync_1.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = this.api(root, task, options); - return entries.map(options.transform); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderSync; - } -}); - -// node_modules/fast-glob/out/settings.js -var require_settings4 = __commonJS({ - "node_modules/fast-glob/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs5 = require("fs"); - var os2 = require("os"); - var CPU_COUNT = Math.max(os2.cpus().length, 1); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs5.lstat, - lstatSync: fs5.lstatSync, - stat: fs5.stat, - statSync: fs5.statSync, - readdir: fs5.readdir, - readdirSync: fs5.readdirSync - }; - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.absolute = this._getValue(this._options.absolute, false); - this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); - this.braceExpansion = this._getValue(this._options.braceExpansion, true); - this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); - this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); - this.cwd = this._getValue(this._options.cwd, process.cwd()); - this.deep = this._getValue(this._options.deep, Infinity); - this.dot = this._getValue(this._options.dot, false); - this.extglob = this._getValue(this._options.extglob, true); - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); - this.fs = this._getFileSystemMethods(this._options.fs); - this.globstar = this._getValue(this._options.globstar, true); - this.ignore = this._getValue(this._options.ignore, []); - this.markDirectories = this._getValue(this._options.markDirectories, false); - this.objectMode = this._getValue(this._options.objectMode, false); - this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); - this.onlyFiles = this._getValue(this._options.onlyFiles, true); - this.stats = this._getValue(this._options.stats, false); - this.suppressErrors = this._getValue(this._options.suppressErrors, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); - this.unique = this._getValue(this._options.unique, true); - if (this.onlyDirectories) { - this.onlyFiles = false; - } - if (this.stats) { - this.objectMode = true; - } - this.ignore = [].concat(this.ignore); - } - _getValue(option, value) { - return option === void 0 ? value : option; - } - _getFileSystemMethods(methods = {}) { - return Object.assign(Object.assign({}, exports2.DEFAULT_FILE_SYSTEM_ADAPTER), methods); - } - }; - exports2.default = Settings; - } -}); - -// node_modules/fast-glob/out/index.js -var require_out4 = __commonJS({ - "node_modules/fast-glob/out/index.js"(exports2, module2) { - "use strict"; - var taskManager = require_tasks(); - var async_1 = require_async6(); - var stream_1 = require_stream4(); - var sync_1 = require_sync6(); - var settings_1 = require_settings4(); - var utils = require_utils7(); - async function FastGlob(source, options) { - assertPatternsInput(source); - const works = getWorks(source, async_1.default, options); - const result = await Promise.all(works); - return utils.array.flatten(result); - } - (function(FastGlob2) { - FastGlob2.glob = FastGlob2; - FastGlob2.globSync = sync; - FastGlob2.globStream = stream; - FastGlob2.async = FastGlob2; - function sync(source, options) { - assertPatternsInput(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream(source, options) { - assertPatternsInput(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream; - function generateTasks(source, options) { - assertPatternsInput(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern; - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPathToPattern(source); - } - FastGlob2.convertPathToPattern = convertPathToPattern; - let posix; - (function(posix2) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapePosixPath(source); - } - posix2.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertPosixPathToPattern(source); - } - posix2.convertPathToPattern = convertPathToPattern2; - })(posix = FastGlob2.posix || (FastGlob2.posix = {})); - let win32; - (function(win322) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapeWindowsPath(source); - } - win322.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertWindowsPathToPattern(source); - } - win322.convertPathToPattern = convertPathToPattern2; - })(win32 = FastGlob2.win32 || (FastGlob2.win32 = {})); - })(FastGlob || (FastGlob = {})); - function getWorks(source, _Provider, options) { - const patterns = [].concat(source); - const settings = new settings_1.default(options); - const tasks = taskManager.generate(patterns, settings); - const provider = new _Provider(settings); - return tasks.map(provider.read, provider); - } - function assertPatternsInput(input) { - const source = [].concat(input); - const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); - if (!isValidSource) { - throw new TypeError("Patterns must be a string (non empty) or an array of strings"); - } - } - module2.exports = FastGlob; - } -}); - -// node_modules/path-type/index.js -var require_path_type = __commonJS({ - "node_modules/path-type/index.js"(exports2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var fs5 = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify2(fs5[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - return fs5[fsStatType](filePath)[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - exports2.isFile = isType.bind(null, "stat", "isFile"); - exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// node_modules/dir-glob/index.js -var require_dir_glob = __commonJS({ - "node_modules/dir-glob/index.js"(exports2, module2) { - "use strict"; - var path5 = require("path"); - var pathType = require_path_type(); - var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; - var getPath = (filepath, cwd) => { - const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; - return path5.isAbsolute(pth) ? pth : path5.join(cwd, pth); - }; - var addExtensions = (file, extensions) => { - if (path5.extname(file)) { - return `**/${file}`; - } - return `**/${file}.${getExtensions(extensions)}`; - }; - var getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - if (options.files && options.extensions) { - return options.files.map((x) => path5.posix.join(directory, addExtensions(x, options.extensions))); - } - if (options.files) { - return options.files.map((x) => path5.posix.join(directory, `**/${x}`)); - } - if (options.extensions) { - return [path5.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - return [path5.posix.join(directory, "**")]; - }; - module2.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = await Promise.all([].concat(input).map(async (x) => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - return [].concat.apply([], globs); - }; - module2.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - return [].concat.apply([], globs); - }; - } -}); - -// node_modules/ignore/index.js -var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports2, module2) { - function makeArray(subject) { - return Array.isArray(subject) ? subject : [subject]; - } - var EMPTY = ""; - var SPACE = " "; - var ESCAPE = "\\"; - var REGEX_TEST_BLANK_LINE = /^\s+$/; - var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; - var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; - var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; - var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; - var SLASH = "/"; - var TMP_KEY_IGNORE = "node-ignore"; - if (typeof Symbol !== "undefined") { - TMP_KEY_IGNORE = Symbol.for("node-ignore"); - } - var KEY_IGNORE = TMP_KEY_IGNORE; - var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); - var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; - var RETURN_FALSE = () => false; - var sanitizeRange = (range) => range.replace( - REGEX_REGEXP_RANGE, - (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY - ); - var cleanRangeBackSlash = (slashes) => { - const { length } = slashes; - return slashes.slice(0, length - length % 2); - }; - var REPLACERS = [ - [ - // remove BOM - // TODO: - // Other similar zero-width characters? - /^\uFEFF/, - () => EMPTY - ], - // > Trailing spaces are ignored unless they are quoted with backslash ("\") - [ - // (a\ ) -> (a ) - // (a ) -> (a) - // (a \ ) -> (a ) - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY - ], - // replace (\ ) with ' ' - [ - /\\\s/g, - () => SPACE - ], - // Escape metacharacters - // which is written down by users but means special for regular expressions. - // > There are 12 characters with special meanings: - // > - the backslash \, - // > - the caret ^, - // > - the dollar sign $, - // > - the period or dot ., - // > - the vertical bar or pipe symbol |, - // > - the question mark ?, - // > - the asterisk or star *, - // > - the plus sign +, - // > - the opening parenthesis (, - // > - the closing parenthesis ), - // > - and the opening square bracket [, - // > - the opening curly brace {, - // > These special characters are often called "metacharacters". - [ - /[\\$.|*+(){^]/g, - (match) => `\\${match}` - ], - [ - // > a question mark (?) matches a single character - /(?!\\)\?/g, - () => "[^/]" - ], - // leading slash - [ - // > A leading slash matches the beginning of the pathname. - // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". - // A leading slash matches the beginning of the pathname - /^\//, - () => "^" - ], - // replace special metacharacter slash after the leading slash - [ - /\//g, - () => "\\/" - ], - [ - // > A leading "**" followed by a slash means match in all directories. - // > For example, "**/foo" matches file or directory "foo" anywhere, - // > the same as pattern "foo". - // > "**/foo/bar" matches file or directory "bar" anywhere that is directly - // > under directory "foo". - // Notice that the '*'s have been replaced as '\\*' - /^\^*\\\*\\\*\\\//, - // '**/foo' <-> 'foo' - () => "^(?:.*\\/)?" - ], - // starting - [ - // there will be no leading '/' - // (which has been replaced by section "leading slash") - // If starts with '**', adding a '^' to the regular expression also works - /^(?=[^^])/, - function startingReplacer() { - return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; - } - ], - // two globstars - [ - // Use lookahead assertions so that we could match more than one `'/**'` - /\\\/\\\*\\\*(?=\\\/|$)/g, - // Zero, one or several directories - // should not use '*', or it will be replaced by the next replacer - // Check if it is not the last `'/**'` - (_, index, str2) => index + 6 < str2.length ? "(?:\\/[^\\/]+)*" : "\\/.+" - ], - // normal intermediate wildcards - [ - // Never replace escaped '*' - // ignore rule '\*' will match the path '*' - // 'abc.*/' -> go - // 'abc.*' -> skip this rule, - // coz trailing single wildcard will be handed by [trailing wildcard] - /(^|[^\\]+)(\\\*)+(?=.+)/g, - // '*.js' matches '.js' - // '*.js' doesn't match 'abc' - (_, p1, p2) => { - const unescaped = p2.replace(/\\\*/g, "[^\\/]*"); - return p1 + unescaped; - } - ], - [ - // unescape, revert step 3 except for back slash - // For example, if a user escape a '\\*', - // after step 3, the result will be '\\\\\\*' - /\\\\\\(?=[$.|*+(){^])/g, - () => ESCAPE - ], - [ - // '\\\\' -> '\\' - /\\\\/g, - () => ESCAPE - ], - [ - // > The range notation, e.g. [a-zA-Z], - // > can be used to match one of the characters in a range. - // `\` is escaped by step 3 - /(\\)?\[([^\]/]*?)(\\*)($|\])/g, - (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" - ], - // ending - [ - // 'js' will not match 'js.' - // 'ab' will not match 'abc' - /(?:[^*])$/, - // WTF! - // https://git-scm.com/docs/gitignore - // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) - // which re-fixes #24, #38 - // > If there is a separator at the end of the pattern then the pattern - // > will only match directories, otherwise the pattern can match both - // > files and directories. - // 'js*' will not match 'a.js' - // 'js/' will not match 'a.js' - // 'js' will match 'a.js' and 'a.js/' - (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } - ] - ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; - } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); - }; - var isString = (subject) => typeof subject === "string"; - var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); - var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; - this.pattern = pattern; - this.negative = negative; - this.regex = regex; - } - }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; - let negative = false; - if (pattern.indexOf("!") === 0) { - negative = true; - pattern = pattern.substr(1); - } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); - return new IgnoreRule( - origin, - pattern, - negative, - regex - ); - }; - var throwError2 = (message, Ctor) => { - throw new Ctor(message); - }; - var checkPath = (path5, originalPath, doThrow) => { - if (!isString(path5)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path5) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path5)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; - }; - var isNotRelative = (path5) => REGEX_TEST_INVALID_PATH.test(path5); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define2(this, KEY_IGNORE, true); - this._rules = []; - this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); - } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); - } - _addPattern(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); - this._added = true; - return; - } - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignoreCase); - this._added = true; - this._rules.push(rule); - } - } - // @param {Array | string | Ignore} pattern - add(pattern) { - this._added = false; - makeArray( - isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { - this._initCache(); - } - return this; - } - // legacy - addPattern(pattern) { - return this.add(pattern); - } - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - _testOne(path5, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path5); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; - } - // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { - const path5 = originalPath && checkPath.convert(originalPath); - checkPath( - path5, - originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError2 - ); - return this._t(path5, cache, checkUnignored, slices); - } - _t(path5, cache, checkUnignored, slices) { - if (path5 in cache) { - return cache[path5]; - } - if (!slices) { - slices = path5.split(SLASH); - } - slices.pop(); - if (!slices.length) { - return cache[path5] = this._testOne(path5, checkUnignored); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path5] = parent.ignored ? parent : this._testOne(path5, checkUnignored); - } - ignores(path5) { - return this._test(path5, this._ignoreCache, false).ignored; - } - createFilter() { - return (path5) => !this.ignores(path5); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path5) { - return this._test(path5, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - var isPathValid = (path5) => checkPath(path5 && checkPath.convert(path5), path5, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module2.exports = factory; - if ( - // Detect `process` so that it can run in browsers. - typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") - ) { - const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); - checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path5) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path5) || isNotRelative(path5); - } - } -}); - -// node_modules/slash/index.js -var require_slash = __commonJS({ - "node_modules/slash/index.js"(exports2, module2) { - "use strict"; - module2.exports = (path5) => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path5); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path5); - if (isExtendedLengthPath || hasNonAscii) { - return path5; - } - return path5.replace(/\\/g, "/"); - }; - } -}); - -// node_modules/globby/gitignore.js -var require_gitignore = __commonJS({ - "node_modules/globby/gitignore.js"(exports2, module2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var fs5 = require("fs"); - var path5 = require("path"); - var fastGlob = require_out4(); - var gitIgnore = require_ignore(); - var slash = require_slash(); - var DEFAULT_IGNORE = [ - "**/node_modules/**", - "**/flow-typed/**", - "**/coverage/**", - "**/.git" - ]; - var readFileP = promisify2(fs5.readFile); - var mapGitIgnorePatternTo = (base) => (ignore) => { - if (ignore.startsWith("!")) { - return "!" + path5.posix.join(base, ignore.slice(1)); - } - return path5.posix.join(base, ignore); - }; - var parseGitIgnore = (content, options) => { - const base = slash(path5.relative(options.cwd, path5.dirname(options.fileName))); - return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); - }; - var reduceIgnore = (files) => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - return ignores; - }; - var ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path5.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - return path5.join(cwd, p); - }; - var getIsIgnoredPredecate = (ignores, cwd) => { - return (p) => ignores.ignores(slash(path5.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); - }; - var getFile = async (file, cwd) => { - const filePath = path5.join(cwd, file); - const content = await readFileP(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var getFileSync = (file, cwd) => { - const filePath = path5.join(cwd, file); - const content = fs5.readFileSync(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) - } = {}) => { - return { ignore, cwd }; - }; - module2.exports = async (options) => { - options = normalizeOptions(options); - const paths = await fastGlob("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - module2.exports.sync = (options) => { - options = normalizeOptions(options); - const paths = fastGlob.sync("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = paths.map((file) => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - } -}); - -// node_modules/globby/stream-utils.js -var require_stream_utils = __commonJS({ - "node_modules/globby/stream-utils.js"(exports2, module2) { - "use strict"; - var { Transform } = require("stream"); - var ObjectTransform = class extends Transform { - constructor() { - super({ - objectMode: true - }); - } - }; - var FilterStream = class extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - callback(); - } - }; - var UniqueStream = class extends ObjectTransform { - constructor() { - super(); - this._pushed = /* @__PURE__ */ new Set(); - } - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - callback(); - } - }; - module2.exports = { - FilterStream, - UniqueStream - }; - } -}); - -// node_modules/globby/index.js -var require_globby = __commonJS({ - "node_modules/globby/index.js"(exports2, module2) { - "use strict"; - var fs5 = require("fs"); - var arrayUnion = require_array_union(); - var merge2 = require_merge2(); - var fastGlob = require_out4(); - var dirGlob = require_dir_glob(); - var gitignore = require_gitignore(); - var { FilterStream, UniqueStream } = require_stream_utils(); - var DEFAULT_FILTER = () => false; - var isNegative = (pattern) => pattern[0] === "!"; - var assertPatternsInput = (patterns) => { - if (!patterns.every((pattern) => typeof pattern === "string")) { - throw new TypeError("Patterns must be a string or an array of strings"); - } - }; - var checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - let stat; - try { - stat = fs5.statSync(options.cwd); - } catch { - return; - } - if (!stat.isDirectory()) { - throw new Error("The `cwd` option must be a path to a directory"); - } - }; - var getPathString = (p) => p.stats instanceof fs5.Stats ? p.path : p; - var generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - const globTasks = []; - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - for (const [index, pattern] of patterns.entries()) { - if (isNegative(pattern)) { - continue; - } - const ignore = patterns.slice(index).filter((pattern2) => isNegative(pattern2)).map((pattern2) => pattern2.slice(1)); - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - globTasks.push({ pattern, options }); - } - return globTasks; - }; - var globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === "object") { - options = { - ...options, - ...task.options.expandDirectories - }; - } - return fn(task.pattern, options); - }; - var getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - var getFilterSync = (options) => { - return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - var globToTask = (task) => (glob) => { - const { options } = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - return { - pattern: glob, - options - }; - }; - module2.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const getFilter = async () => { - return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - const getTasks = async () => { - const tasks2 = await Promise.all(globTasks.map(async (task) => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - return arrayUnion(...tasks2); - }; - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); - return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); - }; - module2.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - return matches.filter((path_) => !filter(path_)); - }; - module2.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - const filterStream = new FilterStream((p) => !filter(p)); - const uniqueStream = new UniqueStream(); - return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); - }; - module2.exports.generateGlobTasks = generateGlobTasks; - module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); - module2.exports.gitignore = gitignore; - } -}); - -// node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - "node_modules/graceful-fs/polyfills.js"(exports2, module2) { - var constants = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform2 = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs5) { - if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs5); - } - if (!fs5.lutimes) { - patchLutimes(fs5); - } - fs5.chown = chownFix(fs5.chown); - fs5.fchown = chownFix(fs5.fchown); - fs5.lchown = chownFix(fs5.lchown); - fs5.chmod = chmodFix(fs5.chmod); - fs5.fchmod = chmodFix(fs5.fchmod); - fs5.lchmod = chmodFix(fs5.lchmod); - fs5.chownSync = chownFixSync(fs5.chownSync); - fs5.fchownSync = chownFixSync(fs5.fchownSync); - fs5.lchownSync = chownFixSync(fs5.lchownSync); - fs5.chmodSync = chmodFixSync(fs5.chmodSync); - fs5.fchmodSync = chmodFixSync(fs5.fchmodSync); - fs5.lchmodSync = chmodFixSync(fs5.lchmodSync); - fs5.stat = statFix(fs5.stat); - fs5.fstat = statFix(fs5.fstat); - fs5.lstat = statFix(fs5.lstat); - fs5.statSync = statFixSync(fs5.statSync); - fs5.fstatSync = statFixSync(fs5.fstatSync); - fs5.lstatSync = statFixSync(fs5.lstatSync); - if (fs5.chmod && !fs5.lchmod) { - fs5.lchmod = function(path5, mode, cb) { - if (cb) process.nextTick(cb); - }; - fs5.lchmodSync = function() { - }; - } - if (fs5.chown && !fs5.lchown) { - fs5.lchown = function(path5, uid, gid, cb) { - if (cb) process.nextTick(cb); - }; - fs5.lchownSync = function() { - }; - } - if (platform2 === "win32") { - fs5.rename = typeof fs5.rename !== "function" ? fs5.rename : (function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { - setTimeout(function() { - fs5.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er); - }); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); - return rename; - })(fs5.rename); - } - fs5.read = typeof fs5.read !== "function" ? fs5.read : (function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs5, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs5, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); - return read; - })(fs5.read); - fs5.readSync = typeof fs5.readSync !== "function" ? fs5.readSync : /* @__PURE__ */ (function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs5, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - })(fs5.readSync); - function patchLchmod(fs6) { - fs6.lchmod = function(path5, mode, callback) { - fs6.open( - path5, - constants.O_WRONLY | constants.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) callback(err); - return; - } - fs6.fchmod(fd, mode, function(err2) { - fs6.close(fd, function(err22) { - if (callback) callback(err2 || err22); - }); - }); - } - ); - }; - fs6.lchmodSync = function(path5, mode) { - var fd = fs6.openSync(path5, constants.O_WRONLY | constants.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs6.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs6.closeSync(fd); - } catch (er) { - } - } else { - fs6.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs6) { - if (constants.hasOwnProperty("O_SYMLINK") && fs6.futimes) { - fs6.lutimes = function(path5, at, mt, cb) { - fs6.open(path5, constants.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) cb(er); - return; - } - fs6.futimes(fd, at, mt, function(er2) { - fs6.close(fd, function(er22) { - if (cb) cb(er2 || er22); - }); - }); - }); - }; - fs6.lutimesSync = function(path5, at, mt) { - var fd = fs6.openSync(path5, constants.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs6.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs6.closeSync(fd); - } catch (er) { - } - } else { - fs6.closeSync(fd); - } - } - return ret; - }; - } else if (fs6.futimes) { - fs6.lutimes = function(_a, _b, _c, cb) { - if (cb) process.nextTick(cb); - }; - fs6.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) return orig; - return function(target, mode, cb) { - return orig.call(fs5, target, mode, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) return orig; - return function(target, mode) { - try { - return orig.call(fs5, target, mode); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function chownFix(orig) { - if (!orig) return orig; - return function(target, uid, gid, cb) { - return orig.call(fs5, target, uid, gid, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) return orig; - return function(target, uid, gid) { - try { - return orig.call(fs5, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function statFix(orig) { - if (!orig) return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - if (cb) cb.apply(this, arguments); - } - return options ? orig.call(fs5, target, options, callback) : orig.call(fs5, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) return orig; - return function(target, options) { - var stats = options ? orig.call(fs5, target, options) : orig.call(fs5, target); - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { - var Stream = require("stream").Stream; - module2.exports = legacy; - function legacy(fs5) { - return { - ReadStream, - WriteStream - }; - function ReadStream(path5, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path5, options); - Stream.call(this); - var self2 = this; - this.path = path5; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self2._read(); - }); - return; - } - fs5.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self2.emit("error", err); - self2.readable = false; - return; - } - self2.fd = fd; - self2.emit("open", fd); - self2._read(); - }); - } - function WriteStream(path5, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path5, options); - Stream.call(this); - this.path = path5; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs5.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - "node_modules/graceful-fs/clone.js"(exports2, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs5 = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop() { - } - function publishQueue(context2, queue2) { - Object.defineProperty(context2, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug3 = noop; - if (util.debuglog) - debug3 = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug3 = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs5[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs5, queue); - fs5.close = (function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs5, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - })(fs5.close); - fs5.closeSync = (function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs5, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - })(fs5.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug3(fs5[gracefulQueue]); - require("assert").equal(fs5[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs5[gracefulQueue]); - } - module2.exports = patch(clone(fs5)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs5.__patched) { - module2.exports = patch(fs5); - fs5.__patched = true; - } - function patch(fs6) { - polyfills(fs6); - fs6.gracefulify = patch; - fs6.createReadStream = createReadStream; - fs6.createWriteStream = createWriteStream; - var fs$readFile = fs6.readFile; - fs6.readFile = readFile; - function readFile(path5, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path5, options, cb); - function go$readFile(path6, options2, cb2, startTime) { - return fs$readFile(path6, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path6, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs6.writeFile; - fs6.writeFile = writeFile; - function writeFile(path5, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path5, data, options, cb); - function go$writeFile(path6, data2, options2, cb2, startTime) { - return fs$writeFile(path6, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs6.appendFile; - if (fs$appendFile) - fs6.appendFile = appendFile; - function appendFile(path5, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path5, data, options, cb); - function go$appendFile(path6, data2, options2, cb2, startTime) { - return fs$appendFile(path6, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path6, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs6.copyFile; - if (fs$copyFile) - fs6.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs6.readdir; - fs6.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path5, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path6, options2, cb2, startTime) { - return fs$readdir(path6, fs$readdirCallback( - path6, - options2, - cb2, - startTime - )); - } : function go$readdir2(path6, options2, cb2, startTime) { - return fs$readdir(path6, options2, fs$readdirCallback( - path6, - options2, - cb2, - startTime - )); - }; - return go$readdir(path5, options, cb); - function fs$readdirCallback(path6, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path6, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs6); - ReadStream = legStreams.ReadStream; - WriteStream = legStreams.WriteStream; - } - var fs$ReadStream = fs6.ReadStream; - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype); - ReadStream.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs6.WriteStream; - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype); - WriteStream.prototype.open = WriteStream$open; - } - Object.defineProperty(fs6, "ReadStream", { - get: function() { - return ReadStream; - }, - set: function(val2) { - ReadStream = val2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs6, "WriteStream", { - get: function() { - return WriteStream; - }, - set: function(val2) { - WriteStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream; - Object.defineProperty(fs6, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val2) { - FileReadStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream; - Object.defineProperty(fs6, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val2) { - FileWriteStream = val2; - }, - enumerable: true, - configurable: true - }); - function ReadStream(path5, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream(path5, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream(path5, options) { - return new fs6.ReadStream(path5, options); - } - function createWriteStream(path5, options) { - return new fs6.WriteStream(path5, options); - } - var fs$open = fs6.open; - fs6.open = open; - function open(path5, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path5, flags, mode, cb); - function go$open(path6, flags2, mode2, cb2, startTime) { - return fs$open(path6, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path6, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs6; - } - function enqueue(elem) { - debug3("ENQUEUE", elem[0].name, elem[1]); - fs5[gracefulQueue].push(elem); - retry3(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs5[gracefulQueue].length; ++i) { - if (fs5[gracefulQueue][i].length > 2) { - fs5[gracefulQueue][i][3] = now; - fs5[gracefulQueue][i][4] = now; - } - } - retry3(); - } - function retry3() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs5[gracefulQueue].length === 0) - return; - var elem = fs5[gracefulQueue].shift(); - var fn = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug3("RETRY", fn.name, args); - fn.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug3("TIMEOUT", fn.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug3("RETRY", fn.name, args); - fn.apply(null, args.concat([startTime])); - } else { - fs5[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry3, 0); - } - } - } -}); - -// node_modules/is-path-cwd/index.js -var require_is_path_cwd = __commonJS({ - "node_modules/is-path-cwd/index.js"(exports2, module2) { - "use strict"; - var path5 = require("path"); - module2.exports = (path_) => { - let cwd = process.cwd(); - path_ = path5.resolve(path_); - if (process.platform === "win32") { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - return path_ === cwd; - }; - } -}); - -// node_modules/is-path-inside/index.js -var require_is_path_inside = __commonJS({ - "node_modules/is-path-inside/index.js"(exports2, module2) { - "use strict"; - var path5 = require("path"); - module2.exports = (childPath, parentPath) => { - const relation = path5.relative(parentPath, childPath); - return Boolean( - relation && relation !== ".." && !relation.startsWith(`..${path5.sep}`) && relation !== path5.resolve(childPath) - ); - }; - } -}); - -// node_modules/fs.realpath/old.js -var require_old = __commonJS({ - "node_modules/fs.realpath/old.js"(exports2) { - var pathModule = require("path"); - var isWindows = process.platform === "win32"; - var fs5 = require("fs"); - var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - function rethrow() { - var callback; - if (DEBUG) { - var backtrace = new Error(); - callback = debugCallback; - } else - callback = missingCallback; - return callback; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; - else if (!process.noDeprecation) { - var msg = "fs: missing callback " + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } - } - function maybeCallback(cb) { - return typeof cb === "function" ? cb : rethrow(); - } - var normalize3 = pathModule.normalize; - if (isWindows) { - nextPartRe = /(.*?)(?:[\/\\]+|$)/g; - } else { - nextPartRe = /(.*?)(?:[\/]+|$)/g; - } - var nextPartRe; - if (isWindows) { - splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; - } else { - splitRootRe = /^[\/]*/; - } - var splitRootRe; - exports2.realpathSync = function realpathSync(p, cache) { - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs5.lstatSync(base); - knownHard[base] = true; - } - } - while (pos < p.length) { - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - continue; - } - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - resolvedLink = cache[base]; - } else { - var stat = fs5.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs5.statSync(base); - linkTarget = fs5.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - if (cache) cache[original] = p; - return p; - }; - exports2.realpath = function realpath(p, cache, cb) { - if (typeof cb !== "function") { - cb = maybeCallback(cache); - cache = null; - } - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs5.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - function LOOP() { - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - return process.nextTick(LOOP); - } - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - return gotResolvedLink(cache[base]); - } - return fs5.lstat(base, gotStat); - } - function gotStat(err, stat) { - if (err) return cb(err); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs5.stat(base, function(err2) { - if (err2) return cb(err2); - fs5.readlink(base, function(err3, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err3, target); - }); - }); - } - function gotTarget(err, target, base2) { - if (err) return cb(err); - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base2] = resolvedLink; - gotResolvedLink(resolvedLink); - } - function gotResolvedLink(resolvedLink) { - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - }; - } -}); - -// node_modules/fs.realpath/index.js -var require_fs5 = __commonJS({ - "node_modules/fs.realpath/index.js"(exports2, module2) { - module2.exports = realpath; - realpath.realpath = realpath; - realpath.sync = realpathSync; - realpath.realpathSync = realpathSync; - realpath.monkeypatch = monkeypatch; - realpath.unmonkeypatch = unmonkeypatch; - var fs5 = require("fs"); - var origRealpath = fs5.realpath; - var origRealpathSync = fs5.realpathSync; - var version = process.version; - var ok = /^v[0-5]\./.test(version); - var old = require_old(); - function newError(er) { - return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); - } - function realpath(p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb); - } - if (typeof cache === "function") { - cb = cache; - cache = null; - } - origRealpath(p, cache, function(er, result) { - if (newError(er)) { - old.realpath(p, cache, cb); - } else { - cb(er, result); - } - }); - } - function realpathSync(p, cache) { - if (ok) { - return origRealpathSync(p, cache); - } - try { - return origRealpathSync(p, cache); - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache); - } else { - throw er; - } - } - } - function monkeypatch() { - fs5.realpath = realpath; - fs5.realpathSync = realpathSync; - } - function unmonkeypatch() { - fs5.realpath = origRealpath; - fs5.realpathSync = origRealpathSync; - } - } -}); - -// node_modules/concat-map/index.js -var require_concat_map = __commonJS({ - "node_modules/concat-map/index.js"(exports2, module2) { - module2.exports = function(xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - } -}); - -// node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ - "node_modules/balanced-match/index.js"(exports2, module2) { - "use strict"; - module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r = range(a, b, str2); - return r && { - start: r[0], - end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + a.length, r[1]), - post: str2.slice(r[1] + b.length) - }; - } - function maybeMatch(reg, str2) { - var m = str2.match(reg); - return m ? m[0] : null; - } - balanced.range = range; - function range(a, b, str2) { - var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); - var i = ai; - if (ai >= 0 && bi > 0) { - begs = []; - left = str2.length; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str2.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - bi = str2.indexOf(b, i + 1); - } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length) { - result = [left, right]; - } - } - return result; - } - } -}); - -// node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ - "node_modules/brace-expansion/index.js"(exports2, module2) { - var concatMap = require_concat_map(); - var balanced = require_balanced_match(); - module2.exports = expandTop; - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) - return [""]; - var parts = []; - var m = balanced("{", "}", str2); - if (!m) - return str2.split(","); - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; - } - function expandTop(str2) { - if (!str2) - return []; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); - } - return expand(escapeBraces(str2), true).map(unescapeBraces); - } - function embrace(str2) { - return "{" + str2 + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte5(i, y) { - return i >= y; - } - function expand(str2, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2); - } - return [str2]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand(m.post, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte5; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { - return expand(el, false); - }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - return expansions; - } - } -}); - -// node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ - "node_modules/minimatch/minimatch.js"(exports2, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path5 = (function() { - try { - return require("path"); - } catch (e) { - } - })() || { - sep: "/" - }; - minimatch.sep = path5.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand = require_brace_expansion(); - var plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" } - }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set2, c) { - set2[c] = true; - return set2; - }, {}); - } - var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { - options = options || {}; - return function(p, i, list) { - return minimatch(p, pattern, options); - }; - } - function ext(a, b) { - b = b || {}; - var t = {}; - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; - } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); - }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); - }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); - }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); - }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); - }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); - }; - m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); - }; - return m; - }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); - if (!options) options = {}; - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); - } - assertValidPattern(pattern); - if (!options) options = {}; - pattern = pattern.trim(); - if (!options.allowWindowsEscape && path5.sep !== "/") { - pattern = pattern.split(path5.sep).join("/"); - } - this.options = options; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.make(); - } - Minimatch.prototype.debug = function() { - }; - Minimatch.prototype.make = make; - function make() { - var pattern = this.pattern; - var options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); - if (options.debug) this.debug = function debug3() { - console.error.apply(console, arguments); - }; - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { - return s.split(slashSplit); - }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { - return s.map(this.parse, this); - }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { - return s.indexOf(false) === -1; - }); - this.debug(this.pattern, set2); - this.set = set2; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate = false; - var options = this.options; - var negateOffset = 0; - if (options.nonegate) return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate = !negate; - negateOffset++; - } - if (negateOffset) this.pattern = pattern.substr(negateOffset); - this.negate = negate; - } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return expand(pattern); - } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); - } - }; - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - assertValidPattern(pattern); - var options = this.options; - if (pattern === "**") { - if (!options.noglobstar) - return GLOBSTAR; - else - pattern = "*"; - } - if (pattern === "") return ""; - var re = ""; - var hasMagic = !!options.nocase; - var escaping = false; - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self2 = this; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; - } - self2.debug("clearStateChar %j %j", stateChar, re); - stateChar = false; - } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; - } - switch (c) { - /* istanbul ignore next */ - case "/": { - return false; - } - case "\\": - clearStateChar(); - escaping = true; - continue; - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); - if (inClass) { - this.debug(" in class"); - if (c === "!" && i === classStart + 1) c = "^"; - re += c; - continue; - } - self2.debug("call clearStateChar %j", stateChar); - clearStateChar(); - stateChar = c; - if (options.noext) clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re); - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - re += pl.close; - if (pl.type === "!") { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - clearStateChar(); - re += "|"; - continue; - // these are mostly the same in regexp and glob - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - var cs = pattern.substring(classStart + 1, i); - try { - RegExp("[" + cs + "]"); - } catch (er) { - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; - } - } - if (inClass) { - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re, pl); - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { - if (!$2) { - $2 = "\\"; - } - return $1 + $1 + $2 + "|"; - }); - this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case "[": - case ".": - case "(": - addPatternStart = true; - } - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - nlLast += nlAfter; - var openParensBefore = nlBefore.split("(").length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); - } - nlAfter = cleanAfter; - var dollar = ""; - if (nlAfter === "" && isSub !== SUBPARSE) { - dollar = "$"; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - if (re !== "" && hasMagic) { - re = "(?=.)" + re; - } - if (addPatternStart) { - re = patternStart + re; - } - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options.nocase ? "i" : ""; - try { - var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); - } - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) re = "^(?!" + re + ").*$"; - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - minimatch.match = function(list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function(f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = function match(f, partial) { - if (typeof partial === "undefined") partial = this.partial; - this.debug("match", f, this.pattern); - if (this.comment) return false; - if (this.empty) return f === ""; - if (f === "/" && partial) return true; - var options = this.options; - if (path5.sep !== "/") { - f = f.split(path5.sep).join("/"); - } - f = f.split(slashSplit); - this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) break; - } - for (i = 0; i < set2.length; i++) { - var pattern = set2[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) return true; - return !this.negate; - } - } - if (options.flipNegate) return false; - return this.negate; - }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options = this.options; - this.debug( - "matchOne", - { "this": this, file, pattern } - ); - this.debug("matchOne", file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug("matchOne loop"); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - if (p === false) return false; - if (p === GLOBSTAR) { - this.debug("GLOBSTAR", [pattern, p, f]); - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; - } - return true; - } - while (fr < fl) { - var swallowee = file[fr]; - this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { - this.debug("dot detected!", file, fr, pattern, pr); - break; - } - this.debug("globstar swallow a segment, and continue"); - fr++; - } - } - if (partial) { - this.debug("\n>>> no match, partial?", file, fr, pattern, pr); - if (fr === fl) return true; - } - return false; - } - var hit; - if (typeof p === "string") { - hit = f === p; - this.debug("string match", p, f, hit); - } else { - hit = f.match(p); - this.debug("pattern match", p, f, hit); - } - if (!hit) return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - return fi === fl - 1 && file[fi] === ""; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/inherits/inherits_browser.js -var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports2, module2) { - if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; - } - } -}); - -// node_modules/inherits/inherits.js -var require_inherits = __commonJS({ - "node_modules/inherits/inherits.js"(exports2, module2) { - try { - util = require("util"); - if (typeof util.inherits !== "function") throw ""; - module2.exports = util.inherits; - } catch (e) { - module2.exports = require_inherits_browser(); - } - var util; - } -}); - -// node_modules/path-is-absolute/index.js -var require_path_is_absolute = __commonJS({ - "node_modules/path-is-absolute/index.js"(exports2, module2) { - "use strict"; - function posix(path5) { - return path5.charAt(0) === "/"; - } - function win32(path5) { - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path5); - var device = result[1] || ""; - var isUnc = Boolean(device && device.charAt(1) !== ":"); - return Boolean(result[2] || isUnc); - } - module2.exports = process.platform === "win32" ? win32 : posix; - module2.exports.posix = posix; - module2.exports.win32 = win32; - } -}); - -// node_modules/rimraf/node_modules/glob/common.js -var require_common3 = __commonJS({ - "node_modules/rimraf/node_modules/glob/common.js"(exports2) { - exports2.setopts = setopts; - exports2.ownProp = ownProp; - exports2.makeAbs = makeAbs; - exports2.finish = finish; - exports2.mark = mark; - exports2.isIgnored = isIgnored; - exports2.childrenIgnored = childrenIgnored; - function ownProp(obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field); - } - var fs5 = require("fs"); - var path5 = require("path"); - var minimatch = require_minimatch(); - var isAbsolute2 = require_path_is_absolute(); - var Minimatch = minimatch.Minimatch; - function alphasort(a, b) { - return a.localeCompare(b, "en"); - } - function setupIgnores(self2, options) { - self2.ignore = options.ignore || []; - if (!Array.isArray(self2.ignore)) - self2.ignore = [self2.ignore]; - if (self2.ignore.length) { - self2.ignore = self2.ignore.map(ignoreMap); - } - } - function ignoreMap(pattern) { - var gmatcher = null; - if (pattern.slice(-3) === "/**") { - var gpattern = pattern.replace(/(\/\*\*)+$/, ""); - gmatcher = new Minimatch(gpattern, { dot: true }); - } - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher - }; - } - function setopts(self2, pattern, options) { - if (!options) - options = {}; - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar"); - } - pattern = "**/" + pattern; - } - self2.silent = !!options.silent; - self2.pattern = pattern; - self2.strict = options.strict !== false; - self2.realpath = !!options.realpath; - self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); - self2.follow = !!options.follow; - self2.dot = !!options.dot; - self2.mark = !!options.mark; - self2.nodir = !!options.nodir; - if (self2.nodir) - self2.mark = true; - self2.sync = !!options.sync; - self2.nounique = !!options.nounique; - self2.nonull = !!options.nonull; - self2.nosort = !!options.nosort; - self2.nocase = !!options.nocase; - self2.stat = !!options.stat; - self2.noprocess = !!options.noprocess; - self2.absolute = !!options.absolute; - self2.fs = options.fs || fs5; - self2.maxLength = options.maxLength || Infinity; - self2.cache = options.cache || /* @__PURE__ */ Object.create(null); - self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); - self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); - setupIgnores(self2, options); - self2.changedCwd = false; - var cwd = process.cwd(); - if (!ownProp(options, "cwd")) - self2.cwd = cwd; - else { - self2.cwd = path5.resolve(options.cwd); - self2.changedCwd = self2.cwd !== cwd; - } - self2.root = options.root || path5.resolve(self2.cwd, "/"); - self2.root = path5.resolve(self2.root); - if (process.platform === "win32") - self2.root = self2.root.replace(/\\/g, "/"); - self2.cwdAbs = isAbsolute2(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); - if (process.platform === "win32") - self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); - self2.nomount = !!options.nomount; - options.nonegate = true; - options.nocomment = true; - self2.minimatch = new Minimatch(pattern, options); - self2.options = self2.minimatch.options; - } - function finish(self2) { - var nou = self2.nounique; - var all = nou ? [] : /* @__PURE__ */ Object.create(null); - for (var i = 0, l = self2.matches.length; i < l; i++) { - var matches = self2.matches[i]; - if (!matches || Object.keys(matches).length === 0) { - if (self2.nonull) { - var literal = self2.minimatch.globSet[i]; - if (nou) - all.push(literal); - else - all[literal] = true; - } - } else { - var m = Object.keys(matches); - if (nou) - all.push.apply(all, m); - else - m.forEach(function(m2) { - all[m2] = true; - }); - } - } - if (!nou) - all = Object.keys(all); - if (!self2.nosort) - all = all.sort(alphasort); - if (self2.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self2._mark(all[i]); - } - if (self2.nodir) { - all = all.filter(function(e) { - var notDir = !/\/$/.test(e); - var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; - if (notDir && c) - notDir = c !== "DIR" && !Array.isArray(c); - return notDir; - }); - } - } - if (self2.ignore.length) - all = all.filter(function(m2) { - return !isIgnored(self2, m2); - }); - self2.found = all; - } - function mark(self2, p) { - var abs = makeAbs(self2, p); - var c = self2.cache[abs]; - var m = p; - if (c) { - var isDir = c === "DIR" || Array.isArray(c); - var slash = p.slice(-1) === "/"; - if (isDir && !slash) - m += "/"; - else if (!isDir && slash) - m = m.slice(0, -1); - if (m !== p) { - var mabs = makeAbs(self2, m); - self2.statCache[mabs] = self2.statCache[abs]; - self2.cache[mabs] = self2.cache[abs]; - } - } - return m; - } - function makeAbs(self2, f) { - var abs = f; - if (f.charAt(0) === "/") { - abs = path5.join(self2.root, f); - } else if (isAbsolute2(f) || f === "") { - abs = f; - } else if (self2.changedCwd) { - abs = path5.resolve(self2.cwd, f); - } else { - abs = path5.resolve(f); - } - if (process.platform === "win32") - abs = abs.replace(/\\/g, "/"); - return abs; - } - function isIgnored(self2, path6) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return item.matcher.match(path6) || !!(item.gmatcher && item.gmatcher.match(path6)); - }); - } - function childrenIgnored(self2, path6) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path6)); - }); - } - } -}); - -// node_modules/rimraf/node_modules/glob/sync.js -var require_sync7 = __commonJS({ - "node_modules/rimraf/node_modules/glob/sync.js"(exports2, module2) { - module2.exports = globSync; - globSync.GlobSync = GlobSync; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var Glob = require_glob().Glob; - var util = require("util"); - var path5 = require("path"); - var assert = require("assert"); - var isAbsolute2 = require_path_is_absolute(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - function globSync(pattern, options) { - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - return new GlobSync(pattern, options).found; - } - function GlobSync(pattern, options) { - if (!pattern) - throw new Error("must provide pattern"); - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options); - setopts(this, pattern, options); - if (this.noprocess) - return this; - var n = this.minimatch.set.length; - this.matches = new Array(n); - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false); - } - this._finish(); - } - GlobSync.prototype._finish = function() { - assert(this instanceof GlobSync); - if (this.realpath) { - var self2 = this; - this.matches.forEach(function(matchset, index) { - var set2 = self2.matches[index] = /* @__PURE__ */ Object.create(null); - for (var p in matchset) { - try { - p = self2._makeAbs(p); - var real = rp.realpathSync(p, self2.realpathCache); - set2[real] = true; - } catch (er) { - if (er.syscall === "stat") - set2[self2._makeAbs(p)] = true; - else - throw er; - } - } - }); - } - common2.finish(this); - }; - GlobSync.prototype._process = function(pattern, index, inGlobStar) { - assert(this instanceof GlobSync); - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute2(prefix) || isAbsolute2(pattern.join("/"))) { - if (!prefix || !isAbsolute2(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return; - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar); - }; - GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path5.join(this.root, e); - } - this._emitMatch(index, e); - } - return; - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) - newPattern = [prefix, e]; - else - newPattern = [e]; - this._process(newPattern.concat(remain), index, inGlobStar); - } - }; - GlobSync.prototype._emitMatch = function(index, e) { - if (isIgnored(this, e)) - return; - var abs = this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) { - e = abs; - } - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - if (this.stat) - this._stat(e); - }; - GlobSync.prototype._readdirInGlobStar = function(abs) { - if (this.follow) - return this._readdir(abs, false); - var entries; - var lstat; - var stat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er.code === "ENOENT") { - return null; - } - } - var isSym = lstat && lstat.isSymbolicLink(); - this.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = "FILE"; - else - entries = this._readdir(abs, false); - return entries; - }; - GlobSync.prototype._readdir = function(abs, inGlobStar) { - var entries; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return null; - if (Array.isArray(c)) - return c; - } - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)); - } catch (er) { - this._readdirError(abs, er); - return null; - } - }; - GlobSync.prototype._readdirEntries = function(abs, entries) { - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return entries; - }; - GlobSync.prototype._readdirError = function(f, er) { - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - throw error2; - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) - throw er; - if (!this.silent) - console.error("glob error", er); - break; - } - }; - GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false); - var len = entries.length; - var isSym = this.symlinks[abs]; - if (isSym && inGlobStar) - return; - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true); - } - }; - GlobSync.prototype._processSimple = function(prefix, index) { - var exists = this._stat(prefix); - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return; - if (prefix && isAbsolute2(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path5.join(this.root, prefix); - } else { - prefix = path5.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - }; - GlobSync.prototype._stat = function(f) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return false; - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return c; - if (needDir && c === "FILE") - return false; - } - var exists; - var stat = this.statCache[abs]; - if (!stat) { - var lstat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return false; - } - } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs); - } catch (er) { - stat = lstat; - } - } else { - stat = lstat; - } - } - this.statCache[abs] = stat; - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return false; - return c; - }; - GlobSync.prototype._mark = function(p) { - return common2.mark(this, p); - }; - GlobSync.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - } -}); - -// node_modules/inflight/inflight.js -var require_inflight = __commonJS({ - "node_modules/inflight/inflight.js"(exports2, module2) { - var wrappy = require_wrappy(); - var reqs = /* @__PURE__ */ Object.create(null); - var once = require_once(); - module2.exports = wrappy(inflight); - function inflight(key, cb) { - if (reqs[key]) { - reqs[key].push(cb); - return null; - } else { - reqs[key] = [cb]; - return makeres(key); - } - } - function makeres(key) { - return once(function RES() { - var cbs = reqs[key]; - var len = cbs.length; - var args = slice(arguments); - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args); - } - } finally { - if (cbs.length > len) { - cbs.splice(0, len); - process.nextTick(function() { - RES.apply(null, args); - }); - } else { - delete reqs[key]; - } - } - }); - } - function slice(args) { - var length = args.length; - var array = []; - for (var i = 0; i < length; i++) array[i] = args[i]; - return array; - } - } -}); - -// node_modules/rimraf/node_modules/glob/glob.js -var require_glob = __commonJS({ - "node_modules/rimraf/node_modules/glob/glob.js"(exports2, module2) { - module2.exports = glob; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var inherits = require_inherits(); - var EE = require("events").EventEmitter; - var path5 = require("path"); - var assert = require("assert"); - var isAbsolute2 = require_path_is_absolute(); - var globSync = require_sync7(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var inflight = require_inflight(); - var util = require("util"); - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - var once = require_once(); - function glob(pattern, options, cb) { - if (typeof options === "function") cb = options, options = {}; - if (!options) options = {}; - if (options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return globSync(pattern, options); - } - return new Glob(pattern, options, cb); - } - glob.sync = globSync; - var GlobSync = glob.GlobSync = globSync.GlobSync; - glob.glob = glob; - function extend3(origin, add) { - if (add === null || typeof add !== "object") { - return origin; - } - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; - } - glob.hasMagic = function(pattern, options_) { - var options = extend3({}, options_); - options.noprocess = true; - var g = new Glob(pattern, options); - var set2 = g.minimatch.set; - if (!pattern) - return false; - if (set2.length > 1) - return true; - for (var j = 0; j < set2[0].length; j++) { - if (typeof set2[0][j] !== "string") - return true; - } - return false; - }; - glob.Glob = Glob; - inherits(Glob, EE); - function Glob(pattern, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - if (options && options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return new GlobSync(pattern, options); - } - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb); - setopts(this, pattern, options); - this._didRealPath = false; - var n = this.minimatch.set.length; - this.matches = new Array(n); - if (typeof cb === "function") { - cb = once(cb); - this.on("error", cb); - this.on("end", function(matches) { - cb(null, matches); - }); - } - var self2 = this; - this._processing = 0; - this._emitQueue = []; - this._processQueue = []; - this.paused = false; - if (this.noprocess) - return this; - if (n === 0) - return done(); - var sync = true; - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false, done); - } - sync = false; - function done() { - --self2._processing; - if (self2._processing <= 0) { - if (sync) { - process.nextTick(function() { - self2._finish(); - }); - } else { - self2._finish(); - } - } - } - } - Glob.prototype._finish = function() { - assert(this instanceof Glob); - if (this.aborted) - return; - if (this.realpath && !this._didRealpath) - return this._realpath(); - common2.finish(this); - this.emit("end", this.found); - }; - Glob.prototype._realpath = function() { - if (this._didRealpath) - return; - this._didRealpath = true; - var n = this.matches.length; - if (n === 0) - return this._finish(); - var self2 = this; - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next); - function next() { - if (--n === 0) - self2._finish(); - } - }; - Glob.prototype._realpathSet = function(index, cb) { - var matchset = this.matches[index]; - if (!matchset) - return cb(); - var found = Object.keys(matchset); - var self2 = this; - var n = found.length; - if (n === 0) - return cb(); - var set2 = this.matches[index] = /* @__PURE__ */ Object.create(null); - found.forEach(function(p, i) { - p = self2._makeAbs(p); - rp.realpath(p, self2.realpathCache, function(er, real) { - if (!er) - set2[real] = true; - else if (er.syscall === "stat") - set2[p] = true; - else - self2.emit("error", er); - if (--n === 0) { - self2.matches[index] = set2; - cb(); - } - }); - }); - }; - Glob.prototype._mark = function(p) { - return common2.mark(this, p); - }; - Glob.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - Glob.prototype.abort = function() { - this.aborted = true; - this.emit("abort"); - }; - Glob.prototype.pause = function() { - if (!this.paused) { - this.paused = true; - this.emit("pause"); - } - }; - Glob.prototype.resume = function() { - if (this.paused) { - this.emit("resume"); - this.paused = false; - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0); - this._emitQueue.length = 0; - for (var i = 0; i < eq.length; i++) { - var e = eq[i]; - this._emitMatch(e[0], e[1]); - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0); - this._processQueue.length = 0; - for (var i = 0; i < pq.length; i++) { - var p = pq[i]; - this._processing--; - this._process(p[0], p[1], p[2], p[3]); - } - } - } - }; - Glob.prototype._process = function(pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === "function"); - if (this.aborted) - return; - this._processing++; - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]); - return; - } - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index, cb); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute2(prefix) || isAbsolute2(pattern.join("/"))) { - if (!prefix || !isAbsolute2(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return cb(); - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); - }; - Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return cb(); - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path5.join(this.root, e); - } - this._emitMatch(index, e); - } - return cb(); - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - this._process([e].concat(remain), index, inGlobStar, cb); - } - cb(); - }; - Glob.prototype._emitMatch = function(index, e) { - if (this.aborted) - return; - if (isIgnored(this, e)) - return; - if (this.paused) { - this._emitQueue.push([index, e]); - return; - } - var abs = isAbsolute2(e) ? e : this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) - e = abs; - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - var st = this.statCache[abs]; - if (st) - this.emit("stat", e, st); - this.emit("match", e); - }; - Glob.prototype._readdirInGlobStar = function(abs, cb) { - if (this.aborted) - return; - if (this.follow) - return this._readdir(abs, false, cb); - var lstatkey = "lstat\0" + abs; - var self2 = this; - var lstatcb = inflight(lstatkey, lstatcb_); - if (lstatcb) - self2.fs.lstat(abs, lstatcb); - function lstatcb_(er, lstat) { - if (er && er.code === "ENOENT") - return cb(); - var isSym = lstat && lstat.isSymbolicLink(); - self2.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) { - self2.cache[abs] = "FILE"; - cb(); - } else - self2._readdir(abs, false, cb); - } - }; - Glob.prototype._readdir = function(abs, inGlobStar, cb) { - if (this.aborted) - return; - cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); - if (!cb) - return; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return cb(); - if (Array.isArray(c)) - return cb(null, c); - } - var self2 = this; - self2.fs.readdir(abs, readdirCb(this, abs, cb)); - }; - function readdirCb(self2, abs, cb) { - return function(er, entries) { - if (er) - self2._readdirError(abs, er, cb); - else - self2._readdirEntries(abs, entries, cb); - }; - } - Glob.prototype._readdirEntries = function(abs, entries, cb) { - if (this.aborted) - return; - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return cb(null, entries); - }; - Glob.prototype._readdirError = function(f, er, cb) { - if (this.aborted) - return; - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - this.emit("error", error2); - this.abort(); - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) { - this.emit("error", er); - this.abort(); - } - if (!this.silent) - console.error("glob error", er); - break; - } - return cb(); - }; - Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false, cb); - var isSym = this.symlinks[abs]; - var len = entries.length; - if (isSym && inGlobStar) - return cb(); - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true, cb); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true, cb); - } - cb(); - }; - Glob.prototype._processSimple = function(prefix, index, cb) { - var self2 = this; - this._stat(prefix, function(er, exists) { - self2._processSimple2(prefix, index, er, exists, cb); - }); - }; - Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return cb(); - if (prefix && isAbsolute2(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path5.join(this.root, prefix); - } else { - prefix = path5.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - cb(); - }; - Glob.prototype._stat = function(f, cb) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return cb(); - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return cb(null, c); - if (needDir && c === "FILE") - return cb(); - } - var exists; - var stat = this.statCache[abs]; - if (stat !== void 0) { - if (stat === false) - return cb(null, stat); - else { - var type2 = stat.isDirectory() ? "DIR" : "FILE"; - if (needDir && type2 === "FILE") - return cb(); - else - return cb(null, type2, stat); - } - } - var self2 = this; - var statcb = inflight("stat\0" + abs, lstatcb_); - if (statcb) - self2.fs.lstat(abs, statcb); - function lstatcb_(er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - return self2.fs.stat(abs, function(er2, stat2) { - if (er2) - self2._stat2(f, abs, null, lstat, cb); - else - self2._stat2(f, abs, er2, stat2, cb); - }); - } else { - self2._stat2(f, abs, er, lstat, cb); - } - } - }; - Glob.prototype._stat2 = function(f, abs, er, stat, cb) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return cb(); - } - var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat; - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) - return cb(null, false, stat); - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return cb(); - return cb(null, c, stat); - }; - } -}); - -// node_modules/rimraf/rimraf.js -var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports2, module2) { - var assert = require("assert"); - var path5 = require("path"); - var fs5 = require("fs"); - var glob = void 0; - try { - glob = require_glob(); - } catch (_err) { - } - var defaultGlobOpts = { - nosort: true, - silent: true - }; - var timeout = 0; - var isWindows = process.platform === "win32"; - var defaults = (options) => { - const methods = [ - "unlink", - "chmod", - "stat", - "lstat", - "rmdir", - "readdir" - ]; - methods.forEach((m) => { - options[m] = options[m] || fs5[m]; - m = m + "Sync"; - options[m] = options[m] || fs5[m]; - }); - options.maxBusyTries = options.maxBusyTries || 3; - options.emfileWait = options.emfileWait || 1e3; - if (options.glob === false) { - options.disableGlob = true; - } - if (options.disableGlob !== true && glob === void 0) { - throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); - } - options.disableGlob = options.disableGlob || false; - options.glob = options.glob || defaultGlobOpts; - }; - var rimraf = (p, options, cb) => { - if (typeof options === "function") { - cb = options; - options = {}; - } - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert.equal(typeof cb, "function", "rimraf: callback function required"); - assert(options, "rimraf: invalid options argument provided"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - defaults(options); - let busyTries = 0; - let errState = null; - let n = 0; - const next = (er) => { - errState = errState || er; - if (--n === 0) - cb(errState); - }; - const afterGlob = (er, results) => { - if (er) - return cb(er); - n = results.length; - if (n === 0) - return cb(); - results.forEach((p2) => { - const CB = (er2) => { - if (er2) { - if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { - busyTries++; - return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); - } - if (er2.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p2, options, CB), timeout++); - } - if (er2.code === "ENOENT") er2 = null; - } - timeout = 0; - next(er2); - }; - rimraf_(p2, options, CB); - }); - }; - if (options.disableGlob || !glob.hasMagic(p)) - return afterGlob(null, [p]); - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]); - glob(p, options.glob, afterGlob); - }); - }; - var rimraf_ = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null); - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb); - if (st && st.isDirectory()) - return rmdir(p, options, er, cb); - options.unlink(p, (er2) => { - if (er2) { - if (er2.code === "ENOENT") - return cb(null); - if (er2.code === "EPERM") - return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); - if (er2.code === "EISDIR") - return rmdir(p, options, er2, cb); - } - return cb(er2); - }); - }); - }; - var fixWinEPERM = (p, options, er, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.chmod(p, 438, (er2) => { - if (er2) - cb(er2.code === "ENOENT" ? null : er); - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er); - else if (stats.isDirectory()) - rmdir(p, options, er, cb); - else - options.unlink(p, cb); - }); - }); - }; - var fixWinEPERMSync = (p, options, er) => { - assert(p); - assert(options); - try { - options.chmodSync(p, 438); - } catch (er2) { - if (er2.code === "ENOENT") - return; - else - throw er; - } - let stats; - try { - stats = options.statSync(p); - } catch (er3) { - if (er3.code === "ENOENT") - return; - else - throw er; - } - if (stats.isDirectory()) - rmdirSync(p, options, er); - else - options.unlinkSync(p); - }; - var rmdir = (p, options, originalEr, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.rmdir(p, (er) => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb); - else if (er && er.code === "ENOTDIR") - cb(originalEr); - else - cb(er); - }); - }; - var rmkids = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.readdir(p, (er, files) => { - if (er) - return cb(er); - let n = files.length; - if (n === 0) - return options.rmdir(p, cb); - let errState; - files.forEach((f) => { - rimraf(path5.join(p, f), options, (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--n === 0) - options.rmdir(p, cb); - }); - }); - }); - }; - var rimrafSync = (p, options) => { - options = options || {}; - defaults(options); - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert(options, "rimraf: missing options"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - let results; - if (options.disableGlob || !glob.hasMagic(p)) { - results = [p]; - } else { - try { - options.lstatSync(p); - results = [p]; - } catch (er) { - results = glob.sync(p, options.glob); - } - } - if (!results.length) - return; - for (let i = 0; i < results.length; i++) { - const p2 = results[i]; - let st; - try { - st = options.lstatSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p2, options, er); - } - try { - if (st && st.isDirectory()) - rmdirSync(p2, options, null); - else - options.unlinkSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); - if (er.code !== "EISDIR") - throw er; - rmdirSync(p2, options, er); - } - } - }; - var rmdirSync = (p, options, originalEr) => { - assert(p); - assert(options); - try { - options.rmdirSync(p); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "ENOTDIR") - throw originalEr; - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options); - } - }; - var rmkidsSync = (p, options) => { - assert(p); - assert(options); - options.readdirSync(p).forEach((f) => rimrafSync(path5.join(p, f), options)); - const retries = isWindows ? 100 : 1; - let i = 0; - do { - let threw = true; - try { - const ret = options.rmdirSync(p, options); - threw = false; - return ret; - } finally { - if (++i < retries && threw) - continue; - } - } while (true); - }; - module2.exports = rimraf; - rimraf.sync = rimrafSync; - } -}); - -// node_modules/del/node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "node_modules/del/node_modules/indent-string/index.js"(exports2, module2) { - "use strict"; - module2.exports = (string, count = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count)); - }; - } -}); - -// node_modules/del/node_modules/clean-stack/index.js -var require_clean_stack = __commonJS({ - "node_modules/del/node_modules/clean-stack/index.js"(exports2, module2) { - "use strict"; - var os2 = require("os"); - var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; - var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; - var homeDir = typeof os2.homedir === "undefined" ? "" : os2.homedir(); - module2.exports = (stack, options) => { - options = Object.assign({ pretty: false }, options); - return stack.replace(/\\/g, "/").split("\n").filter((line) => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - const match = pathMatches[1]; - if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { - return false; - } - return !pathRegex.test(match); - }).filter((line) => line.trim() !== "").map((line) => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); - } - return line; - }).join("\n"); - }; - } -}); - -// node_modules/del/node_modules/aggregate-error/index.js -var require_aggregate_error = __commonJS({ - "node_modules/del/node_modules/aggregate-error/index.js"(exports2, module2) { - "use strict"; - var indentString2 = require_indent_string(); - var cleanStack = require_clean_stack(); - var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - errors = [...errors].map((error2) => { - if (error2 instanceof Error) { - return error2; - } - if (error2 !== null && typeof error2 === "object") { - return Object.assign(new Error(error2.message), error2); - } - return new Error(error2); - }); - let message = errors.map((error2) => { - return typeof error2.stack === "string" ? cleanInternalStack(cleanStack(error2.stack)) : String(error2); - }).join("\n"); - message = "\n" + indentString2(message, 4); - super(message); - this.name = "AggregateError"; - Object.defineProperty(this, "_errors", { value: errors }); - } - *[Symbol.iterator]() { - for (const error2 of this._errors) { - yield error2; - } - } - }; - module2.exports = AggregateError; - } -}); - -// node_modules/del/node_modules/p-map/index.js -var require_p_map = __commonJS({ - "node_modules/del/node_modules/p-map/index.js"(exports2, module2) { - "use strict"; - var AggregateError = require_aggregate_error(); - module2.exports = async (iterable, mapper, { - concurrency = Infinity, - stopOnError = true - } = {}) => { - return new Promise((resolve4, reject) => { - if (typeof mapper !== "function") { - throw new TypeError("Mapper function is required"); - } - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - const next = () => { - if (isRejected) { - return; - } - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - if (nextItem.done) { - isIterableDone = true; - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve4(result); - } - } - return; - } - resolvingCount++; - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error2) { - if (stopOnError) { - isRejected = true; - reject(error2); - } else { - errors.push(error2); - resolvingCount--; - next(); - } - } - })(); - }; - for (let i = 0; i < concurrency; i++) { - next(); - if (isIterableDone) { - break; - } - } - }); - }; - } -}); - -// node_modules/del/index.js -var require_del = __commonJS({ - "node_modules/del/index.js"(exports2, module2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var path5 = require("path"); - var globby = require_globby(); - var isGlob = require_is_glob(); - var slash = require_slash(); - var gracefulFs = require_graceful_fs(); - var isPathCwd = require_is_path_cwd(); - var isPathInside = require_is_path_inside(); - var rimraf = require_rimraf(); - var pMap = require_p_map(); - var rimrafP = promisify2(rimraf); - var rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync - }; - function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); - } - if (!isPathInside(file, cwd)) { - throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); - } - } - function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - patterns = patterns.map((pattern) => { - if (process.platform === "win32" && isGlob(pattern) === false) { - return slash(pattern); - } - return pattern; - }); - return patterns; - } - module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), onProgress = () => { - }, ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); - if (files.length === 0) { - onProgress({ - totalCount: 0, - deletedCount: 0, - percent: 1 - }); - } - let deletedCount = 0; - const mapper = async (file) => { - file = path5.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - deletedCount += 1; - onProgress({ - totalCount: files.length, - deletedCount, - percent: deletedCount / files.length - }); - return file; - }; - const removedFiles = await pMap(files, mapper, options); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); - const removedFiles = files.map((file) => { - file = path5.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - return file; - }); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - } -}); - // node_modules/semver/internal/constants.js -var require_constants9 = __commonJS({ +var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { "use strict"; var SEMVER_SPEC_VERSION = "2.0.0"; @@ -34386,7 +24575,7 @@ var require_re = __commonJS({ MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH - } = require_constants9(); + } = require_constants6(); var debug3 = require_debug(); exports2 = module2.exports = {}; var re = exports2.re = []; @@ -34512,7 +24701,7 @@ var require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports2, module2) { "use strict"; var debug3 = require_debug(); - var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants9(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants6(); var { safeRe: re, t } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); @@ -34769,7 +24958,7 @@ var require_semver = __commonJS({ }); // node_modules/semver/functions/parse.js -var require_parse4 = __commonJS({ +var require_parse2 = __commonJS({ "node_modules/semver/functions/parse.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); @@ -34794,7 +24983,7 @@ var require_parse4 = __commonJS({ var require_valid = __commonJS({ "node_modules/semver/functions/valid.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var valid3 = (version, options) => { const v = parse(version, options); return v ? v.version : null; @@ -34807,7 +24996,7 @@ var require_valid = __commonJS({ var require_clean = __commonJS({ "node_modules/semver/functions/clean.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var clean3 = (version, options) => { const s = parse(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; @@ -34844,7 +25033,7 @@ var require_inc = __commonJS({ var require_diff = __commonJS({ "node_modules/semver/functions/diff.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var diff = (version1, version2) => { const v1 = parse(version1, null, true); const v2 = parse(version2, null, true); @@ -34918,7 +25107,7 @@ var require_patch = __commonJS({ var require_prerelease = __commonJS({ "node_modules/semver/functions/prerelease.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var prerelease = (version, options) => { const parsed = parse(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; @@ -35106,7 +25295,7 @@ var require_coerce = __commonJS({ "node_modules/semver/functions/coerce.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); - var parse = require_parse4(); + var parse = require_parse2(); var { safeRe: re, t } = require_re(); var coerce3 = (version, options) => { if (version instanceof SemVer) { @@ -35342,7 +25531,7 @@ var require_range = __commonJS({ tildeTrimReplace, caretTrimReplace } = require_re(); - var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants9(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants6(); var isNullSet = (c) => c.value === "<0.0.0-0"; var isAny = (c) => c.value === ""; var isSatisfiable = (comparators, options) => { @@ -36154,10 +26343,10 @@ var require_semver2 = __commonJS({ "node_modules/semver/index.js"(exports2, module2) { "use strict"; var internalRe = require_re(); - var constants = require_constants9(); + var constants = require_constants6(); var SemVer = require_semver(); var identifiers = require_identifiers(); - var parse = require_parse4(); + var parse = require_parse2(); var valid3 = require_valid(); var clean3 = require_clean(); var inc = require_inc(); @@ -36287,7 +26476,7 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^6.1.1", + del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -38211,6 +28400,796 @@ var require_internal_pattern_helper = __commonJS({ } }); +// node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str2) { + if (a instanceof RegExp) a = maybeMatch(a, str2); + if (b instanceof RegExp) b = maybeMatch(b, str2); + var r = range(a, b, str2); + return r && { + start: r[0], + end: r[1], + pre: str2.slice(0, r[0]), + body: str2.slice(r[0] + a.length, r[1]), + post: str2.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str2) { + var m = str2.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str2) { + var begs, beg, left, right, result; + var ai = str2.indexOf(a); + var bi = str2.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + begs = []; + left = str2.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str2.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str2.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str2) { + return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + } + function escapeBraces(str2) { + return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str2) { + return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str2) { + if (!str2) + return [""]; + var parts = []; + var m = balanced("{", "}", str2); + if (!m) + return str2.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str2) { + if (!str2) + return []; + if (str2.substr(0, 2) === "{}") { + str2 = "\\{\\}" + str2.substr(2); + } + return expand(escapeBraces(str2), true).map(unescapeBraces); + } + function embrace(str2) { + return "{" + str2 + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte5(i, y) { + return i >= y; + } + function expand(str2, isTop) { + var expansions = []; + var m = balanced("{", "}", str2); + if (!m || /\$$/.test(m.pre)) return [str2]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str2 = m.pre + "{" + m.body + escClose + m.post; + return expand(str2); + } + return [str2]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte5; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path5 = (function() { + try { + return require("path"); + } catch (e) { + } + })() || { + sep: "/" + }; + minimatch.sep = path5.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set2, c) { + set2[c] = true; + return set2; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path5.sep !== "/") { + pattern = pattern.split(path5.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set2 = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug3() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set2); + set2 = this.globParts = set2.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set2); + set2 = set2.map(function(s, si, set3) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set2); + set2 = set2.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set2); + this.set = set2; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set2 = this.set; + if (!set2.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set2.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path5.sep !== "/") { + f = f.split(path5.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set2 = this.set; + this.debug(this.pattern, "set", set2); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set2.length; i++) { + var pattern = set2[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug( + "matchOne", + { "this": this, file, pattern } + ); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) return true; + } + return false; + } + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { @@ -38789,7 +29768,7 @@ var require_internal_globber = __commonJS({ }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ +var require_glob = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -39988,7 +30967,7 @@ var require_semver3 = __commonJS({ }); // node_modules/@actions/cache/lib/internal/constants.js -var require_constants10 = __commonJS({ +var require_constants7 = __commonJS({ "node_modules/@actions/cache/lib/internal/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40101,14 +31080,14 @@ var require_cacheUtils = __commonJS({ exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; var core13 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); - var glob = __importStar4(require_glob2()); + var glob = __importStar4(require_glob()); var io5 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs5 = __importStar4(require("fs")); var path5 = __importStar4(require("path")); var semver8 = __importStar4(require_semver3()); var util = __importStar4(require("util")); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { return __awaiter4(this, void 0, void 0, function* () { @@ -40786,7 +31765,7 @@ var require_object = __commonJS({ }); // node_modules/@azure/core-util/dist/commonjs/error.js -var require_error2 = __commonJS({ +var require_error = __commonJS({ "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40948,7 +31927,7 @@ var require_commonjs2 = __commonJS({ Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { return object_js_1.isObject; } }); - var error_js_1 = require_error2(); + var error_js_1 = require_error(); Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { return error_js_1.isError; } }); @@ -41746,7 +32725,7 @@ var require_userAgentPlatform = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants11 = __commonJS({ +var require_constants8 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -41764,7 +32743,7 @@ var require_userAgent = __commonJS({ exports2.getUserAgentHeaderName = getUserAgentHeaderName; exports2.getUserAgentValue = getUserAgentValue; var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { @@ -42293,7 +33272,7 @@ var require_retryPolicy = __commonJS({ var helpers_js_1 = require_helpers(); var logger_1 = require_dist(); var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); var retryPolicyName = "retryPolicy"; function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { @@ -42390,7 +33369,7 @@ var require_defaultRetryPolicy = __commonJS({ var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.defaultRetryPolicyName = "defaultRetryPolicy"; function defaultRetryPolicy(options = {}) { var _a; @@ -42699,7 +33678,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common4 = __commonJS({ +var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -43033,7 +34012,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common4()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -43321,7 +34300,7 @@ var require_node = __commonJS({ debug3.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common4()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -44392,7 +35371,7 @@ var require_tracingPolicy = __commonJS({ exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); var userAgent_js_1 = require_userAgent(); var log_js_1 = require_log(); var core_util_1 = require_commonjs2(); @@ -44909,7 +35888,7 @@ var require_exponentialRetryPolicy = __commonJS({ exports2.exponentialRetryPolicy = exponentialRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; function exponentialRetryPolicy(options = {}) { var _a; @@ -44931,7 +35910,7 @@ var require_systemErrorRetryPolicy = __commonJS({ exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; function systemErrorRetryPolicy(options = {}) { var _a; @@ -44956,7 +35935,7 @@ var require_throttlingRetryPolicy = __commonJS({ exports2.throttlingRetryPolicy = throttlingRetryPolicy; var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; function throttlingRetryPolicy(options = {}) { var _a; @@ -46708,7 +37687,7 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils9 = __commonJS({ +var require_utils5 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -46783,7 +37762,7 @@ var require_serializer = __commonJS({ var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils9(); + var utils_js_1 = require_utils5(); var SerializerImpl = class { constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; @@ -48261,7 +39240,7 @@ var require_serviceClient = __commonJS({ exports2.ServiceClient = void 0; var core_rest_pipeline_1 = require_commonjs5(); var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils9(); + var utils_js_1 = require_utils5(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); var urlHelpers_js_1 = require_urlHelpers(); @@ -75693,7 +66672,7 @@ var require_requestUtils = __commonJS({ exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; var core13 = __importStar4(require_core()); var http_client_1 = require_lib(); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { return false; @@ -75867,7 +66846,7 @@ var require_downloadUtils = __commonJS({ var stream = __importStar4(require("stream")); var util = __importStar4(require("util")); var utils = __importStar4(require_cacheUtils()); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); var abort_controller_1 = require_dist5(); function pipeResponseToStream(response, output) { @@ -81822,7 +72801,7 @@ var require_tar = __commonJS({ var fs_1 = require("fs"); var path5 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { return __awaiter4(this, void 0, void 0, function* () { @@ -82067,7 +73046,7 @@ var require_cache3 = __commonJS({ var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { @@ -83907,9 +74886,6 @@ function checkDiskSpace(directoryPath, dependencies = { return checkUnix(directoryPath); } -// src/util.ts -var import_del = __toESM(require_del()); - // node_modules/get-folder-size/index.js var import_node_path2 = require("node:path"); async function getFolderSize(itemPath, options) { @@ -88643,52 +79619,6 @@ undici/lib/fetch/body.js: undici/lib/websocket/frame.js: (*! ws. MIT License. Einar Otto Stangvik *) -is-extglob/index.js: - (*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - *) - -is-glob/index.js: - (*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - *) - -is-number/index.js: - (*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - *) - -to-regex-range/index.js: - (*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - *) - -fill-range/index.js: - (*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - *) - -queue-microtask/index.js: - (*! queue-microtask. MIT License. Feross Aboukhadijeh *) - -run-parallel/index.js: - (*! run-parallel. MIT License. Feross Aboukhadijeh *) - js-yaml/dist/js-yaml.mjs: (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) */ diff --git a/lib/start-proxy-action-post.js b/lib/start-proxy-action-post.js index ea13dc356..3355f1274 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -24525,9819 +24525,8 @@ var require_github = __commonJS({ } }); -// node_modules/array-union/index.js -var require_array_union = __commonJS({ - "node_modules/array-union/index.js"(exports2, module2) { - "use strict"; - module2.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; - }; - } -}); - -// node_modules/merge2/index.js -var require_merge2 = __commonJS({ - "node_modules/merge2/index.js"(exports2, module2) { - "use strict"; - var Stream = require("stream"); - var PassThrough = Stream.PassThrough; - var slice = Array.prototype.slice; - module2.exports = merge2; - function merge2() { - const streamsQueue = []; - const args = slice.call(arguments); - let merging = false; - let options = args[args.length - 1]; - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop(); - } else { - options = {}; - } - const doEnd = options.end !== false; - const doPipeError = options.pipeError === true; - if (options.objectMode == null) { - options.objectMode = true; - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024; - } - const mergedStream = PassThrough(options); - function addStream() { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)); - } - mergeStream(); - return this; - } - function mergeStream() { - if (merging) { - return; - } - merging = true; - let streams = streamsQueue.shift(); - if (!streams) { - process.nextTick(endStream); - return; - } - if (!Array.isArray(streams)) { - streams = [streams]; - } - let pipesCount = streams.length + 1; - function next() { - if (--pipesCount > 0) { - return; - } - merging = false; - mergeStream(); - } - function pipe(stream) { - function onend() { - stream.removeListener("merge2UnpipeEnd", onend); - stream.removeListener("end", onend); - if (doPipeError) { - stream.removeListener("error", onerror); - } - next(); - } - function onerror(err) { - mergedStream.emit("error", err); - } - if (stream._readableState.endEmitted) { - return next(); - } - stream.on("merge2UnpipeEnd", onend); - stream.on("end", onend); - if (doPipeError) { - stream.on("error", onerror); - } - stream.pipe(mergedStream, { end: false }); - stream.resume(); - } - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]); - } - next(); - } - function endStream() { - merging = false; - mergedStream.emit("queueDrain"); - if (doEnd) { - mergedStream.end(); - } - } - mergedStream.setMaxListeners(0); - mergedStream.add = addStream; - mergedStream.on("unpipe", function(stream) { - stream.emit("merge2UnpipeEnd"); - }); - if (args.length) { - addStream.apply(null, args); - } - return mergedStream; - } - function pauseStreams(streams, options) { - if (!Array.isArray(streams)) { - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)); - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error("Only readable stream can be merged."); - } - streams.pause(); - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options); - } - } - return streams; - } - } -}); - -// node_modules/fast-glob/out/utils/array.js -var require_array = __commonJS({ - "node_modules/fast-glob/out/utils/array.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.splitWhen = exports2.flatten = void 0; - function flatten(items) { - return items.reduce((collection, item) => [].concat(collection, item), []); - } - exports2.flatten = flatten; - function splitWhen(items, predicate) { - const result = [[]]; - let groupIndex = 0; - for (const item of items) { - if (predicate(item)) { - groupIndex++; - result[groupIndex] = []; - } else { - result[groupIndex].push(item); - } - } - return result; - } - exports2.splitWhen = splitWhen; - } -}); - -// node_modules/fast-glob/out/utils/errno.js -var require_errno = __commonJS({ - "node_modules/fast-glob/out/utils/errno.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEnoentCodeError = void 0; - function isEnoentCodeError(error2) { - return error2.code === "ENOENT"; - } - exports2.isEnoentCodeError = isEnoentCodeError; - } -}); - -// node_modules/fast-glob/out/utils/fs.js -var require_fs = __commonJS({ - "node_modules/fast-glob/out/utils/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports2.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/fast-glob/out/utils/path.js -var require_path = __commonJS({ - "node_modules/fast-glob/out/utils/path.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0; - var os = require("os"); - var path2 = require("path"); - var IS_WINDOWS_PLATFORM = os.platform() === "win32"; - var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; - var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; - var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; - var DOS_DEVICE_PATH_RE = /^\\\\([.?])/; - var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; - function unixify(filepath) { - return filepath.replace(/\\/g, "/"); - } - exports2.unixify = unixify; - function makeAbsolute(cwd, filepath) { - return path2.resolve(cwd, filepath); - } - exports2.makeAbsolute = makeAbsolute; - function removeLeadingDotSegment(entry) { - if (entry.charAt(0) === ".") { - const secondCharactery = entry.charAt(1); - if (secondCharactery === "/" || secondCharactery === "\\") { - return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); - } - } - return entry; - } - exports2.removeLeadingDotSegment = removeLeadingDotSegment; - exports2.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; - function escapeWindowsPath(pattern) { - return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports2.escapeWindowsPath = escapeWindowsPath; - function escapePosixPath(pattern) { - return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports2.escapePosixPath = escapePosixPath; - exports2.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; - function convertWindowsPathToPattern(filepath) { - return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/"); - } - exports2.convertWindowsPathToPattern = convertWindowsPathToPattern; - function convertPosixPathToPattern(filepath) { - return escapePosixPath(filepath); - } - exports2.convertPosixPathToPattern = convertPosixPathToPattern; - } -}); - -// node_modules/is-extglob/index.js -var require_is_extglob = __commonJS({ - "node_modules/is-extglob/index.js"(exports2, module2) { - module2.exports = function isExtglob(str2) { - if (typeof str2 !== "string" || str2 === "") { - return false; - } - var match; - while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str2)) { - if (match[2]) return true; - str2 = str2.slice(match.index + match[0].length); - } - return false; - }; - } -}); - -// node_modules/is-glob/index.js -var require_is_glob = __commonJS({ - "node_modules/is-glob/index.js"(exports2, module2) { - var isExtglob = require_is_extglob(); - var chars = { "{": "}", "(": ")", "[": "]" }; - var strictCheck = function(str2) { - if (str2[0] === "!") { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str2.length) { - if (str2[index] === "*") { - return true; - } - if (str2[index + 1] === "?" && /[\].+)]/.test(str2[index])) { - return true; - } - if (closeSquareIndex !== -1 && str2[index] === "[" && str2[index + 1] !== "]") { - if (closeSquareIndex < index) { - closeSquareIndex = str2.indexOf("]", index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - if (closeCurlyIndex !== -1 && str2[index] === "{" && str2[index + 1] !== "}") { - closeCurlyIndex = str2.indexOf("}", index); - if (closeCurlyIndex > index) { - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - if (closeParenIndex !== -1 && str2[index] === "(" && str2[index + 1] === "?" && /[:!=]/.test(str2[index + 2]) && str2[index + 3] !== ")") { - closeParenIndex = str2.indexOf(")", index); - if (closeParenIndex > index) { - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - if (pipeIndex !== -1 && str2[index] === "(" && str2[index + 1] !== "|") { - if (pipeIndex < index) { - pipeIndex = str2.indexOf("|", index); - } - if (pipeIndex !== -1 && str2[pipeIndex + 1] !== ")") { - closeParenIndex = str2.indexOf(")", pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str2.indexOf("\\", pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - if (str2[index] === "\\") { - var open = str2[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str2.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str2[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - var relaxedCheck = function(str2) { - if (str2[0] === "!") { - return true; - } - var index = 0; - while (index < str2.length) { - if (/[*?{}()[\]]/.test(str2[index])) { - return true; - } - if (str2[index] === "\\") { - var open = str2[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str2.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str2[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - module2.exports = function isGlob(str2, options) { - if (typeof str2 !== "string" || str2 === "") { - return false; - } - if (isExtglob(str2)) { - return true; - } - var check = strictCheck; - if (options && options.strict === false) { - check = relaxedCheck; - } - return check(str2); - }; - } -}); - -// node_modules/glob-parent/index.js -var require_glob_parent = __commonJS({ - "node_modules/glob-parent/index.js"(exports2, module2) { - "use strict"; - var isGlob = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str2, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); - } - if (enclosure.test(str2)) { - str2 += slash; - } - str2 += "a"; - do { - str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); - return str2.replace(escaped, "$1"); - }; - } -}); - -// node_modules/braces/lib/utils.js -var require_utils5 = __commonJS({ - "node_modules/braces/lib/utils.js"(exports2) { - "use strict"; - exports2.isInteger = (num) => { - if (typeof num === "number") { - return Number.isInteger(num); - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isInteger(Number(num)); - } - return false; - }; - exports2.find = (node, type2) => node.nodes.find((node2) => node2.type === type2); - exports2.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports2.isInteger(min) || !exports2.isInteger(max)) return false; - return (Number(max) - Number(min)) / Number(step) >= limit; - }; - exports2.escapeNode = (block, n = 0, type2) => { - const node = block.nodes[n]; - if (!node) return; - if (type2 && node.type === type2 || node.type === "open" || node.type === "close") { - if (node.escaped !== true) { - node.value = "\\" + node.value; - node.escaped = true; - } - } - }; - exports2.encloseBrace = (node) => { - if (node.type !== "brace") return false; - if (node.commas >> 0 + node.ranges >> 0 === 0) { - node.invalid = true; - return true; - } - return false; - }; - exports2.isInvalidBrace = (block) => { - if (block.type !== "brace") return false; - if (block.invalid === true || block.dollar) return true; - if (block.commas >> 0 + block.ranges >> 0 === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; - }; - exports2.isOpenOrClose = (node) => { - if (node.type === "open" || node.type === "close") { - return true; - } - return node.open === true || node.close === true; - }; - exports2.reduce = (nodes) => nodes.reduce((acc, node) => { - if (node.type === "text") acc.push(node.value); - if (node.type === "range") node.type = "text"; - return acc; - }, []); - exports2.flatten = (...args) => { - const result = []; - const flat = (arr) => { - for (let i = 0; i < arr.length; i++) { - const ele = arr[i]; - if (Array.isArray(ele)) { - flat(ele); - continue; - } - if (ele !== void 0) { - result.push(ele); - } - } - return result; - }; - flat(args); - return result; - }; - } -}); - -// node_modules/braces/lib/stringify.js -var require_stringify = __commonJS({ - "node_modules/braces/lib/stringify.js"(exports2, module2) { - "use strict"; - var utils = require_utils5(); - module2.exports = (ast, options = {}) => { - const stringify = (node, parent = {}) => { - const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ""; - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return "\\" + node.value; - } - return node.value; - } - if (node.value) { - return node.value; - } - if (node.nodes) { - for (const child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - return stringify(ast); - }; - } -}); - -// node_modules/is-number/index.js -var require_is_number = __commonJS({ - "node_modules/is-number/index.js"(exports2, module2) { - "use strict"; - module2.exports = function(num) { - if (typeof num === "number") { - return num - num === 0; - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; - }; - } -}); - -// node_modules/to-regex-range/index.js -var require_to_regex_range = __commonJS({ - "node_modules/to-regex-range/index.js"(exports2, module2) { - "use strict"; - var isNumber = require_is_number(); - var toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError("toRegexRange: expected the first argument to be a number"); - } - if (max === void 0 || min === max) { - return String(min); - } - if (isNumber(max) === false) { - throw new TypeError("toRegexRange: expected the second argument to be a number."); - } - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === "boolean") { - opts.relaxZeros = opts.strictZeros === false; - } - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap; - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - let a = Math.min(min, max); - let b = Math.max(min, max); - if (Math.abs(a - b) === 1) { - let result = min + "|" + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && positives.length + negatives.length > 1) { - state.result = `(?:${state.result})`; - } - toRegexRange.cache[cacheKey] = state; - return state.result; - }; - function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, "-", false, options) || []; - let onlyPositive = filterPatterns(pos, neg, "", false, options) || []; - let intersected = filterPatterns(neg, pos, "-?", true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join("|"); - } - function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - let stop = countNines(min, nines); - let stops = /* @__PURE__ */ new Set([max]); - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - stop = countZeros(max + 1, zeros) - 1; - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - stops = [...stops]; - stops.sort(compare); - return stops; - } - function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ""; - let count = 0; - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - if (startDigit === stopDigit) { - pattern += startDigit; - } else if (startDigit !== "0" || stopDigit !== "9") { - pattern += toCharacterClass(startDigit, stopDigit, options); - } else { - count++; - } - } - if (count) { - pattern += options.shorthand === true ? "\\d" : "[0-9]"; - } - return { pattern, count: [count], digits }; - } - function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - for (let i = 0; i < ranges.length; i++) { - let max2 = ranges[i]; - let obj = rangeToPattern(String(start), String(max2), options); - let zeros = ""; - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max2 + 1; - continue; - } - if (tok.isPadded) { - zeros = padZeros(max2, tok, options); - } - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max2 + 1; - prev = obj; - } - return tokens; - } - function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - for (let ele of arr) { - let { string } = ele; - if (!intersection && !contains(comparison, "string", string)) { - result.push(prefix + string); - } - if (intersection && contains(comparison, "string", string)) { - result.push(prefix + string); - } - } - return result; - } - function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; - } - function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; - } - function contains(arr, key, val2) { - return arr.some((ele) => ele[key] === val2); - } - function countNines(min, len) { - return Number(String(min).slice(0, -len) + "9".repeat(len)); - } - function countZeros(integer, zeros) { - return integer - integer % Math.pow(10, zeros); - } - function toQuantifier(digits) { - let [start = 0, stop = ""] = digits; - if (stop || start > 1) { - return `{${start + (stop ? "," + stop : "")}}`; - } - return ""; - } - function toCharacterClass(a, b, options) { - return `[${a}${b - a === 1 ? "" : "-"}${b}]`; - } - function hasPadding(str2) { - return /^-?(0+)\d/.test(str2); - } - function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - switch (diff) { - case 0: - return ""; - case 1: - return relax ? "0?" : "0"; - case 2: - return relax ? "0{0,2}" : "00"; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } - } - toRegexRange.cache = {}; - toRegexRange.clearCache = () => toRegexRange.cache = {}; - module2.exports = toRegexRange; - } -}); - -// node_modules/fill-range/index.js -var require_fill_range = __commonJS({ - "node_modules/fill-range/index.js"(exports2, module2) { - "use strict"; - var util = require("util"); - var toRegexRange = require_to_regex_range(); - var isObject2 = (val2) => val2 !== null && typeof val2 === "object" && !Array.isArray(val2); - var transform = (toNumber) => { - return (value) => toNumber === true ? Number(value) : String(value); - }; - var isValidValue = (value) => { - return typeof value === "number" || typeof value === "string" && value !== ""; - }; - var isNumber = (num) => Number.isInteger(+num); - var zeros = (input) => { - let value = `${input}`; - let index = -1; - if (value[0] === "-") value = value.slice(1); - if (value === "0") return false; - while (value[++index] === "0") ; - return index > 0; - }; - var stringify = (start, end, options) => { - if (typeof start === "string" || typeof end === "string") { - return true; - } - return options.stringify === true; - }; - var pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === "-" ? "-" : ""; - if (dash) input = input.slice(1); - input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); - } - if (toNumber === false) { - return String(input); - } - return input; - }; - var toMaxLen = (input, maxLength) => { - let negative = input[0] === "-" ? "-" : ""; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = "0" + input; - return negative ? "-" + input : input; - }; - var toSequence = (parts, options, maxLen) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - let prefix = options.capture ? "" : "?:"; - let positives = ""; - let negatives = ""; - let result; - if (parts.positives.length) { - positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|"); - } - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`; - } - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - if (options.wrap) { - return `(${prefix}${result})`; - } - return result; - }; - var toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - let start = String.fromCharCode(a); - if (a === b) return start; - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; - }; - var toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? "" : "?:"; - return wrap ? `(${prefix}${start.join("|")})` : start.join("|"); - } - return toRegexRange(start, end, options); - }; - var rangeError = (...args) => { - return new RangeError("Invalid range arguments: " + util.inspect(...args)); - }; - var invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - }; - var invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; - }; - var fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - if (a === 0) a = 0; - if (b === 0) b = 0; - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - let parts = { negatives: [], positives: [] }; - let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: false, ...options }); - } - return range; - }; - var fillLetters = (start, end, step = 1, options = {}) => { - if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) { - return invalidRange(start, end, options); - } - let format = options.transform || ((val2) => String.fromCharCode(val2)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - return range; - }; - var fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - if (typeof step === "function") { - return fill(start, end, 1, { transform: step }); - } - if (isObject2(step)) { - return fill(start, end, 0, step); - } - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - if (!isNumber(step)) { - if (step != null && !isObject2(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); - }; - module2.exports = fill; - } -}); - -// node_modules/braces/lib/compile.js -var require_compile = __commonJS({ - "node_modules/braces/lib/compile.js"(exports2, module2) { - "use strict"; - var fill = require_fill_range(); - var utils = require_utils5(); - var compile = (ast, options = {}) => { - const walk = (node, parent = {}) => { - const invalidBlock = utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - const invalid = invalidBlock === true || invalidNode === true; - const prefix = options.escapeInvalid === true ? "\\" : ""; - let output = ""; - if (node.isOpen === true) { - return prefix + node.value; - } - if (node.isClose === true) { - console.log("node.isClose", prefix, node.value); - return prefix + node.value; - } - if (node.type === "open") { - return invalid ? prefix + node.value : "("; - } - if (node.type === "close") { - return invalid ? prefix + node.value : ")"; - } - if (node.type === "comma") { - return node.prev.type === "comma" ? "" : invalid ? node.value : "|"; - } - if (node.value) { - return node.value; - } - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - if (node.nodes) { - for (const child of node.nodes) { - output += walk(child, node); - } - } - return output; - }; - return walk(ast); - }; - module2.exports = compile; - } -}); - -// node_modules/braces/lib/expand.js -var require_expand = __commonJS({ - "node_modules/braces/lib/expand.js"(exports2, module2) { - "use strict"; - var fill = require_fill_range(); - var stringify = require_stringify(); - var utils = require_utils5(); - var append = (queue = "", stash = "", enclose = false) => { - const result = []; - queue = [].concat(queue); - stash = [].concat(stash); - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash; - } - for (const item of queue) { - if (Array.isArray(item)) { - for (const value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === "string") ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); - } - } - } - return utils.flatten(result); - }; - var expand = (ast, options = {}) => { - const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit; - const walk = (node, parent = {}) => { - node.queue = []; - let p = parent; - let q = parent.queue; - while (p.type !== "brace" && p.type !== "root" && p.parent) { - p = p.parent; - q = p.queue; - } - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ["{}"])); - return; - } - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); - } - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - const enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - while (block.type !== "brace" && block.type !== "root" && block.parent) { - block = block.parent; - queue = block.queue; - } - for (let i = 0; i < node.nodes.length; i++) { - const child = node.nodes[i]; - if (child.type === "comma" && node.type === "brace") { - if (i === 1) queue.push(""); - queue.push(""); - continue; - } - if (child.type === "close") { - q.push(append(q.pop(), queue, enclose)); - continue; - } - if (child.value && child.type !== "open") { - queue.push(append(queue.pop(), child.value)); - continue; - } - if (child.nodes) { - walk(child, node); - } - } - return queue; - }; - return utils.flatten(walk(ast)); - }; - module2.exports = expand; - } -}); - -// node_modules/braces/lib/constants.js -var require_constants6 = __commonJS({ - "node_modules/braces/lib/constants.js"(exports2, module2) { - "use strict"; - module2.exports = { - MAX_LENGTH: 1e4, - // Digits - CHAR_0: "0", - /* 0 */ - CHAR_9: "9", - /* 9 */ - // Alphabet chars. - CHAR_UPPERCASE_A: "A", - /* A */ - CHAR_LOWERCASE_A: "a", - /* a */ - CHAR_UPPERCASE_Z: "Z", - /* Z */ - CHAR_LOWERCASE_Z: "z", - /* z */ - CHAR_LEFT_PARENTHESES: "(", - /* ( */ - CHAR_RIGHT_PARENTHESES: ")", - /* ) */ - CHAR_ASTERISK: "*", - /* * */ - // Non-alphabetic chars. - CHAR_AMPERSAND: "&", - /* & */ - CHAR_AT: "@", - /* @ */ - CHAR_BACKSLASH: "\\", - /* \ */ - CHAR_BACKTICK: "`", - /* ` */ - CHAR_CARRIAGE_RETURN: "\r", - /* \r */ - CHAR_CIRCUMFLEX_ACCENT: "^", - /* ^ */ - CHAR_COLON: ":", - /* : */ - CHAR_COMMA: ",", - /* , */ - CHAR_DOLLAR: "$", - /* . */ - CHAR_DOT: ".", - /* . */ - CHAR_DOUBLE_QUOTE: '"', - /* " */ - CHAR_EQUAL: "=", - /* = */ - CHAR_EXCLAMATION_MARK: "!", - /* ! */ - CHAR_FORM_FEED: "\f", - /* \f */ - CHAR_FORWARD_SLASH: "/", - /* / */ - CHAR_HASH: "#", - /* # */ - CHAR_HYPHEN_MINUS: "-", - /* - */ - CHAR_LEFT_ANGLE_BRACKET: "<", - /* < */ - CHAR_LEFT_CURLY_BRACE: "{", - /* { */ - CHAR_LEFT_SQUARE_BRACKET: "[", - /* [ */ - CHAR_LINE_FEED: "\n", - /* \n */ - CHAR_NO_BREAK_SPACE: "\xA0", - /* \u00A0 */ - CHAR_PERCENT: "%", - /* % */ - CHAR_PLUS: "+", - /* + */ - CHAR_QUESTION_MARK: "?", - /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: ">", - /* > */ - CHAR_RIGHT_CURLY_BRACE: "}", - /* } */ - CHAR_RIGHT_SQUARE_BRACKET: "]", - /* ] */ - CHAR_SEMICOLON: ";", - /* ; */ - CHAR_SINGLE_QUOTE: "'", - /* ' */ - CHAR_SPACE: " ", - /* */ - CHAR_TAB: " ", - /* \t */ - CHAR_UNDERSCORE: "_", - /* _ */ - CHAR_VERTICAL_LINE: "|", - /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF" - /* \uFEFF */ - }; - } -}); - -// node_modules/braces/lib/parse.js -var require_parse2 = __commonJS({ - "node_modules/braces/lib/parse.js"(exports2, module2) { - "use strict"; - var stringify = require_stringify(); - var { - MAX_LENGTH, - CHAR_BACKSLASH, - /* \ */ - CHAR_BACKTICK, - /* ` */ - CHAR_COMMA: CHAR_COMMA2, - /* , */ - CHAR_DOT, - /* . */ - CHAR_LEFT_PARENTHESES, - /* ( */ - CHAR_RIGHT_PARENTHESES, - /* ) */ - CHAR_LEFT_CURLY_BRACE, - /* { */ - CHAR_RIGHT_CURLY_BRACE, - /* } */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, - /* [ */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2, - /* ] */ - CHAR_DOUBLE_QUOTE: CHAR_DOUBLE_QUOTE2, - /* " */ - CHAR_SINGLE_QUOTE: CHAR_SINGLE_QUOTE2, - /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE - } = require_constants6(); - var parse = (input, options = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - const opts = options || {}; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - const ast = { type: "root", input, nodes: [] }; - const stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - const length = input.length; - let index = 0; - let depth = 0; - let value; - const advance = () => input[index++]; - const push = (node) => { - if (node.type === "text" && prev.type === "dot") { - prev.type = "text"; - } - if (prev && prev.type === "text" && node.type === "text") { - prev.value += node.value; - return; - } - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - push({ type: "bos" }); - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - if (value === CHAR_BACKSLASH) { - push({ type: "text", value: (options.keepEscaping ? value : "") + advance() }); - continue; - } - if (value === CHAR_RIGHT_SQUARE_BRACKET2) { - push({ type: "text", value: "\\" + value }); - continue; - } - if (value === CHAR_LEFT_SQUARE_BRACKET2) { - brackets++; - let next; - while (index < length && (next = advance())) { - value += next; - if (next === CHAR_LEFT_SQUARE_BRACKET2) { - brackets++; - continue; - } - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { - brackets--; - if (brackets === 0) { - break; - } - } - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: "paren", nodes: [] }); - stack.push(block); - push({ type: "text", value }); - continue; - } - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== "paren") { - push({ type: "text", value }); - continue; - } - block = stack.pop(); - push({ type: "text", value }); - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_DOUBLE_QUOTE2 || value === CHAR_SINGLE_QUOTE2 || value === CHAR_BACKTICK) { - const open = value; - let next; - if (options.keepQuotes !== true) { - value = ""; - } - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - value += next; - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true; - const brace = { - type: "brace", - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - block = push(brace); - stack.push(block); - push({ type: "open", value }); - continue; - } - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== "brace") { - push({ type: "text", value }); - continue; - } - const type2 = "close"; - block = stack.pop(); - block.close = true; - push({ type: type2, value }); - depth--; - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_COMMA2 && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - const open = block.nodes.shift(); - block.nodes = [open, { type: "text", value: stringify(block) }]; - } - push({ type: "comma", value }); - block.commas++; - continue; - } - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - const siblings = block.nodes; - if (depth === 0 || siblings.length === 0) { - push({ type: "text", value }); - continue; - } - if (prev.type === "dot") { - block.range = []; - prev.value += value; - prev.type = "range"; - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = "text"; - continue; - } - block.ranges++; - block.args = []; - continue; - } - if (prev.type === "range") { - siblings.pop(); - const before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - push({ type: "dot", value }); - continue; - } - push({ type: "text", value }); - } - do { - block = stack.pop(); - if (block.type !== "root") { - block.nodes.forEach((node) => { - if (!node.nodes) { - if (node.type === "open") node.isOpen = true; - if (node.type === "close") node.isClose = true; - if (!node.nodes) node.type = "text"; - node.invalid = true; - } - }); - const parent = stack[stack.length - 1]; - const index2 = parent.nodes.indexOf(block); - parent.nodes.splice(index2, 1, ...block.nodes); - } - } while (stack.length > 0); - push({ type: "eos" }); - return ast; - }; - module2.exports = parse; - } -}); - -// node_modules/braces/index.js -var require_braces = __commonJS({ - "node_modules/braces/index.js"(exports2, module2) { - "use strict"; - var stringify = require_stringify(); - var compile = require_compile(); - var expand = require_expand(); - var parse = require_parse2(); - var braces = (input, options = {}) => { - let output = []; - if (Array.isArray(input)) { - for (const pattern of input) { - const result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; - }; - braces.parse = (input, options = {}) => parse(input, options); - braces.stringify = (input, options = {}) => { - if (typeof input === "string") { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); - }; - braces.compile = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - return compile(input, options); - }; - braces.expand = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - let result = expand(input, options); - if (options.noempty === true) { - result = result.filter(Boolean); - } - if (options.nodupes === true) { - result = [...new Set(result)]; - } - return result; - }; - braces.create = (input, options = {}) => { - if (input === "" || input.length < 3) { - return [input]; - } - return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); - }; - module2.exports = braces; - } -}); - -// node_modules/picomatch/lib/constants.js -var require_constants7 = __commonJS({ - "node_modules/picomatch/lib/constants.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - var WIN_SLASH = "\\\\/"; - var WIN_NO_SLASH = `[^${WIN_SLASH}]`; - var DOT_LITERAL = "\\."; - var PLUS_LITERAL = "\\+"; - var QMARK_LITERAL = "\\?"; - var SLASH_LITERAL = "\\/"; - var ONE_CHAR = "(?=.)"; - var QMARK = "[^/]"; - var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; - var START_ANCHOR = `(?:^|${SLASH_LITERAL})`; - var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; - var NO_DOT = `(?!${DOT_LITERAL})`; - var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; - var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; - var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; - var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; - var STAR = `${QMARK}*?`; - var POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR - }; - var WINDOWS_CHARS = { - ...POSIX_CHARS, - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` - }; - var POSIX_REGEX_SOURCE = { - alnum: "a-zA-Z0-9", - alpha: "a-zA-Z", - ascii: "\\x00-\\x7F", - blank: " \\t", - cntrl: "\\x00-\\x1F\\x7F", - digit: "0-9", - graph: "\\x21-\\x7E", - lower: "a-z", - print: "\\x20-\\x7E ", - punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", - space: " \\t\\r\\n\\v\\f", - upper: "A-Z", - word: "A-Za-z0-9_", - xdigit: "A-Fa-f0-9" - }; - module2.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - "***": "*", - "**/**": "**", - "**/**/**": "**" - }, - // Digits - CHAR_0: 48, - /* 0 */ - CHAR_9: 57, - /* 9 */ - // Alphabet chars. - CHAR_UPPERCASE_A: 65, - /* A */ - CHAR_LOWERCASE_A: 97, - /* a */ - CHAR_UPPERCASE_Z: 90, - /* Z */ - CHAR_LOWERCASE_Z: 122, - /* z */ - CHAR_LEFT_PARENTHESES: 40, - /* ( */ - CHAR_RIGHT_PARENTHESES: 41, - /* ) */ - CHAR_ASTERISK: 42, - /* * */ - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, - /* & */ - CHAR_AT: 64, - /* @ */ - CHAR_BACKWARD_SLASH: 92, - /* \ */ - CHAR_CARRIAGE_RETURN: 13, - /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, - /* ^ */ - CHAR_COLON: 58, - /* : */ - CHAR_COMMA: 44, - /* , */ - CHAR_DOT: 46, - /* . */ - CHAR_DOUBLE_QUOTE: 34, - /* " */ - CHAR_EQUAL: 61, - /* = */ - CHAR_EXCLAMATION_MARK: 33, - /* ! */ - CHAR_FORM_FEED: 12, - /* \f */ - CHAR_FORWARD_SLASH: 47, - /* / */ - CHAR_GRAVE_ACCENT: 96, - /* ` */ - CHAR_HASH: 35, - /* # */ - CHAR_HYPHEN_MINUS: 45, - /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, - /* < */ - CHAR_LEFT_CURLY_BRACE: 123, - /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, - /* [ */ - CHAR_LINE_FEED: 10, - /* \n */ - CHAR_NO_BREAK_SPACE: 160, - /* \u00A0 */ - CHAR_PERCENT: 37, - /* % */ - CHAR_PLUS: 43, - /* + */ - CHAR_QUESTION_MARK: 63, - /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, - /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, - /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, - /* ] */ - CHAR_SEMICOLON: 59, - /* ; */ - CHAR_SINGLE_QUOTE: 39, - /* ' */ - CHAR_SPACE: 32, - /* */ - CHAR_TAB: 9, - /* \t */ - CHAR_UNDERSCORE: 95, - /* _ */ - CHAR_VERTICAL_LINE: 124, - /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, - /* \uFEFF */ - SEP: path2.sep, - /** - * Create EXTGLOB_CHARS - */ - extglobChars(chars) { - return { - "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` }, - "?": { type: "qmark", open: "(?:", close: ")?" }, - "+": { type: "plus", open: "(?:", close: ")+" }, - "*": { type: "star", open: "(?:", close: ")*" }, - "@": { type: "at", open: "(?:", close: ")" } - }; - }, - /** - * Create GLOB_CHARS - */ - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } - }; - } -}); - -// node_modules/picomatch/lib/utils.js -var require_utils6 = __commonJS({ - "node_modules/picomatch/lib/utils.js"(exports2) { - "use strict"; - var path2 = require("path"); - var win32 = process.platform === "win32"; - var { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL - } = require_constants7(); - exports2.isObject = (val2) => val2 !== null && typeof val2 === "object" && !Array.isArray(val2); - exports2.hasRegexChars = (str2) => REGEX_SPECIAL_CHARS.test(str2); - exports2.isRegexChar = (str2) => str2.length === 1 && exports2.hasRegexChars(str2); - exports2.escapeRegex = (str2) => str2.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); - exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/"); - exports2.removeBackslashes = (str2) => { - return str2.replace(REGEX_REMOVE_BACKSLASH, (match) => { - return match === "\\" ? "" : match; - }); - }; - exports2.supportsLookbehinds = () => { - const segs = process.version.slice(1).split(".").map(Number); - if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) { - return true; - } - return false; - }; - exports2.isWindows = (options) => { - if (options && typeof options.windows === "boolean") { - return options.windows; - } - return win32 === true || path2.sep === "\\"; - }; - exports2.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === "\\") return exports2.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; - }; - exports2.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith("./")) { - output = output.slice(2); - state.prefix = "./"; - } - return output; - }; - exports2.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? "" : "^"; - const append = options.contains ? "" : "$"; - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; - }; - } -}); - -// node_modules/picomatch/lib/scan.js -var require_scan = __commonJS({ - "node_modules/picomatch/lib/scan.js"(exports2, module2) { - "use strict"; - var utils = require_utils6(); - var { - CHAR_ASTERISK: CHAR_ASTERISK2, - /* * */ - CHAR_AT, - /* @ */ - CHAR_BACKWARD_SLASH, - /* \ */ - CHAR_COMMA: CHAR_COMMA2, - /* , */ - CHAR_DOT, - /* . */ - CHAR_EXCLAMATION_MARK, - /* ! */ - CHAR_FORWARD_SLASH, - /* / */ - CHAR_LEFT_CURLY_BRACE, - /* { */ - CHAR_LEFT_PARENTHESES, - /* ( */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, - /* [ */ - CHAR_PLUS, - /* + */ - CHAR_QUESTION_MARK, - /* ? */ - CHAR_RIGHT_CURLY_BRACE, - /* } */ - CHAR_RIGHT_PARENTHESES, - /* ) */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2 - /* ] */ - } = require_constants7(); - var isPathSeparator = (code) => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; - }; - var depth = (token) => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } - }; - var scan = (input, options) => { - const opts = options || {}; - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - let str2 = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: "", depth: 0, isGlob: false }; - const eos = () => index >= length; - const peek = () => str2.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str2.charCodeAt(++index); - }; - while (index < length) { - code = advance(); - let next; - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA2) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: "", depth: 0, isGlob: false }; - if (finished === true) continue; - if (prev === CHAR_DOT && index === start + 1) { - start += 2; - continue; - } - lastIndex = index + 1; - continue; - } - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_LEFT_SQUARE_BRACKET2) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - if (isGlob === true) { - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - let base = str2; - let prefix = ""; - let glob2 = ""; - if (start > 0) { - prefix = str2.slice(0, start); - str2 = str2.slice(start); - lastIndex -= start; - } - if (base && isGlob === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob2 = str2.slice(lastIndex); - } else if (isGlob === true) { - base = ""; - glob2 = str2; - } else { - base = str2; - } - if (base && base !== "" && base !== "/" && base !== str2) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - if (opts.unescape === true) { - if (glob2) glob2 = utils.removeBackslashes(glob2); - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - const state = { - prefix, - input, - start, - base, - glob: glob2, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== "") { - parts.push(value); - } - prevIndex = i; - } - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - state.slashes = slashes; - state.parts = parts; - } - return state; - }; - module2.exports = scan; - } -}); - -// node_modules/picomatch/lib/parse.js -var require_parse3 = __commonJS({ - "node_modules/picomatch/lib/parse.js"(exports2, module2) { - "use strict"; - var constants = require_constants7(); - var utils = require_utils6(); - var { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS - } = constants; - var expandRange = (args, options) => { - if (typeof options.expandRange === "function") { - return options.expandRange(...args, options); - } - args.sort(); - const value = `[${args.join("-")}]`; - try { - new RegExp(value); - } catch (ex) { - return args.map((v) => utils.escapeRegex(v)).join(".."); - } - return value; - }; - var syntaxError = (type2, char) => { - return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; - }; - var parse = (input, options) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - input = REPLACEMENTS[input] || input; - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - const bos = { type: "bos", value: "", output: opts.prepend || "" }; - const tokens = [bos]; - const capture = opts.capture ? "" : "?:"; - const win32 = utils.isWindows(options); - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - const globstar = (opts2) => { - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const nodot = opts.dot ? "" : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - if (opts.capture) { - star = `(${star})`; - } - if (typeof opts.noext === "boolean") { - opts.noextglob = opts.noext; - } - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: "", - output: "", - prefix: "", - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - input = utils.removePrefix(input, state); - len = input.length; - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ""; - const remaining = () => input.slice(state.index + 1); - const consume = (value2 = "", num = 0) => { - state.consumed += value2; - state.index += num; - }; - const append = (token) => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - const negate = () => { - let count = 1; - while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { - advance(); - state.start++; - count++; - } - if (count % 2 === 0) { - return false; - } - state.negated = true; - state.start++; - return true; - }; - const increment = (type2) => { - state[type2]++; - stack.push(type2); - }; - const decrement = (type2) => { - state[type2]--; - stack.pop(); - }; - const push = (tok) => { - if (prev.type === "globstar") { - const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); - const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); - if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = "star"; - prev.value = "*"; - prev.output = star; - state.output += prev.output; - } - } - if (extglobs.length && tok.type !== "paren") { - extglobs[extglobs.length - 1].inner += tok.value; - } - if (tok.value || tok.output) append(tok); - if (prev && prev.type === "text" && tok.type === "text") { - prev.value += tok.value; - prev.output = (prev.output || "") + tok.value; - return; - } - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - const extglobOpen = (type2, value2) => { - const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? "(" : "") + token.open; - increment("parens"); - push({ type: type2, value: value2, output: state.output ? "" : ONE_CHAR }); - push({ type: "paren", extglob: true, value: advance(), output }); - extglobs.push(token); - }; - const extglobClose = (token) => { - let output = token.close + (opts.capture ? ")" : ""); - let rest; - if (token.type === "negate") { - let extglobStar = star; - if (token.inner && token.inner.length > 1 && token.inner.includes("/")) { - extglobStar = globstar(opts); - } - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - const expression = parse(rest, { ...options, fastpaths: false }).output; - output = token.close = `)${expression})${extglobStar})`; - } - if (token.prev.type === "bos") { - state.negatedExtglob = true; - } - } - push({ type: "paren", extglob: true, value, output }); - decrement("parens"); - }; - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === "\\") { - backslashes = true; - return m; - } - if (first === "?") { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ""); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); - } - return QMARK.repeat(chars.length); - } - if (first === ".") { - return DOT_LITERAL.repeat(chars.length); - } - if (first === "*") { - if (esc) { - return esc + first + (rest ? star : ""); - } - return star; - } - return esc ? m : `\\${m}`; - }); - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ""); - } else { - output = output.replace(/\\+/g, (m) => { - return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; - }); - } - } - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - state.output = utils.wrapOutput(output, state, options); - return state; - } - while (!eos()) { - value = advance(); - if (value === "\0") { - continue; - } - if (value === "\\") { - const next = peek(); - if (next === "/" && opts.bash !== true) { - continue; - } - if (next === "." || next === ";") { - continue; - } - if (!next) { - value += "\\"; - push({ type: "text", value }); - continue; - } - const match = /^\\+/.exec(remaining()); - let slashes = 0; - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += "\\"; - } - } - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - if (state.brackets === 0) { - push({ type: "text", value }); - continue; - } - } - if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { - if (opts.posix !== false && value === ":") { - const inner = prev.value.slice(1); - if (inner.includes("[")) { - prev.posix = true; - if (inner.includes(":")) { - const idx = prev.value.lastIndexOf("["); - const pre = prev.value.slice(0, idx); - const rest2 = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest2]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") { - value = `\\${value}`; - } - if (value === "]" && (prev.value === "[" || prev.value === "[^")) { - value = `\\${value}`; - } - if (opts.posix === true && value === "!" && prev.value === "[") { - value = "^"; - } - prev.value += value; - append({ value }); - continue; - } - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: "text", value }); - } - continue; - } - if (value === "(") { - increment("parens"); - push({ type: "paren", value }); - continue; - } - if (value === ")") { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "(")); - } - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - push({ type: "paren", value, output: state.parens ? ")" : "\\)" }); - decrement("parens"); - continue; - } - if (value === "[") { - if (opts.nobracket === true || !remaining().includes("]")) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("closing", "]")); - } - value = `\\${value}`; - } else { - increment("brackets"); - } - push({ type: "bracket", value }); - continue; - } - if (value === "]") { - if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { - push({ type: "text", value, output: `\\${value}` }); - continue; - } - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "[")); - } - push({ type: "text", value, output: `\\${value}` }); - continue; - } - decrement("brackets"); - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) { - value = `/${value}`; - } - prev.value += value; - append({ value }); - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - if (value === "{" && opts.nobrace !== true) { - increment("braces"); - const open = { - type: "brace", - value, - output: "(", - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - braces.push(open); - push(open); - continue; - } - if (value === "}") { - const brace = braces[braces.length - 1]; - if (opts.nobrace === true || !brace) { - push({ type: "text", value, output: value }); - continue; - } - let output = ")"; - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === "brace") { - break; - } - if (arr[i].type !== "dots") { - range.unshift(arr[i].value); - } - } - output = expandRange(range, opts); - state.backtrack = true; - } - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = "\\{"; - value = output = "\\}"; - state.output = out; - for (const t of toks) { - state.output += t.output || t.value; - } - } - push({ type: "brace", value, output }); - decrement("braces"); - braces.pop(); - continue; - } - if (value === "|") { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: "text", value }); - continue; - } - if (value === ",") { - let output = value; - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === "braces") { - brace.comma = true; - output = "|"; - } - push({ type: "comma", value, output }); - continue; - } - if (value === "/") { - if (prev.type === "dot" && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ""; - state.output = ""; - tokens.pop(); - prev = bos; - continue; - } - push({ type: "slash", value, output: SLASH_LITERAL }); - continue; - } - if (value === ".") { - if (state.braces > 0 && prev.type === "dot") { - if (prev.value === ".") prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = "dots"; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { - push({ type: "text", value, output: DOT_LITERAL }); - continue; - } - push({ type: "dot", value, output: DOT_LITERAL }); - continue; - } - if (value === "?") { - const isGroup = prev && prev.value === "("; - if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("qmark", value); - continue; - } - if (prev && prev.type === "paren") { - const next = peek(); - let output = value; - if (next === "<" && !utils.supportsLookbehinds()) { - throw new Error("Node.js v10 or higher is required for regex lookbehinds"); - } - if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) { - output = `\\${value}`; - } - push({ type: "text", value, output }); - continue; - } - if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { - push({ type: "qmark", value, output: QMARK_NO_DOT }); - continue; - } - push({ type: "qmark", value, output: QMARK }); - continue; - } - if (value === "!") { - if (opts.noextglob !== true && peek() === "(") { - if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { - extglobOpen("negate", value); - continue; - } - } - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - if (value === "+") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("plus", value); - continue; - } - if (prev && prev.value === "(" || opts.regex === false) { - push({ type: "plus", value, output: PLUS_LITERAL }); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { - push({ type: "plus", value }); - continue; - } - push({ type: "plus", value: PLUS_LITERAL }); - continue; - } - if (value === "@") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - push({ type: "at", extglob: true, value, output: "" }); - continue; - } - push({ type: "text", value }); - continue; - } - if (value !== "*") { - if (value === "$" || value === "^") { - value = `\\${value}`; - } - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - push({ type: "text", value }); - continue; - } - if (prev && (prev.type === "globstar" || prev.star === true)) { - prev.type = "star"; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen("star", value); - continue; - } - if (prev.type === "star") { - if (opts.noglobstar === true) { - consume(value); - continue; - } - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === "slash" || prior.type === "bos"; - const afterStar = before && (before.type === "star" || before.type === "globstar"); - if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { - push({ type: "star", value, output: "" }); - continue; - } - const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); - const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); - if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { - push({ type: "star", value, output: "" }); - continue; - } - while (rest.slice(0, 3) === "/**") { - const after = input[state.index + 4]; - if (after && after !== "/") { - break; - } - rest = rest.slice(3); - consume("/**", 3); - } - if (prior.type === "bos" && eos()) { - prev.type = "globstar"; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { - const end = rest[1] !== void 0 ? "|$" : ""; - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - state.output += prior.output + prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - if (prior.type === "bos" && rest[0] === "/") { - prev.type = "globstar"; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - state.output = state.output.slice(0, -prev.output.length); - prev.type = "globstar"; - prev.output = globstar(opts); - prev.value += value; - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - const token = { type: "star", value, output: star }; - if (opts.bash === true) { - token.output = ".*?"; - if (prev.type === "bos" || prev.type === "slash") { - token.output = nodot + token.output; - } - push(token); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { - token.output = value; - push(token); - continue; - } - if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { - if (prev.type === "dot") { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - } else { - state.output += nodot; - prev.output += nodot; - } - if (peek() !== "*") { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - push(token); - } - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]")); - state.output = utils.escapeLast(state.output, "["); - decrement("brackets"); - } - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")")); - state.output = utils.escapeLast(state.output, "("); - decrement("parens"); - } - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}")); - state.output = utils.escapeLast(state.output, "{"); - decrement("braces"); - } - if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) { - push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); - } - if (state.backtrack === true) { - state.output = ""; - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - if (token.suffix) { - state.output += token.suffix; - } - } - } - return state; - }; - parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? "" : "?:"; - const state = { negated: false, prefix: "" }; - let star = opts.bash === true ? ".*?" : STAR; - if (opts.capture) { - star = `(${star})`; - } - const globstar = (opts2) => { - if (opts2.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const create3 = (str2) => { - switch (str2) { - case "*": - return `${nodot}${ONE_CHAR}${star}`; - case ".*": - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*.*": - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*/*": - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - case "**": - return nodot + globstar(opts); - case "**/*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - case "**/*.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "**/.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - default: { - const match = /^(.*?)\.(\w+)$/.exec(str2); - if (!match) return; - const source2 = create3(match[1]); - if (!source2) return; - return source2 + DOT_LITERAL + match[2]; - } - } - }; - const output = utils.removePrefix(input, state); - let source = create3(output); - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - return source; - }; - module2.exports = parse; - } -}); - -// node_modules/picomatch/lib/picomatch.js -var require_picomatch = __commonJS({ - "node_modules/picomatch/lib/picomatch.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - var scan = require_scan(); - var parse = require_parse3(); - var utils = require_utils6(); - var constants = require_constants7(); - var isObject2 = (val2) => val2 && typeof val2 === "object" && !Array.isArray(val2); - var picomatch = (glob2, options, returnState = false) => { - if (Array.isArray(glob2)) { - const fns = glob2.map((input) => picomatch(input, options, returnState)); - const arrayMatcher = (str2) => { - for (const isMatch of fns) { - const state2 = isMatch(str2); - if (state2) return state2; - } - return false; - }; - return arrayMatcher; - } - const isState = isObject2(glob2) && glob2.tokens && glob2.input; - if (glob2 === "" || typeof glob2 !== "string" && !isState) { - throw new TypeError("Expected pattern to be a non-empty string"); - } - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState ? picomatch.compileRe(glob2, options) : picomatch.makeRe(glob2, options, false, true); - const state = regex.state; - delete regex.state; - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob: glob2, posix }); - const result = { glob: glob2, state, regex, posix, input, output, match, isMatch }; - if (typeof opts.onResult === "function") { - opts.onResult(result); - } - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - if (isIgnored(input)) { - if (typeof opts.onIgnore === "function") { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - if (typeof opts.onMatch === "function") { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - if (returnState) { - matcher.state = state; - } - return matcher; - }; - picomatch.test = (input, regex, options, { glob: glob2, posix } = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected input to be a string"); - } - if (input === "") { - return { isMatch: false, output: "" }; - } - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob2; - let output = match && format ? format(input) : input; - if (match === false) { - output = format ? format(input) : input; - match = output === glob2; - } - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - return { isMatch: Boolean(match), match, output }; - }; - picomatch.matchBase = (input, glob2, options, posix = utils.isWindows(options)) => { - const regex = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options); - return regex.test(path2.basename(input)); - }; - picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); - picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); - }; - picomatch.scan = (input, options) => scan(input, options); - picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - const opts = options || {}; - const prepend = opts.contains ? "" : "^"; - const append = opts.contains ? "" : "$"; - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - return regex; - }; - picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== "string") { - throw new TypeError("Expected a non-empty string"); - } - let parsed = { negated: false, fastpaths: true }; - if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) { - parsed.output = parse.fastpaths(input, options); - } - if (!parsed.output) { - parsed = parse(input, options); - } - return picomatch.compileRe(parsed, options, returnOutput, returnState); - }; - picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } - }; - picomatch.constants = constants; - module2.exports = picomatch; - } -}); - -// node_modules/picomatch/index.js -var require_picomatch2 = __commonJS({ - "node_modules/picomatch/index.js"(exports2, module2) { - "use strict"; - module2.exports = require_picomatch(); - } -}); - -// node_modules/micromatch/index.js -var require_micromatch = __commonJS({ - "node_modules/micromatch/index.js"(exports2, module2) { - "use strict"; - var util = require("util"); - var braces = require_braces(); - var picomatch = require_picomatch2(); - var utils = require_utils6(); - var isEmptyString = (v) => v === "" || v === "./"; - var hasBraces = (v) => { - const index = v.indexOf("{"); - return index > -1 && v.indexOf("}", index) > -1; - }; - var micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - let omit = /* @__PURE__ */ new Set(); - let keep = /* @__PURE__ */ new Set(); - let items = /* @__PURE__ */ new Set(); - let negatives = 0; - let onResult = (state) => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) negatives++; - for (let item of list) { - let matched = isMatch(item, true); - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) continue; - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter((item) => !omit.has(item)); - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(", ")}"`); - } - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns; - } - } - return matches; - }; - micromatch.match = micromatch; - micromatch.matcher = (pattern, options) => picomatch(pattern, options); - micromatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); - micromatch.any = micromatch.isMatch; - micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = /* @__PURE__ */ new Set(); - let items = []; - let onResult = (state) => { - if (options.onResult) options.onResult(state); - items.push(state.output); - }; - let matches = new Set(micromatch(list, patterns, { ...options, onResult })); - for (let item of items) { - if (!matches.has(item)) { - result.add(item); - } - } - return [...result]; - }; - micromatch.contains = (str2, pattern, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str2)}"`); - } - if (Array.isArray(pattern)) { - return pattern.some((p) => micromatch.contains(str2, p, options)); - } - if (typeof pattern === "string") { - if (isEmptyString(str2) || isEmptyString(pattern)) { - return false; - } - if (str2.includes(pattern) || str2.startsWith("./") && str2.slice(2).includes(pattern)) { - return true; - } - } - return micromatch.isMatch(str2, pattern, { ...options, contains: true }); - }; - micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError("Expected the first argument to be an object"); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) res[key] = obj[key]; - return res; - }; - micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some((item) => isMatch(item))) { - return true; - } - } - return false; - }; - micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every((item) => isMatch(item))) { - return false; - } - } - return true; - }; - micromatch.all = (str2, patterns, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str2)}"`); - } - return [].concat(patterns).every((p) => picomatch(p, options)(str2)); - }; - micromatch.capture = (glob2, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob2), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - if (match) { - return match.slice(1).map((v) => v === void 0 ? "" : v); - } - }; - micromatch.makeRe = (...args) => picomatch.makeRe(...args); - micromatch.scan = (...args) => picomatch.scan(...args); - micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str2 of braces(String(pattern), options)) { - res.push(picomatch.parse(str2, options)); - } - } - return res; - }; - micromatch.braces = (pattern, options) => { - if (typeof pattern !== "string") throw new TypeError("Expected a string"); - if (options && options.nobrace === true || !hasBraces(pattern)) { - return [pattern]; - } - return braces(pattern, options); - }; - micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== "string") throw new TypeError("Expected a string"); - return micromatch.braces(pattern, { ...options, expand: true }); - }; - micromatch.hasBraces = hasBraces; - module2.exports = micromatch; - } -}); - -// node_modules/fast-glob/out/utils/pattern.js -var require_pattern = __commonJS({ - "node_modules/fast-glob/out/utils/pattern.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; - var path2 = require("path"); - var globParent = require_glob_parent(); - var micromatch = require_micromatch(); - var GLOBSTAR = "**"; - var ESCAPE_SYMBOL = "\\"; - var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; - var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; - var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; - var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; - var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; - var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; - function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); - } - exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern(pattern, options = {}) { - if (pattern === "") { - return false; - } - if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { - return true; - } - if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.braceExpansion !== false && hasBraceExpansion(pattern)) { - return true; - } - return false; - } - exports2.isDynamicPattern = isDynamicPattern; - function hasBraceExpansion(pattern) { - const openingBraceIndex = pattern.indexOf("{"); - if (openingBraceIndex === -1) { - return false; - } - const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1); - if (closingBraceIndex === -1) { - return false; - } - const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); - return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); - } - function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; - } - exports2.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports2.isNegativePattern = isNegativePattern; - function isPositivePattern(pattern) { - return !isNegativePattern(pattern); - } - exports2.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); - } - exports2.getNegativePatterns = getNegativePatterns; - function getPositivePatterns(patterns) { - return patterns.filter(isPositivePattern); - } - exports2.getPositivePatterns = getPositivePatterns; - function getPatternsInsideCurrentDirectory(patterns) { - return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); - } - exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; - function getPatternsOutsideCurrentDirectory(patterns) { - return patterns.filter(isPatternRelatedToParentDirectory); - } - exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; - function isPatternRelatedToParentDirectory(pattern) { - return pattern.startsWith("..") || pattern.startsWith("./.."); - } - exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; - function getBaseDirectory(pattern) { - return globParent(pattern, { flipBackslashes: false }); - } - exports2.getBaseDirectory = getBaseDirectory; - function hasGlobStar(pattern) { - return pattern.includes(GLOBSTAR); - } - exports2.hasGlobStar = hasGlobStar; - function endsWithSlashGlobStar(pattern) { - return pattern.endsWith("/" + GLOBSTAR); - } - exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; - function isAffectDepthOfReadingPattern(pattern) { - const basename = path2.basename(pattern); - return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); - } - exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; - function expandPatternsWithBraceExpansion(patterns) { - return patterns.reduce((collection, pattern) => { - return collection.concat(expandBraceExpansion(pattern)); - }, []); - } - exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; - function expandBraceExpansion(pattern) { - const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true }); - patterns.sort((a, b) => a.length - b.length); - return patterns.filter((pattern2) => pattern2 !== ""); - } - exports2.expandBraceExpansion = expandBraceExpansion; - function getPatternParts(pattern, options) { - let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); - if (parts.length === 0) { - parts = [pattern]; - } - if (parts[0].startsWith("/")) { - parts[0] = parts[0].slice(1); - parts.unshift(""); - } - return parts; - } - exports2.getPatternParts = getPatternParts; - function makeRe(pattern, options) { - return micromatch.makeRe(pattern, options); - } - exports2.makeRe = makeRe; - function convertPatternsToRe(patterns, options) { - return patterns.map((pattern) => makeRe(pattern, options)); - } - exports2.convertPatternsToRe = convertPatternsToRe; - function matchAny(entry, patternsRe) { - return patternsRe.some((patternRe) => patternRe.test(entry)); - } - exports2.matchAny = matchAny; - function removeDuplicateSlashes(pattern) { - return pattern.replace(DOUBLE_SLASH_RE, "/"); - } - exports2.removeDuplicateSlashes = removeDuplicateSlashes; - function partitionAbsoluteAndRelative(patterns) { - const absolute = []; - const relative = []; - for (const pattern of patterns) { - if (isAbsolute2(pattern)) { - absolute.push(pattern); - } else { - relative.push(pattern); - } - } - return [absolute, relative]; - } - exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; - function isAbsolute2(pattern) { - return path2.isAbsolute(pattern); - } - exports2.isAbsolute = isAbsolute2; - } -}); - -// node_modules/fast-glob/out/utils/stream.js -var require_stream = __commonJS({ - "node_modules/fast-glob/out/utils/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.merge = void 0; - var merge2 = require_merge2(); - function merge3(streams) { - const mergedStream = merge2(streams); - streams.forEach((stream) => { - stream.once("error", (error2) => mergedStream.emit("error", error2)); - }); - mergedStream.once("close", () => propagateCloseEventToSources(streams)); - mergedStream.once("end", () => propagateCloseEventToSources(streams)); - return mergedStream; - } - exports2.merge = merge3; - function propagateCloseEventToSources(streams) { - streams.forEach((stream) => stream.emit("close")); - } - } -}); - -// node_modules/fast-glob/out/utils/string.js -var require_string = __commonJS({ - "node_modules/fast-glob/out/utils/string.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEmpty = exports2.isString = void 0; - function isString(input) { - return typeof input === "string"; - } - exports2.isString = isString; - function isEmpty(input) { - return input === ""; - } - exports2.isEmpty = isEmpty; - } -}); - -// node_modules/fast-glob/out/utils/index.js -var require_utils7 = __commonJS({ - "node_modules/fast-glob/out/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0; - var array = require_array(); - exports2.array = array; - var errno = require_errno(); - exports2.errno = errno; - var fs2 = require_fs(); - exports2.fs = fs2; - var path2 = require_path(); - exports2.path = path2; - var pattern = require_pattern(); - exports2.pattern = pattern; - var stream = require_stream(); - exports2.stream = stream; - var string = require_string(); - exports2.string = string; - } -}); - -// node_modules/fast-glob/out/managers/tasks.js -var require_tasks = __commonJS({ - "node_modules/fast-glob/out/managers/tasks.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0; - var utils = require_utils7(); - function generate(input, settings) { - const patterns = processPatterns(input, settings); - const ignore = processPatterns(settings.ignore, settings); - const positivePatterns = getPositivePatterns(patterns); - const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); - const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); - const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); - const staticTasks = convertPatternsToTasks( - staticPatterns, - negativePatterns, - /* dynamic */ - false - ); - const dynamicTasks = convertPatternsToTasks( - dynamicPatterns, - negativePatterns, - /* dynamic */ - true - ); - return staticTasks.concat(dynamicTasks); - } - exports2.generate = generate; - function processPatterns(input, settings) { - let patterns = input; - if (settings.braceExpansion) { - patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); - } - if (settings.baseNameMatch) { - patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`); - } - return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); - } - function convertPatternsToTasks(positive, negative, dynamic) { - const tasks = []; - const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); - const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); - const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); - const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); - tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); - if ("." in insideCurrentDirectoryGroup) { - tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)); - } else { - tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); - } - return tasks; - } - exports2.convertPatternsToTasks = convertPatternsToTasks; - function getPositivePatterns(patterns) { - return utils.pattern.getPositivePatterns(patterns); - } - exports2.getPositivePatterns = getPositivePatterns; - function getNegativePatternsAsPositive(patterns, ignore) { - const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); - const positive = negative.map(utils.pattern.convertToPositivePattern); - return positive; - } - exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive; - function groupPatternsByBaseDirectory(patterns) { - const group = {}; - return patterns.reduce((collection, pattern) => { - const base = utils.pattern.getBaseDirectory(pattern); - if (base in collection) { - collection[base].push(pattern); - } else { - collection[base] = [pattern]; - } - return collection; - }, group); - } - exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; - function convertPatternGroupsToTasks(positive, negative, dynamic) { - return Object.keys(positive).map((base) => { - return convertPatternGroupToTask(base, positive[base], negative, dynamic); - }); - } - exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks; - function convertPatternGroupToTask(base, positive, negative, dynamic) { - return { - dynamic, - positive, - negative, - base, - patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) - }; - } - exports2.convertPatternGroupToTask = convertPatternGroupToTask; - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/async.js -var require_async = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.read = void 0; - function read(path2, settings, callback) { - settings.fs.lstat(path2, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path2, (statError, stat) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - callFailureCallback(callback, statError); - return; - } - callSuccessCallback(callback, lstat); - return; - } - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - callSuccessCallback(callback, stat); - }); - }); - } - exports2.read = read; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/sync.js -var require_sync = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.read = void 0; - function read(path2, settings) { - const lstat = settings.fs.lstatSync(path2); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path2); - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - return stat; - } catch (error2) { - if (!settings.throwErrorOnBrokenSymbolicLink) { - return lstat; - } - throw error2; - } - } - exports2.read = read; - } -}); - -// node_modules/@nodelib/fs.stat/out/adapters/fs.js -var require_fs2 = __commonJS({ - "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs2 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs2.lstat, - stat: fs2.stat, - lstatSync: fs2.lstatSync, - statSync: fs2.statSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports2.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports2.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.stat/out/settings.js -var require_settings = __commonJS({ - "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fs2 = require_fs2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs2.createFileSystemAdapter(this._options.fs); - this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.stat/out/index.js -var require_out = __commonJS({ - "node_modules/@nodelib/fs.stat/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.statSync = exports2.stat = exports2.Settings = void 0; - var async = require_async(); - var sync = require_sync(); - var settings_1 = require_settings(); - exports2.Settings = settings_1.default; - function stat(path2, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path2, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path2, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.stat = stat; - function statSync(path2, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path2, settings); - } - exports2.statSync = statSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/queue-microtask/index.js -var require_queue_microtask = __commonJS({ - "node_modules/queue-microtask/index.js"(exports2, module2) { - var promise; - module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { - throw err; - }, 0)); - } -}); - -// node_modules/run-parallel/index.js -var require_run_parallel = __commonJS({ - "node_modules/run-parallel/index.js"(exports2, module2) { - module2.exports = runParallel; - var queueMicrotask2 = require_queue_microtask(); - function runParallel(tasks, cb) { - let results, pending, keys; - let isSync = true; - if (Array.isArray(tasks)) { - results = []; - pending = tasks.length; - } else { - keys = Object.keys(tasks); - results = {}; - pending = keys.length; - } - function done(err) { - function end() { - if (cb) cb(err, results); - cb = null; - } - if (isSync) queueMicrotask2(end); - else end(); - } - function each(i, err, result) { - results[i] = result; - if (--pending === 0 || err) { - done(err); - } - } - if (!pending) { - done(null); - } else if (keys) { - keys.forEach(function(key) { - tasks[key](function(err, result) { - each(key, err, result); - }); - }); - } else { - tasks.forEach(function(task, i) { - task(function(err, result) { - each(i, err, result); - }); - }); - } - isSync = false; - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/constants.js -var require_constants8 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; - var NODE_PROCESS_VERSION_PARTS = process.versions.node.split("."); - if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) { - throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); - } - var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); - var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); - var SUPPORTED_MAJOR_VERSION = 10; - var SUPPORTED_MINOR_VERSION = 10; - var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; - var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; - exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/fs.js -var require_fs3 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports2.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/index.js -var require_utils8 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fs = void 0; - var fs2 = require_fs3(); - exports2.fs = fs2; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/common.js -var require_common = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.joinPathSegments = void 0; - function joinPathSegments(a, b, separator) { - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports2.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/async.js -var require_async2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; - var fsStat = require_out(); - var rpl = require_run_parallel(); - var constants_1 = require_constants8(); - var utils = require_utils8(); - var common2 = require_common(); - function read(directory, settings, callback) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - readdirWithFileTypes(directory, settings, callback); - return; - } - readdir(directory, settings, callback); - } - exports2.read = read; - function readdirWithFileTypes(directory, settings, callback) { - settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const entries = dirents.map((dirent) => ({ - dirent, - name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - })); - if (!settings.followSymbolicLinks) { - callSuccessCallback(callback, entries); - return; - } - const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); - rpl(tasks, (rplError, rplEntries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, rplEntries); - }); - }); - } - exports2.readdirWithFileTypes = readdirWithFileTypes; - function makeRplTaskEntry(entry, settings) { - return (done) => { - if (!entry.dirent.isSymbolicLink()) { - done(null, entry); - return; - } - settings.fs.stat(entry.path, (statError, stats) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - done(statError); - return; - } - done(null, entry); - return; - } - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - done(null, entry); - }); - }; - } - function readdir(directory, settings, callback) { - settings.fs.readdir(directory, (readdirError, names) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const tasks = names.map((name) => { - const path2 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path2, settings.fsStatSettings, (error2, stats) => { - if (error2 !== null) { - done(error2); - return; - } - const entry = { - name, - path: path2, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - done(null, entry); - }); - }; - }); - rpl(tasks, (rplError, entries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, entries); - }); - }); - } - exports2.readdir = readdir; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/sync.js -var require_sync2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; - var fsStat = require_out(); - var constants_1 = require_constants8(); - var utils = require_utils8(); - var common2 = require_common(); - function read(directory, settings) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings); - } - return readdir(directory, settings); - } - exports2.read = read; - function readdirWithFileTypes(directory, settings) { - const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); - return dirents.map((dirent) => { - const entry = { - dirent, - name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - }; - if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { - try { - const stats = settings.fs.statSync(entry.path); - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - } catch (error2) { - if (settings.throwErrorOnBrokenSymbolicLink) { - throw error2; - } - } - } - return entry; - }); - } - exports2.readdirWithFileTypes = readdirWithFileTypes; - function readdir(directory, settings) { - const names = settings.fs.readdirSync(directory); - return names.map((name) => { - const entryPath = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - const stats = fsStat.statSync(entryPath, settings.fsStatSettings); - const entry = { - name, - path: entryPath, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - return entry; - }); - } - exports2.readdir = readdir; - } -}); - -// node_modules/@nodelib/fs.scandir/out/adapters/fs.js -var require_fs4 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs2 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs2.lstat, - stat: fs2.stat, - lstatSync: fs2.lstatSync, - statSync: fs2.statSync, - readdir: fs2.readdir, - readdirSync: fs2.readdirSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports2.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports2.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.scandir/out/settings.js -var require_settings2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path2 = require("path"); - var fsStat = require_out(); - var fs2 = require_fs4(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs2.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path2.sep); - this.stats = this._getValue(this._options.stats, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - this.fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this.followSymbolicLinks, - fs: this.fs, - throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.scandir/out/index.js -var require_out2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Settings = exports2.scandirSync = exports2.scandir = void 0; - var async = require_async2(); - var sync = require_sync2(); - var settings_1 = require_settings2(); - exports2.Settings = settings_1.default; - function scandir(path2, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path2, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path2, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.scandir = scandir; - function scandirSync(path2, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path2, settings); - } - exports2.scandirSync = scandirSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/reusify/reusify.js -var require_reusify = __commonJS({ - "node_modules/reusify/reusify.js"(exports2, module2) { - "use strict"; - function reusify(Constructor) { - var head = new Constructor(); - var tail = head; - function get() { - var current = head; - if (current.next) { - head = current.next; - } else { - head = new Constructor(); - tail = head; - } - current.next = null; - return current; - } - function release(obj) { - tail.next = obj; - tail = obj; - } - return { - get, - release - }; - } - module2.exports = reusify; - } -}); - -// node_modules/fastq/queue.js -var require_queue = __commonJS({ - "node_modules/fastq/queue.js"(exports2, module2) { - "use strict"; - var reusify = require_reusify(); - function fastqueue(context2, worker, concurrency) { - if (typeof context2 === "function") { - concurrency = worker; - worker = context2; - context2 = null; - } - var cache = reusify(Task); - var queueHead = null; - var queueTail = null; - var _running = 0; - var self2 = { - push, - drain: noop, - saturated: noop, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop, - kill, - killAndDrain - }; - return self2; - function running() { - return _running; - } - function pause() { - self2.paused = true; - } - function length() { - var current = queueHead; - var counter = 0; - while (current) { - current = current.next; - counter++; - } - return counter; - } - function getQueue() { - var current = queueHead; - var tasks = []; - while (current) { - tasks.push(current.value); - current = current.next; - } - return tasks; - } - function resume() { - if (!self2.paused) return; - self2.paused = false; - for (var i = 0; i < self2.concurrency; i++) { - _running++; - release(); - } - } - function idle() { - return _running === 0 && self2.length() === 0; - } - function push(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release; - current.value = value; - current.callback = done || noop; - if (_running === self2.concurrency || self2.paused) { - if (queueTail) { - queueTail.next = current; - queueTail = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context2, current.value, current.worked); - } - } - function unshift(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release; - current.value = value; - current.callback = done || noop; - if (_running === self2.concurrency || self2.paused) { - if (queueHead) { - current.next = queueHead; - queueHead = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context2, current.value, current.worked); - } - } - function release(holder) { - if (holder) { - cache.release(holder); - } - var next = queueHead; - if (next) { - if (!self2.paused) { - if (queueTail === queueHead) { - queueTail = null; - } - queueHead = next.next; - next.next = null; - worker.call(context2, next.value, next.worked); - if (queueTail === null) { - self2.empty(); - } - } else { - _running--; - } - } else if (--_running === 0) { - self2.drain(); - } - } - function kill() { - queueHead = null; - queueTail = null; - self2.drain = noop; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self2.drain(); - self2.drain = noop; - } - } - function noop() { - } - function Task() { - this.value = null; - this.callback = noop; - this.next = null; - this.release = noop; - this.context = null; - var self2 = this; - this.worked = function worked(err, result) { - var callback = self2.callback; - self2.value = null; - self2.callback = noop; - callback.call(self2.context, err, result); - self2.release(self2); - }; - } - module2.exports = fastqueue; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/common.js -var require_common2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0; - function isFatalError(settings, error2) { - if (settings.errorFilter === null) { - return true; - } - return !settings.errorFilter(error2); - } - exports2.isFatalError = isFatalError; - function isAppliedFilter(filter, value) { - return filter === null || filter(value); - } - exports2.isAppliedFilter = isAppliedFilter; - function replacePathSegmentSeparator(filepath, separator) { - return filepath.split(/[/\\]/).join(separator); - } - exports2.replacePathSegmentSeparator = replacePathSegmentSeparator; - function joinPathSegments(a, b, separator) { - if (a === "") { - return b; - } - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports2.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/reader.js -var require_reader = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var common2 = require_common2(); - var Reader = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._root = common2.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); - } - }; - exports2.default = Reader; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/async.js -var require_async3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var events_1 = require("events"); - var fsScandir = require_out2(); - var fastq = require_queue(); - var common2 = require_common2(); - var reader_1 = require_reader(); - var AsyncReader = class extends reader_1.default { - constructor(_root, _settings) { - super(_root, _settings); - this._settings = _settings; - this._scandir = fsScandir.scandir; - this._emitter = new events_1.EventEmitter(); - this._queue = fastq(this._worker.bind(this), this._settings.concurrency); - this._isFatalError = false; - this._isDestroyed = false; - this._queue.drain = () => { - if (!this._isFatalError) { - this._emitter.emit("end"); - } - }; - } - read() { - this._isFatalError = false; - this._isDestroyed = false; - setImmediate(() => { - this._pushToQueue(this._root, this._settings.basePath); - }); - return this._emitter; - } - get isDestroyed() { - return this._isDestroyed; - } - destroy() { - if (this._isDestroyed) { - throw new Error("The reader is already destroyed"); - } - this._isDestroyed = true; - this._queue.killAndDrain(); - } - onEntry(callback) { - this._emitter.on("entry", callback); - } - onError(callback) { - this._emitter.once("error", callback); - } - onEnd(callback) { - this._emitter.once("end", callback); - } - _pushToQueue(directory, base) { - const queueItem = { directory, base }; - this._queue.push(queueItem, (error2) => { - if (error2 !== null) { - this._handleError(error2); - } - }); - } - _worker(item, done) { - this._scandir(item.directory, this._settings.fsScandirSettings, (error2, entries) => { - if (error2 !== null) { - done(error2, void 0); - return; - } - for (const entry of entries) { - this._handleEntry(entry, item.base); - } - done(null, void 0); - }); - } - _handleError(error2) { - if (this._isDestroyed || !common2.isFatalError(this._settings, error2)) { - return; - } - this._isFatalError = true; - this._isDestroyed = true; - this._emitter.emit("error", error2); - } - _handleEntry(entry, base) { - if (this._isDestroyed || this._isFatalError) { - return; - } - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { - this._emitEntry(entry); - } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _emitEntry(entry) { - this._emitter.emit("entry", entry); - } - }; - exports2.default = AsyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/async.js -var require_async4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var async_1 = require_async3(); - var AsyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._storage = []; - } - read(callback) { - this._reader.onError((error2) => { - callFailureCallback(callback, error2); - }); - this._reader.onEntry((entry) => { - this._storage.push(entry); - }); - this._reader.onEnd(() => { - callSuccessCallback(callback, this._storage); - }); - this._reader.read(); - } - }; - exports2.default = AsyncProvider; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, entries) { - callback(null, entries); - } - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/stream.js -var require_stream2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var async_1 = require_async3(); - var StreamProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._stream = new stream_1.Readable({ - objectMode: true, - read: () => { - }, - destroy: () => { - if (!this._reader.isDestroyed) { - this._reader.destroy(); - } - } - }); - } - read() { - this._reader.onError((error2) => { - this._stream.emit("error", error2); - }); - this._reader.onEntry((entry) => { - this._stream.push(entry); - }); - this._reader.onEnd(() => { - this._stream.push(null); - }); - this._reader.read(); - return this._stream; - } - }; - exports2.default = StreamProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/sync.js -var require_sync3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsScandir = require_out2(); - var common2 = require_common2(); - var reader_1 = require_reader(); - var SyncReader = class extends reader_1.default { - constructor() { - super(...arguments); - this._scandir = fsScandir.scandirSync; - this._storage = []; - this._queue = /* @__PURE__ */ new Set(); - } - read() { - this._pushToQueue(this._root, this._settings.basePath); - this._handleQueue(); - return this._storage; - } - _pushToQueue(directory, base) { - this._queue.add({ directory, base }); - } - _handleQueue() { - for (const item of this._queue.values()) { - this._handleDirectory(item.directory, item.base); - } - } - _handleDirectory(directory, base) { - try { - const entries = this._scandir(directory, this._settings.fsScandirSettings); - for (const entry of entries) { - this._handleEntry(entry, base); - } - } catch (error2) { - this._handleError(error2); - } - } - _handleError(error2) { - if (!common2.isFatalError(this._settings, error2)) { - return; - } - throw error2; - } - _handleEntry(entry, base) { - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { - this._pushToStorage(entry); - } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _pushToStorage(entry) { - this._storage.push(entry); - } - }; - exports2.default = SyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/sync.js -var require_sync4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var sync_1 = require_sync3(); - var SyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new sync_1.default(this._root, this._settings); - } - read() { - return this._reader.read(); - } - }; - exports2.default = SyncProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/settings.js -var require_settings3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path2 = require("path"); - var fsScandir = require_out2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.basePath = this._getValue(this._options.basePath, void 0); - this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); - this.deepFilter = this._getValue(this._options.deepFilter, null); - this.entryFilter = this._getValue(this._options.entryFilter, null); - this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path2.sep); - this.fsScandirSettings = new fsScandir.Settings({ - followSymbolicLinks: this._options.followSymbolicLinks, - fs: this._options.fs, - pathSegmentSeparator: this._options.pathSegmentSeparator, - stats: this._options.stats, - throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.walk/out/index.js -var require_out3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0; - var async_1 = require_async4(); - var stream_1 = require_stream2(); - var sync_1 = require_sync4(); - var settings_1 = require_settings3(); - exports2.Settings = settings_1.default; - function walk(directory, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); - return; - } - new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); - } - exports2.walk = walk; - function walkSync(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new sync_1.default(directory, settings); - return provider.read(); - } - exports2.walkSync = walkSync; - function walkStream(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new stream_1.default(directory, settings); - return provider.read(); - } - exports2.walkStream = walkStream; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/fast-glob/out/readers/reader.js -var require_reader2 = __commonJS({ - "node_modules/fast-glob/out/readers/reader.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path2 = require("path"); - var fsStat = require_out(); - var utils = require_utils7(); - var Reader = class { - constructor(_settings) { - this._settings = _settings; - this._fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this._settings.followSymbolicLinks, - fs: this._settings.fs, - throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks - }); - } - _getFullEntryPath(filepath) { - return path2.resolve(this._settings.cwd, filepath); - } - _makeEntry(stats, pattern) { - const entry = { - name: pattern, - path: pattern, - dirent: utils.fs.createDirentFromStats(pattern, stats) - }; - if (this._settings.stats) { - entry.stats = stats; - } - return entry; - } - _isFatalError(error2) { - return !utils.errno.isEnoentCodeError(error2) && !this._settings.suppressErrors; - } - }; - exports2.default = Reader; - } -}); - -// node_modules/fast-glob/out/readers/stream.js -var require_stream3 = __commonJS({ - "node_modules/fast-glob/out/readers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderStream = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkStream = fsWalk.walkStream; - this._stat = fsStat.stat; - } - dynamic(root, options) { - return this._walkStream(root, options); - } - static(patterns, options) { - const filepaths = patterns.map(this._getFullEntryPath, this); - const stream = new stream_1.PassThrough({ objectMode: true }); - stream._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream.push(entry); - } - if (index === filepaths.length - 1) { - stream.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream.write(i); - } - return stream; - } - _getEntry(filepath, pattern, options) { - return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error2) => { - if (options.errorFilter(error2)) { - return null; - } - throw error2; - }); - } - _getStat(filepath) { - return new Promise((resolve2, reject) => { - this._stat(filepath, this._fsStatSettings, (error2, stats) => { - return error2 === null ? resolve2(stats) : reject(error2); - }); - }); - } - }; - exports2.default = ReaderStream; - } -}); - -// node_modules/fast-glob/out/readers/async.js -var require_async5 = __commonJS({ - "node_modules/fast-glob/out/readers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var stream_1 = require_stream3(); - var ReaderAsync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkAsync = fsWalk.walk; - this._readerStream = new stream_1.default(this._settings); - } - dynamic(root, options) { - return new Promise((resolve2, reject) => { - this._walkAsync(root, options, (error2, entries) => { - if (error2 === null) { - resolve2(entries); - } else { - reject(error2); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream = this._readerStream.static(patterns, options); - return new Promise((resolve2, reject) => { - stream.once("error", reject); - stream.on("data", (entry) => entries.push(entry)); - stream.once("end", () => resolve2(entries)); - }); - } - }; - exports2.default = ReaderAsync; - } -}); - -// node_modules/fast-glob/out/providers/matchers/matcher.js -var require_matcher = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var Matcher = class { - constructor(_patterns, _settings, _micromatchOptions) { - this._patterns = _patterns; - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this._storage = []; - this._fillStorage(); - } - _fillStorage() { - for (const pattern of this._patterns) { - const segments = this._getPatternSegments(pattern); - const sections = this._splitSegmentsIntoSections(segments); - this._storage.push({ - complete: sections.length <= 1, - pattern, - segments, - sections - }); - } - } - _getPatternSegments(pattern) { - const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); - return parts.map((part) => { - const dynamic = utils.pattern.isDynamicPattern(part, this._settings); - if (!dynamic) { - return { - dynamic: false, - pattern: part - }; - } - return { - dynamic: true, - pattern: part, - patternRe: utils.pattern.makeRe(part, this._micromatchOptions) - }; - }); - } - _splitSegmentsIntoSections(segments) { - return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); - } - }; - exports2.default = Matcher; - } -}); - -// node_modules/fast-glob/out/providers/matchers/partial.js -var require_partial = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var matcher_1 = require_matcher(); - var PartialMatcher = class extends matcher_1.default { - match(filepath) { - const parts = filepath.split("/"); - const levels = parts.length; - const patterns = this._storage.filter((info5) => !info5.complete || info5.segments.length > levels); - for (const pattern of patterns) { - const section = pattern.sections[0]; - if (!pattern.complete && levels > section.length) { - return true; - } - const match = parts.every((part, index) => { - const segment = pattern.segments[index]; - if (segment.dynamic && segment.patternRe.test(part)) { - return true; - } - if (!segment.dynamic && segment.pattern === part) { - return true; - } - return false; - }); - if (match) { - return true; - } - } - return false; - } - }; - exports2.default = PartialMatcher; - } -}); - -// node_modules/fast-glob/out/providers/filters/deep.js -var require_deep = __commonJS({ - "node_modules/fast-glob/out/providers/filters/deep.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var partial_1 = require_partial(); - var DeepFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - } - getFilter(basePath, positive, negative) { - const matcher = this._getMatcher(positive); - const negativeRe = this._getNegativePatternsRe(negative); - return (entry) => this._filter(basePath, entry, matcher, negativeRe); - } - _getMatcher(patterns) { - return new partial_1.default(patterns, this._settings, this._micromatchOptions); - } - _getNegativePatternsRe(patterns) { - const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); - return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); - } - _filter(basePath, entry, matcher, negativeRe) { - if (this._isSkippedByDeep(basePath, entry.path)) { - return false; - } - if (this._isSkippedSymbolicLink(entry)) { - return false; - } - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._isSkippedByPositivePatterns(filepath, matcher)) { - return false; - } - return this._isSkippedByNegativePatterns(filepath, negativeRe); - } - _isSkippedByDeep(basePath, entryPath) { - if (this._settings.deep === Infinity) { - return false; - } - return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; - } - _getEntryLevel(basePath, entryPath) { - const entryPathDepth = entryPath.split("/").length; - if (basePath === "") { - return entryPathDepth; - } - const basePathDepth = basePath.split("/").length; - return entryPathDepth - basePathDepth; - } - _isSkippedSymbolicLink(entry) { - return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); - } - _isSkippedByPositivePatterns(entryPath, matcher) { - return !this._settings.baseNameMatch && !matcher.match(entryPath); - } - _isSkippedByNegativePatterns(entryPath, patternsRe) { - return !utils.pattern.matchAny(entryPath, patternsRe); - } - }; - exports2.default = DeepFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/entry.js -var require_entry = __commonJS({ - "node_modules/fast-glob/out/providers/filters/entry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var EntryFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this.index = /* @__PURE__ */ new Map(); - } - getFilter(positive, negative) { - const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); - const patterns = { - positive: { - all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) - }, - negative: { - absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), - relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) - } - }; - return (entry) => this._filter(entry, patterns); - } - _filter(entry, patterns) { - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._settings.unique && this._isDuplicateEntry(filepath)) { - return false; - } - if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { - return false; - } - const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); - if (this._settings.unique && isMatched) { - this._createIndexRecord(filepath); - } - return isMatched; - } - _isDuplicateEntry(filepath) { - return this.index.has(filepath); - } - _createIndexRecord(filepath) { - this.index.set(filepath, void 0); - } - _onlyFileFilter(entry) { - return this._settings.onlyFiles && !entry.dirent.isFile(); - } - _onlyDirectoryFilter(entry) { - return this._settings.onlyDirectories && !entry.dirent.isDirectory(); - } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { - return utils.pattern.matchAny(filepath + "/", patternsRe); - } - return isMatched; - } - }; - exports2.default = EntryFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/error.js -var require_error = __commonJS({ - "node_modules/fast-glob/out/providers/filters/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var ErrorFilter = class { - constructor(_settings) { - this._settings = _settings; - } - getFilter() { - return (error2) => this._isNonFatalError(error2); - } - _isNonFatalError(error2) { - return utils.errno.isEnoentCodeError(error2) || this._settings.suppressErrors; - } - }; - exports2.default = ErrorFilter; - } -}); - -// node_modules/fast-glob/out/providers/transformers/entry.js -var require_entry2 = __commonJS({ - "node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var EntryTransformer = class { - constructor(_settings) { - this._settings = _settings; - } - getTransformer() { - return (entry) => this._transform(entry); - } - _transform(entry) { - let filepath = entry.path; - if (this._settings.absolute) { - filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); - filepath = utils.path.unixify(filepath); - } - if (this._settings.markDirectories && entry.dirent.isDirectory()) { - filepath += "/"; - } - if (!this._settings.objectMode) { - return filepath; - } - return Object.assign(Object.assign({}, entry), { path: filepath }); - } - }; - exports2.default = EntryTransformer; - } -}); - -// node_modules/fast-glob/out/providers/provider.js -var require_provider = __commonJS({ - "node_modules/fast-glob/out/providers/provider.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path2 = require("path"); - var deep_1 = require_deep(); - var entry_1 = require_entry(); - var error_1 = require_error(); - var entry_2 = require_entry2(); - var Provider = class { - constructor(_settings) { - this._settings = _settings; - this.errorFilter = new error_1.default(this._settings); - this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); - this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); - this.entryTransformer = new entry_2.default(this._settings); - } - _getRootDirectory(task) { - return path2.resolve(this._settings.cwd, task.base); - } - _getReaderOptions(task) { - const basePath = task.base === "." ? "" : task.base; - return { - basePath, - pathSegmentSeparator: "/", - concurrency: this._settings.concurrency, - deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), - entryFilter: this.entryFilter.getFilter(task.positive, task.negative), - errorFilter: this.errorFilter.getFilter(), - followSymbolicLinks: this._settings.followSymbolicLinks, - fs: this._settings.fs, - stats: this._settings.stats, - throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, - transform: this.entryTransformer.getTransformer() - }; - } - _getMicromatchOptions() { - return { - dot: this._settings.dot, - matchBase: this._settings.baseNameMatch, - nobrace: !this._settings.braceExpansion, - nocase: !this._settings.caseSensitiveMatch, - noext: !this._settings.extglob, - noglobstar: !this._settings.globstar, - posix: true, - strictSlashes: false - }; - } - }; - exports2.default = Provider; - } -}); - -// node_modules/fast-glob/out/providers/async.js -var require_async6 = __commonJS({ - "node_modules/fast-glob/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var async_1 = require_async5(); - var provider_1 = require_provider(); - var ProviderAsync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new async_1.default(this._settings); - } - async read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = await this.api(root, task, options); - return entries.map((entry) => options.transform(entry)); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderAsync; - } -}); - -// node_modules/fast-glob/out/providers/stream.js -var require_stream4 = __commonJS({ - "node_modules/fast-glob/out/providers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var stream_2 = require_stream3(); - var provider_1 = require_provider(); - var ProviderStream = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new stream_2.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const source = this.api(root, task, options); - const destination = new stream_1.Readable({ objectMode: true, read: () => { - } }); - source.once("error", (error2) => destination.emit("error", error2)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")); - destination.once("close", () => source.destroy()); - return destination; - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderStream; - } -}); - -// node_modules/fast-glob/out/readers/sync.js -var require_sync5 = __commonJS({ - "node_modules/fast-glob/out/readers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderSync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkSync = fsWalk.walkSync; - this._statSync = fsStat.statSync; - } - dynamic(root, options) { - return this._walkSync(root, options); - } - static(patterns, options) { - const entries = []; - for (const pattern of patterns) { - const filepath = this._getFullEntryPath(pattern); - const entry = this._getEntry(filepath, pattern, options); - if (entry === null || !options.entryFilter(entry)) { - continue; - } - entries.push(entry); - } - return entries; - } - _getEntry(filepath, pattern, options) { - try { - const stats = this._getStat(filepath); - return this._makeEntry(stats, pattern); - } catch (error2) { - if (options.errorFilter(error2)) { - return null; - } - throw error2; - } - } - _getStat(filepath) { - return this._statSync(filepath, this._fsStatSettings); - } - }; - exports2.default = ReaderSync; - } -}); - -// node_modules/fast-glob/out/providers/sync.js -var require_sync6 = __commonJS({ - "node_modules/fast-glob/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var sync_1 = require_sync5(); - var provider_1 = require_provider(); - var ProviderSync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new sync_1.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = this.api(root, task, options); - return entries.map(options.transform); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderSync; - } -}); - -// node_modules/fast-glob/out/settings.js -var require_settings4 = __commonJS({ - "node_modules/fast-glob/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs2 = require("fs"); - var os = require("os"); - var CPU_COUNT = Math.max(os.cpus().length, 1); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs2.lstat, - lstatSync: fs2.lstatSync, - stat: fs2.stat, - statSync: fs2.statSync, - readdir: fs2.readdir, - readdirSync: fs2.readdirSync - }; - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.absolute = this._getValue(this._options.absolute, false); - this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); - this.braceExpansion = this._getValue(this._options.braceExpansion, true); - this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); - this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); - this.cwd = this._getValue(this._options.cwd, process.cwd()); - this.deep = this._getValue(this._options.deep, Infinity); - this.dot = this._getValue(this._options.dot, false); - this.extglob = this._getValue(this._options.extglob, true); - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); - this.fs = this._getFileSystemMethods(this._options.fs); - this.globstar = this._getValue(this._options.globstar, true); - this.ignore = this._getValue(this._options.ignore, []); - this.markDirectories = this._getValue(this._options.markDirectories, false); - this.objectMode = this._getValue(this._options.objectMode, false); - this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); - this.onlyFiles = this._getValue(this._options.onlyFiles, true); - this.stats = this._getValue(this._options.stats, false); - this.suppressErrors = this._getValue(this._options.suppressErrors, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); - this.unique = this._getValue(this._options.unique, true); - if (this.onlyDirectories) { - this.onlyFiles = false; - } - if (this.stats) { - this.objectMode = true; - } - this.ignore = [].concat(this.ignore); - } - _getValue(option, value) { - return option === void 0 ? value : option; - } - _getFileSystemMethods(methods = {}) { - return Object.assign(Object.assign({}, exports2.DEFAULT_FILE_SYSTEM_ADAPTER), methods); - } - }; - exports2.default = Settings; - } -}); - -// node_modules/fast-glob/out/index.js -var require_out4 = __commonJS({ - "node_modules/fast-glob/out/index.js"(exports2, module2) { - "use strict"; - var taskManager = require_tasks(); - var async_1 = require_async6(); - var stream_1 = require_stream4(); - var sync_1 = require_sync6(); - var settings_1 = require_settings4(); - var utils = require_utils7(); - async function FastGlob(source, options) { - assertPatternsInput(source); - const works = getWorks(source, async_1.default, options); - const result = await Promise.all(works); - return utils.array.flatten(result); - } - (function(FastGlob2) { - FastGlob2.glob = FastGlob2; - FastGlob2.globSync = sync; - FastGlob2.globStream = stream; - FastGlob2.async = FastGlob2; - function sync(source, options) { - assertPatternsInput(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream(source, options) { - assertPatternsInput(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream; - function generateTasks(source, options) { - assertPatternsInput(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern; - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPathToPattern(source); - } - FastGlob2.convertPathToPattern = convertPathToPattern; - let posix; - (function(posix2) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapePosixPath(source); - } - posix2.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertPosixPathToPattern(source); - } - posix2.convertPathToPattern = convertPathToPattern2; - })(posix = FastGlob2.posix || (FastGlob2.posix = {})); - let win32; - (function(win322) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapeWindowsPath(source); - } - win322.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertWindowsPathToPattern(source); - } - win322.convertPathToPattern = convertPathToPattern2; - })(win32 = FastGlob2.win32 || (FastGlob2.win32 = {})); - })(FastGlob || (FastGlob = {})); - function getWorks(source, _Provider, options) { - const patterns = [].concat(source); - const settings = new settings_1.default(options); - const tasks = taskManager.generate(patterns, settings); - const provider = new _Provider(settings); - return tasks.map(provider.read, provider); - } - function assertPatternsInput(input) { - const source = [].concat(input); - const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); - if (!isValidSource) { - throw new TypeError("Patterns must be a string (non empty) or an array of strings"); - } - } - module2.exports = FastGlob; - } -}); - -// node_modules/path-type/index.js -var require_path_type = __commonJS({ - "node_modules/path-type/index.js"(exports2) { - "use strict"; - var { promisify } = require("util"); - var fs2 = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify(fs2[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - return fs2[fsStatType](filePath)[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - exports2.isFile = isType.bind(null, "stat", "isFile"); - exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// node_modules/dir-glob/index.js -var require_dir_glob = __commonJS({ - "node_modules/dir-glob/index.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - var pathType = require_path_type(); - var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; - var getPath = (filepath, cwd) => { - const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; - return path2.isAbsolute(pth) ? pth : path2.join(cwd, pth); - }; - var addExtensions = (file, extensions) => { - if (path2.extname(file)) { - return `**/${file}`; - } - return `**/${file}.${getExtensions(extensions)}`; - }; - var getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - if (options.files && options.extensions) { - return options.files.map((x) => path2.posix.join(directory, addExtensions(x, options.extensions))); - } - if (options.files) { - return options.files.map((x) => path2.posix.join(directory, `**/${x}`)); - } - if (options.extensions) { - return [path2.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - return [path2.posix.join(directory, "**")]; - }; - module2.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = await Promise.all([].concat(input).map(async (x) => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - return [].concat.apply([], globs); - }; - module2.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - return [].concat.apply([], globs); - }; - } -}); - -// node_modules/ignore/index.js -var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports2, module2) { - function makeArray(subject) { - return Array.isArray(subject) ? subject : [subject]; - } - var EMPTY = ""; - var SPACE = " "; - var ESCAPE = "\\"; - var REGEX_TEST_BLANK_LINE = /^\s+$/; - var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; - var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; - var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; - var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; - var SLASH = "/"; - var TMP_KEY_IGNORE = "node-ignore"; - if (typeof Symbol !== "undefined") { - TMP_KEY_IGNORE = Symbol.for("node-ignore"); - } - var KEY_IGNORE = TMP_KEY_IGNORE; - var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); - var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; - var RETURN_FALSE = () => false; - var sanitizeRange = (range) => range.replace( - REGEX_REGEXP_RANGE, - (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY - ); - var cleanRangeBackSlash = (slashes) => { - const { length } = slashes; - return slashes.slice(0, length - length % 2); - }; - var REPLACERS = [ - [ - // remove BOM - // TODO: - // Other similar zero-width characters? - /^\uFEFF/, - () => EMPTY - ], - // > Trailing spaces are ignored unless they are quoted with backslash ("\") - [ - // (a\ ) -> (a ) - // (a ) -> (a) - // (a \ ) -> (a ) - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY - ], - // replace (\ ) with ' ' - [ - /\\\s/g, - () => SPACE - ], - // Escape metacharacters - // which is written down by users but means special for regular expressions. - // > There are 12 characters with special meanings: - // > - the backslash \, - // > - the caret ^, - // > - the dollar sign $, - // > - the period or dot ., - // > - the vertical bar or pipe symbol |, - // > - the question mark ?, - // > - the asterisk or star *, - // > - the plus sign +, - // > - the opening parenthesis (, - // > - the closing parenthesis ), - // > - and the opening square bracket [, - // > - the opening curly brace {, - // > These special characters are often called "metacharacters". - [ - /[\\$.|*+(){^]/g, - (match) => `\\${match}` - ], - [ - // > a question mark (?) matches a single character - /(?!\\)\?/g, - () => "[^/]" - ], - // leading slash - [ - // > A leading slash matches the beginning of the pathname. - // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". - // A leading slash matches the beginning of the pathname - /^\//, - () => "^" - ], - // replace special metacharacter slash after the leading slash - [ - /\//g, - () => "\\/" - ], - [ - // > A leading "**" followed by a slash means match in all directories. - // > For example, "**/foo" matches file or directory "foo" anywhere, - // > the same as pattern "foo". - // > "**/foo/bar" matches file or directory "bar" anywhere that is directly - // > under directory "foo". - // Notice that the '*'s have been replaced as '\\*' - /^\^*\\\*\\\*\\\//, - // '**/foo' <-> 'foo' - () => "^(?:.*\\/)?" - ], - // starting - [ - // there will be no leading '/' - // (which has been replaced by section "leading slash") - // If starts with '**', adding a '^' to the regular expression also works - /^(?=[^^])/, - function startingReplacer() { - return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; - } - ], - // two globstars - [ - // Use lookahead assertions so that we could match more than one `'/**'` - /\\\/\\\*\\\*(?=\\\/|$)/g, - // Zero, one or several directories - // should not use '*', or it will be replaced by the next replacer - // Check if it is not the last `'/**'` - (_2, index, str2) => index + 6 < str2.length ? "(?:\\/[^\\/]+)*" : "\\/.+" - ], - // normal intermediate wildcards - [ - // Never replace escaped '*' - // ignore rule '\*' will match the path '*' - // 'abc.*/' -> go - // 'abc.*' -> skip this rule, - // coz trailing single wildcard will be handed by [trailing wildcard] - /(^|[^\\]+)(\\\*)+(?=.+)/g, - // '*.js' matches '.js' - // '*.js' doesn't match 'abc' - (_2, p1, p2) => { - const unescaped = p2.replace(/\\\*/g, "[^\\/]*"); - return p1 + unescaped; - } - ], - [ - // unescape, revert step 3 except for back slash - // For example, if a user escape a '\\*', - // after step 3, the result will be '\\\\\\*' - /\\\\\\(?=[$.|*+(){^])/g, - () => ESCAPE - ], - [ - // '\\\\' -> '\\' - /\\\\/g, - () => ESCAPE - ], - [ - // > The range notation, e.g. [a-zA-Z], - // > can be used to match one of the characters in a range. - // `\` is escaped by step 3 - /(\\)?\[([^\]/]*?)(\\*)($|\])/g, - (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" - ], - // ending - [ - // 'js' will not match 'js.' - // 'ab' will not match 'abc' - /(?:[^*])$/, - // WTF! - // https://git-scm.com/docs/gitignore - // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) - // which re-fixes #24, #38 - // > If there is a separator at the end of the pattern then the pattern - // > will only match directories, otherwise the pattern can match both - // > files and directories. - // 'js*' will not match 'a.js' - // 'js/' will not match 'a.js' - // 'js' will match 'a.js' and 'a.js/' - (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_2, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } - ] - ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; - } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); - }; - var isString = (subject) => typeof subject === "string"; - var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); - var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; - this.pattern = pattern; - this.negative = negative; - this.regex = regex; - } - }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; - let negative = false; - if (pattern.indexOf("!") === 0) { - negative = true; - pattern = pattern.substr(1); - } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); - return new IgnoreRule( - origin, - pattern, - negative, - regex - ); - }; - var throwError2 = (message, Ctor) => { - throw new Ctor(message); - }; - var checkPath = (path2, originalPath, doThrow) => { - if (!isString(path2)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path2) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path2)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; - }; - var isNotRelative = (path2) => REGEX_TEST_INVALID_PATH.test(path2); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define2(this, KEY_IGNORE, true); - this._rules = []; - this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); - } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); - } - _addPattern(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); - this._added = true; - return; - } - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignoreCase); - this._added = true; - this._rules.push(rule); - } - } - // @param {Array | string | Ignore} pattern - add(pattern) { - this._added = false; - makeArray( - isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { - this._initCache(); - } - return this; - } - // legacy - addPattern(pattern) { - return this.add(pattern); - } - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - _testOne(path2, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path2); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; - } - // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { - const path2 = originalPath && checkPath.convert(originalPath); - checkPath( - path2, - originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError2 - ); - return this._t(path2, cache, checkUnignored, slices); - } - _t(path2, cache, checkUnignored, slices) { - if (path2 in cache) { - return cache[path2]; - } - if (!slices) { - slices = path2.split(SLASH); - } - slices.pop(); - if (!slices.length) { - return cache[path2] = this._testOne(path2, checkUnignored); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path2] = parent.ignored ? parent : this._testOne(path2, checkUnignored); - } - ignores(path2) { - return this._test(path2, this._ignoreCache, false).ignored; - } - createFilter() { - return (path2) => !this.ignores(path2); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path2) { - return this._test(path2, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - var isPathValid = (path2) => checkPath(path2 && checkPath.convert(path2), path2, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module2.exports = factory; - if ( - // Detect `process` so that it can run in browsers. - typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") - ) { - const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); - checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path2) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path2) || isNotRelative(path2); - } - } -}); - -// node_modules/slash/index.js -var require_slash = __commonJS({ - "node_modules/slash/index.js"(exports2, module2) { - "use strict"; - module2.exports = (path2) => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path2); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path2); - if (isExtendedLengthPath || hasNonAscii) { - return path2; - } - return path2.replace(/\\/g, "/"); - }; - } -}); - -// node_modules/globby/gitignore.js -var require_gitignore = __commonJS({ - "node_modules/globby/gitignore.js"(exports2, module2) { - "use strict"; - var { promisify } = require("util"); - var fs2 = require("fs"); - var path2 = require("path"); - var fastGlob = require_out4(); - var gitIgnore = require_ignore(); - var slash = require_slash(); - var DEFAULT_IGNORE = [ - "**/node_modules/**", - "**/flow-typed/**", - "**/coverage/**", - "**/.git" - ]; - var readFileP = promisify(fs2.readFile); - var mapGitIgnorePatternTo = (base) => (ignore) => { - if (ignore.startsWith("!")) { - return "!" + path2.posix.join(base, ignore.slice(1)); - } - return path2.posix.join(base, ignore); - }; - var parseGitIgnore = (content, options) => { - const base = slash(path2.relative(options.cwd, path2.dirname(options.fileName))); - return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); - }; - var reduceIgnore = (files) => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - return ignores; - }; - var ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path2.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - return path2.join(cwd, p); - }; - var getIsIgnoredPredecate = (ignores, cwd) => { - return (p) => ignores.ignores(slash(path2.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); - }; - var getFile = async (file, cwd) => { - const filePath = path2.join(cwd, file); - const content = await readFileP(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var getFileSync = (file, cwd) => { - const filePath = path2.join(cwd, file); - const content = fs2.readFileSync(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) - } = {}) => { - return { ignore, cwd }; - }; - module2.exports = async (options) => { - options = normalizeOptions(options); - const paths = await fastGlob("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - module2.exports.sync = (options) => { - options = normalizeOptions(options); - const paths = fastGlob.sync("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = paths.map((file) => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - } -}); - -// node_modules/globby/stream-utils.js -var require_stream_utils = __commonJS({ - "node_modules/globby/stream-utils.js"(exports2, module2) { - "use strict"; - var { Transform } = require("stream"); - var ObjectTransform = class extends Transform { - constructor() { - super({ - objectMode: true - }); - } - }; - var FilterStream = class extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - callback(); - } - }; - var UniqueStream = class extends ObjectTransform { - constructor() { - super(); - this._pushed = /* @__PURE__ */ new Set(); - } - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - callback(); - } - }; - module2.exports = { - FilterStream, - UniqueStream - }; - } -}); - -// node_modules/globby/index.js -var require_globby = __commonJS({ - "node_modules/globby/index.js"(exports2, module2) { - "use strict"; - var fs2 = require("fs"); - var arrayUnion = require_array_union(); - var merge2 = require_merge2(); - var fastGlob = require_out4(); - var dirGlob = require_dir_glob(); - var gitignore = require_gitignore(); - var { FilterStream, UniqueStream } = require_stream_utils(); - var DEFAULT_FILTER = () => false; - var isNegative = (pattern) => pattern[0] === "!"; - var assertPatternsInput = (patterns) => { - if (!patterns.every((pattern) => typeof pattern === "string")) { - throw new TypeError("Patterns must be a string or an array of strings"); - } - }; - var checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - let stat; - try { - stat = fs2.statSync(options.cwd); - } catch { - return; - } - if (!stat.isDirectory()) { - throw new Error("The `cwd` option must be a path to a directory"); - } - }; - var getPathString = (p) => p.stats instanceof fs2.Stats ? p.path : p; - var generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - const globTasks = []; - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - for (const [index, pattern] of patterns.entries()) { - if (isNegative(pattern)) { - continue; - } - const ignore = patterns.slice(index).filter((pattern2) => isNegative(pattern2)).map((pattern2) => pattern2.slice(1)); - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - globTasks.push({ pattern, options }); - } - return globTasks; - }; - var globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === "object") { - options = { - ...options, - ...task.options.expandDirectories - }; - } - return fn(task.pattern, options); - }; - var getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - var getFilterSync = (options) => { - return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - var globToTask = (task) => (glob2) => { - const { options } = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - return { - pattern: glob2, - options - }; - }; - module2.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const getFilter = async () => { - return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - const getTasks = async () => { - const tasks2 = await Promise.all(globTasks.map(async (task) => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - return arrayUnion(...tasks2); - }; - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); - return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); - }; - module2.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - return matches.filter((path_) => !filter(path_)); - }; - module2.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - const filterStream = new FilterStream((p) => !filter(p)); - const uniqueStream = new UniqueStream(); - return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); - }; - module2.exports.generateGlobTasks = generateGlobTasks; - module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); - module2.exports.gitignore = gitignore; - } -}); - -// node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - "node_modules/graceful-fs/polyfills.js"(exports2, module2) { - var constants = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs2) { - if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs2); - } - if (!fs2.lutimes) { - patchLutimes(fs2); - } - fs2.chown = chownFix(fs2.chown); - fs2.fchown = chownFix(fs2.fchown); - fs2.lchown = chownFix(fs2.lchown); - fs2.chmod = chmodFix(fs2.chmod); - fs2.fchmod = chmodFix(fs2.fchmod); - fs2.lchmod = chmodFix(fs2.lchmod); - fs2.chownSync = chownFixSync(fs2.chownSync); - fs2.fchownSync = chownFixSync(fs2.fchownSync); - fs2.lchownSync = chownFixSync(fs2.lchownSync); - fs2.chmodSync = chmodFixSync(fs2.chmodSync); - fs2.fchmodSync = chmodFixSync(fs2.fchmodSync); - fs2.lchmodSync = chmodFixSync(fs2.lchmodSync); - fs2.stat = statFix(fs2.stat); - fs2.fstat = statFix(fs2.fstat); - fs2.lstat = statFix(fs2.lstat); - fs2.statSync = statFixSync(fs2.statSync); - fs2.fstatSync = statFixSync(fs2.fstatSync); - fs2.lstatSync = statFixSync(fs2.lstatSync); - if (fs2.chmod && !fs2.lchmod) { - fs2.lchmod = function(path2, mode, cb) { - if (cb) process.nextTick(cb); - }; - fs2.lchmodSync = function() { - }; - } - if (fs2.chown && !fs2.lchown) { - fs2.lchown = function(path2, uid, gid, cb) { - if (cb) process.nextTick(cb); - }; - fs2.lchownSync = function() { - }; - } - if (platform === "win32") { - fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : (function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { - setTimeout(function() { - fs2.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er); - }); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); - return rename; - })(fs2.rename); - } - fs2.read = typeof fs2.read !== "function" ? fs2.read : (function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _2, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs2, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs2, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); - return read; - })(fs2.read); - fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : /* @__PURE__ */ (function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs2, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - })(fs2.readSync); - function patchLchmod(fs3) { - fs3.lchmod = function(path2, mode, callback) { - fs3.open( - path2, - constants.O_WRONLY | constants.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) callback(err); - return; - } - fs3.fchmod(fd, mode, function(err2) { - fs3.close(fd, function(err22) { - if (callback) callback(err2 || err22); - }); - }); - } - ); - }; - fs3.lchmodSync = function(path2, mode) { - var fd = fs3.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs3.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs3.closeSync(fd); - } catch (er) { - } - } else { - fs3.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs3) { - if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) { - fs3.lutimes = function(path2, at, mt, cb) { - fs3.open(path2, constants.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) cb(er); - return; - } - fs3.futimes(fd, at, mt, function(er2) { - fs3.close(fd, function(er22) { - if (cb) cb(er2 || er22); - }); - }); - }); - }; - fs3.lutimesSync = function(path2, at, mt) { - var fd = fs3.openSync(path2, constants.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs3.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs3.closeSync(fd); - } catch (er) { - } - } else { - fs3.closeSync(fd); - } - } - return ret; - }; - } else if (fs3.futimes) { - fs3.lutimes = function(_a, _b, _c, cb) { - if (cb) process.nextTick(cb); - }; - fs3.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) return orig; - return function(target, mode, cb) { - return orig.call(fs2, target, mode, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) return orig; - return function(target, mode) { - try { - return orig.call(fs2, target, mode); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function chownFix(orig) { - if (!orig) return orig; - return function(target, uid, gid, cb) { - return orig.call(fs2, target, uid, gid, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) return orig; - return function(target, uid, gid) { - try { - return orig.call(fs2, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function statFix(orig) { - if (!orig) return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - if (cb) cb.apply(this, arguments); - } - return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) return orig; - return function(target, options) { - var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target); - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { - var Stream = require("stream").Stream; - module2.exports = legacy; - function legacy(fs2) { - return { - ReadStream, - WriteStream - }; - function ReadStream(path2, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path2, options); - Stream.call(this); - var self2 = this; - this.path = path2; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self2._read(); - }); - return; - } - fs2.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self2.emit("error", err); - self2.readable = false; - return; - } - self2.fd = fd; - self2.emit("open", fd); - self2._read(); - }); - } - function WriteStream(path2, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path2, options); - Stream.call(this); - this.path = path2; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs2.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - "node_modules/graceful-fs/clone.js"(exports2, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs2 = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop() { - } - function publishQueue(context2, queue2) { - Object.defineProperty(context2, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug2 = noop; - if (util.debuglog) - debug2 = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug2 = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs2[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs2, queue); - fs2.close = (function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs2, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - })(fs2.close); - fs2.closeSync = (function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs2, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - })(fs2.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug2(fs2[gracefulQueue]); - require("assert").equal(fs2[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs2[gracefulQueue]); - } - module2.exports = patch(clone(fs2)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) { - module2.exports = patch(fs2); - fs2.__patched = true; - } - function patch(fs3) { - polyfills(fs3); - fs3.gracefulify = patch; - fs3.createReadStream = createReadStream; - fs3.createWriteStream = createWriteStream; - var fs$readFile = fs3.readFile; - fs3.readFile = readFile; - function readFile(path2, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path2, options, cb); - function go$readFile(path3, options2, cb2, startTime) { - return fs$readFile(path3, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs3.writeFile; - fs3.writeFile = writeFile; - function writeFile(path2, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path2, data, options, cb); - function go$writeFile(path3, data2, options2, cb2, startTime) { - return fs$writeFile(path3, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs3.appendFile; - if (fs$appendFile) - fs3.appendFile = appendFile; - function appendFile(path2, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path2, data, options, cb); - function go$appendFile(path3, data2, options2, cb2, startTime) { - return fs$appendFile(path3, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs3.copyFile; - if (fs$copyFile) - fs3.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs3.readdir; - fs3.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path2, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options2, cb2, startTime) { - return fs$readdir(path3, fs$readdirCallback( - path3, - options2, - cb2, - startTime - )); - } : function go$readdir2(path3, options2, cb2, startTime) { - return fs$readdir(path3, options2, fs$readdirCallback( - path3, - options2, - cb2, - startTime - )); - }; - return go$readdir(path2, options, cb); - function fs$readdirCallback(path3, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path3, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs3); - ReadStream = legStreams.ReadStream; - WriteStream = legStreams.WriteStream; - } - var fs$ReadStream = fs3.ReadStream; - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype); - ReadStream.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs3.WriteStream; - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype); - WriteStream.prototype.open = WriteStream$open; - } - Object.defineProperty(fs3, "ReadStream", { - get: function() { - return ReadStream; - }, - set: function(val2) { - ReadStream = val2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs3, "WriteStream", { - get: function() { - return WriteStream; - }, - set: function(val2) { - WriteStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream; - Object.defineProperty(fs3, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val2) { - FileReadStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream; - Object.defineProperty(fs3, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val2) { - FileWriteStream = val2; - }, - enumerable: true, - configurable: true - }); - function ReadStream(path2, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream(path2, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream(path2, options) { - return new fs3.ReadStream(path2, options); - } - function createWriteStream(path2, options) { - return new fs3.WriteStream(path2, options); - } - var fs$open = fs3.open; - fs3.open = open; - function open(path2, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path2, flags, mode, cb); - function go$open(path3, flags2, mode2, cb2, startTime) { - return fs$open(path3, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs3; - } - function enqueue(elem) { - debug2("ENQUEUE", elem[0].name, elem[1]); - fs2[gracefulQueue].push(elem); - retry3(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs2[gracefulQueue].length; ++i) { - if (fs2[gracefulQueue][i].length > 2) { - fs2[gracefulQueue][i][3] = now; - fs2[gracefulQueue][i][4] = now; - } - } - retry3(); - } - function retry3() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs2[gracefulQueue].length === 0) - return; - var elem = fs2[gracefulQueue].shift(); - var fn = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug2("RETRY", fn.name, args); - fn.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug2("TIMEOUT", fn.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug2("RETRY", fn.name, args); - fn.apply(null, args.concat([startTime])); - } else { - fs2[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry3, 0); - } - } - } -}); - -// node_modules/is-path-cwd/index.js -var require_is_path_cwd = __commonJS({ - "node_modules/is-path-cwd/index.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - module2.exports = (path_) => { - let cwd = process.cwd(); - path_ = path2.resolve(path_); - if (process.platform === "win32") { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - return path_ === cwd; - }; - } -}); - -// node_modules/is-path-inside/index.js -var require_is_path_inside = __commonJS({ - "node_modules/is-path-inside/index.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - module2.exports = (childPath, parentPath) => { - const relation = path2.relative(parentPath, childPath); - return Boolean( - relation && relation !== ".." && !relation.startsWith(`..${path2.sep}`) && relation !== path2.resolve(childPath) - ); - }; - } -}); - -// node_modules/fs.realpath/old.js -var require_old = __commonJS({ - "node_modules/fs.realpath/old.js"(exports2) { - var pathModule = require("path"); - var isWindows = process.platform === "win32"; - var fs2 = require("fs"); - var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - function rethrow() { - var callback; - if (DEBUG) { - var backtrace = new Error(); - callback = debugCallback; - } else - callback = missingCallback; - return callback; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; - else if (!process.noDeprecation) { - var msg = "fs: missing callback " + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } - } - function maybeCallback(cb) { - return typeof cb === "function" ? cb : rethrow(); - } - var normalize2 = pathModule.normalize; - if (isWindows) { - nextPartRe = /(.*?)(?:[\/\\]+|$)/g; - } else { - nextPartRe = /(.*?)(?:[\/]+|$)/g; - } - var nextPartRe; - if (isWindows) { - splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; - } else { - splitRootRe = /^[\/]*/; - } - var splitRootRe; - exports2.realpathSync = function realpathSync(p, cache) { - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs2.lstatSync(base); - knownHard[base] = true; - } - } - while (pos < p.length) { - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - continue; - } - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - resolvedLink = cache[base]; - } else { - var stat = fs2.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs2.statSync(base); - linkTarget = fs2.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - if (cache) cache[original] = p; - return p; - }; - exports2.realpath = function realpath(p, cache, cb) { - if (typeof cb !== "function") { - cb = maybeCallback(cache); - cache = null; - } - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs2.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - function LOOP() { - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - return process.nextTick(LOOP); - } - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - return gotResolvedLink(cache[base]); - } - return fs2.lstat(base, gotStat); - } - function gotStat(err, stat) { - if (err) return cb(err); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs2.stat(base, function(err2) { - if (err2) return cb(err2); - fs2.readlink(base, function(err3, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err3, target); - }); - }); - } - function gotTarget(err, target, base2) { - if (err) return cb(err); - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base2] = resolvedLink; - gotResolvedLink(resolvedLink); - } - function gotResolvedLink(resolvedLink) { - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - }; - } -}); - -// node_modules/fs.realpath/index.js -var require_fs5 = __commonJS({ - "node_modules/fs.realpath/index.js"(exports2, module2) { - module2.exports = realpath; - realpath.realpath = realpath; - realpath.sync = realpathSync; - realpath.realpathSync = realpathSync; - realpath.monkeypatch = monkeypatch; - realpath.unmonkeypatch = unmonkeypatch; - var fs2 = require("fs"); - var origRealpath = fs2.realpath; - var origRealpathSync = fs2.realpathSync; - var version = process.version; - var ok = /^v[0-5]\./.test(version); - var old = require_old(); - function newError(er) { - return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); - } - function realpath(p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb); - } - if (typeof cache === "function") { - cb = cache; - cache = null; - } - origRealpath(p, cache, function(er, result) { - if (newError(er)) { - old.realpath(p, cache, cb); - } else { - cb(er, result); - } - }); - } - function realpathSync(p, cache) { - if (ok) { - return origRealpathSync(p, cache); - } - try { - return origRealpathSync(p, cache); - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache); - } else { - throw er; - } - } - } - function monkeypatch() { - fs2.realpath = realpath; - fs2.realpathSync = realpathSync; - } - function unmonkeypatch() { - fs2.realpath = origRealpath; - fs2.realpathSync = origRealpathSync; - } - } -}); - -// node_modules/concat-map/index.js -var require_concat_map = __commonJS({ - "node_modules/concat-map/index.js"(exports2, module2) { - module2.exports = function(xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - } -}); - -// node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ - "node_modules/balanced-match/index.js"(exports2, module2) { - "use strict"; - module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r = range(a, b, str2); - return r && { - start: r[0], - end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + a.length, r[1]), - post: str2.slice(r[1] + b.length) - }; - } - function maybeMatch(reg, str2) { - var m = str2.match(reg); - return m ? m[0] : null; - } - balanced.range = range; - function range(a, b, str2) { - var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); - var i = ai; - if (ai >= 0 && bi > 0) { - begs = []; - left = str2.length; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str2.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - bi = str2.indexOf(b, i + 1); - } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length) { - result = [left, right]; - } - } - return result; - } - } -}); - -// node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ - "node_modules/brace-expansion/index.js"(exports2, module2) { - var concatMap = require_concat_map(); - var balanced = require_balanced_match(); - module2.exports = expandTop; - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) - return [""]; - var parts = []; - var m = balanced("{", "}", str2); - if (!m) - return str2.split(","); - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; - } - function expandTop(str2) { - if (!str2) - return []; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); - } - return expand(escapeBraces(str2), true).map(unescapeBraces); - } - function embrace(str2) { - return "{" + str2 + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte5(i, y) { - return i >= y; - } - function expand(str2, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2); - } - return [str2]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand(m.post, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte5; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { - return expand(el, false); - }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - return expansions; - } - } -}); - -// node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ - "node_modules/minimatch/minimatch.js"(exports2, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path2 = (function() { - try { - return require("path"); - } catch (e) { - } - })() || { - sep: "/" - }; - minimatch.sep = path2.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand = require_brace_expansion(); - var plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" } - }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set2, c) { - set2[c] = true; - return set2; - }, {}); - } - var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { - options = options || {}; - return function(p, i, list) { - return minimatch(p, pattern, options); - }; - } - function ext(a, b) { - b = b || {}; - var t = {}; - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; - } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); - }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); - }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); - }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); - }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); - }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); - }; - m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); - }; - return m; - }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); - if (!options) options = {}; - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); - } - assertValidPattern(pattern); - if (!options) options = {}; - pattern = pattern.trim(); - if (!options.allowWindowsEscape && path2.sep !== "/") { - pattern = pattern.split(path2.sep).join("/"); - } - this.options = options; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.make(); - } - Minimatch.prototype.debug = function() { - }; - Minimatch.prototype.make = make; - function make() { - var pattern = this.pattern; - var options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); - if (options.debug) this.debug = function debug2() { - console.error.apply(console, arguments); - }; - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { - return s.split(slashSplit); - }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { - return s.map(this.parse, this); - }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { - return s.indexOf(false) === -1; - }); - this.debug(this.pattern, set2); - this.set = set2; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate = false; - var options = this.options; - var negateOffset = 0; - if (options.nonegate) return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate = !negate; - negateOffset++; - } - if (negateOffset) this.pattern = pattern.substr(negateOffset); - this.negate = negate; - } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return expand(pattern); - } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); - } - }; - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - assertValidPattern(pattern); - var options = this.options; - if (pattern === "**") { - if (!options.noglobstar) - return GLOBSTAR; - else - pattern = "*"; - } - if (pattern === "") return ""; - var re = ""; - var hasMagic = !!options.nocase; - var escaping = false; - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self2 = this; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; - } - self2.debug("clearStateChar %j %j", stateChar, re); - stateChar = false; - } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; - } - switch (c) { - /* istanbul ignore next */ - case "/": { - return false; - } - case "\\": - clearStateChar(); - escaping = true; - continue; - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); - if (inClass) { - this.debug(" in class"); - if (c === "!" && i === classStart + 1) c = "^"; - re += c; - continue; - } - self2.debug("call clearStateChar %j", stateChar); - clearStateChar(); - stateChar = c; - if (options.noext) clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re); - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - re += pl.close; - if (pl.type === "!") { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - clearStateChar(); - re += "|"; - continue; - // these are mostly the same in regexp and glob - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - var cs = pattern.substring(classStart + 1, i); - try { - RegExp("[" + cs + "]"); - } catch (er) { - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; - } - } - if (inClass) { - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re, pl); - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_2, $1, $2) { - if (!$2) { - $2 = "\\"; - } - return $1 + $1 + $2 + "|"; - }); - this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case "[": - case ".": - case "(": - addPatternStart = true; - } - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - nlLast += nlAfter; - var openParensBefore = nlBefore.split("(").length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); - } - nlAfter = cleanAfter; - var dollar = ""; - if (nlAfter === "" && isSub !== SUBPARSE) { - dollar = "$"; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - if (re !== "" && hasMagic) { - re = "(?=.)" + re; - } - if (addPatternStart) { - re = patternStart + re; - } - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options.nocase ? "i" : ""; - try { - var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); - } - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) re = "^(?!" + re + ").*$"; - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - minimatch.match = function(list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function(f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = function match(f, partial) { - if (typeof partial === "undefined") partial = this.partial; - this.debug("match", f, this.pattern); - if (this.comment) return false; - if (this.empty) return f === ""; - if (f === "/" && partial) return true; - var options = this.options; - if (path2.sep !== "/") { - f = f.split(path2.sep).join("/"); - } - f = f.split(slashSplit); - this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) break; - } - for (i = 0; i < set2.length; i++) { - var pattern = set2[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) return true; - return !this.negate; - } - } - if (options.flipNegate) return false; - return this.negate; - }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options = this.options; - this.debug( - "matchOne", - { "this": this, file, pattern } - ); - this.debug("matchOne", file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug("matchOne loop"); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - if (p === false) return false; - if (p === GLOBSTAR) { - this.debug("GLOBSTAR", [pattern, p, f]); - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; - } - return true; - } - while (fr < fl) { - var swallowee = file[fr]; - this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { - this.debug("dot detected!", file, fr, pattern, pr); - break; - } - this.debug("globstar swallow a segment, and continue"); - fr++; - } - } - if (partial) { - this.debug("\n>>> no match, partial?", file, fr, pattern, pr); - if (fr === fl) return true; - } - return false; - } - var hit; - if (typeof p === "string") { - hit = f === p; - this.debug("string match", p, f, hit); - } else { - hit = f.match(p); - this.debug("pattern match", p, f, hit); - } - if (!hit) return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - return fi === fl - 1 && file[fi] === ""; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/inherits/inherits_browser.js -var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports2, module2) { - if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; - } - } -}); - -// node_modules/inherits/inherits.js -var require_inherits = __commonJS({ - "node_modules/inherits/inherits.js"(exports2, module2) { - try { - util = require("util"); - if (typeof util.inherits !== "function") throw ""; - module2.exports = util.inherits; - } catch (e) { - module2.exports = require_inherits_browser(); - } - var util; - } -}); - -// node_modules/path-is-absolute/index.js -var require_path_is_absolute = __commonJS({ - "node_modules/path-is-absolute/index.js"(exports2, module2) { - "use strict"; - function posix(path2) { - return path2.charAt(0) === "/"; - } - function win32(path2) { - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path2); - var device = result[1] || ""; - var isUnc = Boolean(device && device.charAt(1) !== ":"); - return Boolean(result[2] || isUnc); - } - module2.exports = process.platform === "win32" ? win32 : posix; - module2.exports.posix = posix; - module2.exports.win32 = win32; - } -}); - -// node_modules/rimraf/node_modules/glob/common.js -var require_common3 = __commonJS({ - "node_modules/rimraf/node_modules/glob/common.js"(exports2) { - exports2.setopts = setopts; - exports2.ownProp = ownProp; - exports2.makeAbs = makeAbs; - exports2.finish = finish; - exports2.mark = mark; - exports2.isIgnored = isIgnored; - exports2.childrenIgnored = childrenIgnored; - function ownProp(obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field); - } - var fs2 = require("fs"); - var path2 = require("path"); - var minimatch = require_minimatch(); - var isAbsolute2 = require_path_is_absolute(); - var Minimatch = minimatch.Minimatch; - function alphasort(a, b) { - return a.localeCompare(b, "en"); - } - function setupIgnores(self2, options) { - self2.ignore = options.ignore || []; - if (!Array.isArray(self2.ignore)) - self2.ignore = [self2.ignore]; - if (self2.ignore.length) { - self2.ignore = self2.ignore.map(ignoreMap); - } - } - function ignoreMap(pattern) { - var gmatcher = null; - if (pattern.slice(-3) === "/**") { - var gpattern = pattern.replace(/(\/\*\*)+$/, ""); - gmatcher = new Minimatch(gpattern, { dot: true }); - } - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher - }; - } - function setopts(self2, pattern, options) { - if (!options) - options = {}; - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar"); - } - pattern = "**/" + pattern; - } - self2.silent = !!options.silent; - self2.pattern = pattern; - self2.strict = options.strict !== false; - self2.realpath = !!options.realpath; - self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); - self2.follow = !!options.follow; - self2.dot = !!options.dot; - self2.mark = !!options.mark; - self2.nodir = !!options.nodir; - if (self2.nodir) - self2.mark = true; - self2.sync = !!options.sync; - self2.nounique = !!options.nounique; - self2.nonull = !!options.nonull; - self2.nosort = !!options.nosort; - self2.nocase = !!options.nocase; - self2.stat = !!options.stat; - self2.noprocess = !!options.noprocess; - self2.absolute = !!options.absolute; - self2.fs = options.fs || fs2; - self2.maxLength = options.maxLength || Infinity; - self2.cache = options.cache || /* @__PURE__ */ Object.create(null); - self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); - self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); - setupIgnores(self2, options); - self2.changedCwd = false; - var cwd = process.cwd(); - if (!ownProp(options, "cwd")) - self2.cwd = cwd; - else { - self2.cwd = path2.resolve(options.cwd); - self2.changedCwd = self2.cwd !== cwd; - } - self2.root = options.root || path2.resolve(self2.cwd, "/"); - self2.root = path2.resolve(self2.root); - if (process.platform === "win32") - self2.root = self2.root.replace(/\\/g, "/"); - self2.cwdAbs = isAbsolute2(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); - if (process.platform === "win32") - self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); - self2.nomount = !!options.nomount; - options.nonegate = true; - options.nocomment = true; - self2.minimatch = new Minimatch(pattern, options); - self2.options = self2.minimatch.options; - } - function finish(self2) { - var nou = self2.nounique; - var all = nou ? [] : /* @__PURE__ */ Object.create(null); - for (var i = 0, l = self2.matches.length; i < l; i++) { - var matches = self2.matches[i]; - if (!matches || Object.keys(matches).length === 0) { - if (self2.nonull) { - var literal = self2.minimatch.globSet[i]; - if (nou) - all.push(literal); - else - all[literal] = true; - } - } else { - var m = Object.keys(matches); - if (nou) - all.push.apply(all, m); - else - m.forEach(function(m2) { - all[m2] = true; - }); - } - } - if (!nou) - all = Object.keys(all); - if (!self2.nosort) - all = all.sort(alphasort); - if (self2.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self2._mark(all[i]); - } - if (self2.nodir) { - all = all.filter(function(e) { - var notDir = !/\/$/.test(e); - var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; - if (notDir && c) - notDir = c !== "DIR" && !Array.isArray(c); - return notDir; - }); - } - } - if (self2.ignore.length) - all = all.filter(function(m2) { - return !isIgnored(self2, m2); - }); - self2.found = all; - } - function mark(self2, p) { - var abs = makeAbs(self2, p); - var c = self2.cache[abs]; - var m = p; - if (c) { - var isDir = c === "DIR" || Array.isArray(c); - var slash = p.slice(-1) === "/"; - if (isDir && !slash) - m += "/"; - else if (!isDir && slash) - m = m.slice(0, -1); - if (m !== p) { - var mabs = makeAbs(self2, m); - self2.statCache[mabs] = self2.statCache[abs]; - self2.cache[mabs] = self2.cache[abs]; - } - } - return m; - } - function makeAbs(self2, f) { - var abs = f; - if (f.charAt(0) === "/") { - abs = path2.join(self2.root, f); - } else if (isAbsolute2(f) || f === "") { - abs = f; - } else if (self2.changedCwd) { - abs = path2.resolve(self2.cwd, f); - } else { - abs = path2.resolve(f); - } - if (process.platform === "win32") - abs = abs.replace(/\\/g, "/"); - return abs; - } - function isIgnored(self2, path3) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return item.matcher.match(path3) || !!(item.gmatcher && item.gmatcher.match(path3)); - }); - } - function childrenIgnored(self2, path3) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path3)); - }); - } - } -}); - -// node_modules/rimraf/node_modules/glob/sync.js -var require_sync7 = __commonJS({ - "node_modules/rimraf/node_modules/glob/sync.js"(exports2, module2) { - module2.exports = globSync; - globSync.GlobSync = GlobSync; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var Glob = require_glob().Glob; - var util = require("util"); - var path2 = require("path"); - var assert = require("assert"); - var isAbsolute2 = require_path_is_absolute(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - function globSync(pattern, options) { - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - return new GlobSync(pattern, options).found; - } - function GlobSync(pattern, options) { - if (!pattern) - throw new Error("must provide pattern"); - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options); - setopts(this, pattern, options); - if (this.noprocess) - return this; - var n = this.minimatch.set.length; - this.matches = new Array(n); - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false); - } - this._finish(); - } - GlobSync.prototype._finish = function() { - assert(this instanceof GlobSync); - if (this.realpath) { - var self2 = this; - this.matches.forEach(function(matchset, index) { - var set2 = self2.matches[index] = /* @__PURE__ */ Object.create(null); - for (var p in matchset) { - try { - p = self2._makeAbs(p); - var real = rp.realpathSync(p, self2.realpathCache); - set2[real] = true; - } catch (er) { - if (er.syscall === "stat") - set2[self2._makeAbs(p)] = true; - else - throw er; - } - } - }); - } - common2.finish(this); - }; - GlobSync.prototype._process = function(pattern, index, inGlobStar) { - assert(this instanceof GlobSync); - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute2(prefix) || isAbsolute2(pattern.join("/"))) { - if (!prefix || !isAbsolute2(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return; - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar); - }; - GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path2.join(this.root, e); - } - this._emitMatch(index, e); - } - return; - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) - newPattern = [prefix, e]; - else - newPattern = [e]; - this._process(newPattern.concat(remain), index, inGlobStar); - } - }; - GlobSync.prototype._emitMatch = function(index, e) { - if (isIgnored(this, e)) - return; - var abs = this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) { - e = abs; - } - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - if (this.stat) - this._stat(e); - }; - GlobSync.prototype._readdirInGlobStar = function(abs) { - if (this.follow) - return this._readdir(abs, false); - var entries; - var lstat; - var stat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er.code === "ENOENT") { - return null; - } - } - var isSym = lstat && lstat.isSymbolicLink(); - this.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = "FILE"; - else - entries = this._readdir(abs, false); - return entries; - }; - GlobSync.prototype._readdir = function(abs, inGlobStar) { - var entries; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return null; - if (Array.isArray(c)) - return c; - } - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)); - } catch (er) { - this._readdirError(abs, er); - return null; - } - }; - GlobSync.prototype._readdirEntries = function(abs, entries) { - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return entries; - }; - GlobSync.prototype._readdirError = function(f, er) { - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - throw error2; - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) - throw er; - if (!this.silent) - console.error("glob error", er); - break; - } - }; - GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false); - var len = entries.length; - var isSym = this.symlinks[abs]; - if (isSym && inGlobStar) - return; - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true); - } - }; - GlobSync.prototype._processSimple = function(prefix, index) { - var exists = this._stat(prefix); - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return; - if (prefix && isAbsolute2(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path2.join(this.root, prefix); - } else { - prefix = path2.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - }; - GlobSync.prototype._stat = function(f) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return false; - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return c; - if (needDir && c === "FILE") - return false; - } - var exists; - var stat = this.statCache[abs]; - if (!stat) { - var lstat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return false; - } - } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs); - } catch (er) { - stat = lstat; - } - } else { - stat = lstat; - } - } - this.statCache[abs] = stat; - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return false; - return c; - }; - GlobSync.prototype._mark = function(p) { - return common2.mark(this, p); - }; - GlobSync.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - } -}); - -// node_modules/inflight/inflight.js -var require_inflight = __commonJS({ - "node_modules/inflight/inflight.js"(exports2, module2) { - var wrappy = require_wrappy(); - var reqs = /* @__PURE__ */ Object.create(null); - var once = require_once(); - module2.exports = wrappy(inflight); - function inflight(key, cb) { - if (reqs[key]) { - reqs[key].push(cb); - return null; - } else { - reqs[key] = [cb]; - return makeres(key); - } - } - function makeres(key) { - return once(function RES() { - var cbs = reqs[key]; - var len = cbs.length; - var args = slice(arguments); - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args); - } - } finally { - if (cbs.length > len) { - cbs.splice(0, len); - process.nextTick(function() { - RES.apply(null, args); - }); - } else { - delete reqs[key]; - } - } - }); - } - function slice(args) { - var length = args.length; - var array = []; - for (var i = 0; i < length; i++) array[i] = args[i]; - return array; - } - } -}); - -// node_modules/rimraf/node_modules/glob/glob.js -var require_glob = __commonJS({ - "node_modules/rimraf/node_modules/glob/glob.js"(exports2, module2) { - module2.exports = glob2; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var inherits = require_inherits(); - var EE = require("events").EventEmitter; - var path2 = require("path"); - var assert = require("assert"); - var isAbsolute2 = require_path_is_absolute(); - var globSync = require_sync7(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var inflight = require_inflight(); - var util = require("util"); - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - var once = require_once(); - function glob2(pattern, options, cb) { - if (typeof options === "function") cb = options, options = {}; - if (!options) options = {}; - if (options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return globSync(pattern, options); - } - return new Glob(pattern, options, cb); - } - glob2.sync = globSync; - var GlobSync = glob2.GlobSync = globSync.GlobSync; - glob2.glob = glob2; - function extend3(origin, add) { - if (add === null || typeof add !== "object") { - return origin; - } - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; - } - glob2.hasMagic = function(pattern, options_) { - var options = extend3({}, options_); - options.noprocess = true; - var g = new Glob(pattern, options); - var set2 = g.minimatch.set; - if (!pattern) - return false; - if (set2.length > 1) - return true; - for (var j = 0; j < set2[0].length; j++) { - if (typeof set2[0][j] !== "string") - return true; - } - return false; - }; - glob2.Glob = Glob; - inherits(Glob, EE); - function Glob(pattern, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - if (options && options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return new GlobSync(pattern, options); - } - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb); - setopts(this, pattern, options); - this._didRealPath = false; - var n = this.minimatch.set.length; - this.matches = new Array(n); - if (typeof cb === "function") { - cb = once(cb); - this.on("error", cb); - this.on("end", function(matches) { - cb(null, matches); - }); - } - var self2 = this; - this._processing = 0; - this._emitQueue = []; - this._processQueue = []; - this.paused = false; - if (this.noprocess) - return this; - if (n === 0) - return done(); - var sync = true; - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false, done); - } - sync = false; - function done() { - --self2._processing; - if (self2._processing <= 0) { - if (sync) { - process.nextTick(function() { - self2._finish(); - }); - } else { - self2._finish(); - } - } - } - } - Glob.prototype._finish = function() { - assert(this instanceof Glob); - if (this.aborted) - return; - if (this.realpath && !this._didRealpath) - return this._realpath(); - common2.finish(this); - this.emit("end", this.found); - }; - Glob.prototype._realpath = function() { - if (this._didRealpath) - return; - this._didRealpath = true; - var n = this.matches.length; - if (n === 0) - return this._finish(); - var self2 = this; - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next); - function next() { - if (--n === 0) - self2._finish(); - } - }; - Glob.prototype._realpathSet = function(index, cb) { - var matchset = this.matches[index]; - if (!matchset) - return cb(); - var found = Object.keys(matchset); - var self2 = this; - var n = found.length; - if (n === 0) - return cb(); - var set2 = this.matches[index] = /* @__PURE__ */ Object.create(null); - found.forEach(function(p, i) { - p = self2._makeAbs(p); - rp.realpath(p, self2.realpathCache, function(er, real) { - if (!er) - set2[real] = true; - else if (er.syscall === "stat") - set2[p] = true; - else - self2.emit("error", er); - if (--n === 0) { - self2.matches[index] = set2; - cb(); - } - }); - }); - }; - Glob.prototype._mark = function(p) { - return common2.mark(this, p); - }; - Glob.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - Glob.prototype.abort = function() { - this.aborted = true; - this.emit("abort"); - }; - Glob.prototype.pause = function() { - if (!this.paused) { - this.paused = true; - this.emit("pause"); - } - }; - Glob.prototype.resume = function() { - if (this.paused) { - this.emit("resume"); - this.paused = false; - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0); - this._emitQueue.length = 0; - for (var i = 0; i < eq.length; i++) { - var e = eq[i]; - this._emitMatch(e[0], e[1]); - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0); - this._processQueue.length = 0; - for (var i = 0; i < pq.length; i++) { - var p = pq[i]; - this._processing--; - this._process(p[0], p[1], p[2], p[3]); - } - } - } - }; - Glob.prototype._process = function(pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === "function"); - if (this.aborted) - return; - this._processing++; - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]); - return; - } - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index, cb); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute2(prefix) || isAbsolute2(pattern.join("/"))) { - if (!prefix || !isAbsolute2(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return cb(); - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); - }; - Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return cb(); - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path2.join(this.root, e); - } - this._emitMatch(index, e); - } - return cb(); - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - this._process([e].concat(remain), index, inGlobStar, cb); - } - cb(); - }; - Glob.prototype._emitMatch = function(index, e) { - if (this.aborted) - return; - if (isIgnored(this, e)) - return; - if (this.paused) { - this._emitQueue.push([index, e]); - return; - } - var abs = isAbsolute2(e) ? e : this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) - e = abs; - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - var st = this.statCache[abs]; - if (st) - this.emit("stat", e, st); - this.emit("match", e); - }; - Glob.prototype._readdirInGlobStar = function(abs, cb) { - if (this.aborted) - return; - if (this.follow) - return this._readdir(abs, false, cb); - var lstatkey = "lstat\0" + abs; - var self2 = this; - var lstatcb = inflight(lstatkey, lstatcb_); - if (lstatcb) - self2.fs.lstat(abs, lstatcb); - function lstatcb_(er, lstat) { - if (er && er.code === "ENOENT") - return cb(); - var isSym = lstat && lstat.isSymbolicLink(); - self2.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) { - self2.cache[abs] = "FILE"; - cb(); - } else - self2._readdir(abs, false, cb); - } - }; - Glob.prototype._readdir = function(abs, inGlobStar, cb) { - if (this.aborted) - return; - cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); - if (!cb) - return; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return cb(); - if (Array.isArray(c)) - return cb(null, c); - } - var self2 = this; - self2.fs.readdir(abs, readdirCb(this, abs, cb)); - }; - function readdirCb(self2, abs, cb) { - return function(er, entries) { - if (er) - self2._readdirError(abs, er, cb); - else - self2._readdirEntries(abs, entries, cb); - }; - } - Glob.prototype._readdirEntries = function(abs, entries, cb) { - if (this.aborted) - return; - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return cb(null, entries); - }; - Glob.prototype._readdirError = function(f, er, cb) { - if (this.aborted) - return; - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - this.emit("error", error2); - this.abort(); - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) { - this.emit("error", er); - this.abort(); - } - if (!this.silent) - console.error("glob error", er); - break; - } - return cb(); - }; - Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false, cb); - var isSym = this.symlinks[abs]; - var len = entries.length; - if (isSym && inGlobStar) - return cb(); - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true, cb); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true, cb); - } - cb(); - }; - Glob.prototype._processSimple = function(prefix, index, cb) { - var self2 = this; - this._stat(prefix, function(er, exists) { - self2._processSimple2(prefix, index, er, exists, cb); - }); - }; - Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return cb(); - if (prefix && isAbsolute2(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path2.join(this.root, prefix); - } else { - prefix = path2.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - cb(); - }; - Glob.prototype._stat = function(f, cb) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return cb(); - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return cb(null, c); - if (needDir && c === "FILE") - return cb(); - } - var exists; - var stat = this.statCache[abs]; - if (stat !== void 0) { - if (stat === false) - return cb(null, stat); - else { - var type2 = stat.isDirectory() ? "DIR" : "FILE"; - if (needDir && type2 === "FILE") - return cb(); - else - return cb(null, type2, stat); - } - } - var self2 = this; - var statcb = inflight("stat\0" + abs, lstatcb_); - if (statcb) - self2.fs.lstat(abs, statcb); - function lstatcb_(er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - return self2.fs.stat(abs, function(er2, stat2) { - if (er2) - self2._stat2(f, abs, null, lstat, cb); - else - self2._stat2(f, abs, er2, stat2, cb); - }); - } else { - self2._stat2(f, abs, er, lstat, cb); - } - } - }; - Glob.prototype._stat2 = function(f, abs, er, stat, cb) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return cb(); - } - var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat; - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) - return cb(null, false, stat); - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return cb(); - return cb(null, c, stat); - }; - } -}); - -// node_modules/rimraf/rimraf.js -var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports2, module2) { - var assert = require("assert"); - var path2 = require("path"); - var fs2 = require("fs"); - var glob2 = void 0; - try { - glob2 = require_glob(); - } catch (_err) { - } - var defaultGlobOpts = { - nosort: true, - silent: true - }; - var timeout = 0; - var isWindows = process.platform === "win32"; - var defaults = (options) => { - const methods = [ - "unlink", - "chmod", - "stat", - "lstat", - "rmdir", - "readdir" - ]; - methods.forEach((m) => { - options[m] = options[m] || fs2[m]; - m = m + "Sync"; - options[m] = options[m] || fs2[m]; - }); - options.maxBusyTries = options.maxBusyTries || 3; - options.emfileWait = options.emfileWait || 1e3; - if (options.glob === false) { - options.disableGlob = true; - } - if (options.disableGlob !== true && glob2 === void 0) { - throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); - } - options.disableGlob = options.disableGlob || false; - options.glob = options.glob || defaultGlobOpts; - }; - var rimraf = (p, options, cb) => { - if (typeof options === "function") { - cb = options; - options = {}; - } - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert.equal(typeof cb, "function", "rimraf: callback function required"); - assert(options, "rimraf: invalid options argument provided"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - defaults(options); - let busyTries = 0; - let errState = null; - let n = 0; - const next = (er) => { - errState = errState || er; - if (--n === 0) - cb(errState); - }; - const afterGlob = (er, results) => { - if (er) - return cb(er); - n = results.length; - if (n === 0) - return cb(); - results.forEach((p2) => { - const CB = (er2) => { - if (er2) { - if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { - busyTries++; - return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); - } - if (er2.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p2, options, CB), timeout++); - } - if (er2.code === "ENOENT") er2 = null; - } - timeout = 0; - next(er2); - }; - rimraf_(p2, options, CB); - }); - }; - if (options.disableGlob || !glob2.hasMagic(p)) - return afterGlob(null, [p]); - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]); - glob2(p, options.glob, afterGlob); - }); - }; - var rimraf_ = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null); - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb); - if (st && st.isDirectory()) - return rmdir(p, options, er, cb); - options.unlink(p, (er2) => { - if (er2) { - if (er2.code === "ENOENT") - return cb(null); - if (er2.code === "EPERM") - return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); - if (er2.code === "EISDIR") - return rmdir(p, options, er2, cb); - } - return cb(er2); - }); - }); - }; - var fixWinEPERM = (p, options, er, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.chmod(p, 438, (er2) => { - if (er2) - cb(er2.code === "ENOENT" ? null : er); - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er); - else if (stats.isDirectory()) - rmdir(p, options, er, cb); - else - options.unlink(p, cb); - }); - }); - }; - var fixWinEPERMSync = (p, options, er) => { - assert(p); - assert(options); - try { - options.chmodSync(p, 438); - } catch (er2) { - if (er2.code === "ENOENT") - return; - else - throw er; - } - let stats; - try { - stats = options.statSync(p); - } catch (er3) { - if (er3.code === "ENOENT") - return; - else - throw er; - } - if (stats.isDirectory()) - rmdirSync(p, options, er); - else - options.unlinkSync(p); - }; - var rmdir = (p, options, originalEr, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.rmdir(p, (er) => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb); - else if (er && er.code === "ENOTDIR") - cb(originalEr); - else - cb(er); - }); - }; - var rmkids = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.readdir(p, (er, files) => { - if (er) - return cb(er); - let n = files.length; - if (n === 0) - return options.rmdir(p, cb); - let errState; - files.forEach((f) => { - rimraf(path2.join(p, f), options, (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--n === 0) - options.rmdir(p, cb); - }); - }); - }); - }; - var rimrafSync = (p, options) => { - options = options || {}; - defaults(options); - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert(options, "rimraf: missing options"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - let results; - if (options.disableGlob || !glob2.hasMagic(p)) { - results = [p]; - } else { - try { - options.lstatSync(p); - results = [p]; - } catch (er) { - results = glob2.sync(p, options.glob); - } - } - if (!results.length) - return; - for (let i = 0; i < results.length; i++) { - const p2 = results[i]; - let st; - try { - st = options.lstatSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p2, options, er); - } - try { - if (st && st.isDirectory()) - rmdirSync(p2, options, null); - else - options.unlinkSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); - if (er.code !== "EISDIR") - throw er; - rmdirSync(p2, options, er); - } - } - }; - var rmdirSync = (p, options, originalEr) => { - assert(p); - assert(options); - try { - options.rmdirSync(p); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "ENOTDIR") - throw originalEr; - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options); - } - }; - var rmkidsSync = (p, options) => { - assert(p); - assert(options); - options.readdirSync(p).forEach((f) => rimrafSync(path2.join(p, f), options)); - const retries = isWindows ? 100 : 1; - let i = 0; - do { - let threw = true; - try { - const ret = options.rmdirSync(p, options); - threw = false; - return ret; - } finally { - if (++i < retries && threw) - continue; - } - } while (true); - }; - module2.exports = rimraf; - rimraf.sync = rimrafSync; - } -}); - -// node_modules/del/node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "node_modules/del/node_modules/indent-string/index.js"(exports2, module2) { - "use strict"; - module2.exports = (string, count = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count)); - }; - } -}); - -// node_modules/del/node_modules/clean-stack/index.js -var require_clean_stack = __commonJS({ - "node_modules/del/node_modules/clean-stack/index.js"(exports2, module2) { - "use strict"; - var os = require("os"); - var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; - var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; - var homeDir = typeof os.homedir === "undefined" ? "" : os.homedir(); - module2.exports = (stack, options) => { - options = Object.assign({ pretty: false }, options); - return stack.replace(/\\/g, "/").split("\n").filter((line) => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - const match = pathMatches[1]; - if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { - return false; - } - return !pathRegex.test(match); - }).filter((line) => line.trim() !== "").map((line) => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); - } - return line; - }).join("\n"); - }; - } -}); - -// node_modules/del/node_modules/aggregate-error/index.js -var require_aggregate_error = __commonJS({ - "node_modules/del/node_modules/aggregate-error/index.js"(exports2, module2) { - "use strict"; - var indentString2 = require_indent_string(); - var cleanStack = require_clean_stack(); - var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - errors = [...errors].map((error2) => { - if (error2 instanceof Error) { - return error2; - } - if (error2 !== null && typeof error2 === "object") { - return Object.assign(new Error(error2.message), error2); - } - return new Error(error2); - }); - let message = errors.map((error2) => { - return typeof error2.stack === "string" ? cleanInternalStack(cleanStack(error2.stack)) : String(error2); - }).join("\n"); - message = "\n" + indentString2(message, 4); - super(message); - this.name = "AggregateError"; - Object.defineProperty(this, "_errors", { value: errors }); - } - *[Symbol.iterator]() { - for (const error2 of this._errors) { - yield error2; - } - } - }; - module2.exports = AggregateError; - } -}); - -// node_modules/del/node_modules/p-map/index.js -var require_p_map = __commonJS({ - "node_modules/del/node_modules/p-map/index.js"(exports2, module2) { - "use strict"; - var AggregateError = require_aggregate_error(); - module2.exports = async (iterable, mapper, { - concurrency = Infinity, - stopOnError = true - } = {}) => { - return new Promise((resolve2, reject) => { - if (typeof mapper !== "function") { - throw new TypeError("Mapper function is required"); - } - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - const next = () => { - if (isRejected) { - return; - } - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - if (nextItem.done) { - isIterableDone = true; - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve2(result); - } - } - return; - } - resolvingCount++; - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error2) { - if (stopOnError) { - isRejected = true; - reject(error2); - } else { - errors.push(error2); - resolvingCount--; - next(); - } - } - })(); - }; - for (let i = 0; i < concurrency; i++) { - next(); - if (isIterableDone) { - break; - } - } - }); - }; - } -}); - -// node_modules/del/index.js -var require_del = __commonJS({ - "node_modules/del/index.js"(exports2, module2) { - "use strict"; - var { promisify } = require("util"); - var path2 = require("path"); - var globby = require_globby(); - var isGlob = require_is_glob(); - var slash = require_slash(); - var gracefulFs = require_graceful_fs(); - var isPathCwd = require_is_path_cwd(); - var isPathInside = require_is_path_inside(); - var rimraf = require_rimraf(); - var pMap = require_p_map(); - var rimrafP = promisify(rimraf); - var rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync - }; - function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); - } - if (!isPathInside(file, cwd)) { - throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); - } - } - function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - patterns = patterns.map((pattern) => { - if (process.platform === "win32" && isGlob(pattern) === false) { - return slash(pattern); - } - return pattern; - }); - return patterns; - } - module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), onProgress = () => { - }, ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); - if (files.length === 0) { - onProgress({ - totalCount: 0, - deletedCount: 0, - percent: 1 - }); - } - let deletedCount = 0; - const mapper = async (file) => { - file = path2.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - deletedCount += 1; - onProgress({ - totalCount: files.length, - deletedCount, - percent: deletedCount / files.length - }); - return file; - }; - const removedFiles = await pMap(files, mapper, options); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); - const removedFiles = files.map((file) => { - file = path2.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - return file; - }); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - } -}); - // node_modules/semver/internal/constants.js -var require_constants9 = __commonJS({ +var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { "use strict"; var SEMVER_SPEC_VERSION = "2.0.0"; @@ -34386,7 +24575,7 @@ var require_re = __commonJS({ MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH - } = require_constants9(); + } = require_constants6(); var debug2 = require_debug(); exports2 = module2.exports = {}; var re = exports2.re = []; @@ -34512,7 +24701,7 @@ var require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports2, module2) { "use strict"; var debug2 = require_debug(); - var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants9(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants6(); var { safeRe: re, t } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); @@ -34769,7 +24958,7 @@ var require_semver = __commonJS({ }); // node_modules/semver/functions/parse.js -var require_parse4 = __commonJS({ +var require_parse2 = __commonJS({ "node_modules/semver/functions/parse.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); @@ -34794,7 +24983,7 @@ var require_parse4 = __commonJS({ var require_valid = __commonJS({ "node_modules/semver/functions/valid.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var valid3 = (version, options) => { const v = parse(version, options); return v ? v.version : null; @@ -34807,7 +24996,7 @@ var require_valid = __commonJS({ var require_clean = __commonJS({ "node_modules/semver/functions/clean.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var clean3 = (version, options) => { const s = parse(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; @@ -34844,7 +25033,7 @@ var require_inc = __commonJS({ var require_diff = __commonJS({ "node_modules/semver/functions/diff.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var diff = (version1, version2) => { const v1 = parse(version1, null, true); const v2 = parse(version2, null, true); @@ -34918,7 +25107,7 @@ var require_patch = __commonJS({ var require_prerelease = __commonJS({ "node_modules/semver/functions/prerelease.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var prerelease = (version, options) => { const parsed = parse(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; @@ -35106,7 +25295,7 @@ var require_coerce = __commonJS({ "node_modules/semver/functions/coerce.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); - var parse = require_parse4(); + var parse = require_parse2(); var { safeRe: re, t } = require_re(); var coerce3 = (version, options) => { if (version instanceof SemVer) { @@ -35342,7 +25531,7 @@ var require_range = __commonJS({ tildeTrimReplace, caretTrimReplace } = require_re(); - var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants9(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants6(); var isNullSet = (c) => c.value === "<0.0.0-0"; var isAny = (c) => c.value === ""; var isSatisfiable = (comparators, options) => { @@ -36154,10 +26343,10 @@ var require_semver2 = __commonJS({ "node_modules/semver/index.js"(exports2, module2) { "use strict"; var internalRe = require_re(); - var constants = require_constants9(); + var constants = require_constants6(); var SemVer = require_semver(); var identifiers = require_identifiers(); - var parse = require_parse4(); + var parse = require_parse2(); var valid3 = require_valid(); var clean3 = require_clean(); var inc = require_inc(); @@ -36287,7 +26476,7 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^6.1.1", + del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -38211,6 +28400,796 @@ var require_internal_pattern_helper = __commonJS({ } }); +// node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str2) { + if (a instanceof RegExp) a = maybeMatch(a, str2); + if (b instanceof RegExp) b = maybeMatch(b, str2); + var r = range(a, b, str2); + return r && { + start: r[0], + end: r[1], + pre: str2.slice(0, r[0]), + body: str2.slice(r[0] + a.length, r[1]), + post: str2.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str2) { + var m = str2.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str2) { + var begs, beg, left, right, result; + var ai = str2.indexOf(a); + var bi = str2.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + begs = []; + left = str2.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str2.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str2.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str2) { + return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + } + function escapeBraces(str2) { + return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str2) { + return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str2) { + if (!str2) + return [""]; + var parts = []; + var m = balanced("{", "}", str2); + if (!m) + return str2.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str2) { + if (!str2) + return []; + if (str2.substr(0, 2) === "{}") { + str2 = "\\{\\}" + str2.substr(2); + } + return expand(escapeBraces(str2), true).map(unescapeBraces); + } + function embrace(str2) { + return "{" + str2 + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte5(i, y) { + return i >= y; + } + function expand(str2, isTop) { + var expansions = []; + var m = balanced("{", "}", str2); + if (!m || /\$$/.test(m.pre)) return [str2]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str2 = m.pre + "{" + m.body + escClose + m.post; + return expand(str2); + } + return [str2]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte5; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path2 = (function() { + try { + return require("path"); + } catch (e) { + } + })() || { + sep: "/" + }; + minimatch.sep = path2.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set2, c) { + set2[c] = true; + return set2; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path2.sep !== "/") { + pattern = pattern.split(path2.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set2 = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug2() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set2); + set2 = this.globParts = set2.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set2); + set2 = set2.map(function(s, si, set3) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set2); + set2 = set2.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set2); + this.set = set2; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_2, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set2 = this.set; + if (!set2.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set2.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path2.sep !== "/") { + f = f.split(path2.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set2 = this.set; + this.debug(this.pattern, "set", set2); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set2.length; i++) { + var pattern = set2[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug( + "matchOne", + { "this": this, file, pattern } + ); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) return true; + } + return false; + } + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { @@ -38789,7 +29768,7 @@ var require_internal_globber = __commonJS({ }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ +var require_glob = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -39988,7 +30967,7 @@ var require_semver3 = __commonJS({ }); // node_modules/@actions/cache/lib/internal/constants.js -var require_constants10 = __commonJS({ +var require_constants7 = __commonJS({ "node_modules/@actions/cache/lib/internal/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40101,14 +31080,14 @@ var require_cacheUtils = __commonJS({ exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); - var glob2 = __importStar4(require_glob2()); + var glob2 = __importStar4(require_glob()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs2 = __importStar4(require("fs")); var path2 = __importStar4(require("path")); var semver8 = __importStar4(require_semver3()); var util = __importStar4(require("util")); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var versionSalt = "1.0"; function createTempDirectory() { return __awaiter4(this, void 0, void 0, function* () { @@ -40786,7 +31765,7 @@ var require_object = __commonJS({ }); // node_modules/@azure/core-util/dist/commonjs/error.js -var require_error2 = __commonJS({ +var require_error = __commonJS({ "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -40948,7 +31927,7 @@ var require_commonjs2 = __commonJS({ Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { return object_js_1.isObject; } }); - var error_js_1 = require_error2(); + var error_js_1 = require_error(); Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { return error_js_1.isError; } }); @@ -41746,7 +32725,7 @@ var require_userAgentPlatform = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants11 = __commonJS({ +var require_constants8 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -41764,7 +32743,7 @@ var require_userAgent = __commonJS({ exports2.getUserAgentHeaderName = getUserAgentHeaderName; exports2.getUserAgentValue = getUserAgentValue; var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { @@ -42293,7 +33272,7 @@ var require_retryPolicy = __commonJS({ var helpers_js_1 = require_helpers(); var logger_1 = require_dist(); var abort_controller_1 = require_commonjs3(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); var retryPolicyName = "retryPolicy"; function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { @@ -42390,7 +33369,7 @@ var require_defaultRetryPolicy = __commonJS({ var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.defaultRetryPolicyName = "defaultRetryPolicy"; function defaultRetryPolicy(options = {}) { var _a; @@ -42699,7 +33678,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common4 = __commonJS({ +var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -43033,7 +34012,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common4()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -43321,7 +34300,7 @@ var require_node = __commonJS({ debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common4()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -44392,7 +35371,7 @@ var require_tracingPolicy = __commonJS({ exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; var core_tracing_1 = require_commonjs4(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); var userAgent_js_1 = require_userAgent(); var log_js_1 = require_log(); var core_util_1 = require_commonjs2(); @@ -44909,7 +35888,7 @@ var require_exponentialRetryPolicy = __commonJS({ exports2.exponentialRetryPolicy = exponentialRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; function exponentialRetryPolicy(options = {}) { var _a; @@ -44931,7 +35910,7 @@ var require_systemErrorRetryPolicy = __commonJS({ exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; function systemErrorRetryPolicy(options = {}) { var _a; @@ -44956,7 +35935,7 @@ var require_throttlingRetryPolicy = __commonJS({ exports2.throttlingRetryPolicy = throttlingRetryPolicy; var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants11(); + var constants_js_1 = require_constants8(); exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; function throttlingRetryPolicy(options = {}) { var _a; @@ -46708,7 +37687,7 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils9 = __commonJS({ +var require_utils5 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -46783,7 +37762,7 @@ var require_serializer = __commonJS({ var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); var base64 = tslib_1.__importStar(require_base64()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils9(); + var utils_js_1 = require_utils5(); var SerializerImpl = class { constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; @@ -48261,7 +39240,7 @@ var require_serviceClient = __commonJS({ exports2.ServiceClient = void 0; var core_rest_pipeline_1 = require_commonjs5(); var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils9(); + var utils_js_1 = require_utils5(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); var urlHelpers_js_1 = require_urlHelpers(); @@ -75693,7 +66672,7 @@ var require_requestUtils = __commonJS({ exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); function isSuccessStatusCode(statusCode) { if (!statusCode) { return false; @@ -75867,7 +66846,7 @@ var require_downloadUtils = __commonJS({ var stream = __importStar4(require("stream")); var util = __importStar4(require("util")); var utils = __importStar4(require_cacheUtils()); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var requestUtils_1 = require_requestUtils(); var abort_controller_1 = require_dist5(); function pipeResponseToStream(response, output) { @@ -81822,7 +72801,7 @@ var require_tar = __commonJS({ var fs_1 = require("fs"); var path2 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { return __awaiter4(this, void 0, void 0, function* () { @@ -82067,7 +73046,7 @@ var require_cache3 = __commonJS({ var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); var config_1 = require_config(); var tar_1 = require_tar(); - var constants_1 = require_constants10(); + var constants_1 = require_constants7(); var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { @@ -85285,7 +76264,7 @@ var require_blob_upload = __commonJS({ }); // node_modules/readdir-glob/node_modules/minimatch/lib/path.js -var require_path2 = __commonJS({ +var require_path = __commonJS({ "node_modules/readdir-glob/node_modules/minimatch/lib/path.js"(exports2, module2) { var isWindows = typeof process === "object" && process && process.platform === "win32"; module2.exports = isWindows ? { sep: "\\" } : { sep: "/" }; @@ -85453,7 +76432,7 @@ var require_minimatch2 = __commonJS({ return new Minimatch(pattern, options).match(p); }; module2.exports = minimatch; - var path2 = require_path2(); + var path2 = require_path(); minimatch.sep = path2.sep; var GLOBSTAR = Symbol("globstar **"); minimatch.GLOBSTAR = GLOBSTAR; @@ -86221,7 +77200,7 @@ var require_readdir_glob = __commonJS({ }); // node_modules/async/dist/async.js -var require_async7 = __commonJS({ +var require_async = __commonJS({ "node_modules/async/dist/async.js"(exports2, module2) { (function(global2, factory) { typeof exports2 === "object" && typeof module2 !== "undefined" ? factory(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.async = {})); @@ -88080,6 +79059,783 @@ var require_async7 = __commonJS({ } }); +// node_modules/graceful-fs/polyfills.js +var require_polyfills = __commonJS({ + "node_modules/graceful-fs/polyfills.js"(exports2, module2) { + var constants = require("constants"); + var origCwd = process.cwd; + var cwd = null; + var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process); + return cwd; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs2) { + if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs2); + } + if (!fs2.lutimes) { + patchLutimes(fs2); + } + fs2.chown = chownFix(fs2.chown); + fs2.fchown = chownFix(fs2.fchown); + fs2.lchown = chownFix(fs2.lchown); + fs2.chmod = chmodFix(fs2.chmod); + fs2.fchmod = chmodFix(fs2.fchmod); + fs2.lchmod = chmodFix(fs2.lchmod); + fs2.chownSync = chownFixSync(fs2.chownSync); + fs2.fchownSync = chownFixSync(fs2.fchownSync); + fs2.lchownSync = chownFixSync(fs2.lchownSync); + fs2.chmodSync = chmodFixSync(fs2.chmodSync); + fs2.fchmodSync = chmodFixSync(fs2.fchmodSync); + fs2.lchmodSync = chmodFixSync(fs2.lchmodSync); + fs2.stat = statFix(fs2.stat); + fs2.fstat = statFix(fs2.fstat); + fs2.lstat = statFix(fs2.lstat); + fs2.statSync = statFixSync(fs2.statSync); + fs2.fstatSync = statFixSync(fs2.fstatSync); + fs2.lstatSync = statFixSync(fs2.lstatSync); + if (fs2.chmod && !fs2.lchmod) { + fs2.lchmod = function(path2, mode, cb) { + if (cb) process.nextTick(cb); + }; + fs2.lchmodSync = function() { + }; + } + if (fs2.chown && !fs2.lchown) { + fs2.lchown = function(path2, uid, gid, cb) { + if (cb) process.nextTick(cb); + }; + fs2.lchownSync = function() { + }; + } + if (platform === "win32") { + fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : (function(fs$rename) { + function rename(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { + setTimeout(function() { + fs2.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er); + }); + }, backoff); + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er); + }); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); + return rename; + })(fs2.rename); + } + fs2.read = typeof fs2.read !== "function" ? fs2.read : (function(fs$read) { + function read(fd, buffer, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _2, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs2, fd, buffer, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs2, fd, buffer, offset, length, position, callback); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); + return read; + })(fs2.read); + fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : /* @__PURE__ */ (function(fs$readSync) { + return function(fd, buffer, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs2, fd, buffer, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + })(fs2.readSync); + function patchLchmod(fs3) { + fs3.lchmod = function(path2, mode, callback) { + fs3.open( + path2, + constants.O_WRONLY | constants.O_SYMLINK, + mode, + function(err, fd) { + if (err) { + if (callback) callback(err); + return; + } + fs3.fchmod(fd, mode, function(err2) { + fs3.close(fd, function(err22) { + if (callback) callback(err2 || err22); + }); + }); + } + ); + }; + fs3.lchmodSync = function(path2, mode) { + var fd = fs3.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode); + var threw = true; + var ret; + try { + ret = fs3.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs3.closeSync(fd); + } catch (er) { + } + } else { + fs3.closeSync(fd); + } + } + return ret; + }; + } + function patchLutimes(fs3) { + if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) { + fs3.lutimes = function(path2, at, mt, cb) { + fs3.open(path2, constants.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) cb(er); + return; + } + fs3.futimes(fd, at, mt, function(er2) { + fs3.close(fd, function(er22) { + if (cb) cb(er2 || er22); + }); + }); + }); + }; + fs3.lutimesSync = function(path2, at, mt) { + var fd = fs3.openSync(path2, constants.O_SYMLINK); + var ret; + var threw = true; + try { + ret = fs3.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs3.closeSync(fd); + } catch (er) { + } + } else { + fs3.closeSync(fd); + } + } + return ret; + }; + } else if (fs3.futimes) { + fs3.lutimes = function(_a, _b, _c, cb) { + if (cb) process.nextTick(cb); + }; + fs3.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) return orig; + return function(target, mode, cb) { + return orig.call(fs2, target, mode, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) return orig; + return function(target, mode) { + try { + return orig.call(fs2, target, mode); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function chownFix(orig) { + if (!orig) return orig; + return function(target, uid, gid, cb) { + return orig.call(fs2, target, uid, gid, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) return orig; + return function(target, uid, gid) { + try { + return orig.call(fs2, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function statFix(orig) { + if (!orig) return orig; + return function(target, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + if (cb) cb.apply(this, arguments); + } + return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) return orig; + return function(target, options) { + var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target); + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + return stats; + }; + } + function chownErOk(er) { + if (!er) + return true; + if (er.code === "ENOSYS") + return true; + var nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true; + } + return false; + } + } + } +}); + +// node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = __commonJS({ + "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { + var Stream = require("stream").Stream; + module2.exports = legacy; + function legacy(fs2) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path2, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path2, options); + Stream.call(this); + var self2 = this; + this.path = path2; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.encoding) this.setEncoding(this.encoding); + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.end === void 0) { + this.end = Infinity; + } else if ("number" !== typeof this.end) { + throw TypeError("end must be a Number"); + } + if (this.start > this.end) { + throw new Error("start must be <= end"); + } + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self2._read(); + }); + return; + } + fs2.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self2.emit("error", err); + self2.readable = false; + return; + } + self2.fd = fd; + self2.emit("open", fd); + self2._read(); + }); + } + function WriteStream(path2, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path2, options); + Stream.call(this); + this.path = path2; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.start < 0) { + throw new Error("start must be >= zero"); + } + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs2.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } + } + } + } +}); + +// node_modules/graceful-fs/clone.js +var require_clone = __commonJS({ + "node_modules/graceful-fs/clone.js"(exports2, module2) { + "use strict"; + module2.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj) { + return obj.__proto__; + }; + function clone(obj) { + if (obj === null || typeof obj !== "object") + return obj; + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) }; + else + var copy = /* @__PURE__ */ Object.create(null); + Object.getOwnPropertyNames(obj).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); + }); + return copy; + } + } +}); + +// node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = __commonJS({ + "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { + var fs2 = require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util = require("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); + } else { + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop() { + } + function publishQueue(context2, queue2) { + Object.defineProperty(context2, gracefulQueue, { + get: function() { + return queue2; + } + }); + } + var debug2 = noop; + if (util.debuglog) + debug2 = util.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug2 = function() { + var m = util.format.apply(util, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs2[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs2, queue); + fs2.close = (function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs2, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }); + return close; + })(fs2.close); + fs2.closeSync = (function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs2, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + })(fs2.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug2(fs2[gracefulQueue]); + require("assert").equal(fs2[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs2[gracefulQueue]); + } + module2.exports = patch(clone(fs2)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) { + module2.exports = patch(fs2); + fs2.__patched = true; + } + function patch(fs3) { + polyfills(fs3); + fs3.gracefulify = patch; + fs3.createReadStream = createReadStream; + fs3.createWriteStream = createWriteStream; + var fs$readFile = fs3.readFile; + fs3.readFile = readFile; + function readFile(path2, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readFile(path2, options, cb); + function go$readFile(path3, options2, cb2, startTime) { + return fs$readFile(path3, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs3.writeFile; + fs3.writeFile = writeFile; + function writeFile(path2, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$writeFile(path2, data, options, cb); + function go$writeFile(path3, data2, options2, cb2, startTime) { + return fs$writeFile(path3, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs3.appendFile; + if (fs$appendFile) + fs3.appendFile = appendFile; + function appendFile(path2, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$appendFile(path2, data, options, cb); + function go$appendFile(path3, data2, options2, cb2, startTime) { + return fs$appendFile(path3, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs3.copyFile; + if (fs$copyFile) + fs3.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs3.readdir; + fs3.readdir = readdir; + var noReaddirOptionVersions = /^v[0-5]\./; + function readdir(path2, options, cb) { + if (typeof options === "function") + cb = options, options = null; + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options2, cb2, startTime) { + return fs$readdir(path3, fs$readdirCallback( + path3, + options2, + cb2, + startTime + )); + } : function go$readdir2(path3, options2, cb2, startTime) { + return fs$readdir(path3, options2, fs$readdirCallback( + path3, + options2, + cb2, + startTime + )); + }; + return go$readdir(path2, options, cb); + function fs$readdirCallback(path3, options2, cb2, startTime) { + return function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([ + go$readdir, + [path3, options2, cb2], + err, + startTime || Date.now(), + Date.now() + ]); + else { + if (files && files.sort) + files.sort(); + if (typeof cb2 === "function") + cb2.call(this, err, files); + } + }; + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs3); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs3.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs3.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs3, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val2) { + ReadStream = val2; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs3, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val2) { + WriteStream = val2; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs3, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val2) { + FileReadStream = val2; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs3, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val2) { + FileWriteStream = val2; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path2, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this; + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream(path2, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this; + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream(path2, options) { + return new fs3.ReadStream(path2, options); + } + function createWriteStream(path2, options) { + return new fs3.WriteStream(path2, options); + } + var fs$open = fs3.open; + fs3.open = open; + function open(path2, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path2, flags, mode, cb); + function go$open(path3, flags2, mode2, cb2, startTime) { + return fs$open(path3, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + return fs3; + } + function enqueue(elem) { + debug2("ENQUEUE", elem[0].name, elem[1]); + fs2[gracefulQueue].push(elem); + retry3(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs2[gracefulQueue].length; ++i) { + if (fs2[gracefulQueue][i].length > 2) { + fs2[gracefulQueue][i][3] = now; + fs2[gracefulQueue][i][4] = now; + } + } + retry3(); + } + function retry3() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs2[gracefulQueue].length === 0) + return; + var elem = fs2[gracefulQueue].shift(); + var fn = elem[0]; + var args = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug2("RETRY", fn.name, args); + fn.apply(null, args); + } else if (Date.now() - startTime >= 6e4) { + debug2("TIMEOUT", fn.name, args); + var cb = args.pop(); + if (typeof cb === "function") + cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + var desiredDelay = Math.min(sinceStart * 1.2, 100); + if (sinceAttempt >= desiredDelay) { + debug2("RETRY", fn.name, args); + fn.apply(null, args.concat([startTime])); + } else { + fs2[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry3, 0); + } + } + } +}); + // node_modules/archiver-utils/node_modules/is-stream/index.js var require_is_stream = __commonJS({ "node_modules/archiver-utils/node_modules/is-stream/index.js"(exports2, module2) { @@ -88149,7 +79905,7 @@ var require_isarray = __commonJS({ }); // node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream.js -var require_stream5 = __commonJS({ +var require_stream = __commonJS({ "node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { module2.exports = require("stream"); } @@ -88282,6 +80038,48 @@ var require_util12 = __commonJS({ } }); +// node_modules/inherits/inherits_browser.js +var require_inherits_browser = __commonJS({ + "node_modules/inherits/inherits_browser.js"(exports2, module2) { + if (typeof Object.create === "function") { + module2.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + module2.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; + } + } +}); + +// node_modules/inherits/inherits.js +var require_inherits = __commonJS({ + "node_modules/inherits/inherits.js"(exports2, module2) { + try { + util = require("util"); + if (typeof util.inherits !== "function") throw ""; + module2.exports = util.inherits; + } catch (e) { + module2.exports = require_inherits_browser(); + } + var util; + } +}); + // node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js var require_BufferList = __commonJS({ "node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports2, module2) { @@ -88458,7 +80256,7 @@ var require_stream_writable = __commonJS({ var internalUtil = { deprecate: require_node2() }; - var Stream = require_stream5(); + var Stream = require_stream(); var Buffer2 = require_safe_buffer().Buffer; var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { }; @@ -89204,7 +81002,7 @@ var require_stream_readable = __commonJS({ var EElistenerCount = function(emitter, type2) { return emitter.listeners(type2).length; }; - var Stream = require_stream5(); + var Stream = require_stream(); var Buffer2 = require_safe_buffer().Buffer; var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { }; @@ -92382,7 +84180,7 @@ var require_process = __commonJS({ }); // node_modules/readable-stream/lib/internal/streams/utils.js -var require_utils10 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/utils.js"(exports2, module2) { "use strict"; var { SymbolAsyncIterator, SymbolIterator, SymbolFor } = require_primordials(); @@ -92614,7 +84412,7 @@ var require_end_of_stream = __commonJS({ isNodeStream, willEmitClose: _willEmitClose, kIsClosedPromise - } = require_utils10(); + } = require_utils6(); var addAbortListener; function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; @@ -92852,7 +84650,7 @@ var require_destroy2 = __commonJS({ AbortError } = require_errors4(); var { Symbol: Symbol2 } = require_primordials(); - var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils10(); + var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils6(); var kDestroy = Symbol2("kDestroy"); var kConstruct = Symbol2("kConstruct"); function checkError(err, w, r) { @@ -93190,7 +84988,7 @@ var require_add_abort_signal = __commonJS({ "use strict"; var { SymbolDispose } = require_primordials(); var { AbortError, codes } = require_errors4(); - var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils10(); + var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils6(); var eos = require_end_of_stream(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2 } = codes; var addAbortListener; @@ -95127,7 +86925,7 @@ var require_duplexify = __commonJS({ isDuplexNodeStream, isReadableStream, isWritableStream - } = require_utils10(); + } = require_utils6(); var eos = require_end_of_stream(); var { AbortError, @@ -95727,7 +87525,7 @@ var require_pipeline3 = __commonJS({ isWebStream, isReadableStream, isReadableFinished - } = require_utils10(); + } = require_utils6(); var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; var PassThrough; var Readable; @@ -96140,7 +87938,7 @@ var require_compose = __commonJS({ isTransformStream, isWritableStream, isReadableStream - } = require_utils10(); + } = require_utils6(); var { AbortError, codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } @@ -96333,7 +88131,7 @@ var require_operators = __commonJS({ var { finished } = require_end_of_stream(); var staticCompose = require_compose(); var { addAbortSignalNoValidate } = require_add_abort_signal(); - var { isWritable, isNodeStream } = require_utils10(); + var { isWritable, isNodeStream } = require_utils6(); var { deprecate } = require_util13(); var { ArrayPrototypePush, @@ -96728,10 +88526,10 @@ var require_promises = __commonJS({ "node_modules/readable-stream/lib/stream/promises.js"(exports2, module2) { "use strict"; var { ArrayPrototypePop, Promise: Promise2 } = require_primordials(); - var { isIterable, isNodeStream, isWebStream } = require_utils10(); + var { isIterable, isNodeStream, isWebStream } = require_utils6(); var { pipelineImpl: pl } = require_pipeline3(); var { finished } = require_end_of_stream(); - require_stream6(); + require_stream2(); function pipeline(...streams) { return new Promise2((resolve2, reject) => { let signal; @@ -96766,7 +88564,7 @@ var require_promises = __commonJS({ }); // node_modules/readable-stream/lib/stream.js -var require_stream6 = __commonJS({ +var require_stream2 = __commonJS({ "node_modules/readable-stream/lib/stream.js"(exports2, module2) { var { Buffer: Buffer2 } = require("buffer"); var { ObjectDefineProperty, ObjectKeys, ReflectApply } = require_primordials(); @@ -96783,7 +88581,7 @@ var require_stream6 = __commonJS({ var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); var promises = require_promises(); - var utils = require_utils10(); + var utils = require_utils6(); var Stream = module2.exports = require_legacy().Stream; Stream.isDestroyed = utils.isDestroyed; Stream.isDisturbed = utils.isDisturbed; @@ -96918,7 +88716,7 @@ var require_ours = __commonJS({ }); module2.exports.Stream = Stream.Stream; } else { - const CustomStream = require_stream6(); + const CustomStream = require_stream2(); const promises = require_promises(); const originalDestroy = CustomStream.Readable.destroy; module2.exports = CustomStream.Readable; @@ -100354,8 +92152,8 @@ var require_commonjs14 = __commonJS({ const noDelete = allowStale || options.noDeleteOnFetchRejection; const bf2 = p; if (this.#valList[index] === p) { - const del4 = !noDelete || bf2.__staleWhileFetching === void 0; - if (del4) { + const del = !noDelete || bf2.__staleWhileFetching === void 0; + if (del) { this.#delete(k, "fetch"); } else if (!allowStaleAborted) { this.#valList[index] = bf2.__staleWhileFetching; @@ -103349,7 +95147,7 @@ var require_commonjs16 = __commonJS({ }); // node_modules/archiver-utils/node_modules/glob/dist/commonjs/pattern.js -var require_pattern2 = __commonJS({ +var require_pattern = __commonJS({ "node_modules/archiver-utils/node_modules/glob/dist/commonjs/pattern.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -103523,13 +95321,13 @@ var require_pattern2 = __commonJS({ }); // node_modules/archiver-utils/node_modules/glob/dist/commonjs/ignore.js -var require_ignore2 = __commonJS({ +var require_ignore = __commonJS({ "node_modules/archiver-utils/node_modules/glob/dist/commonjs/ignore.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Ignore = void 0; var minimatch_1 = require_commonjs13(); - var pattern_js_1 = require_pattern2(); + var pattern_js_1 = require_pattern(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; var Ignore = class { relative; @@ -103859,7 +95657,7 @@ var require_walker = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.GlobStream = exports2.GlobWalker = exports2.GlobUtil = void 0; var minipass_1 = require_commonjs15(); - var ignore_js_1 = require_ignore2(); + var ignore_js_1 = require_ignore(); var processor_js_1 = require_processor(); var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new ignore_js_1.Ignore([ignore], opts) : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) : ignore; var GlobUtil = class { @@ -104193,7 +95991,7 @@ var require_walker = __commonJS({ }); // node_modules/archiver-utils/node_modules/glob/dist/commonjs/glob.js -var require_glob3 = __commonJS({ +var require_glob2 = __commonJS({ "node_modules/archiver-utils/node_modules/glob/dist/commonjs/glob.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -104201,7 +95999,7 @@ var require_glob3 = __commonJS({ var minimatch_1 = require_commonjs13(); var node_url_1 = require("node:url"); var path_scurry_1 = require_commonjs16(); - var pattern_js_1 = require_pattern2(); + var pattern_js_1 = require_pattern(); var walker_js_1 = require_walker(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; var Glob = class { @@ -104438,7 +96236,7 @@ var require_commonjs17 = __commonJS({ exports2.globIterateSync = globIterateSync; exports2.globIterate = globIterate; var minimatch_1 = require_commonjs13(); - var glob_js_1 = require_glob3(); + var glob_js_1 = require_glob2(); var has_magic_js_1 = require_has_magic(); var minimatch_2 = require_commonjs13(); Object.defineProperty(exports2, "escape", { enumerable: true, get: function() { @@ -104447,7 +96245,7 @@ var require_commonjs17 = __commonJS({ Object.defineProperty(exports2, "unescape", { enumerable: true, get: function() { return minimatch_2.unescape; } }); - var glob_js_2 = require_glob3(); + var glob_js_2 = require_glob2(); Object.defineProperty(exports2, "Glob", { enumerable: true, get: function() { return glob_js_2.Glob; } }); @@ -104455,7 +96253,7 @@ var require_commonjs17 = __commonJS({ Object.defineProperty(exports2, "hasMagic", { enumerable: true, get: function() { return has_magic_js_2.hasMagic; } }); - var ignore_js_1 = require_ignore2(); + var ignore_js_1 = require_ignore(); Object.defineProperty(exports2, "Ignore", { enumerable: true, get: function() { return ignore_js_1.Ignore; } }); @@ -104781,7 +96579,7 @@ var require_archiver_utils = __commonJS({ }); // node_modules/archiver/lib/error.js -var require_error3 = __commonJS({ +var require_error2 = __commonJS({ "node_modules/archiver/lib/error.js"(exports2, module2) { var util = require("util"); var ERROR_CODES = { @@ -104818,11 +96616,11 @@ var require_core2 = __commonJS({ "node_modules/archiver/lib/core.js"(exports2, module2) { var fs2 = require("fs"); var glob2 = require_readdir_glob(); - var async = require_async7(); + var async = require_async(); var path2 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; - var ArchiverError = require_error3(); + var ArchiverError = require_error2(); var Transform = require_ours().Transform; var win32 = process.platform === "win32"; var Archiver = function(format, options) { @@ -105550,7 +97348,7 @@ var require_unix_stat = __commonJS({ }); // node_modules/compress-commons/lib/archivers/zip/constants.js -var require_constants12 = __commonJS({ +var require_constants9 = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/constants.js"(exports2, module2) { module2.exports = { WORD: 4, @@ -105634,7 +97432,7 @@ var require_zip_archive_entry = __commonJS({ var ArchiveEntry = require_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); var UnixStat = require_unix_stat(); - var constants = require_constants12(); + var constants = require_constants9(); var zipUtil = require_util14(); var ZipArchiveEntry = module2.exports = function(name) { if (!(this instanceof ZipArchiveEntry)) { @@ -106126,7 +97924,7 @@ var require_zip_archive_output_stream = __commonJS({ var ArchiveOutputStream = require_archive_output_stream(); var ZipArchiveEntry = require_zip_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); - var constants = require_constants12(); + var constants = require_constants9(); var util = require_util15(); var zipUtil = require_util14(); var ZipArchiveOutputStream = module2.exports = function(options) { @@ -106557,7 +98355,7 @@ var require_zip = __commonJS({ }); // node_modules/queue-tick/queue-microtask.js -var require_queue_microtask2 = __commonJS({ +var require_queue_microtask = __commonJS({ "node_modules/queue-tick/queue-microtask.js"(exports2, module2) { module2.exports = typeof queueMicrotask === "function" ? queueMicrotask : (fn) => Promise.resolve().then(fn); } @@ -106566,7 +98364,7 @@ var require_queue_microtask2 = __commonJS({ // node_modules/queue-tick/process-next-tick.js var require_process_next_tick = __commonJS({ "node_modules/queue-tick/process-next-tick.js"(exports2, module2) { - module2.exports = typeof process !== "undefined" && typeof process.nextTick === "function" ? process.nextTick.bind(process) : require_queue_microtask2(); + module2.exports = typeof process !== "undefined" && typeof process.nextTick === "function" ? process.nextTick.bind(process) : require_queue_microtask(); } }); @@ -108524,7 +100322,7 @@ var require_extract = __commonJS({ }); // node_modules/tar-stream/constants.js -var require_constants13 = __commonJS({ +var require_constants10 = __commonJS({ "node_modules/tar-stream/constants.js"(exports2, module2) { var constants = { // just for envs without fs @@ -108548,7 +100346,7 @@ var require_pack = __commonJS({ "node_modules/tar-stream/pack.js"(exports2, module2) { var { Readable, Writable, getStreamError } = require_streamx(); var b4a = require_b4a(); - var constants = require_constants13(); + var constants = require_constants10(); var headers = require_headers2(); var DMODE = 493; var FMODE = 420; @@ -109587,7 +101385,7 @@ var require_context2 = __commonJS({ }); // node_modules/@actions/artifact/node_modules/@actions/github/lib/internal/utils.js -var require_utils11 = __commonJS({ +var require_utils7 = __commonJS({ "node_modules/@actions/artifact/node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { @@ -110112,7 +101910,7 @@ var require_lib3 = __commonJS({ }); // node_modules/whatwg-url/lib/utils.js -var require_utils12 = __commonJS({ +var require_utils8 = __commonJS({ "node_modules/whatwg-url/lib/utils.js"(exports2, module2) { "use strict"; module2.exports.mixin = function mixin(target, source) { @@ -111534,7 +103332,7 @@ var require_URL = __commonJS({ "node_modules/whatwg-url/lib/URL.js"(exports2, module2) { "use strict"; var conversions = require_lib3(); - var utils = require_utils12(); + var utils = require_utils8(); var Impl = require_URL_impl(); var impl = utils.implSymbol; function URL2(url) { @@ -114628,7 +106426,7 @@ var require_dist_node23 = __commonJS({ }); // node_modules/@actions/artifact/node_modules/@actions/github/lib/utils.js -var require_utils13 = __commonJS({ +var require_utils9 = __commonJS({ "node_modules/@actions/artifact/node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { @@ -114657,7 +106455,7 @@ var require_utils13 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; var Context = __importStar4(require_context2()); - var Utils = __importStar4(require_utils11()); + var Utils = __importStar4(require_utils7()); var core_1 = require_dist_node21(); var plugin_rest_endpoint_methods_1 = require_dist_node22(); var plugin_paginate_rest_1 = require_dist_node23(); @@ -114712,7 +106510,7 @@ var require_github2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; var Context = __importStar4(require_context2()); - var utils_1 = require_utils13(); + var utils_1 = require_utils9(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); @@ -115751,7 +107549,7 @@ var require_matcher_stream = __commonJS({ }); // node_modules/unzip-stream/lib/entry.js -var require_entry3 = __commonJS({ +var require_entry = __commonJS({ "node_modules/unzip-stream/lib/entry.js"(exports2, module2) { "use strict"; var stream = require("stream"); @@ -115784,7 +107582,7 @@ var require_unzip_stream = __commonJS({ var util = require("util"); var zlib = require("zlib"); var MatcherStream = require_matcher_stream(); - var Entry = require_entry3(); + var Entry = require_entry(); var states = { STREAM_START: 0, START: 1, @@ -117052,7 +108850,7 @@ var require_get_artifact = __commonJS({ var github_1 = require_github2(); var plugin_retry_1 = require_dist_node25(); var core14 = __importStar4(require_core()); - var utils_1 = require_utils13(); + var utils_1 = require_utils9(); var retry_options_1 = require_retry_options(); var plugin_request_log_1 = require_dist_node24(); var util_1 = require_util11(); @@ -117176,7 +108974,7 @@ var require_delete_artifact = __commonJS({ var github_1 = require_github2(); var user_agent_1 = require_user_agent2(); var retry_options_1 = require_retry_options(); - var utils_1 = require_utils13(); + var utils_1 = require_utils9(); var plugin_request_log_1 = require_dist_node24(); var plugin_retry_1 = require_dist_node25(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); @@ -117282,7 +109080,7 @@ var require_list_artifacts = __commonJS({ var github_1 = require_github2(); var user_agent_1 = require_user_agent2(); var retry_options_1 = require_retry_options(); - var utils_1 = require_utils13(); + var utils_1 = require_utils9(); var plugin_request_log_1 = require_dist_node24(); var plugin_retry_1 = require_dist_node25(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); @@ -118504,7 +110302,7 @@ var require_crc64 = __commonJS({ }); // node_modules/@actions/artifact-legacy/lib/internal/utils.js -var require_utils14 = __commonJS({ +var require_utils10 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/utils.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -118814,7 +110612,7 @@ var require_http_manager = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpManager = void 0; - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var HttpManager = class { constructor(clientCount, userAgent) { if (clientCount < 1) { @@ -119069,7 +110867,7 @@ var require_requestUtils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientRequest = exports2.retry = void 0; - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var core14 = __importStar4(require_core()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { @@ -119190,7 +110988,7 @@ var require_upload_http_client = __commonJS({ var core14 = __importStar4(require_core()); var tmp = __importStar4(require_tmp_promise()); var stream = __importStar4(require("stream")); - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var config_variables_1 = require_config_variables(); var util_1 = require("util"); var url_1 = require("url"); @@ -119581,7 +111379,7 @@ var require_download_http_client = __commonJS({ var fs2 = __importStar4(require("fs")); var core14 = __importStar4(require_core()); var zlib = __importStar4(require("zlib")); - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var url_1 = require("url"); var status_reporter_1 = require_status_reporter(); var perf_hooks_1 = require("perf_hooks"); @@ -119924,7 +111722,7 @@ var require_artifact_client = __commonJS({ var core14 = __importStar4(require_core()); var upload_specification_1 = require_upload_specification(); var upload_http_client_1 = require_upload_http_client(); - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); var download_http_client_1 = require_download_http_client(); var download_specification_1 = require_download_specification(); @@ -122456,7 +114254,7 @@ var require_internal_hash_files = __commonJS({ }); // node_modules/@actions/glob/lib/glob.js -var require_glob4 = __commonJS({ +var require_glob3 = __commonJS({ "node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -122523,7 +114321,6 @@ var io2 = __toESM(require_io()); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); -var import_del = __toESM(require_del()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -125592,11 +117389,9 @@ var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); -var import_del3 = __toESM(require_del()); // src/analyze.ts var io5 = __toESM(require_io()); -var import_del2 = __toESM(require_del()); // src/autobuild.ts var core11 = __toESM(require_core()); @@ -125759,7 +117554,7 @@ var STREAMING_HIGH_WATERMARK_BYTES = 4 * 1024 * 1024; // src/dependency-caching.ts var actionsCache3 = __toESM(require_cache3()); -var glob = __toESM(require_glob4()); +var glob = __toESM(require_glob3()); // src/debug-artifacts.ts async function getArtifactUploaderClient(logger, ghVariant) { @@ -125831,52 +117626,6 @@ undici/lib/fetch/body.js: undici/lib/websocket/frame.js: (*! ws. MIT License. Einar Otto Stangvik *) -is-extglob/index.js: - (*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - *) - -is-glob/index.js: - (*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - *) - -is-number/index.js: - (*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - *) - -to-regex-range/index.js: - (*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - *) - -fill-range/index.js: - (*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - *) - -queue-microtask/index.js: - (*! queue-microtask. MIT License. Feross Aboukhadijeh *) - -run-parallel/index.js: - (*! run-parallel. MIT License. Feross Aboukhadijeh *) - normalize-path/index.js: (*! * normalize-path diff --git a/lib/start-proxy-action.js b/lib/start-proxy-action.js index 3d8c3109f..6664bf4fc 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -44961,9817 +44961,6 @@ var require_github = __commonJS({ } }); -// node_modules/array-union/index.js -var require_array_union = __commonJS({ - "node_modules/array-union/index.js"(exports2, module2) { - "use strict"; - module2.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; - }; - } -}); - -// node_modules/merge2/index.js -var require_merge2 = __commonJS({ - "node_modules/merge2/index.js"(exports2, module2) { - "use strict"; - var Stream = require("stream"); - var PassThrough = Stream.PassThrough; - var slice = Array.prototype.slice; - module2.exports = merge2; - function merge2() { - const streamsQueue = []; - const args = slice.call(arguments); - let merging = false; - let options = args[args.length - 1]; - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop(); - } else { - options = {}; - } - const doEnd = options.end !== false; - const doPipeError = options.pipeError === true; - if (options.objectMode == null) { - options.objectMode = true; - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024; - } - const mergedStream = PassThrough(options); - function addStream() { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)); - } - mergeStream(); - return this; - } - function mergeStream() { - if (merging) { - return; - } - merging = true; - let streams = streamsQueue.shift(); - if (!streams) { - process.nextTick(endStream); - return; - } - if (!Array.isArray(streams)) { - streams = [streams]; - } - let pipesCount = streams.length + 1; - function next() { - if (--pipesCount > 0) { - return; - } - merging = false; - mergeStream(); - } - function pipe(stream) { - function onend() { - stream.removeListener("merge2UnpipeEnd", onend); - stream.removeListener("end", onend); - if (doPipeError) { - stream.removeListener("error", onerror); - } - next(); - } - function onerror(err) { - mergedStream.emit("error", err); - } - if (stream._readableState.endEmitted) { - return next(); - } - stream.on("merge2UnpipeEnd", onend); - stream.on("end", onend); - if (doPipeError) { - stream.on("error", onerror); - } - stream.pipe(mergedStream, { end: false }); - stream.resume(); - } - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]); - } - next(); - } - function endStream() { - merging = false; - mergedStream.emit("queueDrain"); - if (doEnd) { - mergedStream.end(); - } - } - mergedStream.setMaxListeners(0); - mergedStream.add = addStream; - mergedStream.on("unpipe", function(stream) { - stream.emit("merge2UnpipeEnd"); - }); - if (args.length) { - addStream.apply(null, args); - } - return mergedStream; - } - function pauseStreams(streams, options) { - if (!Array.isArray(streams)) { - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)); - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error("Only readable stream can be merged."); - } - streams.pause(); - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options); - } - } - return streams; - } - } -}); - -// node_modules/fast-glob/out/utils/array.js -var require_array = __commonJS({ - "node_modules/fast-glob/out/utils/array.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.splitWhen = exports2.flatten = void 0; - function flatten(items) { - return items.reduce((collection, item) => [].concat(collection, item), []); - } - exports2.flatten = flatten; - function splitWhen(items, predicate) { - const result = [[]]; - let groupIndex = 0; - for (const item of items) { - if (predicate(item)) { - groupIndex++; - result[groupIndex] = []; - } else { - result[groupIndex].push(item); - } - } - return result; - } - exports2.splitWhen = splitWhen; - } -}); - -// node_modules/fast-glob/out/utils/errno.js -var require_errno = __commonJS({ - "node_modules/fast-glob/out/utils/errno.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEnoentCodeError = void 0; - function isEnoentCodeError(error2) { - return error2.code === "ENOENT"; - } - exports2.isEnoentCodeError = isEnoentCodeError; - } -}); - -// node_modules/fast-glob/out/utils/fs.js -var require_fs = __commonJS({ - "node_modules/fast-glob/out/utils/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports2.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/fast-glob/out/utils/path.js -var require_path = __commonJS({ - "node_modules/fast-glob/out/utils/path.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0; - var os = require("os"); - var path2 = require("path"); - var IS_WINDOWS_PLATFORM = os.platform() === "win32"; - var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; - var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; - var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; - var DOS_DEVICE_PATH_RE = /^\\\\([.?])/; - var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; - function unixify(filepath) { - return filepath.replace(/\\/g, "/"); - } - exports2.unixify = unixify; - function makeAbsolute(cwd, filepath) { - return path2.resolve(cwd, filepath); - } - exports2.makeAbsolute = makeAbsolute; - function removeLeadingDotSegment(entry) { - if (entry.charAt(0) === ".") { - const secondCharactery = entry.charAt(1); - if (secondCharactery === "/" || secondCharactery === "\\") { - return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); - } - } - return entry; - } - exports2.removeLeadingDotSegment = removeLeadingDotSegment; - exports2.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; - function escapeWindowsPath(pattern) { - return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports2.escapeWindowsPath = escapeWindowsPath; - function escapePosixPath(pattern) { - return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports2.escapePosixPath = escapePosixPath; - exports2.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; - function convertWindowsPathToPattern(filepath) { - return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/"); - } - exports2.convertWindowsPathToPattern = convertWindowsPathToPattern; - function convertPosixPathToPattern(filepath) { - return escapePosixPath(filepath); - } - exports2.convertPosixPathToPattern = convertPosixPathToPattern; - } -}); - -// node_modules/is-extglob/index.js -var require_is_extglob = __commonJS({ - "node_modules/is-extglob/index.js"(exports2, module2) { - module2.exports = function isExtglob(str2) { - if (typeof str2 !== "string" || str2 === "") { - return false; - } - var match; - while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str2)) { - if (match[2]) return true; - str2 = str2.slice(match.index + match[0].length); - } - return false; - }; - } -}); - -// node_modules/is-glob/index.js -var require_is_glob = __commonJS({ - "node_modules/is-glob/index.js"(exports2, module2) { - var isExtglob = require_is_extglob(); - var chars = { "{": "}", "(": ")", "[": "]" }; - var strictCheck = function(str2) { - if (str2[0] === "!") { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str2.length) { - if (str2[index] === "*") { - return true; - } - if (str2[index + 1] === "?" && /[\].+)]/.test(str2[index])) { - return true; - } - if (closeSquareIndex !== -1 && str2[index] === "[" && str2[index + 1] !== "]") { - if (closeSquareIndex < index) { - closeSquareIndex = str2.indexOf("]", index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - if (closeCurlyIndex !== -1 && str2[index] === "{" && str2[index + 1] !== "}") { - closeCurlyIndex = str2.indexOf("}", index); - if (closeCurlyIndex > index) { - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - if (closeParenIndex !== -1 && str2[index] === "(" && str2[index + 1] === "?" && /[:!=]/.test(str2[index + 2]) && str2[index + 3] !== ")") { - closeParenIndex = str2.indexOf(")", index); - if (closeParenIndex > index) { - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - if (pipeIndex !== -1 && str2[index] === "(" && str2[index + 1] !== "|") { - if (pipeIndex < index) { - pipeIndex = str2.indexOf("|", index); - } - if (pipeIndex !== -1 && str2[pipeIndex + 1] !== ")") { - closeParenIndex = str2.indexOf(")", pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str2.indexOf("\\", pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - if (str2[index] === "\\") { - var open = str2[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str2.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str2[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - var relaxedCheck = function(str2) { - if (str2[0] === "!") { - return true; - } - var index = 0; - while (index < str2.length) { - if (/[*?{}()[\]]/.test(str2[index])) { - return true; - } - if (str2[index] === "\\") { - var open = str2[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str2.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str2[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - module2.exports = function isGlob(str2, options) { - if (typeof str2 !== "string" || str2 === "") { - return false; - } - if (isExtglob(str2)) { - return true; - } - var check = strictCheck; - if (options && options.strict === false) { - check = relaxedCheck; - } - return check(str2); - }; - } -}); - -// node_modules/glob-parent/index.js -var require_glob_parent = __commonJS({ - "node_modules/glob-parent/index.js"(exports2, module2) { - "use strict"; - var isGlob = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str2, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); - } - if (enclosure.test(str2)) { - str2 += slash; - } - str2 += "a"; - do { - str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); - return str2.replace(escaped, "$1"); - }; - } -}); - -// node_modules/braces/lib/utils.js -var require_utils5 = __commonJS({ - "node_modules/braces/lib/utils.js"(exports2) { - "use strict"; - exports2.isInteger = (num) => { - if (typeof num === "number") { - return Number.isInteger(num); - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isInteger(Number(num)); - } - return false; - }; - exports2.find = (node, type2) => node.nodes.find((node2) => node2.type === type2); - exports2.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports2.isInteger(min) || !exports2.isInteger(max)) return false; - return (Number(max) - Number(min)) / Number(step) >= limit; - }; - exports2.escapeNode = (block, n = 0, type2) => { - const node = block.nodes[n]; - if (!node) return; - if (type2 && node.type === type2 || node.type === "open" || node.type === "close") { - if (node.escaped !== true) { - node.value = "\\" + node.value; - node.escaped = true; - } - } - }; - exports2.encloseBrace = (node) => { - if (node.type !== "brace") return false; - if (node.commas >> 0 + node.ranges >> 0 === 0) { - node.invalid = true; - return true; - } - return false; - }; - exports2.isInvalidBrace = (block) => { - if (block.type !== "brace") return false; - if (block.invalid === true || block.dollar) return true; - if (block.commas >> 0 + block.ranges >> 0 === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; - }; - exports2.isOpenOrClose = (node) => { - if (node.type === "open" || node.type === "close") { - return true; - } - return node.open === true || node.close === true; - }; - exports2.reduce = (nodes) => nodes.reduce((acc, node) => { - if (node.type === "text") acc.push(node.value); - if (node.type === "range") node.type = "text"; - return acc; - }, []); - exports2.flatten = (...args) => { - const result = []; - const flat = (arr) => { - for (let i = 0; i < arr.length; i++) { - const ele = arr[i]; - if (Array.isArray(ele)) { - flat(ele); - continue; - } - if (ele !== void 0) { - result.push(ele); - } - } - return result; - }; - flat(args); - return result; - }; - } -}); - -// node_modules/braces/lib/stringify.js -var require_stringify = __commonJS({ - "node_modules/braces/lib/stringify.js"(exports2, module2) { - "use strict"; - var utils = require_utils5(); - module2.exports = (ast, options = {}) => { - const stringify = (node, parent = {}) => { - const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ""; - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return "\\" + node.value; - } - return node.value; - } - if (node.value) { - return node.value; - } - if (node.nodes) { - for (const child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - return stringify(ast); - }; - } -}); - -// node_modules/is-number/index.js -var require_is_number = __commonJS({ - "node_modules/is-number/index.js"(exports2, module2) { - "use strict"; - module2.exports = function(num) { - if (typeof num === "number") { - return num - num === 0; - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; - }; - } -}); - -// node_modules/to-regex-range/index.js -var require_to_regex_range = __commonJS({ - "node_modules/to-regex-range/index.js"(exports2, module2) { - "use strict"; - var isNumber = require_is_number(); - var toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError("toRegexRange: expected the first argument to be a number"); - } - if (max === void 0 || min === max) { - return String(min); - } - if (isNumber(max) === false) { - throw new TypeError("toRegexRange: expected the second argument to be a number."); - } - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === "boolean") { - opts.relaxZeros = opts.strictZeros === false; - } - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap; - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - let a = Math.min(min, max); - let b = Math.max(min, max); - if (Math.abs(a - b) === 1) { - let result = min + "|" + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && positives.length + negatives.length > 1) { - state.result = `(?:${state.result})`; - } - toRegexRange.cache[cacheKey] = state; - return state.result; - }; - function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, "-", false, options) || []; - let onlyPositive = filterPatterns(pos, neg, "", false, options) || []; - let intersected = filterPatterns(neg, pos, "-?", true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join("|"); - } - function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - let stop = countNines(min, nines); - let stops = /* @__PURE__ */ new Set([max]); - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - stop = countZeros(max + 1, zeros) - 1; - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - stops = [...stops]; - stops.sort(compare); - return stops; - } - function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ""; - let count = 0; - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - if (startDigit === stopDigit) { - pattern += startDigit; - } else if (startDigit !== "0" || stopDigit !== "9") { - pattern += toCharacterClass(startDigit, stopDigit, options); - } else { - count++; - } - } - if (count) { - pattern += options.shorthand === true ? "\\d" : "[0-9]"; - } - return { pattern, count: [count], digits }; - } - function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - for (let i = 0; i < ranges.length; i++) { - let max2 = ranges[i]; - let obj = rangeToPattern(String(start), String(max2), options); - let zeros = ""; - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max2 + 1; - continue; - } - if (tok.isPadded) { - zeros = padZeros(max2, tok, options); - } - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max2 + 1; - prev = obj; - } - return tokens; - } - function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - for (let ele of arr) { - let { string } = ele; - if (!intersection && !contains(comparison, "string", string)) { - result.push(prefix + string); - } - if (intersection && contains(comparison, "string", string)) { - result.push(prefix + string); - } - } - return result; - } - function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; - } - function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; - } - function contains(arr, key, val) { - return arr.some((ele) => ele[key] === val); - } - function countNines(min, len) { - return Number(String(min).slice(0, -len) + "9".repeat(len)); - } - function countZeros(integer, zeros) { - return integer - integer % Math.pow(10, zeros); - } - function toQuantifier(digits) { - let [start = 0, stop = ""] = digits; - if (stop || start > 1) { - return `{${start + (stop ? "," + stop : "")}}`; - } - return ""; - } - function toCharacterClass(a, b, options) { - return `[${a}${b - a === 1 ? "" : "-"}${b}]`; - } - function hasPadding(str2) { - return /^-?(0+)\d/.test(str2); - } - function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - switch (diff) { - case 0: - return ""; - case 1: - return relax ? "0?" : "0"; - case 2: - return relax ? "0{0,2}" : "00"; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } - } - toRegexRange.cache = {}; - toRegexRange.clearCache = () => toRegexRange.cache = {}; - module2.exports = toRegexRange; - } -}); - -// node_modules/fill-range/index.js -var require_fill_range = __commonJS({ - "node_modules/fill-range/index.js"(exports2, module2) { - "use strict"; - var util = require("util"); - var toRegexRange = require_to_regex_range(); - var isObject2 = (val) => val !== null && typeof val === "object" && !Array.isArray(val); - var transform = (toNumber) => { - return (value) => toNumber === true ? Number(value) : String(value); - }; - var isValidValue = (value) => { - return typeof value === "number" || typeof value === "string" && value !== ""; - }; - var isNumber = (num) => Number.isInteger(+num); - var zeros = (input) => { - let value = `${input}`; - let index = -1; - if (value[0] === "-") value = value.slice(1); - if (value === "0") return false; - while (value[++index] === "0") ; - return index > 0; - }; - var stringify = (start, end, options) => { - if (typeof start === "string" || typeof end === "string") { - return true; - } - return options.stringify === true; - }; - var pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === "-" ? "-" : ""; - if (dash) input = input.slice(1); - input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); - } - if (toNumber === false) { - return String(input); - } - return input; - }; - var toMaxLen = (input, maxLength) => { - let negative = input[0] === "-" ? "-" : ""; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = "0" + input; - return negative ? "-" + input : input; - }; - var toSequence = (parts, options, maxLen) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - let prefix = options.capture ? "" : "?:"; - let positives = ""; - let negatives = ""; - let result; - if (parts.positives.length) { - positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|"); - } - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`; - } - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - if (options.wrap) { - return `(${prefix}${result})`; - } - return result; - }; - var toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - let start = String.fromCharCode(a); - if (a === b) return start; - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; - }; - var toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? "" : "?:"; - return wrap ? `(${prefix}${start.join("|")})` : start.join("|"); - } - return toRegexRange(start, end, options); - }; - var rangeError = (...args) => { - return new RangeError("Invalid range arguments: " + util.inspect(...args)); - }; - var invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - }; - var invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; - }; - var fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - if (a === 0) a = 0; - if (b === 0) b = 0; - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - let parts = { negatives: [], positives: [] }; - let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: false, ...options }); - } - return range; - }; - var fillLetters = (start, end, step = 1, options = {}) => { - if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) { - return invalidRange(start, end, options); - } - let format = options.transform || ((val) => String.fromCharCode(val)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - return range; - }; - var fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - if (typeof step === "function") { - return fill(start, end, 1, { transform: step }); - } - if (isObject2(step)) { - return fill(start, end, 0, step); - } - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - if (!isNumber(step)) { - if (step != null && !isObject2(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); - }; - module2.exports = fill; - } -}); - -// node_modules/braces/lib/compile.js -var require_compile = __commonJS({ - "node_modules/braces/lib/compile.js"(exports2, module2) { - "use strict"; - var fill = require_fill_range(); - var utils = require_utils5(); - var compile = (ast, options = {}) => { - const walk = (node, parent = {}) => { - const invalidBlock = utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - const invalid = invalidBlock === true || invalidNode === true; - const prefix = options.escapeInvalid === true ? "\\" : ""; - let output = ""; - if (node.isOpen === true) { - return prefix + node.value; - } - if (node.isClose === true) { - console.log("node.isClose", prefix, node.value); - return prefix + node.value; - } - if (node.type === "open") { - return invalid ? prefix + node.value : "("; - } - if (node.type === "close") { - return invalid ? prefix + node.value : ")"; - } - if (node.type === "comma") { - return node.prev.type === "comma" ? "" : invalid ? node.value : "|"; - } - if (node.value) { - return node.value; - } - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - if (node.nodes) { - for (const child of node.nodes) { - output += walk(child, node); - } - } - return output; - }; - return walk(ast); - }; - module2.exports = compile; - } -}); - -// node_modules/braces/lib/expand.js -var require_expand = __commonJS({ - "node_modules/braces/lib/expand.js"(exports2, module2) { - "use strict"; - var fill = require_fill_range(); - var stringify = require_stringify(); - var utils = require_utils5(); - var append = (queue = "", stash = "", enclose = false) => { - const result = []; - queue = [].concat(queue); - stash = [].concat(stash); - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash; - } - for (const item of queue) { - if (Array.isArray(item)) { - for (const value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === "string") ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); - } - } - } - return utils.flatten(result); - }; - var expand = (ast, options = {}) => { - const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit; - const walk = (node, parent = {}) => { - node.queue = []; - let p = parent; - let q = parent.queue; - while (p.type !== "brace" && p.type !== "root" && p.parent) { - p = p.parent; - q = p.queue; - } - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ["{}"])); - return; - } - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); - } - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - const enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - while (block.type !== "brace" && block.type !== "root" && block.parent) { - block = block.parent; - queue = block.queue; - } - for (let i = 0; i < node.nodes.length; i++) { - const child = node.nodes[i]; - if (child.type === "comma" && node.type === "brace") { - if (i === 1) queue.push(""); - queue.push(""); - continue; - } - if (child.type === "close") { - q.push(append(q.pop(), queue, enclose)); - continue; - } - if (child.value && child.type !== "open") { - queue.push(append(queue.pop(), child.value)); - continue; - } - if (child.nodes) { - walk(child, node); - } - } - return queue; - }; - return utils.flatten(walk(ast)); - }; - module2.exports = expand; - } -}); - -// node_modules/braces/lib/constants.js -var require_constants7 = __commonJS({ - "node_modules/braces/lib/constants.js"(exports2, module2) { - "use strict"; - module2.exports = { - MAX_LENGTH: 1e4, - // Digits - CHAR_0: "0", - /* 0 */ - CHAR_9: "9", - /* 9 */ - // Alphabet chars. - CHAR_UPPERCASE_A: "A", - /* A */ - CHAR_LOWERCASE_A: "a", - /* a */ - CHAR_UPPERCASE_Z: "Z", - /* Z */ - CHAR_LOWERCASE_Z: "z", - /* z */ - CHAR_LEFT_PARENTHESES: "(", - /* ( */ - CHAR_RIGHT_PARENTHESES: ")", - /* ) */ - CHAR_ASTERISK: "*", - /* * */ - // Non-alphabetic chars. - CHAR_AMPERSAND: "&", - /* & */ - CHAR_AT: "@", - /* @ */ - CHAR_BACKSLASH: "\\", - /* \ */ - CHAR_BACKTICK: "`", - /* ` */ - CHAR_CARRIAGE_RETURN: "\r", - /* \r */ - CHAR_CIRCUMFLEX_ACCENT: "^", - /* ^ */ - CHAR_COLON: ":", - /* : */ - CHAR_COMMA: ",", - /* , */ - CHAR_DOLLAR: "$", - /* . */ - CHAR_DOT: ".", - /* . */ - CHAR_DOUBLE_QUOTE: '"', - /* " */ - CHAR_EQUAL: "=", - /* = */ - CHAR_EXCLAMATION_MARK: "!", - /* ! */ - CHAR_FORM_FEED: "\f", - /* \f */ - CHAR_FORWARD_SLASH: "/", - /* / */ - CHAR_HASH: "#", - /* # */ - CHAR_HYPHEN_MINUS: "-", - /* - */ - CHAR_LEFT_ANGLE_BRACKET: "<", - /* < */ - CHAR_LEFT_CURLY_BRACE: "{", - /* { */ - CHAR_LEFT_SQUARE_BRACKET: "[", - /* [ */ - CHAR_LINE_FEED: "\n", - /* \n */ - CHAR_NO_BREAK_SPACE: "\xA0", - /* \u00A0 */ - CHAR_PERCENT: "%", - /* % */ - CHAR_PLUS: "+", - /* + */ - CHAR_QUESTION_MARK: "?", - /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: ">", - /* > */ - CHAR_RIGHT_CURLY_BRACE: "}", - /* } */ - CHAR_RIGHT_SQUARE_BRACKET: "]", - /* ] */ - CHAR_SEMICOLON: ";", - /* ; */ - CHAR_SINGLE_QUOTE: "'", - /* ' */ - CHAR_SPACE: " ", - /* */ - CHAR_TAB: " ", - /* \t */ - CHAR_UNDERSCORE: "_", - /* _ */ - CHAR_VERTICAL_LINE: "|", - /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF" - /* \uFEFF */ - }; - } -}); - -// node_modules/braces/lib/parse.js -var require_parse3 = __commonJS({ - "node_modules/braces/lib/parse.js"(exports2, module2) { - "use strict"; - var stringify = require_stringify(); - var { - MAX_LENGTH, - CHAR_BACKSLASH, - /* \ */ - CHAR_BACKTICK, - /* ` */ - CHAR_COMMA: CHAR_COMMA2, - /* , */ - CHAR_DOT, - /* . */ - CHAR_LEFT_PARENTHESES, - /* ( */ - CHAR_RIGHT_PARENTHESES, - /* ) */ - CHAR_LEFT_CURLY_BRACE, - /* { */ - CHAR_RIGHT_CURLY_BRACE, - /* } */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, - /* [ */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2, - /* ] */ - CHAR_DOUBLE_QUOTE: CHAR_DOUBLE_QUOTE2, - /* " */ - CHAR_SINGLE_QUOTE: CHAR_SINGLE_QUOTE2, - /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE - } = require_constants7(); - var parse = (input, options = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - const opts = options || {}; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - const ast = { type: "root", input, nodes: [] }; - const stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - const length = input.length; - let index = 0; - let depth = 0; - let value; - const advance = () => input[index++]; - const push = (node) => { - if (node.type === "text" && prev.type === "dot") { - prev.type = "text"; - } - if (prev && prev.type === "text" && node.type === "text") { - prev.value += node.value; - return; - } - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - push({ type: "bos" }); - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - if (value === CHAR_BACKSLASH) { - push({ type: "text", value: (options.keepEscaping ? value : "") + advance() }); - continue; - } - if (value === CHAR_RIGHT_SQUARE_BRACKET2) { - push({ type: "text", value: "\\" + value }); - continue; - } - if (value === CHAR_LEFT_SQUARE_BRACKET2) { - brackets++; - let next; - while (index < length && (next = advance())) { - value += next; - if (next === CHAR_LEFT_SQUARE_BRACKET2) { - brackets++; - continue; - } - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { - brackets--; - if (brackets === 0) { - break; - } - } - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: "paren", nodes: [] }); - stack.push(block); - push({ type: "text", value }); - continue; - } - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== "paren") { - push({ type: "text", value }); - continue; - } - block = stack.pop(); - push({ type: "text", value }); - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_DOUBLE_QUOTE2 || value === CHAR_SINGLE_QUOTE2 || value === CHAR_BACKTICK) { - const open = value; - let next; - if (options.keepQuotes !== true) { - value = ""; - } - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - value += next; - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true; - const brace = { - type: "brace", - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - block = push(brace); - stack.push(block); - push({ type: "open", value }); - continue; - } - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== "brace") { - push({ type: "text", value }); - continue; - } - const type2 = "close"; - block = stack.pop(); - block.close = true; - push({ type: type2, value }); - depth--; - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_COMMA2 && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - const open = block.nodes.shift(); - block.nodes = [open, { type: "text", value: stringify(block) }]; - } - push({ type: "comma", value }); - block.commas++; - continue; - } - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - const siblings = block.nodes; - if (depth === 0 || siblings.length === 0) { - push({ type: "text", value }); - continue; - } - if (prev.type === "dot") { - block.range = []; - prev.value += value; - prev.type = "range"; - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = "text"; - continue; - } - block.ranges++; - block.args = []; - continue; - } - if (prev.type === "range") { - siblings.pop(); - const before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - push({ type: "dot", value }); - continue; - } - push({ type: "text", value }); - } - do { - block = stack.pop(); - if (block.type !== "root") { - block.nodes.forEach((node) => { - if (!node.nodes) { - if (node.type === "open") node.isOpen = true; - if (node.type === "close") node.isClose = true; - if (!node.nodes) node.type = "text"; - node.invalid = true; - } - }); - const parent = stack[stack.length - 1]; - const index2 = parent.nodes.indexOf(block); - parent.nodes.splice(index2, 1, ...block.nodes); - } - } while (stack.length > 0); - push({ type: "eos" }); - return ast; - }; - module2.exports = parse; - } -}); - -// node_modules/braces/index.js -var require_braces = __commonJS({ - "node_modules/braces/index.js"(exports2, module2) { - "use strict"; - var stringify = require_stringify(); - var compile = require_compile(); - var expand = require_expand(); - var parse = require_parse3(); - var braces = (input, options = {}) => { - let output = []; - if (Array.isArray(input)) { - for (const pattern of input) { - const result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; - }; - braces.parse = (input, options = {}) => parse(input, options); - braces.stringify = (input, options = {}) => { - if (typeof input === "string") { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); - }; - braces.compile = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - return compile(input, options); - }; - braces.expand = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - let result = expand(input, options); - if (options.noempty === true) { - result = result.filter(Boolean); - } - if (options.nodupes === true) { - result = [...new Set(result)]; - } - return result; - }; - braces.create = (input, options = {}) => { - if (input === "" || input.length < 3) { - return [input]; - } - return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); - }; - module2.exports = braces; - } -}); - -// node_modules/picomatch/lib/constants.js -var require_constants8 = __commonJS({ - "node_modules/picomatch/lib/constants.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - var WIN_SLASH = "\\\\/"; - var WIN_NO_SLASH = `[^${WIN_SLASH}]`; - var DOT_LITERAL = "\\."; - var PLUS_LITERAL = "\\+"; - var QMARK_LITERAL = "\\?"; - var SLASH_LITERAL = "\\/"; - var ONE_CHAR = "(?=.)"; - var QMARK = "[^/]"; - var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; - var START_ANCHOR = `(?:^|${SLASH_LITERAL})`; - var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; - var NO_DOT = `(?!${DOT_LITERAL})`; - var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; - var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; - var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; - var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; - var STAR = `${QMARK}*?`; - var POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR - }; - var WINDOWS_CHARS = { - ...POSIX_CHARS, - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` - }; - var POSIX_REGEX_SOURCE = { - alnum: "a-zA-Z0-9", - alpha: "a-zA-Z", - ascii: "\\x00-\\x7F", - blank: " \\t", - cntrl: "\\x00-\\x1F\\x7F", - digit: "0-9", - graph: "\\x21-\\x7E", - lower: "a-z", - print: "\\x20-\\x7E ", - punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", - space: " \\t\\r\\n\\v\\f", - upper: "A-Z", - word: "A-Za-z0-9_", - xdigit: "A-Fa-f0-9" - }; - module2.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - "***": "*", - "**/**": "**", - "**/**/**": "**" - }, - // Digits - CHAR_0: 48, - /* 0 */ - CHAR_9: 57, - /* 9 */ - // Alphabet chars. - CHAR_UPPERCASE_A: 65, - /* A */ - CHAR_LOWERCASE_A: 97, - /* a */ - CHAR_UPPERCASE_Z: 90, - /* Z */ - CHAR_LOWERCASE_Z: 122, - /* z */ - CHAR_LEFT_PARENTHESES: 40, - /* ( */ - CHAR_RIGHT_PARENTHESES: 41, - /* ) */ - CHAR_ASTERISK: 42, - /* * */ - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, - /* & */ - CHAR_AT: 64, - /* @ */ - CHAR_BACKWARD_SLASH: 92, - /* \ */ - CHAR_CARRIAGE_RETURN: 13, - /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, - /* ^ */ - CHAR_COLON: 58, - /* : */ - CHAR_COMMA: 44, - /* , */ - CHAR_DOT: 46, - /* . */ - CHAR_DOUBLE_QUOTE: 34, - /* " */ - CHAR_EQUAL: 61, - /* = */ - CHAR_EXCLAMATION_MARK: 33, - /* ! */ - CHAR_FORM_FEED: 12, - /* \f */ - CHAR_FORWARD_SLASH: 47, - /* / */ - CHAR_GRAVE_ACCENT: 96, - /* ` */ - CHAR_HASH: 35, - /* # */ - CHAR_HYPHEN_MINUS: 45, - /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, - /* < */ - CHAR_LEFT_CURLY_BRACE: 123, - /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, - /* [ */ - CHAR_LINE_FEED: 10, - /* \n */ - CHAR_NO_BREAK_SPACE: 160, - /* \u00A0 */ - CHAR_PERCENT: 37, - /* % */ - CHAR_PLUS: 43, - /* + */ - CHAR_QUESTION_MARK: 63, - /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, - /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, - /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, - /* ] */ - CHAR_SEMICOLON: 59, - /* ; */ - CHAR_SINGLE_QUOTE: 39, - /* ' */ - CHAR_SPACE: 32, - /* */ - CHAR_TAB: 9, - /* \t */ - CHAR_UNDERSCORE: 95, - /* _ */ - CHAR_VERTICAL_LINE: 124, - /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, - /* \uFEFF */ - SEP: path2.sep, - /** - * Create EXTGLOB_CHARS - */ - extglobChars(chars) { - return { - "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` }, - "?": { type: "qmark", open: "(?:", close: ")?" }, - "+": { type: "plus", open: "(?:", close: ")+" }, - "*": { type: "star", open: "(?:", close: ")*" }, - "@": { type: "at", open: "(?:", close: ")" } - }; - }, - /** - * Create GLOB_CHARS - */ - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } - }; - } -}); - -// node_modules/picomatch/lib/utils.js -var require_utils6 = __commonJS({ - "node_modules/picomatch/lib/utils.js"(exports2) { - "use strict"; - var path2 = require("path"); - var win32 = process.platform === "win32"; - var { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL - } = require_constants8(); - exports2.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val); - exports2.hasRegexChars = (str2) => REGEX_SPECIAL_CHARS.test(str2); - exports2.isRegexChar = (str2) => str2.length === 1 && exports2.hasRegexChars(str2); - exports2.escapeRegex = (str2) => str2.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); - exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/"); - exports2.removeBackslashes = (str2) => { - return str2.replace(REGEX_REMOVE_BACKSLASH, (match) => { - return match === "\\" ? "" : match; - }); - }; - exports2.supportsLookbehinds = () => { - const segs = process.version.slice(1).split(".").map(Number); - if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) { - return true; - } - return false; - }; - exports2.isWindows = (options) => { - if (options && typeof options.windows === "boolean") { - return options.windows; - } - return win32 === true || path2.sep === "\\"; - }; - exports2.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === "\\") return exports2.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; - }; - exports2.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith("./")) { - output = output.slice(2); - state.prefix = "./"; - } - return output; - }; - exports2.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? "" : "^"; - const append = options.contains ? "" : "$"; - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; - }; - } -}); - -// node_modules/picomatch/lib/scan.js -var require_scan = __commonJS({ - "node_modules/picomatch/lib/scan.js"(exports2, module2) { - "use strict"; - var utils = require_utils6(); - var { - CHAR_ASTERISK: CHAR_ASTERISK2, - /* * */ - CHAR_AT, - /* @ */ - CHAR_BACKWARD_SLASH, - /* \ */ - CHAR_COMMA: CHAR_COMMA2, - /* , */ - CHAR_DOT, - /* . */ - CHAR_EXCLAMATION_MARK, - /* ! */ - CHAR_FORWARD_SLASH, - /* / */ - CHAR_LEFT_CURLY_BRACE, - /* { */ - CHAR_LEFT_PARENTHESES, - /* ( */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, - /* [ */ - CHAR_PLUS, - /* + */ - CHAR_QUESTION_MARK, - /* ? */ - CHAR_RIGHT_CURLY_BRACE, - /* } */ - CHAR_RIGHT_PARENTHESES, - /* ) */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2 - /* ] */ - } = require_constants8(); - var isPathSeparator = (code) => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; - }; - var depth = (token) => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } - }; - var scan = (input, options) => { - const opts = options || {}; - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - let str2 = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: "", depth: 0, isGlob: false }; - const eos = () => index >= length; - const peek = () => str2.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str2.charCodeAt(++index); - }; - while (index < length) { - code = advance(); - let next; - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA2) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: "", depth: 0, isGlob: false }; - if (finished === true) continue; - if (prev === CHAR_DOT && index === start + 1) { - start += 2; - continue; - } - lastIndex = index + 1; - continue; - } - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_LEFT_SQUARE_BRACKET2) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - if (isGlob === true) { - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - let base = str2; - let prefix = ""; - let glob = ""; - if (start > 0) { - prefix = str2.slice(0, start); - str2 = str2.slice(start); - lastIndex -= start; - } - if (base && isGlob === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob = str2.slice(lastIndex); - } else if (isGlob === true) { - base = ""; - glob = str2; - } else { - base = str2; - } - if (base && base !== "" && base !== "/" && base !== str2) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - if (opts.unescape === true) { - if (glob) glob = utils.removeBackslashes(glob); - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - const state = { - prefix, - input, - start, - base, - glob, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== "") { - parts.push(value); - } - prevIndex = i; - } - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - state.slashes = slashes; - state.parts = parts; - } - return state; - }; - module2.exports = scan; - } -}); - -// node_modules/picomatch/lib/parse.js -var require_parse4 = __commonJS({ - "node_modules/picomatch/lib/parse.js"(exports2, module2) { - "use strict"; - var constants = require_constants8(); - var utils = require_utils6(); - var { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS - } = constants; - var expandRange = (args, options) => { - if (typeof options.expandRange === "function") { - return options.expandRange(...args, options); - } - args.sort(); - const value = `[${args.join("-")}]`; - try { - new RegExp(value); - } catch (ex) { - return args.map((v) => utils.escapeRegex(v)).join(".."); - } - return value; - }; - var syntaxError = (type2, char) => { - return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; - }; - var parse = (input, options) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - input = REPLACEMENTS[input] || input; - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - const bos = { type: "bos", value: "", output: opts.prepend || "" }; - const tokens = [bos]; - const capture = opts.capture ? "" : "?:"; - const win32 = utils.isWindows(options); - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - const globstar = (opts2) => { - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const nodot = opts.dot ? "" : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - if (opts.capture) { - star = `(${star})`; - } - if (typeof opts.noext === "boolean") { - opts.noextglob = opts.noext; - } - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: "", - output: "", - prefix: "", - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - input = utils.removePrefix(input, state); - len = input.length; - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ""; - const remaining = () => input.slice(state.index + 1); - const consume = (value2 = "", num = 0) => { - state.consumed += value2; - state.index += num; - }; - const append = (token) => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - const negate = () => { - let count = 1; - while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { - advance(); - state.start++; - count++; - } - if (count % 2 === 0) { - return false; - } - state.negated = true; - state.start++; - return true; - }; - const increment = (type2) => { - state[type2]++; - stack.push(type2); - }; - const decrement = (type2) => { - state[type2]--; - stack.pop(); - }; - const push = (tok) => { - if (prev.type === "globstar") { - const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); - const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); - if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = "star"; - prev.value = "*"; - prev.output = star; - state.output += prev.output; - } - } - if (extglobs.length && tok.type !== "paren") { - extglobs[extglobs.length - 1].inner += tok.value; - } - if (tok.value || tok.output) append(tok); - if (prev && prev.type === "text" && tok.type === "text") { - prev.value += tok.value; - prev.output = (prev.output || "") + tok.value; - return; - } - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - const extglobOpen = (type2, value2) => { - const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? "(" : "") + token.open; - increment("parens"); - push({ type: type2, value: value2, output: state.output ? "" : ONE_CHAR }); - push({ type: "paren", extglob: true, value: advance(), output }); - extglobs.push(token); - }; - const extglobClose = (token) => { - let output = token.close + (opts.capture ? ")" : ""); - let rest; - if (token.type === "negate") { - let extglobStar = star; - if (token.inner && token.inner.length > 1 && token.inner.includes("/")) { - extglobStar = globstar(opts); - } - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - const expression = parse(rest, { ...options, fastpaths: false }).output; - output = token.close = `)${expression})${extglobStar})`; - } - if (token.prev.type === "bos") { - state.negatedExtglob = true; - } - } - push({ type: "paren", extglob: true, value, output }); - decrement("parens"); - }; - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === "\\") { - backslashes = true; - return m; - } - if (first === "?") { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ""); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); - } - return QMARK.repeat(chars.length); - } - if (first === ".") { - return DOT_LITERAL.repeat(chars.length); - } - if (first === "*") { - if (esc) { - return esc + first + (rest ? star : ""); - } - return star; - } - return esc ? m : `\\${m}`; - }); - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ""); - } else { - output = output.replace(/\\+/g, (m) => { - return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; - }); - } - } - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - state.output = utils.wrapOutput(output, state, options); - return state; - } - while (!eos()) { - value = advance(); - if (value === "\0") { - continue; - } - if (value === "\\") { - const next = peek(); - if (next === "/" && opts.bash !== true) { - continue; - } - if (next === "." || next === ";") { - continue; - } - if (!next) { - value += "\\"; - push({ type: "text", value }); - continue; - } - const match = /^\\+/.exec(remaining()); - let slashes = 0; - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += "\\"; - } - } - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - if (state.brackets === 0) { - push({ type: "text", value }); - continue; - } - } - if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { - if (opts.posix !== false && value === ":") { - const inner = prev.value.slice(1); - if (inner.includes("[")) { - prev.posix = true; - if (inner.includes(":")) { - const idx = prev.value.lastIndexOf("["); - const pre = prev.value.slice(0, idx); - const rest2 = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest2]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") { - value = `\\${value}`; - } - if (value === "]" && (prev.value === "[" || prev.value === "[^")) { - value = `\\${value}`; - } - if (opts.posix === true && value === "!" && prev.value === "[") { - value = "^"; - } - prev.value += value; - append({ value }); - continue; - } - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: "text", value }); - } - continue; - } - if (value === "(") { - increment("parens"); - push({ type: "paren", value }); - continue; - } - if (value === ")") { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "(")); - } - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - push({ type: "paren", value, output: state.parens ? ")" : "\\)" }); - decrement("parens"); - continue; - } - if (value === "[") { - if (opts.nobracket === true || !remaining().includes("]")) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("closing", "]")); - } - value = `\\${value}`; - } else { - increment("brackets"); - } - push({ type: "bracket", value }); - continue; - } - if (value === "]") { - if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { - push({ type: "text", value, output: `\\${value}` }); - continue; - } - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "[")); - } - push({ type: "text", value, output: `\\${value}` }); - continue; - } - decrement("brackets"); - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) { - value = `/${value}`; - } - prev.value += value; - append({ value }); - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - if (value === "{" && opts.nobrace !== true) { - increment("braces"); - const open = { - type: "brace", - value, - output: "(", - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - braces.push(open); - push(open); - continue; - } - if (value === "}") { - const brace = braces[braces.length - 1]; - if (opts.nobrace === true || !brace) { - push({ type: "text", value, output: value }); - continue; - } - let output = ")"; - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === "brace") { - break; - } - if (arr[i].type !== "dots") { - range.unshift(arr[i].value); - } - } - output = expandRange(range, opts); - state.backtrack = true; - } - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = "\\{"; - value = output = "\\}"; - state.output = out; - for (const t of toks) { - state.output += t.output || t.value; - } - } - push({ type: "brace", value, output }); - decrement("braces"); - braces.pop(); - continue; - } - if (value === "|") { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: "text", value }); - continue; - } - if (value === ",") { - let output = value; - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === "braces") { - brace.comma = true; - output = "|"; - } - push({ type: "comma", value, output }); - continue; - } - if (value === "/") { - if (prev.type === "dot" && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ""; - state.output = ""; - tokens.pop(); - prev = bos; - continue; - } - push({ type: "slash", value, output: SLASH_LITERAL }); - continue; - } - if (value === ".") { - if (state.braces > 0 && prev.type === "dot") { - if (prev.value === ".") prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = "dots"; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { - push({ type: "text", value, output: DOT_LITERAL }); - continue; - } - push({ type: "dot", value, output: DOT_LITERAL }); - continue; - } - if (value === "?") { - const isGroup = prev && prev.value === "("; - if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("qmark", value); - continue; - } - if (prev && prev.type === "paren") { - const next = peek(); - let output = value; - if (next === "<" && !utils.supportsLookbehinds()) { - throw new Error("Node.js v10 or higher is required for regex lookbehinds"); - } - if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) { - output = `\\${value}`; - } - push({ type: "text", value, output }); - continue; - } - if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { - push({ type: "qmark", value, output: QMARK_NO_DOT }); - continue; - } - push({ type: "qmark", value, output: QMARK }); - continue; - } - if (value === "!") { - if (opts.noextglob !== true && peek() === "(") { - if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { - extglobOpen("negate", value); - continue; - } - } - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - if (value === "+") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("plus", value); - continue; - } - if (prev && prev.value === "(" || opts.regex === false) { - push({ type: "plus", value, output: PLUS_LITERAL }); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { - push({ type: "plus", value }); - continue; - } - push({ type: "plus", value: PLUS_LITERAL }); - continue; - } - if (value === "@") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - push({ type: "at", extglob: true, value, output: "" }); - continue; - } - push({ type: "text", value }); - continue; - } - if (value !== "*") { - if (value === "$" || value === "^") { - value = `\\${value}`; - } - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - push({ type: "text", value }); - continue; - } - if (prev && (prev.type === "globstar" || prev.star === true)) { - prev.type = "star"; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen("star", value); - continue; - } - if (prev.type === "star") { - if (opts.noglobstar === true) { - consume(value); - continue; - } - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === "slash" || prior.type === "bos"; - const afterStar = before && (before.type === "star" || before.type === "globstar"); - if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { - push({ type: "star", value, output: "" }); - continue; - } - const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); - const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); - if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { - push({ type: "star", value, output: "" }); - continue; - } - while (rest.slice(0, 3) === "/**") { - const after = input[state.index + 4]; - if (after && after !== "/") { - break; - } - rest = rest.slice(3); - consume("/**", 3); - } - if (prior.type === "bos" && eos()) { - prev.type = "globstar"; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { - const end = rest[1] !== void 0 ? "|$" : ""; - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - state.output += prior.output + prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - if (prior.type === "bos" && rest[0] === "/") { - prev.type = "globstar"; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - state.output = state.output.slice(0, -prev.output.length); - prev.type = "globstar"; - prev.output = globstar(opts); - prev.value += value; - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - const token = { type: "star", value, output: star }; - if (opts.bash === true) { - token.output = ".*?"; - if (prev.type === "bos" || prev.type === "slash") { - token.output = nodot + token.output; - } - push(token); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { - token.output = value; - push(token); - continue; - } - if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { - if (prev.type === "dot") { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - } else { - state.output += nodot; - prev.output += nodot; - } - if (peek() !== "*") { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - push(token); - } - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]")); - state.output = utils.escapeLast(state.output, "["); - decrement("brackets"); - } - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")")); - state.output = utils.escapeLast(state.output, "("); - decrement("parens"); - } - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}")); - state.output = utils.escapeLast(state.output, "{"); - decrement("braces"); - } - if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) { - push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); - } - if (state.backtrack === true) { - state.output = ""; - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - if (token.suffix) { - state.output += token.suffix; - } - } - } - return state; - }; - parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? "" : "?:"; - const state = { negated: false, prefix: "" }; - let star = opts.bash === true ? ".*?" : STAR; - if (opts.capture) { - star = `(${star})`; - } - const globstar = (opts2) => { - if (opts2.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const create = (str2) => { - switch (str2) { - case "*": - return `${nodot}${ONE_CHAR}${star}`; - case ".*": - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*.*": - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*/*": - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - case "**": - return nodot + globstar(opts); - case "**/*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - case "**/*.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "**/.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - default: { - const match = /^(.*?)\.(\w+)$/.exec(str2); - if (!match) return; - const source2 = create(match[1]); - if (!source2) return; - return source2 + DOT_LITERAL + match[2]; - } - } - }; - const output = utils.removePrefix(input, state); - let source = create(output); - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - return source; - }; - module2.exports = parse; - } -}); - -// node_modules/picomatch/lib/picomatch.js -var require_picomatch = __commonJS({ - "node_modules/picomatch/lib/picomatch.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - var scan = require_scan(); - var parse = require_parse4(); - var utils = require_utils6(); - var constants = require_constants8(); - var isObject2 = (val) => val && typeof val === "object" && !Array.isArray(val); - var picomatch = (glob, options, returnState = false) => { - if (Array.isArray(glob)) { - const fns = glob.map((input) => picomatch(input, options, returnState)); - const arrayMatcher = (str2) => { - for (const isMatch of fns) { - const state2 = isMatch(str2); - if (state2) return state2; - } - return false; - }; - return arrayMatcher; - } - const isState = isObject2(glob) && glob.tokens && glob.input; - if (glob === "" || typeof glob !== "string" && !isState) { - throw new TypeError("Expected pattern to be a non-empty string"); - } - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true); - const state = regex.state; - delete regex.state; - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob, posix }); - const result = { glob, state, regex, posix, input, output, match, isMatch }; - if (typeof opts.onResult === "function") { - opts.onResult(result); - } - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - if (isIgnored(input)) { - if (typeof opts.onIgnore === "function") { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - if (typeof opts.onMatch === "function") { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - if (returnState) { - matcher.state = state; - } - return matcher; - }; - picomatch.test = (input, regex, options, { glob, posix } = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected input to be a string"); - } - if (input === "") { - return { isMatch: false, output: "" }; - } - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob; - let output = match && format ? format(input) : input; - if (match === false) { - output = format ? format(input) : input; - match = output === glob; - } - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - return { isMatch: Boolean(match), match, output }; - }; - picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { - const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path2.basename(input)); - }; - picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); - picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); - }; - picomatch.scan = (input, options) => scan(input, options); - picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - const opts = options || {}; - const prepend = opts.contains ? "" : "^"; - const append = opts.contains ? "" : "$"; - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - return regex; - }; - picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== "string") { - throw new TypeError("Expected a non-empty string"); - } - let parsed = { negated: false, fastpaths: true }; - if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) { - parsed.output = parse.fastpaths(input, options); - } - if (!parsed.output) { - parsed = parse(input, options); - } - return picomatch.compileRe(parsed, options, returnOutput, returnState); - }; - picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } - }; - picomatch.constants = constants; - module2.exports = picomatch; - } -}); - -// node_modules/picomatch/index.js -var require_picomatch2 = __commonJS({ - "node_modules/picomatch/index.js"(exports2, module2) { - "use strict"; - module2.exports = require_picomatch(); - } -}); - -// node_modules/micromatch/index.js -var require_micromatch = __commonJS({ - "node_modules/micromatch/index.js"(exports2, module2) { - "use strict"; - var util = require("util"); - var braces = require_braces(); - var picomatch = require_picomatch2(); - var utils = require_utils6(); - var isEmptyString = (v) => v === "" || v === "./"; - var hasBraces = (v) => { - const index = v.indexOf("{"); - return index > -1 && v.indexOf("}", index) > -1; - }; - var micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - let omit = /* @__PURE__ */ new Set(); - let keep = /* @__PURE__ */ new Set(); - let items = /* @__PURE__ */ new Set(); - let negatives = 0; - let onResult = (state) => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) negatives++; - for (let item of list) { - let matched = isMatch(item, true); - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) continue; - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter((item) => !omit.has(item)); - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(", ")}"`); - } - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns; - } - } - return matches; - }; - micromatch.match = micromatch; - micromatch.matcher = (pattern, options) => picomatch(pattern, options); - micromatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); - micromatch.any = micromatch.isMatch; - micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = /* @__PURE__ */ new Set(); - let items = []; - let onResult = (state) => { - if (options.onResult) options.onResult(state); - items.push(state.output); - }; - let matches = new Set(micromatch(list, patterns, { ...options, onResult })); - for (let item of items) { - if (!matches.has(item)) { - result.add(item); - } - } - return [...result]; - }; - micromatch.contains = (str2, pattern, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str2)}"`); - } - if (Array.isArray(pattern)) { - return pattern.some((p) => micromatch.contains(str2, p, options)); - } - if (typeof pattern === "string") { - if (isEmptyString(str2) || isEmptyString(pattern)) { - return false; - } - if (str2.includes(pattern) || str2.startsWith("./") && str2.slice(2).includes(pattern)) { - return true; - } - } - return micromatch.isMatch(str2, pattern, { ...options, contains: true }); - }; - micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError("Expected the first argument to be an object"); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) res[key] = obj[key]; - return res; - }; - micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some((item) => isMatch(item))) { - return true; - } - } - return false; - }; - micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every((item) => isMatch(item))) { - return false; - } - } - return true; - }; - micromatch.all = (str2, patterns, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str2)}"`); - } - return [].concat(patterns).every((p) => picomatch(p, options)(str2)); - }; - micromatch.capture = (glob, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - if (match) { - return match.slice(1).map((v) => v === void 0 ? "" : v); - } - }; - micromatch.makeRe = (...args) => picomatch.makeRe(...args); - micromatch.scan = (...args) => picomatch.scan(...args); - micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str2 of braces(String(pattern), options)) { - res.push(picomatch.parse(str2, options)); - } - } - return res; - }; - micromatch.braces = (pattern, options) => { - if (typeof pattern !== "string") throw new TypeError("Expected a string"); - if (options && options.nobrace === true || !hasBraces(pattern)) { - return [pattern]; - } - return braces(pattern, options); - }; - micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== "string") throw new TypeError("Expected a string"); - return micromatch.braces(pattern, { ...options, expand: true }); - }; - micromatch.hasBraces = hasBraces; - module2.exports = micromatch; - } -}); - -// node_modules/fast-glob/out/utils/pattern.js -var require_pattern = __commonJS({ - "node_modules/fast-glob/out/utils/pattern.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; - var path2 = require("path"); - var globParent = require_glob_parent(); - var micromatch = require_micromatch(); - var GLOBSTAR = "**"; - var ESCAPE_SYMBOL = "\\"; - var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; - var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; - var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; - var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; - var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; - var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; - function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); - } - exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern(pattern, options = {}) { - if (pattern === "") { - return false; - } - if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { - return true; - } - if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.braceExpansion !== false && hasBraceExpansion(pattern)) { - return true; - } - return false; - } - exports2.isDynamicPattern = isDynamicPattern; - function hasBraceExpansion(pattern) { - const openingBraceIndex = pattern.indexOf("{"); - if (openingBraceIndex === -1) { - return false; - } - const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1); - if (closingBraceIndex === -1) { - return false; - } - const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); - return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); - } - function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; - } - exports2.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports2.isNegativePattern = isNegativePattern; - function isPositivePattern(pattern) { - return !isNegativePattern(pattern); - } - exports2.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); - } - exports2.getNegativePatterns = getNegativePatterns; - function getPositivePatterns(patterns) { - return patterns.filter(isPositivePattern); - } - exports2.getPositivePatterns = getPositivePatterns; - function getPatternsInsideCurrentDirectory(patterns) { - return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); - } - exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; - function getPatternsOutsideCurrentDirectory(patterns) { - return patterns.filter(isPatternRelatedToParentDirectory); - } - exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; - function isPatternRelatedToParentDirectory(pattern) { - return pattern.startsWith("..") || pattern.startsWith("./.."); - } - exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; - function getBaseDirectory(pattern) { - return globParent(pattern, { flipBackslashes: false }); - } - exports2.getBaseDirectory = getBaseDirectory; - function hasGlobStar(pattern) { - return pattern.includes(GLOBSTAR); - } - exports2.hasGlobStar = hasGlobStar; - function endsWithSlashGlobStar(pattern) { - return pattern.endsWith("/" + GLOBSTAR); - } - exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; - function isAffectDepthOfReadingPattern(pattern) { - const basename = path2.basename(pattern); - return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); - } - exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; - function expandPatternsWithBraceExpansion(patterns) { - return patterns.reduce((collection, pattern) => { - return collection.concat(expandBraceExpansion(pattern)); - }, []); - } - exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; - function expandBraceExpansion(pattern) { - const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true }); - patterns.sort((a, b) => a.length - b.length); - return patterns.filter((pattern2) => pattern2 !== ""); - } - exports2.expandBraceExpansion = expandBraceExpansion; - function getPatternParts(pattern, options) { - let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); - if (parts.length === 0) { - parts = [pattern]; - } - if (parts[0].startsWith("/")) { - parts[0] = parts[0].slice(1); - parts.unshift(""); - } - return parts; - } - exports2.getPatternParts = getPatternParts; - function makeRe(pattern, options) { - return micromatch.makeRe(pattern, options); - } - exports2.makeRe = makeRe; - function convertPatternsToRe(patterns, options) { - return patterns.map((pattern) => makeRe(pattern, options)); - } - exports2.convertPatternsToRe = convertPatternsToRe; - function matchAny(entry, patternsRe) { - return patternsRe.some((patternRe) => patternRe.test(entry)); - } - exports2.matchAny = matchAny; - function removeDuplicateSlashes(pattern) { - return pattern.replace(DOUBLE_SLASH_RE, "/"); - } - exports2.removeDuplicateSlashes = removeDuplicateSlashes; - function partitionAbsoluteAndRelative(patterns) { - const absolute = []; - const relative = []; - for (const pattern of patterns) { - if (isAbsolute(pattern)) { - absolute.push(pattern); - } else { - relative.push(pattern); - } - } - return [absolute, relative]; - } - exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; - function isAbsolute(pattern) { - return path2.isAbsolute(pattern); - } - exports2.isAbsolute = isAbsolute; - } -}); - -// node_modules/fast-glob/out/utils/stream.js -var require_stream = __commonJS({ - "node_modules/fast-glob/out/utils/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.merge = void 0; - var merge2 = require_merge2(); - function merge3(streams) { - const mergedStream = merge2(streams); - streams.forEach((stream) => { - stream.once("error", (error2) => mergedStream.emit("error", error2)); - }); - mergedStream.once("close", () => propagateCloseEventToSources(streams)); - mergedStream.once("end", () => propagateCloseEventToSources(streams)); - return mergedStream; - } - exports2.merge = merge3; - function propagateCloseEventToSources(streams) { - streams.forEach((stream) => stream.emit("close")); - } - } -}); - -// node_modules/fast-glob/out/utils/string.js -var require_string = __commonJS({ - "node_modules/fast-glob/out/utils/string.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEmpty = exports2.isString = void 0; - function isString(input) { - return typeof input === "string"; - } - exports2.isString = isString; - function isEmpty(input) { - return input === ""; - } - exports2.isEmpty = isEmpty; - } -}); - -// node_modules/fast-glob/out/utils/index.js -var require_utils7 = __commonJS({ - "node_modules/fast-glob/out/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0; - var array = require_array(); - exports2.array = array; - var errno = require_errno(); - exports2.errno = errno; - var fs = require_fs(); - exports2.fs = fs; - var path2 = require_path(); - exports2.path = path2; - var pattern = require_pattern(); - exports2.pattern = pattern; - var stream = require_stream(); - exports2.stream = stream; - var string = require_string(); - exports2.string = string; - } -}); - -// node_modules/fast-glob/out/managers/tasks.js -var require_tasks = __commonJS({ - "node_modules/fast-glob/out/managers/tasks.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0; - var utils = require_utils7(); - function generate(input, settings) { - const patterns = processPatterns(input, settings); - const ignore = processPatterns(settings.ignore, settings); - const positivePatterns = getPositivePatterns(patterns); - const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); - const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); - const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); - const staticTasks = convertPatternsToTasks( - staticPatterns, - negativePatterns, - /* dynamic */ - false - ); - const dynamicTasks = convertPatternsToTasks( - dynamicPatterns, - negativePatterns, - /* dynamic */ - true - ); - return staticTasks.concat(dynamicTasks); - } - exports2.generate = generate; - function processPatterns(input, settings) { - let patterns = input; - if (settings.braceExpansion) { - patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); - } - if (settings.baseNameMatch) { - patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`); - } - return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); - } - function convertPatternsToTasks(positive, negative, dynamic) { - const tasks = []; - const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); - const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); - const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); - const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); - tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); - if ("." in insideCurrentDirectoryGroup) { - tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)); - } else { - tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); - } - return tasks; - } - exports2.convertPatternsToTasks = convertPatternsToTasks; - function getPositivePatterns(patterns) { - return utils.pattern.getPositivePatterns(patterns); - } - exports2.getPositivePatterns = getPositivePatterns; - function getNegativePatternsAsPositive(patterns, ignore) { - const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); - const positive = negative.map(utils.pattern.convertToPositivePattern); - return positive; - } - exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive; - function groupPatternsByBaseDirectory(patterns) { - const group = {}; - return patterns.reduce((collection, pattern) => { - const base = utils.pattern.getBaseDirectory(pattern); - if (base in collection) { - collection[base].push(pattern); - } else { - collection[base] = [pattern]; - } - return collection; - }, group); - } - exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; - function convertPatternGroupsToTasks(positive, negative, dynamic) { - return Object.keys(positive).map((base) => { - return convertPatternGroupToTask(base, positive[base], negative, dynamic); - }); - } - exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks; - function convertPatternGroupToTask(base, positive, negative, dynamic) { - return { - dynamic, - positive, - negative, - base, - patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) - }; - } - exports2.convertPatternGroupToTask = convertPatternGroupToTask; - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/async.js -var require_async = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.read = void 0; - function read(path2, settings, callback) { - settings.fs.lstat(path2, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path2, (statError, stat) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - callFailureCallback(callback, statError); - return; - } - callSuccessCallback(callback, lstat); - return; - } - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - callSuccessCallback(callback, stat); - }); - }); - } - exports2.read = read; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/sync.js -var require_sync = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.read = void 0; - function read(path2, settings) { - const lstat = settings.fs.lstatSync(path2); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path2); - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - return stat; - } catch (error2) { - if (!settings.throwErrorOnBrokenSymbolicLink) { - return lstat; - } - throw error2; - } - } - exports2.read = read; - } -}); - -// node_modules/@nodelib/fs.stat/out/adapters/fs.js -var require_fs2 = __commonJS({ - "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - stat: fs.stat, - lstatSync: fs.lstatSync, - statSync: fs.statSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports2.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports2.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.stat/out/settings.js -var require_settings = __commonJS({ - "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fs = require_fs2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs.createFileSystemAdapter(this._options.fs); - this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.stat/out/index.js -var require_out = __commonJS({ - "node_modules/@nodelib/fs.stat/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.statSync = exports2.stat = exports2.Settings = void 0; - var async = require_async(); - var sync = require_sync(); - var settings_1 = require_settings(); - exports2.Settings = settings_1.default; - function stat(path2, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path2, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path2, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.stat = stat; - function statSync(path2, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path2, settings); - } - exports2.statSync = statSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/queue-microtask/index.js -var require_queue_microtask = __commonJS({ - "node_modules/queue-microtask/index.js"(exports2, module2) { - var promise; - module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { - throw err; - }, 0)); - } -}); - -// node_modules/run-parallel/index.js -var require_run_parallel = __commonJS({ - "node_modules/run-parallel/index.js"(exports2, module2) { - module2.exports = runParallel; - var queueMicrotask2 = require_queue_microtask(); - function runParallel(tasks, cb) { - let results, pending, keys; - let isSync = true; - if (Array.isArray(tasks)) { - results = []; - pending = tasks.length; - } else { - keys = Object.keys(tasks); - results = {}; - pending = keys.length; - } - function done(err) { - function end() { - if (cb) cb(err, results); - cb = null; - } - if (isSync) queueMicrotask2(end); - else end(); - } - function each(i, err, result) { - results[i] = result; - if (--pending === 0 || err) { - done(err); - } - } - if (!pending) { - done(null); - } else if (keys) { - keys.forEach(function(key) { - tasks[key](function(err, result) { - each(key, err, result); - }); - }); - } else { - tasks.forEach(function(task, i) { - task(function(err, result) { - each(i, err, result); - }); - }); - } - isSync = false; - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/constants.js -var require_constants9 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; - var NODE_PROCESS_VERSION_PARTS = process.versions.node.split("."); - if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) { - throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); - } - var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); - var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); - var SUPPORTED_MAJOR_VERSION = 10; - var SUPPORTED_MINOR_VERSION = 10; - var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; - var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; - exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/fs.js -var require_fs3 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports2.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/index.js -var require_utils8 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fs = void 0; - var fs = require_fs3(); - exports2.fs = fs; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/common.js -var require_common = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.joinPathSegments = void 0; - function joinPathSegments(a, b, separator) { - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports2.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/async.js -var require_async2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; - var fsStat = require_out(); - var rpl = require_run_parallel(); - var constants_1 = require_constants9(); - var utils = require_utils8(); - var common2 = require_common(); - function read(directory, settings, callback) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - readdirWithFileTypes(directory, settings, callback); - return; - } - readdir(directory, settings, callback); - } - exports2.read = read; - function readdirWithFileTypes(directory, settings, callback) { - settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const entries = dirents.map((dirent) => ({ - dirent, - name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - })); - if (!settings.followSymbolicLinks) { - callSuccessCallback(callback, entries); - return; - } - const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); - rpl(tasks, (rplError, rplEntries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, rplEntries); - }); - }); - } - exports2.readdirWithFileTypes = readdirWithFileTypes; - function makeRplTaskEntry(entry, settings) { - return (done) => { - if (!entry.dirent.isSymbolicLink()) { - done(null, entry); - return; - } - settings.fs.stat(entry.path, (statError, stats) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - done(statError); - return; - } - done(null, entry); - return; - } - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - done(null, entry); - }); - }; - } - function readdir(directory, settings, callback) { - settings.fs.readdir(directory, (readdirError, names) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const tasks = names.map((name) => { - const path2 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path2, settings.fsStatSettings, (error2, stats) => { - if (error2 !== null) { - done(error2); - return; - } - const entry = { - name, - path: path2, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - done(null, entry); - }); - }; - }); - rpl(tasks, (rplError, entries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, entries); - }); - }); - } - exports2.readdir = readdir; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/sync.js -var require_sync2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; - var fsStat = require_out(); - var constants_1 = require_constants9(); - var utils = require_utils8(); - var common2 = require_common(); - function read(directory, settings) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings); - } - return readdir(directory, settings); - } - exports2.read = read; - function readdirWithFileTypes(directory, settings) { - const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); - return dirents.map((dirent) => { - const entry = { - dirent, - name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - }; - if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { - try { - const stats = settings.fs.statSync(entry.path); - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - } catch (error2) { - if (settings.throwErrorOnBrokenSymbolicLink) { - throw error2; - } - } - } - return entry; - }); - } - exports2.readdirWithFileTypes = readdirWithFileTypes; - function readdir(directory, settings) { - const names = settings.fs.readdirSync(directory); - return names.map((name) => { - const entryPath = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - const stats = fsStat.statSync(entryPath, settings.fsStatSettings); - const entry = { - name, - path: entryPath, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - return entry; - }); - } - exports2.readdir = readdir; - } -}); - -// node_modules/@nodelib/fs.scandir/out/adapters/fs.js -var require_fs4 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - stat: fs.stat, - lstatSync: fs.lstatSync, - statSync: fs.statSync, - readdir: fs.readdir, - readdirSync: fs.readdirSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports2.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports2.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.scandir/out/settings.js -var require_settings2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path2 = require("path"); - var fsStat = require_out(); - var fs = require_fs4(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path2.sep); - this.stats = this._getValue(this._options.stats, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - this.fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this.followSymbolicLinks, - fs: this.fs, - throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.scandir/out/index.js -var require_out2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Settings = exports2.scandirSync = exports2.scandir = void 0; - var async = require_async2(); - var sync = require_sync2(); - var settings_1 = require_settings2(); - exports2.Settings = settings_1.default; - function scandir(path2, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path2, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path2, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.scandir = scandir; - function scandirSync(path2, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path2, settings); - } - exports2.scandirSync = scandirSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/reusify/reusify.js -var require_reusify = __commonJS({ - "node_modules/reusify/reusify.js"(exports2, module2) { - "use strict"; - function reusify(Constructor) { - var head = new Constructor(); - var tail = head; - function get() { - var current = head; - if (current.next) { - head = current.next; - } else { - head = new Constructor(); - tail = head; - } - current.next = null; - return current; - } - function release(obj) { - tail.next = obj; - tail = obj; - } - return { - get, - release - }; - } - module2.exports = reusify; - } -}); - -// node_modules/fastq/queue.js -var require_queue = __commonJS({ - "node_modules/fastq/queue.js"(exports2, module2) { - "use strict"; - var reusify = require_reusify(); - function fastqueue(context2, worker, concurrency) { - if (typeof context2 === "function") { - concurrency = worker; - worker = context2; - context2 = null; - } - var cache = reusify(Task); - var queueHead = null; - var queueTail = null; - var _running = 0; - var self2 = { - push, - drain: noop, - saturated: noop, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop, - kill, - killAndDrain - }; - return self2; - function running() { - return _running; - } - function pause() { - self2.paused = true; - } - function length() { - var current = queueHead; - var counter = 0; - while (current) { - current = current.next; - counter++; - } - return counter; - } - function getQueue() { - var current = queueHead; - var tasks = []; - while (current) { - tasks.push(current.value); - current = current.next; - } - return tasks; - } - function resume() { - if (!self2.paused) return; - self2.paused = false; - for (var i = 0; i < self2.concurrency; i++) { - _running++; - release(); - } - } - function idle() { - return _running === 0 && self2.length() === 0; - } - function push(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release; - current.value = value; - current.callback = done || noop; - if (_running === self2.concurrency || self2.paused) { - if (queueTail) { - queueTail.next = current; - queueTail = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context2, current.value, current.worked); - } - } - function unshift(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release; - current.value = value; - current.callback = done || noop; - if (_running === self2.concurrency || self2.paused) { - if (queueHead) { - current.next = queueHead; - queueHead = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context2, current.value, current.worked); - } - } - function release(holder) { - if (holder) { - cache.release(holder); - } - var next = queueHead; - if (next) { - if (!self2.paused) { - if (queueTail === queueHead) { - queueTail = null; - } - queueHead = next.next; - next.next = null; - worker.call(context2, next.value, next.worked); - if (queueTail === null) { - self2.empty(); - } - } else { - _running--; - } - } else if (--_running === 0) { - self2.drain(); - } - } - function kill() { - queueHead = null; - queueTail = null; - self2.drain = noop; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self2.drain(); - self2.drain = noop; - } - } - function noop() { - } - function Task() { - this.value = null; - this.callback = noop; - this.next = null; - this.release = noop; - this.context = null; - var self2 = this; - this.worked = function worked(err, result) { - var callback = self2.callback; - self2.value = null; - self2.callback = noop; - callback.call(self2.context, err, result); - self2.release(self2); - }; - } - module2.exports = fastqueue; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/common.js -var require_common2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0; - function isFatalError(settings, error2) { - if (settings.errorFilter === null) { - return true; - } - return !settings.errorFilter(error2); - } - exports2.isFatalError = isFatalError; - function isAppliedFilter(filter, value) { - return filter === null || filter(value); - } - exports2.isAppliedFilter = isAppliedFilter; - function replacePathSegmentSeparator(filepath, separator) { - return filepath.split(/[/\\]/).join(separator); - } - exports2.replacePathSegmentSeparator = replacePathSegmentSeparator; - function joinPathSegments(a, b, separator) { - if (a === "") { - return b; - } - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports2.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/reader.js -var require_reader = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var common2 = require_common2(); - var Reader = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._root = common2.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); - } - }; - exports2.default = Reader; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/async.js -var require_async3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var events_1 = require("events"); - var fsScandir = require_out2(); - var fastq = require_queue(); - var common2 = require_common2(); - var reader_1 = require_reader(); - var AsyncReader = class extends reader_1.default { - constructor(_root, _settings) { - super(_root, _settings); - this._settings = _settings; - this._scandir = fsScandir.scandir; - this._emitter = new events_1.EventEmitter(); - this._queue = fastq(this._worker.bind(this), this._settings.concurrency); - this._isFatalError = false; - this._isDestroyed = false; - this._queue.drain = () => { - if (!this._isFatalError) { - this._emitter.emit("end"); - } - }; - } - read() { - this._isFatalError = false; - this._isDestroyed = false; - setImmediate(() => { - this._pushToQueue(this._root, this._settings.basePath); - }); - return this._emitter; - } - get isDestroyed() { - return this._isDestroyed; - } - destroy() { - if (this._isDestroyed) { - throw new Error("The reader is already destroyed"); - } - this._isDestroyed = true; - this._queue.killAndDrain(); - } - onEntry(callback) { - this._emitter.on("entry", callback); - } - onError(callback) { - this._emitter.once("error", callback); - } - onEnd(callback) { - this._emitter.once("end", callback); - } - _pushToQueue(directory, base) { - const queueItem = { directory, base }; - this._queue.push(queueItem, (error2) => { - if (error2 !== null) { - this._handleError(error2); - } - }); - } - _worker(item, done) { - this._scandir(item.directory, this._settings.fsScandirSettings, (error2, entries) => { - if (error2 !== null) { - done(error2, void 0); - return; - } - for (const entry of entries) { - this._handleEntry(entry, item.base); - } - done(null, void 0); - }); - } - _handleError(error2) { - if (this._isDestroyed || !common2.isFatalError(this._settings, error2)) { - return; - } - this._isFatalError = true; - this._isDestroyed = true; - this._emitter.emit("error", error2); - } - _handleEntry(entry, base) { - if (this._isDestroyed || this._isFatalError) { - return; - } - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { - this._emitEntry(entry); - } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _emitEntry(entry) { - this._emitter.emit("entry", entry); - } - }; - exports2.default = AsyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/async.js -var require_async4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var async_1 = require_async3(); - var AsyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._storage = []; - } - read(callback) { - this._reader.onError((error2) => { - callFailureCallback(callback, error2); - }); - this._reader.onEntry((entry) => { - this._storage.push(entry); - }); - this._reader.onEnd(() => { - callSuccessCallback(callback, this._storage); - }); - this._reader.read(); - } - }; - exports2.default = AsyncProvider; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, entries) { - callback(null, entries); - } - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/stream.js -var require_stream2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var async_1 = require_async3(); - var StreamProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._stream = new stream_1.Readable({ - objectMode: true, - read: () => { - }, - destroy: () => { - if (!this._reader.isDestroyed) { - this._reader.destroy(); - } - } - }); - } - read() { - this._reader.onError((error2) => { - this._stream.emit("error", error2); - }); - this._reader.onEntry((entry) => { - this._stream.push(entry); - }); - this._reader.onEnd(() => { - this._stream.push(null); - }); - this._reader.read(); - return this._stream; - } - }; - exports2.default = StreamProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/sync.js -var require_sync3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsScandir = require_out2(); - var common2 = require_common2(); - var reader_1 = require_reader(); - var SyncReader = class extends reader_1.default { - constructor() { - super(...arguments); - this._scandir = fsScandir.scandirSync; - this._storage = []; - this._queue = /* @__PURE__ */ new Set(); - } - read() { - this._pushToQueue(this._root, this._settings.basePath); - this._handleQueue(); - return this._storage; - } - _pushToQueue(directory, base) { - this._queue.add({ directory, base }); - } - _handleQueue() { - for (const item of this._queue.values()) { - this._handleDirectory(item.directory, item.base); - } - } - _handleDirectory(directory, base) { - try { - const entries = this._scandir(directory, this._settings.fsScandirSettings); - for (const entry of entries) { - this._handleEntry(entry, base); - } - } catch (error2) { - this._handleError(error2); - } - } - _handleError(error2) { - if (!common2.isFatalError(this._settings, error2)) { - return; - } - throw error2; - } - _handleEntry(entry, base) { - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { - this._pushToStorage(entry); - } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _pushToStorage(entry) { - this._storage.push(entry); - } - }; - exports2.default = SyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/sync.js -var require_sync4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var sync_1 = require_sync3(); - var SyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new sync_1.default(this._root, this._settings); - } - read() { - return this._reader.read(); - } - }; - exports2.default = SyncProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/settings.js -var require_settings3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path2 = require("path"); - var fsScandir = require_out2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.basePath = this._getValue(this._options.basePath, void 0); - this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); - this.deepFilter = this._getValue(this._options.deepFilter, null); - this.entryFilter = this._getValue(this._options.entryFilter, null); - this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path2.sep); - this.fsScandirSettings = new fsScandir.Settings({ - followSymbolicLinks: this._options.followSymbolicLinks, - fs: this._options.fs, - pathSegmentSeparator: this._options.pathSegmentSeparator, - stats: this._options.stats, - throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.walk/out/index.js -var require_out3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0; - var async_1 = require_async4(); - var stream_1 = require_stream2(); - var sync_1 = require_sync4(); - var settings_1 = require_settings3(); - exports2.Settings = settings_1.default; - function walk(directory, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); - return; - } - new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); - } - exports2.walk = walk; - function walkSync(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new sync_1.default(directory, settings); - return provider.read(); - } - exports2.walkSync = walkSync; - function walkStream(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new stream_1.default(directory, settings); - return provider.read(); - } - exports2.walkStream = walkStream; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/fast-glob/out/readers/reader.js -var require_reader2 = __commonJS({ - "node_modules/fast-glob/out/readers/reader.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path2 = require("path"); - var fsStat = require_out(); - var utils = require_utils7(); - var Reader = class { - constructor(_settings) { - this._settings = _settings; - this._fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this._settings.followSymbolicLinks, - fs: this._settings.fs, - throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks - }); - } - _getFullEntryPath(filepath) { - return path2.resolve(this._settings.cwd, filepath); - } - _makeEntry(stats, pattern) { - const entry = { - name: pattern, - path: pattern, - dirent: utils.fs.createDirentFromStats(pattern, stats) - }; - if (this._settings.stats) { - entry.stats = stats; - } - return entry; - } - _isFatalError(error2) { - return !utils.errno.isEnoentCodeError(error2) && !this._settings.suppressErrors; - } - }; - exports2.default = Reader; - } -}); - -// node_modules/fast-glob/out/readers/stream.js -var require_stream3 = __commonJS({ - "node_modules/fast-glob/out/readers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderStream = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkStream = fsWalk.walkStream; - this._stat = fsStat.stat; - } - dynamic(root, options) { - return this._walkStream(root, options); - } - static(patterns, options) { - const filepaths = patterns.map(this._getFullEntryPath, this); - const stream = new stream_1.PassThrough({ objectMode: true }); - stream._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream.push(entry); - } - if (index === filepaths.length - 1) { - stream.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream.write(i); - } - return stream; - } - _getEntry(filepath, pattern, options) { - return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error2) => { - if (options.errorFilter(error2)) { - return null; - } - throw error2; - }); - } - _getStat(filepath) { - return new Promise((resolve2, reject) => { - this._stat(filepath, this._fsStatSettings, (error2, stats) => { - return error2 === null ? resolve2(stats) : reject(error2); - }); - }); - } - }; - exports2.default = ReaderStream; - } -}); - -// node_modules/fast-glob/out/readers/async.js -var require_async5 = __commonJS({ - "node_modules/fast-glob/out/readers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var stream_1 = require_stream3(); - var ReaderAsync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkAsync = fsWalk.walk; - this._readerStream = new stream_1.default(this._settings); - } - dynamic(root, options) { - return new Promise((resolve2, reject) => { - this._walkAsync(root, options, (error2, entries) => { - if (error2 === null) { - resolve2(entries); - } else { - reject(error2); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream = this._readerStream.static(patterns, options); - return new Promise((resolve2, reject) => { - stream.once("error", reject); - stream.on("data", (entry) => entries.push(entry)); - stream.once("end", () => resolve2(entries)); - }); - } - }; - exports2.default = ReaderAsync; - } -}); - -// node_modules/fast-glob/out/providers/matchers/matcher.js -var require_matcher = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var Matcher = class { - constructor(_patterns, _settings, _micromatchOptions) { - this._patterns = _patterns; - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this._storage = []; - this._fillStorage(); - } - _fillStorage() { - for (const pattern of this._patterns) { - const segments = this._getPatternSegments(pattern); - const sections = this._splitSegmentsIntoSections(segments); - this._storage.push({ - complete: sections.length <= 1, - pattern, - segments, - sections - }); - } - } - _getPatternSegments(pattern) { - const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); - return parts.map((part) => { - const dynamic = utils.pattern.isDynamicPattern(part, this._settings); - if (!dynamic) { - return { - dynamic: false, - pattern: part - }; - } - return { - dynamic: true, - pattern: part, - patternRe: utils.pattern.makeRe(part, this._micromatchOptions) - }; - }); - } - _splitSegmentsIntoSections(segments) { - return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); - } - }; - exports2.default = Matcher; - } -}); - -// node_modules/fast-glob/out/providers/matchers/partial.js -var require_partial = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var matcher_1 = require_matcher(); - var PartialMatcher = class extends matcher_1.default { - match(filepath) { - const parts = filepath.split("/"); - const levels = parts.length; - const patterns = this._storage.filter((info3) => !info3.complete || info3.segments.length > levels); - for (const pattern of patterns) { - const section = pattern.sections[0]; - if (!pattern.complete && levels > section.length) { - return true; - } - const match = parts.every((part, index) => { - const segment = pattern.segments[index]; - if (segment.dynamic && segment.patternRe.test(part)) { - return true; - } - if (!segment.dynamic && segment.pattern === part) { - return true; - } - return false; - }); - if (match) { - return true; - } - } - return false; - } - }; - exports2.default = PartialMatcher; - } -}); - -// node_modules/fast-glob/out/providers/filters/deep.js -var require_deep = __commonJS({ - "node_modules/fast-glob/out/providers/filters/deep.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var partial_1 = require_partial(); - var DeepFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - } - getFilter(basePath, positive, negative) { - const matcher = this._getMatcher(positive); - const negativeRe = this._getNegativePatternsRe(negative); - return (entry) => this._filter(basePath, entry, matcher, negativeRe); - } - _getMatcher(patterns) { - return new partial_1.default(patterns, this._settings, this._micromatchOptions); - } - _getNegativePatternsRe(patterns) { - const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); - return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); - } - _filter(basePath, entry, matcher, negativeRe) { - if (this._isSkippedByDeep(basePath, entry.path)) { - return false; - } - if (this._isSkippedSymbolicLink(entry)) { - return false; - } - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._isSkippedByPositivePatterns(filepath, matcher)) { - return false; - } - return this._isSkippedByNegativePatterns(filepath, negativeRe); - } - _isSkippedByDeep(basePath, entryPath) { - if (this._settings.deep === Infinity) { - return false; - } - return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; - } - _getEntryLevel(basePath, entryPath) { - const entryPathDepth = entryPath.split("/").length; - if (basePath === "") { - return entryPathDepth; - } - const basePathDepth = basePath.split("/").length; - return entryPathDepth - basePathDepth; - } - _isSkippedSymbolicLink(entry) { - return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); - } - _isSkippedByPositivePatterns(entryPath, matcher) { - return !this._settings.baseNameMatch && !matcher.match(entryPath); - } - _isSkippedByNegativePatterns(entryPath, patternsRe) { - return !utils.pattern.matchAny(entryPath, patternsRe); - } - }; - exports2.default = DeepFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/entry.js -var require_entry = __commonJS({ - "node_modules/fast-glob/out/providers/filters/entry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var EntryFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this.index = /* @__PURE__ */ new Map(); - } - getFilter(positive, negative) { - const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); - const patterns = { - positive: { - all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) - }, - negative: { - absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), - relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) - } - }; - return (entry) => this._filter(entry, patterns); - } - _filter(entry, patterns) { - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._settings.unique && this._isDuplicateEntry(filepath)) { - return false; - } - if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { - return false; - } - const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); - if (this._settings.unique && isMatched) { - this._createIndexRecord(filepath); - } - return isMatched; - } - _isDuplicateEntry(filepath) { - return this.index.has(filepath); - } - _createIndexRecord(filepath) { - this.index.set(filepath, void 0); - } - _onlyFileFilter(entry) { - return this._settings.onlyFiles && !entry.dirent.isFile(); - } - _onlyDirectoryFilter(entry) { - return this._settings.onlyDirectories && !entry.dirent.isDirectory(); - } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { - return utils.pattern.matchAny(filepath + "/", patternsRe); - } - return isMatched; - } - }; - exports2.default = EntryFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/error.js -var require_error = __commonJS({ - "node_modules/fast-glob/out/providers/filters/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var ErrorFilter = class { - constructor(_settings) { - this._settings = _settings; - } - getFilter() { - return (error2) => this._isNonFatalError(error2); - } - _isNonFatalError(error2) { - return utils.errno.isEnoentCodeError(error2) || this._settings.suppressErrors; - } - }; - exports2.default = ErrorFilter; - } -}); - -// node_modules/fast-glob/out/providers/transformers/entry.js -var require_entry2 = __commonJS({ - "node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var EntryTransformer = class { - constructor(_settings) { - this._settings = _settings; - } - getTransformer() { - return (entry) => this._transform(entry); - } - _transform(entry) { - let filepath = entry.path; - if (this._settings.absolute) { - filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); - filepath = utils.path.unixify(filepath); - } - if (this._settings.markDirectories && entry.dirent.isDirectory()) { - filepath += "/"; - } - if (!this._settings.objectMode) { - return filepath; - } - return Object.assign(Object.assign({}, entry), { path: filepath }); - } - }; - exports2.default = EntryTransformer; - } -}); - -// node_modules/fast-glob/out/providers/provider.js -var require_provider = __commonJS({ - "node_modules/fast-glob/out/providers/provider.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path2 = require("path"); - var deep_1 = require_deep(); - var entry_1 = require_entry(); - var error_1 = require_error(); - var entry_2 = require_entry2(); - var Provider = class { - constructor(_settings) { - this._settings = _settings; - this.errorFilter = new error_1.default(this._settings); - this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); - this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); - this.entryTransformer = new entry_2.default(this._settings); - } - _getRootDirectory(task) { - return path2.resolve(this._settings.cwd, task.base); - } - _getReaderOptions(task) { - const basePath = task.base === "." ? "" : task.base; - return { - basePath, - pathSegmentSeparator: "/", - concurrency: this._settings.concurrency, - deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), - entryFilter: this.entryFilter.getFilter(task.positive, task.negative), - errorFilter: this.errorFilter.getFilter(), - followSymbolicLinks: this._settings.followSymbolicLinks, - fs: this._settings.fs, - stats: this._settings.stats, - throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, - transform: this.entryTransformer.getTransformer() - }; - } - _getMicromatchOptions() { - return { - dot: this._settings.dot, - matchBase: this._settings.baseNameMatch, - nobrace: !this._settings.braceExpansion, - nocase: !this._settings.caseSensitiveMatch, - noext: !this._settings.extglob, - noglobstar: !this._settings.globstar, - posix: true, - strictSlashes: false - }; - } - }; - exports2.default = Provider; - } -}); - -// node_modules/fast-glob/out/providers/async.js -var require_async6 = __commonJS({ - "node_modules/fast-glob/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var async_1 = require_async5(); - var provider_1 = require_provider(); - var ProviderAsync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new async_1.default(this._settings); - } - async read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = await this.api(root, task, options); - return entries.map((entry) => options.transform(entry)); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderAsync; - } -}); - -// node_modules/fast-glob/out/providers/stream.js -var require_stream4 = __commonJS({ - "node_modules/fast-glob/out/providers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var stream_2 = require_stream3(); - var provider_1 = require_provider(); - var ProviderStream = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new stream_2.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const source = this.api(root, task, options); - const destination = new stream_1.Readable({ objectMode: true, read: () => { - } }); - source.once("error", (error2) => destination.emit("error", error2)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")); - destination.once("close", () => source.destroy()); - return destination; - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderStream; - } -}); - -// node_modules/fast-glob/out/readers/sync.js -var require_sync5 = __commonJS({ - "node_modules/fast-glob/out/readers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderSync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkSync = fsWalk.walkSync; - this._statSync = fsStat.statSync; - } - dynamic(root, options) { - return this._walkSync(root, options); - } - static(patterns, options) { - const entries = []; - for (const pattern of patterns) { - const filepath = this._getFullEntryPath(pattern); - const entry = this._getEntry(filepath, pattern, options); - if (entry === null || !options.entryFilter(entry)) { - continue; - } - entries.push(entry); - } - return entries; - } - _getEntry(filepath, pattern, options) { - try { - const stats = this._getStat(filepath); - return this._makeEntry(stats, pattern); - } catch (error2) { - if (options.errorFilter(error2)) { - return null; - } - throw error2; - } - } - _getStat(filepath) { - return this._statSync(filepath, this._fsStatSettings); - } - }; - exports2.default = ReaderSync; - } -}); - -// node_modules/fast-glob/out/providers/sync.js -var require_sync6 = __commonJS({ - "node_modules/fast-glob/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var sync_1 = require_sync5(); - var provider_1 = require_provider(); - var ProviderSync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new sync_1.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = this.api(root, task, options); - return entries.map(options.transform); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderSync; - } -}); - -// node_modules/fast-glob/out/settings.js -var require_settings4 = __commonJS({ - "node_modules/fast-glob/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs = require("fs"); - var os = require("os"); - var CPU_COUNT = Math.max(os.cpus().length, 1); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs.lstat, - lstatSync: fs.lstatSync, - stat: fs.stat, - statSync: fs.statSync, - readdir: fs.readdir, - readdirSync: fs.readdirSync - }; - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.absolute = this._getValue(this._options.absolute, false); - this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); - this.braceExpansion = this._getValue(this._options.braceExpansion, true); - this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); - this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); - this.cwd = this._getValue(this._options.cwd, process.cwd()); - this.deep = this._getValue(this._options.deep, Infinity); - this.dot = this._getValue(this._options.dot, false); - this.extglob = this._getValue(this._options.extglob, true); - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); - this.fs = this._getFileSystemMethods(this._options.fs); - this.globstar = this._getValue(this._options.globstar, true); - this.ignore = this._getValue(this._options.ignore, []); - this.markDirectories = this._getValue(this._options.markDirectories, false); - this.objectMode = this._getValue(this._options.objectMode, false); - this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); - this.onlyFiles = this._getValue(this._options.onlyFiles, true); - this.stats = this._getValue(this._options.stats, false); - this.suppressErrors = this._getValue(this._options.suppressErrors, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); - this.unique = this._getValue(this._options.unique, true); - if (this.onlyDirectories) { - this.onlyFiles = false; - } - if (this.stats) { - this.objectMode = true; - } - this.ignore = [].concat(this.ignore); - } - _getValue(option, value) { - return option === void 0 ? value : option; - } - _getFileSystemMethods(methods = {}) { - return Object.assign(Object.assign({}, exports2.DEFAULT_FILE_SYSTEM_ADAPTER), methods); - } - }; - exports2.default = Settings; - } -}); - -// node_modules/fast-glob/out/index.js -var require_out4 = __commonJS({ - "node_modules/fast-glob/out/index.js"(exports2, module2) { - "use strict"; - var taskManager = require_tasks(); - var async_1 = require_async6(); - var stream_1 = require_stream4(); - var sync_1 = require_sync6(); - var settings_1 = require_settings4(); - var utils = require_utils7(); - async function FastGlob(source, options) { - assertPatternsInput(source); - const works = getWorks(source, async_1.default, options); - const result = await Promise.all(works); - return utils.array.flatten(result); - } - (function(FastGlob2) { - FastGlob2.glob = FastGlob2; - FastGlob2.globSync = sync; - FastGlob2.globStream = stream; - FastGlob2.async = FastGlob2; - function sync(source, options) { - assertPatternsInput(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream(source, options) { - assertPatternsInput(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream; - function generateTasks(source, options) { - assertPatternsInput(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern; - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPathToPattern(source); - } - FastGlob2.convertPathToPattern = convertPathToPattern; - let posix; - (function(posix2) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapePosixPath(source); - } - posix2.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertPosixPathToPattern(source); - } - posix2.convertPathToPattern = convertPathToPattern2; - })(posix = FastGlob2.posix || (FastGlob2.posix = {})); - let win32; - (function(win322) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapeWindowsPath(source); - } - win322.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertWindowsPathToPattern(source); - } - win322.convertPathToPattern = convertPathToPattern2; - })(win32 = FastGlob2.win32 || (FastGlob2.win32 = {})); - })(FastGlob || (FastGlob = {})); - function getWorks(source, _Provider, options) { - const patterns = [].concat(source); - const settings = new settings_1.default(options); - const tasks = taskManager.generate(patterns, settings); - const provider = new _Provider(settings); - return tasks.map(provider.read, provider); - } - function assertPatternsInput(input) { - const source = [].concat(input); - const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); - if (!isValidSource) { - throw new TypeError("Patterns must be a string (non empty) or an array of strings"); - } - } - module2.exports = FastGlob; - } -}); - -// node_modules/path-type/index.js -var require_path_type = __commonJS({ - "node_modules/path-type/index.js"(exports2) { - "use strict"; - var { promisify } = require("util"); - var fs = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify(fs[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - return fs[fsStatType](filePath)[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - exports2.isFile = isType.bind(null, "stat", "isFile"); - exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// node_modules/dir-glob/index.js -var require_dir_glob = __commonJS({ - "node_modules/dir-glob/index.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - var pathType = require_path_type(); - var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; - var getPath = (filepath, cwd) => { - const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; - return path2.isAbsolute(pth) ? pth : path2.join(cwd, pth); - }; - var addExtensions = (file, extensions) => { - if (path2.extname(file)) { - return `**/${file}`; - } - return `**/${file}.${getExtensions(extensions)}`; - }; - var getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - if (options.files && options.extensions) { - return options.files.map((x) => path2.posix.join(directory, addExtensions(x, options.extensions))); - } - if (options.files) { - return options.files.map((x) => path2.posix.join(directory, `**/${x}`)); - } - if (options.extensions) { - return [path2.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - return [path2.posix.join(directory, "**")]; - }; - module2.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = await Promise.all([].concat(input).map(async (x) => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - return [].concat.apply([], globs); - }; - module2.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - return [].concat.apply([], globs); - }; - } -}); - -// node_modules/ignore/index.js -var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports2, module2) { - function makeArray(subject) { - return Array.isArray(subject) ? subject : [subject]; - } - var EMPTY = ""; - var SPACE = " "; - var ESCAPE = "\\"; - var REGEX_TEST_BLANK_LINE = /^\s+$/; - var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; - var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; - var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; - var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; - var SLASH = "/"; - var TMP_KEY_IGNORE = "node-ignore"; - if (typeof Symbol !== "undefined") { - TMP_KEY_IGNORE = Symbol.for("node-ignore"); - } - var KEY_IGNORE = TMP_KEY_IGNORE; - var define = (object, key, value) => Object.defineProperty(object, key, { value }); - var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; - var RETURN_FALSE = () => false; - var sanitizeRange = (range) => range.replace( - REGEX_REGEXP_RANGE, - (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY - ); - var cleanRangeBackSlash = (slashes) => { - const { length } = slashes; - return slashes.slice(0, length - length % 2); - }; - var REPLACERS = [ - [ - // remove BOM - // TODO: - // Other similar zero-width characters? - /^\uFEFF/, - () => EMPTY - ], - // > Trailing spaces are ignored unless they are quoted with backslash ("\") - [ - // (a\ ) -> (a ) - // (a ) -> (a) - // (a \ ) -> (a ) - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY - ], - // replace (\ ) with ' ' - [ - /\\\s/g, - () => SPACE - ], - // Escape metacharacters - // which is written down by users but means special for regular expressions. - // > There are 12 characters with special meanings: - // > - the backslash \, - // > - the caret ^, - // > - the dollar sign $, - // > - the period or dot ., - // > - the vertical bar or pipe symbol |, - // > - the question mark ?, - // > - the asterisk or star *, - // > - the plus sign +, - // > - the opening parenthesis (, - // > - the closing parenthesis ), - // > - and the opening square bracket [, - // > - the opening curly brace {, - // > These special characters are often called "metacharacters". - [ - /[\\$.|*+(){^]/g, - (match) => `\\${match}` - ], - [ - // > a question mark (?) matches a single character - /(?!\\)\?/g, - () => "[^/]" - ], - // leading slash - [ - // > A leading slash matches the beginning of the pathname. - // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". - // A leading slash matches the beginning of the pathname - /^\//, - () => "^" - ], - // replace special metacharacter slash after the leading slash - [ - /\//g, - () => "\\/" - ], - [ - // > A leading "**" followed by a slash means match in all directories. - // > For example, "**/foo" matches file or directory "foo" anywhere, - // > the same as pattern "foo". - // > "**/foo/bar" matches file or directory "bar" anywhere that is directly - // > under directory "foo". - // Notice that the '*'s have been replaced as '\\*' - /^\^*\\\*\\\*\\\//, - // '**/foo' <-> 'foo' - () => "^(?:.*\\/)?" - ], - // starting - [ - // there will be no leading '/' - // (which has been replaced by section "leading slash") - // If starts with '**', adding a '^' to the regular expression also works - /^(?=[^^])/, - function startingReplacer() { - return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; - } - ], - // two globstars - [ - // Use lookahead assertions so that we could match more than one `'/**'` - /\\\/\\\*\\\*(?=\\\/|$)/g, - // Zero, one or several directories - // should not use '*', or it will be replaced by the next replacer - // Check if it is not the last `'/**'` - (_, index, str2) => index + 6 < str2.length ? "(?:\\/[^\\/]+)*" : "\\/.+" - ], - // normal intermediate wildcards - [ - // Never replace escaped '*' - // ignore rule '\*' will match the path '*' - // 'abc.*/' -> go - // 'abc.*' -> skip this rule, - // coz trailing single wildcard will be handed by [trailing wildcard] - /(^|[^\\]+)(\\\*)+(?=.+)/g, - // '*.js' matches '.js' - // '*.js' doesn't match 'abc' - (_, p1, p2) => { - const unescaped = p2.replace(/\\\*/g, "[^\\/]*"); - return p1 + unescaped; - } - ], - [ - // unescape, revert step 3 except for back slash - // For example, if a user escape a '\\*', - // after step 3, the result will be '\\\\\\*' - /\\\\\\(?=[$.|*+(){^])/g, - () => ESCAPE - ], - [ - // '\\\\' -> '\\' - /\\\\/g, - () => ESCAPE - ], - [ - // > The range notation, e.g. [a-zA-Z], - // > can be used to match one of the characters in a range. - // `\` is escaped by step 3 - /(\\)?\[([^\]/]*?)(\\*)($|\])/g, - (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" - ], - // ending - [ - // 'js' will not match 'js.' - // 'ab' will not match 'abc' - /(?:[^*])$/, - // WTF! - // https://git-scm.com/docs/gitignore - // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) - // which re-fixes #24, #38 - // > If there is a separator at the end of the pattern then the pattern - // > will only match directories, otherwise the pattern can match both - // > files and directories. - // 'js*' will not match 'a.js' - // 'js/' will not match 'a.js' - // 'js' will match 'a.js' and 'a.js/' - (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } - ] - ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; - } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); - }; - var isString = (subject) => typeof subject === "string"; - var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); - var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; - this.pattern = pattern; - this.negative = negative; - this.regex = regex; - } - }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; - let negative = false; - if (pattern.indexOf("!") === 0) { - negative = true; - pattern = pattern.substr(1); - } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); - return new IgnoreRule( - origin, - pattern, - negative, - regex - ); - }; - var throwError2 = (message, Ctor) => { - throw new Ctor(message); - }; - var checkPath = (path2, originalPath, doThrow) => { - if (!isString(path2)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path2) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path2)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; - }; - var isNotRelative = (path2) => REGEX_TEST_INVALID_PATH.test(path2); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define(this, KEY_IGNORE, true); - this._rules = []; - this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); - } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); - } - _addPattern(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); - this._added = true; - return; - } - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignoreCase); - this._added = true; - this._rules.push(rule); - } - } - // @param {Array | string | Ignore} pattern - add(pattern) { - this._added = false; - makeArray( - isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { - this._initCache(); - } - return this; - } - // legacy - addPattern(pattern) { - return this.add(pattern); - } - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - _testOne(path2, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path2); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; - } - // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { - const path2 = originalPath && checkPath.convert(originalPath); - checkPath( - path2, - originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError2 - ); - return this._t(path2, cache, checkUnignored, slices); - } - _t(path2, cache, checkUnignored, slices) { - if (path2 in cache) { - return cache[path2]; - } - if (!slices) { - slices = path2.split(SLASH); - } - slices.pop(); - if (!slices.length) { - return cache[path2] = this._testOne(path2, checkUnignored); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path2] = parent.ignored ? parent : this._testOne(path2, checkUnignored); - } - ignores(path2) { - return this._test(path2, this._ignoreCache, false).ignored; - } - createFilter() { - return (path2) => !this.ignores(path2); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path2) { - return this._test(path2, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - var isPathValid = (path2) => checkPath(path2 && checkPath.convert(path2), path2, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module2.exports = factory; - if ( - // Detect `process` so that it can run in browsers. - typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") - ) { - const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); - checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path2) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path2) || isNotRelative(path2); - } - } -}); - -// node_modules/slash/index.js -var require_slash = __commonJS({ - "node_modules/slash/index.js"(exports2, module2) { - "use strict"; - module2.exports = (path2) => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path2); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path2); - if (isExtendedLengthPath || hasNonAscii) { - return path2; - } - return path2.replace(/\\/g, "/"); - }; - } -}); - -// node_modules/globby/gitignore.js -var require_gitignore = __commonJS({ - "node_modules/globby/gitignore.js"(exports2, module2) { - "use strict"; - var { promisify } = require("util"); - var fs = require("fs"); - var path2 = require("path"); - var fastGlob = require_out4(); - var gitIgnore = require_ignore(); - var slash = require_slash(); - var DEFAULT_IGNORE = [ - "**/node_modules/**", - "**/flow-typed/**", - "**/coverage/**", - "**/.git" - ]; - var readFileP = promisify(fs.readFile); - var mapGitIgnorePatternTo = (base) => (ignore) => { - if (ignore.startsWith("!")) { - return "!" + path2.posix.join(base, ignore.slice(1)); - } - return path2.posix.join(base, ignore); - }; - var parseGitIgnore = (content, options) => { - const base = slash(path2.relative(options.cwd, path2.dirname(options.fileName))); - return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); - }; - var reduceIgnore = (files) => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - return ignores; - }; - var ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path2.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - return path2.join(cwd, p); - }; - var getIsIgnoredPredecate = (ignores, cwd) => { - return (p) => ignores.ignores(slash(path2.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); - }; - var getFile = async (file, cwd) => { - const filePath = path2.join(cwd, file); - const content = await readFileP(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var getFileSync = (file, cwd) => { - const filePath = path2.join(cwd, file); - const content = fs.readFileSync(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) - } = {}) => { - return { ignore, cwd }; - }; - module2.exports = async (options) => { - options = normalizeOptions(options); - const paths = await fastGlob("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - module2.exports.sync = (options) => { - options = normalizeOptions(options); - const paths = fastGlob.sync("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = paths.map((file) => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - } -}); - -// node_modules/globby/stream-utils.js -var require_stream_utils = __commonJS({ - "node_modules/globby/stream-utils.js"(exports2, module2) { - "use strict"; - var { Transform } = require("stream"); - var ObjectTransform = class extends Transform { - constructor() { - super({ - objectMode: true - }); - } - }; - var FilterStream = class extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - callback(); - } - }; - var UniqueStream = class extends ObjectTransform { - constructor() { - super(); - this._pushed = /* @__PURE__ */ new Set(); - } - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - callback(); - } - }; - module2.exports = { - FilterStream, - UniqueStream - }; - } -}); - -// node_modules/globby/index.js -var require_globby = __commonJS({ - "node_modules/globby/index.js"(exports2, module2) { - "use strict"; - var fs = require("fs"); - var arrayUnion = require_array_union(); - var merge2 = require_merge2(); - var fastGlob = require_out4(); - var dirGlob = require_dir_glob(); - var gitignore = require_gitignore(); - var { FilterStream, UniqueStream } = require_stream_utils(); - var DEFAULT_FILTER = () => false; - var isNegative = (pattern) => pattern[0] === "!"; - var assertPatternsInput = (patterns) => { - if (!patterns.every((pattern) => typeof pattern === "string")) { - throw new TypeError("Patterns must be a string or an array of strings"); - } - }; - var checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - let stat; - try { - stat = fs.statSync(options.cwd); - } catch { - return; - } - if (!stat.isDirectory()) { - throw new Error("The `cwd` option must be a path to a directory"); - } - }; - var getPathString = (p) => p.stats instanceof fs.Stats ? p.path : p; - var generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - const globTasks = []; - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - for (const [index, pattern] of patterns.entries()) { - if (isNegative(pattern)) { - continue; - } - const ignore = patterns.slice(index).filter((pattern2) => isNegative(pattern2)).map((pattern2) => pattern2.slice(1)); - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - globTasks.push({ pattern, options }); - } - return globTasks; - }; - var globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === "object") { - options = { - ...options, - ...task.options.expandDirectories - }; - } - return fn(task.pattern, options); - }; - var getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - var getFilterSync = (options) => { - return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - var globToTask = (task) => (glob) => { - const { options } = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - return { - pattern: glob, - options - }; - }; - module2.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const getFilter = async () => { - return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - const getTasks = async () => { - const tasks2 = await Promise.all(globTasks.map(async (task) => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - return arrayUnion(...tasks2); - }; - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); - return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); - }; - module2.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - return matches.filter((path_) => !filter(path_)); - }; - module2.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - const filterStream = new FilterStream((p) => !filter(p)); - const uniqueStream = new UniqueStream(); - return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); - }; - module2.exports.generateGlobTasks = generateGlobTasks; - module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); - module2.exports.gitignore = gitignore; - } -}); - -// node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - "node_modules/graceful-fs/polyfills.js"(exports2, module2) { - var constants = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs) { - if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs); - } - if (!fs.lutimes) { - patchLutimes(fs); - } - fs.chown = chownFix(fs.chown); - fs.fchown = chownFix(fs.fchown); - fs.lchown = chownFix(fs.lchown); - fs.chmod = chmodFix(fs.chmod); - fs.fchmod = chmodFix(fs.fchmod); - fs.lchmod = chmodFix(fs.lchmod); - fs.chownSync = chownFixSync(fs.chownSync); - fs.fchownSync = chownFixSync(fs.fchownSync); - fs.lchownSync = chownFixSync(fs.lchownSync); - fs.chmodSync = chmodFixSync(fs.chmodSync); - fs.fchmodSync = chmodFixSync(fs.fchmodSync); - fs.lchmodSync = chmodFixSync(fs.lchmodSync); - fs.stat = statFix(fs.stat); - fs.fstat = statFix(fs.fstat); - fs.lstat = statFix(fs.lstat); - fs.statSync = statFixSync(fs.statSync); - fs.fstatSync = statFixSync(fs.fstatSync); - fs.lstatSync = statFixSync(fs.lstatSync); - if (fs.chmod && !fs.lchmod) { - fs.lchmod = function(path2, mode, cb) { - if (cb) process.nextTick(cb); - }; - fs.lchmodSync = function() { - }; - } - if (fs.chown && !fs.lchown) { - fs.lchown = function(path2, uid, gid, cb) { - if (cb) process.nextTick(cb); - }; - fs.lchownSync = function() { - }; - } - if (platform === "win32") { - fs.rename = typeof fs.rename !== "function" ? fs.rename : (function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { - setTimeout(function() { - fs.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er); - }); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); - return rename; - })(fs.rename); - } - fs.read = typeof fs.read !== "function" ? fs.read : (function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); - return read; - })(fs.read); - fs.readSync = typeof fs.readSync !== "function" ? fs.readSync : /* @__PURE__ */ (function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - })(fs.readSync); - function patchLchmod(fs2) { - fs2.lchmod = function(path2, mode, callback) { - fs2.open( - path2, - constants.O_WRONLY | constants.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) callback(err); - return; - } - fs2.fchmod(fd, mode, function(err2) { - fs2.close(fd, function(err22) { - if (callback) callback(err2 || err22); - }); - }); - } - ); - }; - fs2.lchmodSync = function(path2, mode) { - var fd = fs2.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs2.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs2.closeSync(fd); - } catch (er) { - } - } else { - fs2.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs2) { - if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) { - fs2.lutimes = function(path2, at, mt, cb) { - fs2.open(path2, constants.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) cb(er); - return; - } - fs2.futimes(fd, at, mt, function(er2) { - fs2.close(fd, function(er22) { - if (cb) cb(er2 || er22); - }); - }); - }); - }; - fs2.lutimesSync = function(path2, at, mt) { - var fd = fs2.openSync(path2, constants.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs2.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs2.closeSync(fd); - } catch (er) { - } - } else { - fs2.closeSync(fd); - } - } - return ret; - }; - } else if (fs2.futimes) { - fs2.lutimes = function(_a, _b, _c, cb) { - if (cb) process.nextTick(cb); - }; - fs2.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) return orig; - return function(target, mode, cb) { - return orig.call(fs, target, mode, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) return orig; - return function(target, mode) { - try { - return orig.call(fs, target, mode); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function chownFix(orig) { - if (!orig) return orig; - return function(target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) return orig; - return function(target, uid, gid) { - try { - return orig.call(fs, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function statFix(orig) { - if (!orig) return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - if (cb) cb.apply(this, arguments); - } - return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) return orig; - return function(target, options) { - var stats = options ? orig.call(fs, target, options) : orig.call(fs, target); - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { - var Stream = require("stream").Stream; - module2.exports = legacy; - function legacy(fs) { - return { - ReadStream, - WriteStream - }; - function ReadStream(path2, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path2, options); - Stream.call(this); - var self2 = this; - this.path = path2; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self2._read(); - }); - return; - } - fs.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self2.emit("error", err); - self2.readable = false; - return; - } - self2.fd = fd; - self2.emit("open", fd); - self2._read(); - }); - } - function WriteStream(path2, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path2, options); - Stream.call(this); - this.path = path2; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - "node_modules/graceful-fs/clone.js"(exports2, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop() { - } - function publishQueue(context2, queue2) { - Object.defineProperty(context2, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug = noop; - if (util.debuglog) - debug = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs, queue); - fs.close = (function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - })(fs.close); - fs.closeSync = (function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - })(fs.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug(fs[gracefulQueue]); - require("assert").equal(fs[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs[gracefulQueue]); - } - module2.exports = patch(clone(fs)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { - module2.exports = patch(fs); - fs.__patched = true; - } - function patch(fs2) { - polyfills(fs2); - fs2.gracefulify = patch; - fs2.createReadStream = createReadStream; - fs2.createWriteStream = createWriteStream; - var fs$readFile = fs2.readFile; - fs2.readFile = readFile; - function readFile(path2, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path2, options, cb); - function go$readFile(path3, options2, cb2, startTime) { - return fs$readFile(path3, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs2.writeFile; - fs2.writeFile = writeFile; - function writeFile(path2, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path2, data, options, cb); - function go$writeFile(path3, data2, options2, cb2, startTime) { - return fs$writeFile(path3, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs2.appendFile; - if (fs$appendFile) - fs2.appendFile = appendFile; - function appendFile(path2, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path2, data, options, cb); - function go$appendFile(path3, data2, options2, cb2, startTime) { - return fs$appendFile(path3, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs2.copyFile; - if (fs$copyFile) - fs2.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs2.readdir; - fs2.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path2, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options2, cb2, startTime) { - return fs$readdir(path3, fs$readdirCallback( - path3, - options2, - cb2, - startTime - )); - } : function go$readdir2(path3, options2, cb2, startTime) { - return fs$readdir(path3, options2, fs$readdirCallback( - path3, - options2, - cb2, - startTime - )); - }; - return go$readdir(path2, options, cb); - function fs$readdirCallback(path3, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path3, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs2); - ReadStream = legStreams.ReadStream; - WriteStream = legStreams.WriteStream; - } - var fs$ReadStream = fs2.ReadStream; - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype); - ReadStream.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs2.WriteStream; - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype); - WriteStream.prototype.open = WriteStream$open; - } - Object.defineProperty(fs2, "ReadStream", { - get: function() { - return ReadStream; - }, - set: function(val) { - ReadStream = val; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs2, "WriteStream", { - get: function() { - return WriteStream; - }, - set: function(val) { - WriteStream = val; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream; - Object.defineProperty(fs2, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val) { - FileReadStream = val; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream; - Object.defineProperty(fs2, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val) { - FileWriteStream = val; - }, - enumerable: true, - configurable: true - }); - function ReadStream(path2, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream(path2, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream(path2, options) { - return new fs2.ReadStream(path2, options); - } - function createWriteStream(path2, options) { - return new fs2.WriteStream(path2, options); - } - var fs$open = fs2.open; - fs2.open = open; - function open(path2, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path2, flags, mode, cb); - function go$open(path3, flags2, mode2, cb2, startTime) { - return fs$open(path3, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs2; - } - function enqueue(elem) { - debug("ENQUEUE", elem[0].name, elem[1]); - fs[gracefulQueue].push(elem); - retry(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs[gracefulQueue].length; ++i) { - if (fs[gracefulQueue][i].length > 2) { - fs[gracefulQueue][i][3] = now; - fs[gracefulQueue][i][4] = now; - } - } - retry(); - } - function retry() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs[gracefulQueue].length === 0) - return; - var elem = fs[gracefulQueue].shift(); - var fn = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug("RETRY", fn.name, args); - fn.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug("TIMEOUT", fn.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug("RETRY", fn.name, args); - fn.apply(null, args.concat([startTime])); - } else { - fs[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry, 0); - } - } - } -}); - -// node_modules/is-path-cwd/index.js -var require_is_path_cwd = __commonJS({ - "node_modules/is-path-cwd/index.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - module2.exports = (path_) => { - let cwd = process.cwd(); - path_ = path2.resolve(path_); - if (process.platform === "win32") { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - return path_ === cwd; - }; - } -}); - -// node_modules/is-path-inside/index.js -var require_is_path_inside = __commonJS({ - "node_modules/is-path-inside/index.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - module2.exports = (childPath, parentPath) => { - const relation = path2.relative(parentPath, childPath); - return Boolean( - relation && relation !== ".." && !relation.startsWith(`..${path2.sep}`) && relation !== path2.resolve(childPath) - ); - }; - } -}); - -// node_modules/fs.realpath/old.js -var require_old = __commonJS({ - "node_modules/fs.realpath/old.js"(exports2) { - var pathModule = require("path"); - var isWindows = process.platform === "win32"; - var fs = require("fs"); - var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - function rethrow() { - var callback; - if (DEBUG) { - var backtrace = new Error(); - callback = debugCallback; - } else - callback = missingCallback; - return callback; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; - else if (!process.noDeprecation) { - var msg = "fs: missing callback " + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } - } - function maybeCallback(cb) { - return typeof cb === "function" ? cb : rethrow(); - } - var normalize = pathModule.normalize; - if (isWindows) { - nextPartRe = /(.*?)(?:[\/\\]+|$)/g; - } else { - nextPartRe = /(.*?)(?:[\/]+|$)/g; - } - var nextPartRe; - if (isWindows) { - splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; - } else { - splitRootRe = /^[\/]*/; - } - var splitRootRe; - exports2.realpathSync = function realpathSync(p, cache) { - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - while (pos < p.length) { - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - continue; - } - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - if (cache) cache[original] = p; - return p; - }; - exports2.realpath = function realpath(p, cache, cb) { - if (typeof cb !== "function") { - cb = maybeCallback(cache); - cache = null; - } - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - function LOOP() { - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - return process.nextTick(LOOP); - } - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - return gotResolvedLink(cache[base]); - } - return fs.lstat(base, gotStat); - } - function gotStat(err, stat) { - if (err) return cb(err); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err2) { - if (err2) return cb(err2); - fs.readlink(base, function(err3, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err3, target); - }); - }); - } - function gotTarget(err, target, base2) { - if (err) return cb(err); - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base2] = resolvedLink; - gotResolvedLink(resolvedLink); - } - function gotResolvedLink(resolvedLink) { - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - }; - } -}); - -// node_modules/fs.realpath/index.js -var require_fs5 = __commonJS({ - "node_modules/fs.realpath/index.js"(exports2, module2) { - module2.exports = realpath; - realpath.realpath = realpath; - realpath.sync = realpathSync; - realpath.realpathSync = realpathSync; - realpath.monkeypatch = monkeypatch; - realpath.unmonkeypatch = unmonkeypatch; - var fs = require("fs"); - var origRealpath = fs.realpath; - var origRealpathSync = fs.realpathSync; - var version = process.version; - var ok = /^v[0-5]\./.test(version); - var old = require_old(); - function newError(er) { - return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); - } - function realpath(p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb); - } - if (typeof cache === "function") { - cb = cache; - cache = null; - } - origRealpath(p, cache, function(er, result) { - if (newError(er)) { - old.realpath(p, cache, cb); - } else { - cb(er, result); - } - }); - } - function realpathSync(p, cache) { - if (ok) { - return origRealpathSync(p, cache); - } - try { - return origRealpathSync(p, cache); - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache); - } else { - throw er; - } - } - } - function monkeypatch() { - fs.realpath = realpath; - fs.realpathSync = realpathSync; - } - function unmonkeypatch() { - fs.realpath = origRealpath; - fs.realpathSync = origRealpathSync; - } - } -}); - -// node_modules/concat-map/index.js -var require_concat_map = __commonJS({ - "node_modules/concat-map/index.js"(exports2, module2) { - module2.exports = function(xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - } -}); - -// node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ - "node_modules/balanced-match/index.js"(exports2, module2) { - "use strict"; - module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r = range(a, b, str2); - return r && { - start: r[0], - end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + a.length, r[1]), - post: str2.slice(r[1] + b.length) - }; - } - function maybeMatch(reg, str2) { - var m = str2.match(reg); - return m ? m[0] : null; - } - balanced.range = range; - function range(a, b, str2) { - var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); - var i = ai; - if (ai >= 0 && bi > 0) { - begs = []; - left = str2.length; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str2.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - bi = str2.indexOf(b, i + 1); - } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length) { - result = [left, right]; - } - } - return result; - } - } -}); - -// node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ - "node_modules/brace-expansion/index.js"(exports2, module2) { - var concatMap = require_concat_map(); - var balanced = require_balanced_match(); - module2.exports = expandTop; - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) - return [""]; - var parts = []; - var m = balanced("{", "}", str2); - if (!m) - return str2.split(","); - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; - } - function expandTop(str2) { - if (!str2) - return []; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); - } - return expand(escapeBraces(str2), true).map(unescapeBraces); - } - function embrace(str2) { - return "{" + str2 + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte2(i, y) { - return i >= y; - } - function expand(str2, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2); - } - return [str2]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand(m.post, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte2; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { - return expand(el, false); - }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - return expansions; - } - } -}); - -// node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ - "node_modules/minimatch/minimatch.js"(exports2, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path2 = (function() { - try { - return require("path"); - } catch (e) { - } - })() || { - sep: "/" - }; - minimatch.sep = path2.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand = require_brace_expansion(); - var plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" } - }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set2, c) { - set2[c] = true; - return set2; - }, {}); - } - var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { - options = options || {}; - return function(p, i, list) { - return minimatch(p, pattern, options); - }; - } - function ext(a, b) { - b = b || {}; - var t = {}; - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; - } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); - }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); - }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); - }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); - }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); - }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); - }; - m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); - }; - return m; - }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); - if (!options) options = {}; - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); - } - assertValidPattern(pattern); - if (!options) options = {}; - pattern = pattern.trim(); - if (!options.allowWindowsEscape && path2.sep !== "/") { - pattern = pattern.split(path2.sep).join("/"); - } - this.options = options; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.make(); - } - Minimatch.prototype.debug = function() { - }; - Minimatch.prototype.make = make; - function make() { - var pattern = this.pattern; - var options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); - if (options.debug) this.debug = function debug() { - console.error.apply(console, arguments); - }; - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { - return s.split(slashSplit); - }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { - return s.map(this.parse, this); - }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { - return s.indexOf(false) === -1; - }); - this.debug(this.pattern, set2); - this.set = set2; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate = false; - var options = this.options; - var negateOffset = 0; - if (options.nonegate) return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate = !negate; - negateOffset++; - } - if (negateOffset) this.pattern = pattern.substr(negateOffset); - this.negate = negate; - } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return expand(pattern); - } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); - } - }; - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - assertValidPattern(pattern); - var options = this.options; - if (pattern === "**") { - if (!options.noglobstar) - return GLOBSTAR; - else - pattern = "*"; - } - if (pattern === "") return ""; - var re = ""; - var hasMagic = !!options.nocase; - var escaping = false; - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self2 = this; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; - } - self2.debug("clearStateChar %j %j", stateChar, re); - stateChar = false; - } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; - } - switch (c) { - /* istanbul ignore next */ - case "/": { - return false; - } - case "\\": - clearStateChar(); - escaping = true; - continue; - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); - if (inClass) { - this.debug(" in class"); - if (c === "!" && i === classStart + 1) c = "^"; - re += c; - continue; - } - self2.debug("call clearStateChar %j", stateChar); - clearStateChar(); - stateChar = c; - if (options.noext) clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re); - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - re += pl.close; - if (pl.type === "!") { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - clearStateChar(); - re += "|"; - continue; - // these are mostly the same in regexp and glob - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - var cs = pattern.substring(classStart + 1, i); - try { - RegExp("[" + cs + "]"); - } catch (er) { - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; - } - } - if (inClass) { - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re, pl); - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { - if (!$2) { - $2 = "\\"; - } - return $1 + $1 + $2 + "|"; - }); - this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case "[": - case ".": - case "(": - addPatternStart = true; - } - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - nlLast += nlAfter; - var openParensBefore = nlBefore.split("(").length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); - } - nlAfter = cleanAfter; - var dollar = ""; - if (nlAfter === "" && isSub !== SUBPARSE) { - dollar = "$"; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - if (re !== "" && hasMagic) { - re = "(?=.)" + re; - } - if (addPatternStart) { - re = patternStart + re; - } - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options.nocase ? "i" : ""; - try { - var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); - } - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) re = "^(?!" + re + ").*$"; - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - minimatch.match = function(list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function(f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = function match(f, partial) { - if (typeof partial === "undefined") partial = this.partial; - this.debug("match", f, this.pattern); - if (this.comment) return false; - if (this.empty) return f === ""; - if (f === "/" && partial) return true; - var options = this.options; - if (path2.sep !== "/") { - f = f.split(path2.sep).join("/"); - } - f = f.split(slashSplit); - this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) break; - } - for (i = 0; i < set2.length; i++) { - var pattern = set2[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) return true; - return !this.negate; - } - } - if (options.flipNegate) return false; - return this.negate; - }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options = this.options; - this.debug( - "matchOne", - { "this": this, file, pattern } - ); - this.debug("matchOne", file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug("matchOne loop"); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - if (p === false) return false; - if (p === GLOBSTAR) { - this.debug("GLOBSTAR", [pattern, p, f]); - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; - } - return true; - } - while (fr < fl) { - var swallowee = file[fr]; - this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { - this.debug("dot detected!", file, fr, pattern, pr); - break; - } - this.debug("globstar swallow a segment, and continue"); - fr++; - } - } - if (partial) { - this.debug("\n>>> no match, partial?", file, fr, pattern, pr); - if (fr === fl) return true; - } - return false; - } - var hit; - if (typeof p === "string") { - hit = f === p; - this.debug("string match", p, f, hit); - } else { - hit = f.match(p); - this.debug("pattern match", p, f, hit); - } - if (!hit) return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - return fi === fl - 1 && file[fi] === ""; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/inherits/inherits_browser.js -var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports2, module2) { - if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; - } - } -}); - -// node_modules/inherits/inherits.js -var require_inherits = __commonJS({ - "node_modules/inherits/inherits.js"(exports2, module2) { - try { - util = require("util"); - if (typeof util.inherits !== "function") throw ""; - module2.exports = util.inherits; - } catch (e) { - module2.exports = require_inherits_browser(); - } - var util; - } -}); - -// node_modules/path-is-absolute/index.js -var require_path_is_absolute = __commonJS({ - "node_modules/path-is-absolute/index.js"(exports2, module2) { - "use strict"; - function posix(path2) { - return path2.charAt(0) === "/"; - } - function win32(path2) { - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path2); - var device = result[1] || ""; - var isUnc = Boolean(device && device.charAt(1) !== ":"); - return Boolean(result[2] || isUnc); - } - module2.exports = process.platform === "win32" ? win32 : posix; - module2.exports.posix = posix; - module2.exports.win32 = win32; - } -}); - -// node_modules/rimraf/node_modules/glob/common.js -var require_common3 = __commonJS({ - "node_modules/rimraf/node_modules/glob/common.js"(exports2) { - exports2.setopts = setopts; - exports2.ownProp = ownProp; - exports2.makeAbs = makeAbs; - exports2.finish = finish; - exports2.mark = mark; - exports2.isIgnored = isIgnored; - exports2.childrenIgnored = childrenIgnored; - function ownProp(obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field); - } - var fs = require("fs"); - var path2 = require("path"); - var minimatch = require_minimatch(); - var isAbsolute = require_path_is_absolute(); - var Minimatch = minimatch.Minimatch; - function alphasort(a, b) { - return a.localeCompare(b, "en"); - } - function setupIgnores(self2, options) { - self2.ignore = options.ignore || []; - if (!Array.isArray(self2.ignore)) - self2.ignore = [self2.ignore]; - if (self2.ignore.length) { - self2.ignore = self2.ignore.map(ignoreMap); - } - } - function ignoreMap(pattern) { - var gmatcher = null; - if (pattern.slice(-3) === "/**") { - var gpattern = pattern.replace(/(\/\*\*)+$/, ""); - gmatcher = new Minimatch(gpattern, { dot: true }); - } - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher - }; - } - function setopts(self2, pattern, options) { - if (!options) - options = {}; - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar"); - } - pattern = "**/" + pattern; - } - self2.silent = !!options.silent; - self2.pattern = pattern; - self2.strict = options.strict !== false; - self2.realpath = !!options.realpath; - self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); - self2.follow = !!options.follow; - self2.dot = !!options.dot; - self2.mark = !!options.mark; - self2.nodir = !!options.nodir; - if (self2.nodir) - self2.mark = true; - self2.sync = !!options.sync; - self2.nounique = !!options.nounique; - self2.nonull = !!options.nonull; - self2.nosort = !!options.nosort; - self2.nocase = !!options.nocase; - self2.stat = !!options.stat; - self2.noprocess = !!options.noprocess; - self2.absolute = !!options.absolute; - self2.fs = options.fs || fs; - self2.maxLength = options.maxLength || Infinity; - self2.cache = options.cache || /* @__PURE__ */ Object.create(null); - self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); - self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); - setupIgnores(self2, options); - self2.changedCwd = false; - var cwd = process.cwd(); - if (!ownProp(options, "cwd")) - self2.cwd = cwd; - else { - self2.cwd = path2.resolve(options.cwd); - self2.changedCwd = self2.cwd !== cwd; - } - self2.root = options.root || path2.resolve(self2.cwd, "/"); - self2.root = path2.resolve(self2.root); - if (process.platform === "win32") - self2.root = self2.root.replace(/\\/g, "/"); - self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); - if (process.platform === "win32") - self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); - self2.nomount = !!options.nomount; - options.nonegate = true; - options.nocomment = true; - self2.minimatch = new Minimatch(pattern, options); - self2.options = self2.minimatch.options; - } - function finish(self2) { - var nou = self2.nounique; - var all = nou ? [] : /* @__PURE__ */ Object.create(null); - for (var i = 0, l = self2.matches.length; i < l; i++) { - var matches = self2.matches[i]; - if (!matches || Object.keys(matches).length === 0) { - if (self2.nonull) { - var literal = self2.minimatch.globSet[i]; - if (nou) - all.push(literal); - else - all[literal] = true; - } - } else { - var m = Object.keys(matches); - if (nou) - all.push.apply(all, m); - else - m.forEach(function(m2) { - all[m2] = true; - }); - } - } - if (!nou) - all = Object.keys(all); - if (!self2.nosort) - all = all.sort(alphasort); - if (self2.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self2._mark(all[i]); - } - if (self2.nodir) { - all = all.filter(function(e) { - var notDir = !/\/$/.test(e); - var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; - if (notDir && c) - notDir = c !== "DIR" && !Array.isArray(c); - return notDir; - }); - } - } - if (self2.ignore.length) - all = all.filter(function(m2) { - return !isIgnored(self2, m2); - }); - self2.found = all; - } - function mark(self2, p) { - var abs = makeAbs(self2, p); - var c = self2.cache[abs]; - var m = p; - if (c) { - var isDir = c === "DIR" || Array.isArray(c); - var slash = p.slice(-1) === "/"; - if (isDir && !slash) - m += "/"; - else if (!isDir && slash) - m = m.slice(0, -1); - if (m !== p) { - var mabs = makeAbs(self2, m); - self2.statCache[mabs] = self2.statCache[abs]; - self2.cache[mabs] = self2.cache[abs]; - } - } - return m; - } - function makeAbs(self2, f) { - var abs = f; - if (f.charAt(0) === "/") { - abs = path2.join(self2.root, f); - } else if (isAbsolute(f) || f === "") { - abs = f; - } else if (self2.changedCwd) { - abs = path2.resolve(self2.cwd, f); - } else { - abs = path2.resolve(f); - } - if (process.platform === "win32") - abs = abs.replace(/\\/g, "/"); - return abs; - } - function isIgnored(self2, path3) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return item.matcher.match(path3) || !!(item.gmatcher && item.gmatcher.match(path3)); - }); - } - function childrenIgnored(self2, path3) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path3)); - }); - } - } -}); - -// node_modules/rimraf/node_modules/glob/sync.js -var require_sync7 = __commonJS({ - "node_modules/rimraf/node_modules/glob/sync.js"(exports2, module2) { - module2.exports = globSync; - globSync.GlobSync = GlobSync; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var Glob = require_glob().Glob; - var util = require("util"); - var path2 = require("path"); - var assert = require("assert"); - var isAbsolute = require_path_is_absolute(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - function globSync(pattern, options) { - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - return new GlobSync(pattern, options).found; - } - function GlobSync(pattern, options) { - if (!pattern) - throw new Error("must provide pattern"); - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options); - setopts(this, pattern, options); - if (this.noprocess) - return this; - var n = this.minimatch.set.length; - this.matches = new Array(n); - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false); - } - this._finish(); - } - GlobSync.prototype._finish = function() { - assert(this instanceof GlobSync); - if (this.realpath) { - var self2 = this; - this.matches.forEach(function(matchset, index) { - var set2 = self2.matches[index] = /* @__PURE__ */ Object.create(null); - for (var p in matchset) { - try { - p = self2._makeAbs(p); - var real = rp.realpathSync(p, self2.realpathCache); - set2[real] = true; - } catch (er) { - if (er.syscall === "stat") - set2[self2._makeAbs(p)] = true; - else - throw er; - } - } - }); - } - common2.finish(this); - }; - GlobSync.prototype._process = function(pattern, index, inGlobStar) { - assert(this instanceof GlobSync); - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { - if (!prefix || !isAbsolute(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return; - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar); - }; - GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path2.join(this.root, e); - } - this._emitMatch(index, e); - } - return; - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) - newPattern = [prefix, e]; - else - newPattern = [e]; - this._process(newPattern.concat(remain), index, inGlobStar); - } - }; - GlobSync.prototype._emitMatch = function(index, e) { - if (isIgnored(this, e)) - return; - var abs = this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) { - e = abs; - } - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - if (this.stat) - this._stat(e); - }; - GlobSync.prototype._readdirInGlobStar = function(abs) { - if (this.follow) - return this._readdir(abs, false); - var entries; - var lstat; - var stat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er.code === "ENOENT") { - return null; - } - } - var isSym = lstat && lstat.isSymbolicLink(); - this.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = "FILE"; - else - entries = this._readdir(abs, false); - return entries; - }; - GlobSync.prototype._readdir = function(abs, inGlobStar) { - var entries; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return null; - if (Array.isArray(c)) - return c; - } - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)); - } catch (er) { - this._readdirError(abs, er); - return null; - } - }; - GlobSync.prototype._readdirEntries = function(abs, entries) { - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return entries; - }; - GlobSync.prototype._readdirError = function(f, er) { - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - throw error2; - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) - throw er; - if (!this.silent) - console.error("glob error", er); - break; - } - }; - GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false); - var len = entries.length; - var isSym = this.symlinks[abs]; - if (isSym && inGlobStar) - return; - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true); - } - }; - GlobSync.prototype._processSimple = function(prefix, index) { - var exists = this._stat(prefix); - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return; - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path2.join(this.root, prefix); - } else { - prefix = path2.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - }; - GlobSync.prototype._stat = function(f) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return false; - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return c; - if (needDir && c === "FILE") - return false; - } - var exists; - var stat = this.statCache[abs]; - if (!stat) { - var lstat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return false; - } - } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs); - } catch (er) { - stat = lstat; - } - } else { - stat = lstat; - } - } - this.statCache[abs] = stat; - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return false; - return c; - }; - GlobSync.prototype._mark = function(p) { - return common2.mark(this, p); - }; - GlobSync.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - } -}); - -// node_modules/inflight/inflight.js -var require_inflight = __commonJS({ - "node_modules/inflight/inflight.js"(exports2, module2) { - var wrappy = require_wrappy(); - var reqs = /* @__PURE__ */ Object.create(null); - var once = require_once(); - module2.exports = wrappy(inflight); - function inflight(key, cb) { - if (reqs[key]) { - reqs[key].push(cb); - return null; - } else { - reqs[key] = [cb]; - return makeres(key); - } - } - function makeres(key) { - return once(function RES() { - var cbs = reqs[key]; - var len = cbs.length; - var args = slice(arguments); - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args); - } - } finally { - if (cbs.length > len) { - cbs.splice(0, len); - process.nextTick(function() { - RES.apply(null, args); - }); - } else { - delete reqs[key]; - } - } - }); - } - function slice(args) { - var length = args.length; - var array = []; - for (var i = 0; i < length; i++) array[i] = args[i]; - return array; - } - } -}); - -// node_modules/rimraf/node_modules/glob/glob.js -var require_glob = __commonJS({ - "node_modules/rimraf/node_modules/glob/glob.js"(exports2, module2) { - module2.exports = glob; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var inherits = require_inherits(); - var EE = require("events").EventEmitter; - var path2 = require("path"); - var assert = require("assert"); - var isAbsolute = require_path_is_absolute(); - var globSync = require_sync7(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var inflight = require_inflight(); - var util = require("util"); - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - var once = require_once(); - function glob(pattern, options, cb) { - if (typeof options === "function") cb = options, options = {}; - if (!options) options = {}; - if (options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return globSync(pattern, options); - } - return new Glob(pattern, options, cb); - } - glob.sync = globSync; - var GlobSync = glob.GlobSync = globSync.GlobSync; - glob.glob = glob; - function extend3(origin, add) { - if (add === null || typeof add !== "object") { - return origin; - } - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; - } - glob.hasMagic = function(pattern, options_) { - var options = extend3({}, options_); - options.noprocess = true; - var g = new Glob(pattern, options); - var set2 = g.minimatch.set; - if (!pattern) - return false; - if (set2.length > 1) - return true; - for (var j = 0; j < set2[0].length; j++) { - if (typeof set2[0][j] !== "string") - return true; - } - return false; - }; - glob.Glob = Glob; - inherits(Glob, EE); - function Glob(pattern, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - if (options && options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return new GlobSync(pattern, options); - } - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb); - setopts(this, pattern, options); - this._didRealPath = false; - var n = this.minimatch.set.length; - this.matches = new Array(n); - if (typeof cb === "function") { - cb = once(cb); - this.on("error", cb); - this.on("end", function(matches) { - cb(null, matches); - }); - } - var self2 = this; - this._processing = 0; - this._emitQueue = []; - this._processQueue = []; - this.paused = false; - if (this.noprocess) - return this; - if (n === 0) - return done(); - var sync = true; - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false, done); - } - sync = false; - function done() { - --self2._processing; - if (self2._processing <= 0) { - if (sync) { - process.nextTick(function() { - self2._finish(); - }); - } else { - self2._finish(); - } - } - } - } - Glob.prototype._finish = function() { - assert(this instanceof Glob); - if (this.aborted) - return; - if (this.realpath && !this._didRealpath) - return this._realpath(); - common2.finish(this); - this.emit("end", this.found); - }; - Glob.prototype._realpath = function() { - if (this._didRealpath) - return; - this._didRealpath = true; - var n = this.matches.length; - if (n === 0) - return this._finish(); - var self2 = this; - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next); - function next() { - if (--n === 0) - self2._finish(); - } - }; - Glob.prototype._realpathSet = function(index, cb) { - var matchset = this.matches[index]; - if (!matchset) - return cb(); - var found = Object.keys(matchset); - var self2 = this; - var n = found.length; - if (n === 0) - return cb(); - var set2 = this.matches[index] = /* @__PURE__ */ Object.create(null); - found.forEach(function(p, i) { - p = self2._makeAbs(p); - rp.realpath(p, self2.realpathCache, function(er, real) { - if (!er) - set2[real] = true; - else if (er.syscall === "stat") - set2[p] = true; - else - self2.emit("error", er); - if (--n === 0) { - self2.matches[index] = set2; - cb(); - } - }); - }); - }; - Glob.prototype._mark = function(p) { - return common2.mark(this, p); - }; - Glob.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - Glob.prototype.abort = function() { - this.aborted = true; - this.emit("abort"); - }; - Glob.prototype.pause = function() { - if (!this.paused) { - this.paused = true; - this.emit("pause"); - } - }; - Glob.prototype.resume = function() { - if (this.paused) { - this.emit("resume"); - this.paused = false; - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0); - this._emitQueue.length = 0; - for (var i = 0; i < eq.length; i++) { - var e = eq[i]; - this._emitMatch(e[0], e[1]); - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0); - this._processQueue.length = 0; - for (var i = 0; i < pq.length; i++) { - var p = pq[i]; - this._processing--; - this._process(p[0], p[1], p[2], p[3]); - } - } - } - }; - Glob.prototype._process = function(pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === "function"); - if (this.aborted) - return; - this._processing++; - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]); - return; - } - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index, cb); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { - if (!prefix || !isAbsolute(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return cb(); - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); - }; - Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return cb(); - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path2.join(this.root, e); - } - this._emitMatch(index, e); - } - return cb(); - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - this._process([e].concat(remain), index, inGlobStar, cb); - } - cb(); - }; - Glob.prototype._emitMatch = function(index, e) { - if (this.aborted) - return; - if (isIgnored(this, e)) - return; - if (this.paused) { - this._emitQueue.push([index, e]); - return; - } - var abs = isAbsolute(e) ? e : this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) - e = abs; - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - var st = this.statCache[abs]; - if (st) - this.emit("stat", e, st); - this.emit("match", e); - }; - Glob.prototype._readdirInGlobStar = function(abs, cb) { - if (this.aborted) - return; - if (this.follow) - return this._readdir(abs, false, cb); - var lstatkey = "lstat\0" + abs; - var self2 = this; - var lstatcb = inflight(lstatkey, lstatcb_); - if (lstatcb) - self2.fs.lstat(abs, lstatcb); - function lstatcb_(er, lstat) { - if (er && er.code === "ENOENT") - return cb(); - var isSym = lstat && lstat.isSymbolicLink(); - self2.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) { - self2.cache[abs] = "FILE"; - cb(); - } else - self2._readdir(abs, false, cb); - } - }; - Glob.prototype._readdir = function(abs, inGlobStar, cb) { - if (this.aborted) - return; - cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); - if (!cb) - return; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return cb(); - if (Array.isArray(c)) - return cb(null, c); - } - var self2 = this; - self2.fs.readdir(abs, readdirCb(this, abs, cb)); - }; - function readdirCb(self2, abs, cb) { - return function(er, entries) { - if (er) - self2._readdirError(abs, er, cb); - else - self2._readdirEntries(abs, entries, cb); - }; - } - Glob.prototype._readdirEntries = function(abs, entries, cb) { - if (this.aborted) - return; - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return cb(null, entries); - }; - Glob.prototype._readdirError = function(f, er, cb) { - if (this.aborted) - return; - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - this.emit("error", error2); - this.abort(); - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) { - this.emit("error", er); - this.abort(); - } - if (!this.silent) - console.error("glob error", er); - break; - } - return cb(); - }; - Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false, cb); - var isSym = this.symlinks[abs]; - var len = entries.length; - if (isSym && inGlobStar) - return cb(); - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true, cb); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true, cb); - } - cb(); - }; - Glob.prototype._processSimple = function(prefix, index, cb) { - var self2 = this; - this._stat(prefix, function(er, exists) { - self2._processSimple2(prefix, index, er, exists, cb); - }); - }; - Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return cb(); - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path2.join(this.root, prefix); - } else { - prefix = path2.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - cb(); - }; - Glob.prototype._stat = function(f, cb) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return cb(); - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return cb(null, c); - if (needDir && c === "FILE") - return cb(); - } - var exists; - var stat = this.statCache[abs]; - if (stat !== void 0) { - if (stat === false) - return cb(null, stat); - else { - var type2 = stat.isDirectory() ? "DIR" : "FILE"; - if (needDir && type2 === "FILE") - return cb(); - else - return cb(null, type2, stat); - } - } - var self2 = this; - var statcb = inflight("stat\0" + abs, lstatcb_); - if (statcb) - self2.fs.lstat(abs, statcb); - function lstatcb_(er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - return self2.fs.stat(abs, function(er2, stat2) { - if (er2) - self2._stat2(f, abs, null, lstat, cb); - else - self2._stat2(f, abs, er2, stat2, cb); - }); - } else { - self2._stat2(f, abs, er, lstat, cb); - } - } - }; - Glob.prototype._stat2 = function(f, abs, er, stat, cb) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return cb(); - } - var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat; - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) - return cb(null, false, stat); - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return cb(); - return cb(null, c, stat); - }; - } -}); - -// node_modules/rimraf/rimraf.js -var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports2, module2) { - var assert = require("assert"); - var path2 = require("path"); - var fs = require("fs"); - var glob = void 0; - try { - glob = require_glob(); - } catch (_err) { - } - var defaultGlobOpts = { - nosort: true, - silent: true - }; - var timeout = 0; - var isWindows = process.platform === "win32"; - var defaults = (options) => { - const methods = [ - "unlink", - "chmod", - "stat", - "lstat", - "rmdir", - "readdir" - ]; - methods.forEach((m) => { - options[m] = options[m] || fs[m]; - m = m + "Sync"; - options[m] = options[m] || fs[m]; - }); - options.maxBusyTries = options.maxBusyTries || 3; - options.emfileWait = options.emfileWait || 1e3; - if (options.glob === false) { - options.disableGlob = true; - } - if (options.disableGlob !== true && glob === void 0) { - throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); - } - options.disableGlob = options.disableGlob || false; - options.glob = options.glob || defaultGlobOpts; - }; - var rimraf = (p, options, cb) => { - if (typeof options === "function") { - cb = options; - options = {}; - } - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert.equal(typeof cb, "function", "rimraf: callback function required"); - assert(options, "rimraf: invalid options argument provided"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - defaults(options); - let busyTries = 0; - let errState = null; - let n = 0; - const next = (er) => { - errState = errState || er; - if (--n === 0) - cb(errState); - }; - const afterGlob = (er, results) => { - if (er) - return cb(er); - n = results.length; - if (n === 0) - return cb(); - results.forEach((p2) => { - const CB = (er2) => { - if (er2) { - if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { - busyTries++; - return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); - } - if (er2.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p2, options, CB), timeout++); - } - if (er2.code === "ENOENT") er2 = null; - } - timeout = 0; - next(er2); - }; - rimraf_(p2, options, CB); - }); - }; - if (options.disableGlob || !glob.hasMagic(p)) - return afterGlob(null, [p]); - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]); - glob(p, options.glob, afterGlob); - }); - }; - var rimraf_ = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null); - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb); - if (st && st.isDirectory()) - return rmdir(p, options, er, cb); - options.unlink(p, (er2) => { - if (er2) { - if (er2.code === "ENOENT") - return cb(null); - if (er2.code === "EPERM") - return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); - if (er2.code === "EISDIR") - return rmdir(p, options, er2, cb); - } - return cb(er2); - }); - }); - }; - var fixWinEPERM = (p, options, er, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.chmod(p, 438, (er2) => { - if (er2) - cb(er2.code === "ENOENT" ? null : er); - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er); - else if (stats.isDirectory()) - rmdir(p, options, er, cb); - else - options.unlink(p, cb); - }); - }); - }; - var fixWinEPERMSync = (p, options, er) => { - assert(p); - assert(options); - try { - options.chmodSync(p, 438); - } catch (er2) { - if (er2.code === "ENOENT") - return; - else - throw er; - } - let stats; - try { - stats = options.statSync(p); - } catch (er3) { - if (er3.code === "ENOENT") - return; - else - throw er; - } - if (stats.isDirectory()) - rmdirSync(p, options, er); - else - options.unlinkSync(p); - }; - var rmdir = (p, options, originalEr, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.rmdir(p, (er) => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb); - else if (er && er.code === "ENOTDIR") - cb(originalEr); - else - cb(er); - }); - }; - var rmkids = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.readdir(p, (er, files) => { - if (er) - return cb(er); - let n = files.length; - if (n === 0) - return options.rmdir(p, cb); - let errState; - files.forEach((f) => { - rimraf(path2.join(p, f), options, (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--n === 0) - options.rmdir(p, cb); - }); - }); - }); - }; - var rimrafSync = (p, options) => { - options = options || {}; - defaults(options); - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert(options, "rimraf: missing options"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - let results; - if (options.disableGlob || !glob.hasMagic(p)) { - results = [p]; - } else { - try { - options.lstatSync(p); - results = [p]; - } catch (er) { - results = glob.sync(p, options.glob); - } - } - if (!results.length) - return; - for (let i = 0; i < results.length; i++) { - const p2 = results[i]; - let st; - try { - st = options.lstatSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p2, options, er); - } - try { - if (st && st.isDirectory()) - rmdirSync(p2, options, null); - else - options.unlinkSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); - if (er.code !== "EISDIR") - throw er; - rmdirSync(p2, options, er); - } - } - }; - var rmdirSync = (p, options, originalEr) => { - assert(p); - assert(options); - try { - options.rmdirSync(p); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "ENOTDIR") - throw originalEr; - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options); - } - }; - var rmkidsSync = (p, options) => { - assert(p); - assert(options); - options.readdirSync(p).forEach((f) => rimrafSync(path2.join(p, f), options)); - const retries = isWindows ? 100 : 1; - let i = 0; - do { - let threw = true; - try { - const ret = options.rmdirSync(p, options); - threw = false; - return ret; - } finally { - if (++i < retries && threw) - continue; - } - } while (true); - }; - module2.exports = rimraf; - rimraf.sync = rimrafSync; - } -}); - -// node_modules/del/node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "node_modules/del/node_modules/indent-string/index.js"(exports2, module2) { - "use strict"; - module2.exports = (string, count = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count)); - }; - } -}); - -// node_modules/del/node_modules/clean-stack/index.js -var require_clean_stack = __commonJS({ - "node_modules/del/node_modules/clean-stack/index.js"(exports2, module2) { - "use strict"; - var os = require("os"); - var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; - var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; - var homeDir = typeof os.homedir === "undefined" ? "" : os.homedir(); - module2.exports = (stack, options) => { - options = Object.assign({ pretty: false }, options); - return stack.replace(/\\/g, "/").split("\n").filter((line) => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - const match = pathMatches[1]; - if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { - return false; - } - return !pathRegex.test(match); - }).filter((line) => line.trim() !== "").map((line) => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); - } - return line; - }).join("\n"); - }; - } -}); - -// node_modules/del/node_modules/aggregate-error/index.js -var require_aggregate_error = __commonJS({ - "node_modules/del/node_modules/aggregate-error/index.js"(exports2, module2) { - "use strict"; - var indentString2 = require_indent_string(); - var cleanStack = require_clean_stack(); - var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - errors = [...errors].map((error2) => { - if (error2 instanceof Error) { - return error2; - } - if (error2 !== null && typeof error2 === "object") { - return Object.assign(new Error(error2.message), error2); - } - return new Error(error2); - }); - let message = errors.map((error2) => { - return typeof error2.stack === "string" ? cleanInternalStack(cleanStack(error2.stack)) : String(error2); - }).join("\n"); - message = "\n" + indentString2(message, 4); - super(message); - this.name = "AggregateError"; - Object.defineProperty(this, "_errors", { value: errors }); - } - *[Symbol.iterator]() { - for (const error2 of this._errors) { - yield error2; - } - } - }; - module2.exports = AggregateError; - } -}); - -// node_modules/del/node_modules/p-map/index.js -var require_p_map = __commonJS({ - "node_modules/del/node_modules/p-map/index.js"(exports2, module2) { - "use strict"; - var AggregateError = require_aggregate_error(); - module2.exports = async (iterable, mapper, { - concurrency = Infinity, - stopOnError = true - } = {}) => { - return new Promise((resolve2, reject) => { - if (typeof mapper !== "function") { - throw new TypeError("Mapper function is required"); - } - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - const next = () => { - if (isRejected) { - return; - } - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - if (nextItem.done) { - isIterableDone = true; - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve2(result); - } - } - return; - } - resolvingCount++; - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error2) { - if (stopOnError) { - isRejected = true; - reject(error2); - } else { - errors.push(error2); - resolvingCount--; - next(); - } - } - })(); - }; - for (let i = 0; i < concurrency; i++) { - next(); - if (isIterableDone) { - break; - } - } - }); - }; - } -}); - -// node_modules/del/index.js -var require_del = __commonJS({ - "node_modules/del/index.js"(exports2, module2) { - "use strict"; - var { promisify } = require("util"); - var path2 = require("path"); - var globby = require_globby(); - var isGlob = require_is_glob(); - var slash = require_slash(); - var gracefulFs = require_graceful_fs(); - var isPathCwd = require_is_path_cwd(); - var isPathInside = require_is_path_inside(); - var rimraf = require_rimraf(); - var pMap = require_p_map(); - var rimrafP = promisify(rimraf); - var rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync - }; - function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); - } - if (!isPathInside(file, cwd)) { - throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); - } - } - function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - patterns = patterns.map((pattern) => { - if (process.platform === "win32" && isGlob(pattern) === false) { - return slash(pattern); - } - return pattern; - }); - return patterns; - } - module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), onProgress = () => { - }, ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); - if (files.length === 0) { - onProgress({ - totalCount: 0, - deletedCount: 0, - percent: 1 - }); - } - let deletedCount = 0; - const mapper = async (file) => { - file = path2.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - deletedCount += 1; - onProgress({ - totalCount: files.length, - deletedCount, - percent: deletedCount / files.length - }); - return file; - }; - const removedFiles = await pMap(files, mapper, options); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); - const removedFiles = files.map((file) => { - file = path2.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - return file; - }); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - } -}); - // package.json var require_package = __commonJS({ "package.json"(exports2, module2) { @@ -54815,7 +45004,7 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^6.1.1", + del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -54900,7 +45089,6 @@ var io2 = __toESM(require_io()); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); -var import_del = __toESM(require_del()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -57864,52 +48052,6 @@ undici/lib/fetch/body.js: undici/lib/websocket/frame.js: (*! ws. MIT License. Einar Otto Stangvik *) -is-extglob/index.js: - (*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - *) - -is-glob/index.js: - (*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - *) - -is-number/index.js: - (*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - *) - -to-regex-range/index.js: - (*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - *) - -fill-range/index.js: - (*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - *) - -queue-microtask/index.js: - (*! queue-microtask. MIT License. Feross Aboukhadijeh *) - -run-parallel/index.js: - (*! run-parallel. MIT License. Feross Aboukhadijeh *) - js-yaml/dist/js-yaml.mjs: (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *) */ diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 4e00b0d09..42c1c94bc 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -185,7 +185,7 @@ var require_file_command = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; var crypto = __importStar4(require("crypto")); - var fs11 = __importStar4(require("fs")); + var fs14 = __importStar4(require("fs")); var os2 = __importStar4(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -193,10 +193,10 @@ var require_file_command = __commonJS({ if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs11.existsSync(filePath)) { + if (!fs14.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs11.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { + fs14.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { encoding: "utf8" }); } @@ -999,14 +999,14 @@ var require_util = __commonJS({ } const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; - let path11 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path15 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path11 && !path11.startsWith("/")) { - path11 = `/${path11}`; + if (path15 && !path15.startsWith("/")) { + path15 = `/${path15}`; } - url2 = new URL(origin + path11); + url2 = new URL(origin + path15); } return url2; } @@ -2620,20 +2620,20 @@ var require_parseParams = __commonJS({ var require_basename = __commonJS({ "node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) { "use strict"; - module2.exports = function basename(path11) { - if (typeof path11 !== "string") { + module2.exports = function basename(path15) { + if (typeof path15 !== "string") { return ""; } - for (var i = path11.length - 1; i >= 0; --i) { - switch (path11.charCodeAt(i)) { + for (var i = path15.length - 1; i >= 0; --i) { + switch (path15.charCodeAt(i)) { case 47: // '/' case 92: - path11 = path11.slice(i + 1); - return path11 === ".." || path11 === "." ? "" : path11; + path15 = path15.slice(i + 1); + return path15 === ".." || path15 === "." ? "" : path15; } } - return path11 === ".." || path11 === "." ? "" : path11; + return path15 === ".." || path15 === "." ? "" : path15; }; } }); @@ -2673,8 +2673,8 @@ var require_multipart = __commonJS({ } } function checkFinished() { - if (nends === 0 && finished && !boy._done) { - finished = false; + if (nends === 0 && finished2 && !boy._done) { + finished2 = false; self2.end(); } } @@ -2693,7 +2693,7 @@ var require_multipart = __commonJS({ let nends = 0; let curFile; let curField; - let finished = false; + let finished2 = false; this._needDrain = false; this._pause = false; this._cb = void 0; @@ -2879,7 +2879,7 @@ var require_multipart = __commonJS({ }).on("error", function(err) { boy.emit("error", err); }).on("finish", function() { - finished = true; + finished2 = true; checkFinished(); }); } @@ -5663,7 +5663,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path11, + path: path15, method, body, headers, @@ -5677,11 +5677,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path11 !== "string") { + if (typeof path15 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path11[0] !== "/" && !(path11.startsWith("http://") || path11.startsWith("https://")) && method !== "CONNECT") { + } else if (path15[0] !== "/" && !(path15.startsWith("http://") || path15.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path11) !== null) { + } else if (invalidPathRegex.exec(path15) !== null) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -5744,7 +5744,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? util.buildURL(path11, query) : path11; + this.path = query ? util.buildURL(path15, query) : path15; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -6752,9 +6752,9 @@ var require_RedirectHandler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path11 = search ? `${pathname}${search}` : pathname; + const path15 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path11; + this.opts.path = path15; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -7994,7 +7994,7 @@ var require_client = __commonJS({ writeH2(client, client[kHTTP2Session], request); return; } - const { body, method, path: path11, host, upgrade, headers, blocking, reset } = request; + const { body, method, path: path15, host, upgrade, headers, blocking, reset } = request; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); @@ -8044,7 +8044,7 @@ var require_client = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path11} HTTP/1.1\r + let header = `${method} ${path15} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -8107,7 +8107,7 @@ upgrade: ${upgrade}\r return true; } function writeH2(client, session, request) { - const { body, method, path: path11, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + const { body, method, path: path15, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; @@ -8150,7 +8150,7 @@ upgrade: ${upgrade}\r }); return true; } - headers[HTTP2_HEADER_PATH] = path11; + headers[HTTP2_HEADER_PATH] = path15; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -8310,10 +8310,10 @@ upgrade: ${upgrade}\r }); return; } - let finished = false; + let finished2 = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { - if (finished) { + if (finished2) { return; } try { @@ -8325,7 +8325,7 @@ upgrade: ${upgrade}\r } }; const onDrain = function() { - if (finished) { + if (finished2) { return; } if (body.resume) { @@ -8333,17 +8333,17 @@ upgrade: ${upgrade}\r } }; const onAbort = function() { - if (finished) { + if (finished2) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); }; const onFinished = function(err) { - if (finished) { + if (finished2) { return; } - finished = true; + finished2 = true; assert(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); socket.off("drain", onDrain).off("error", onFinished); body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); @@ -9217,7 +9217,7 @@ var require_readable = __commonJS({ var kBody = Symbol("kBody"); var kAbort = Symbol("abort"); var kContentType = Symbol("kContentType"); - var noop = () => { + var noop2 = () => { }; module2.exports = class BodyReadable extends Readable2 { constructor({ @@ -9339,7 +9339,7 @@ var require_readable = __commonJS({ return new Promise((resolve6, reject) => { const signalListenerCleanup = signal ? util.addAbortListener(signal, () => { this.destroy(); - }) : noop; + }) : noop2; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { @@ -9347,7 +9347,7 @@ var require_readable = __commonJS({ } else { resolve6(null); } - }).on("error", noop).on("data", function(chunk) { + }).on("error", noop2).on("data", function(chunk) { limit -= chunk.length; if (limit <= 0) { this.destroy(); @@ -9704,7 +9704,7 @@ var require_api_request = __commonJS({ var require_api_stream = __commonJS({ "node_modules/undici/lib/api/api-stream.js"(exports2, module2) { "use strict"; - var { finished, PassThrough } = require("stream"); + var { finished: finished2, PassThrough } = require("stream"); var { InvalidArgumentError, InvalidReturnValueError, @@ -9802,7 +9802,7 @@ var require_api_stream = __commonJS({ if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { throw new InvalidReturnValueError("expected Writable"); } - finished(res, { readable: false }, (err) => { + finished2(res, { readable: false }, (err) => { const { callback: callback2, res: res2, opaque: opaque2, trailers, abort } = this; this.res = null; if (err || !res2.readable) { @@ -10390,20 +10390,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path11) { - if (typeof path11 !== "string") { - return path11; + function safeUrl(path15) { + if (typeof path15 !== "string") { + return path15; } - const pathSegments = path11.split("?"); + const pathSegments = path15.split("?"); if (pathSegments.length !== 2) { - return path11; + return path15; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path11, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path11); + function matchKey(mockDispatch2, { path: path15, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path15); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10421,7 +10421,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path11 }) => matchValue(safeUrl(path11), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path15 }) => matchValue(safeUrl(path15), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10458,9 +10458,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path11, method, body, headers, query } = opts; + const { path: path15, method, body, headers, query } = opts; return { - path: path11, + path: path15, method, body, headers, @@ -10754,7 +10754,7 @@ var require_mock_interceptor = __commonJS({ var require_mock_client = __commonJS({ "node_modules/undici/lib/mock/mock-client.js"(exports2, module2) { "use strict"; - var { promisify } = require("util"); + var { promisify: promisify2 } = require("util"); var Client = require_client(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10794,7 +10794,7 @@ var require_mock_client = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify(this[kOriginalClose])(); + await promisify2(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10807,7 +10807,7 @@ var require_mock_client = __commonJS({ var require_mock_pool = __commonJS({ "node_modules/undici/lib/mock/mock-pool.js"(exports2, module2) { "use strict"; - var { promisify } = require("util"); + var { promisify: promisify2 } = require("util"); var Pool = require_pool(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10847,7 +10847,7 @@ var require_mock_pool = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify(this[kOriginalClose])(); + await promisify2(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10909,10 +10909,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path11, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path15, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path11, + Path: path15, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -15532,8 +15532,8 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path11) { - for (const char of path11) { + function validateCookiePath(path15) { + for (const char of path15) { const code = char.charCodeAt(0); if (code < 33 || char === ";") { throw new Error("Invalid cookie path"); @@ -17213,11 +17213,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path11 = opts.path; + let path15 = opts.path; if (!opts.path.startsWith("/")) { - path11 = `/${path11}`; + path15 = `/${path15}`; } - url2 = new URL(util.parseOrigin(url2).origin + path11); + url2 = new URL(util.parseOrigin(url2).origin + path15); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -18440,7 +18440,7 @@ var require_path_utils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path11 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -18450,7 +18450,7 @@ var require_path_utils = __commonJS({ } exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path11.sep); + return pth.replace(/[/\\]/g, path15.sep); } exports2.toPlatformPath = toPlatformPath; } @@ -18513,12 +18513,12 @@ var require_io_util = __commonJS({ var _a; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs11 = __importStar4(require("fs")); - var path11 = __importStar4(require("path")); - _a = fs11.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + var fs14 = __importStar4(require("fs")); + var path15 = __importStar4(require("path")); + _a = fs14.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs11.constants.O_RDONLY; + exports2.READONLY = fs14.constants.O_RDONLY; function exists(fsPath) { return __awaiter4(this, void 0, void 0, function* () { try { @@ -18533,13 +18533,13 @@ var require_io_util = __commonJS({ }); } exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { + function isDirectory2(fsPath, useStat = false) { return __awaiter4(this, void 0, void 0, function* () { const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; + exports2.isDirectory = isDirectory2; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18563,7 +18563,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path11.extname(filePath).toUpperCase(); + const upperExt = path15.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -18587,11 +18587,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path11.dirname(filePath); - const upperName = path11.basename(filePath).toUpperCase(); + const directory = path15.dirname(filePath); + const upperName = path15.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path11.join(directory, actualName); + filePath = path15.join(directory, actualName); break; } } @@ -18686,7 +18686,7 @@ var require_io = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; var assert_1 = require("assert"); - var path11 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var ioUtil = __importStar4(require_io_util()); function cp(source, dest, options = {}) { return __awaiter4(this, void 0, void 0, function* () { @@ -18695,7 +18695,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path11.join(dest, path11.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path15.join(dest, path15.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -18707,7 +18707,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path11.relative(source, newDest) === "") { + if (path15.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); @@ -18720,7 +18720,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path11.join(dest, path11.basename(source)); + dest = path15.join(dest, path15.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -18731,7 +18731,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path11.dirname(dest)); + yield mkdirP(path15.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -18794,7 +18794,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path11.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path15.delimiter)) { if (extension) { extensions.push(extension); } @@ -18807,12 +18807,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path11.sep)) { + if (tool.includes(path15.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path11.delimiter)) { + for (const p of process.env.PATH.split(path15.delimiter)) { if (p) { directories.push(p); } @@ -18820,7 +18820,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path11.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path15.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -18936,7 +18936,7 @@ var require_toolrunner = __commonJS({ var os2 = __importStar4(require("os")); var events = __importStar4(require("events")); var child = __importStar4(require("child_process")); - var path11 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var io6 = __importStar4(require_io()); var ioUtil = __importStar4(require_io_util()); var timers_1 = require("timers"); @@ -19151,7 +19151,7 @@ var require_toolrunner = __commonJS({ exec() { return __awaiter4(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path11.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path15.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { @@ -19651,7 +19651,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os2 = __importStar4(require("os")); - var path11 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -19679,7 +19679,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path11.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path15.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath; function getInput2(name, options) { @@ -19821,14 +19821,14 @@ var require_helpers = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; var uri = require("url"); - var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path11, name, argument) { - if (Array.isArray(path11)) { - this.path = path11; - this.property = path11.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path15, name, argument) { + if (Array.isArray(path15)) { + this.path = path15; + this.property = path15.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path11 !== void 0) { - this.property = path11; + } else if (path15 !== void 0) { + this.property = path15; } if (message) { this.message = message; @@ -19919,16 +19919,16 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path11, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path15, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path11)) { - this.path = path11; - this.propertyPath = path11.reduce(function(sum, item) { + if (Array.isArray(path15)) { + this.path = path15; + this.propertyPath = path15.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path11; + this.propertyPath = path15; } this.base = base; this.schemas = schemas; @@ -19937,10 +19937,10 @@ var require_helpers = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path11 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path15 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); var id = schema2.$id || schema2.id; var base = uri.resolve(this.base, id || ""); - var ctx = new SchemaContext(schema2, this.options, path11, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path15, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -21132,8 +21132,8 @@ var require_context = __commonJS({ if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path11 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path11} does not exist${os_1.EOL}`); + const path15 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path15} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -21826,12 +21826,12 @@ var require_wrappy = __commonJS({ var require_once = __commonJS({ "node_modules/once/once.js"(exports2, module2) { var wrappy = require_wrappy(); - module2.exports = wrappy(once); + module2.exports = wrappy(once2); module2.exports.strict = wrappy(onceStrict); - once.proto = once(function() { + once2.proto = once2(function() { Object.defineProperty(Function.prototype, "once", { value: function() { - return once(this); + return once2(this); }, configurable: true }); @@ -21842,7 +21842,7 @@ var require_once = __commonJS({ configurable: true }); }); - function once(fn) { + function once2(fn) { var f = function() { if (f.called) return f.value; f.called = true; @@ -23056,7 +23056,7 @@ var require_dist_node11 = __commonJS({ var import_graphql = require_dist_node9(); var import_auth_token = require_dist_node10(); var VERSION = "5.2.0"; - var noop = () => { + var noop2 = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); @@ -23135,8 +23135,8 @@ var require_dist_node11 = __commonJS({ this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); this.log = Object.assign( { - debug: noop, - info: noop, + debug: noop2, + info: noop2, warn: consoleWarn, error: consoleError }, @@ -25822,135 +25822,6 @@ var require_github = __commonJS({ } }); -// node_modules/array-union/index.js -var require_array_union = __commonJS({ - "node_modules/array-union/index.js"(exports2, module2) { - "use strict"; - module2.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; - }; - } -}); - -// node_modules/merge2/index.js -var require_merge2 = __commonJS({ - "node_modules/merge2/index.js"(exports2, module2) { - "use strict"; - var Stream = require("stream"); - var PassThrough = Stream.PassThrough; - var slice = Array.prototype.slice; - module2.exports = merge2; - function merge2() { - const streamsQueue = []; - const args = slice.call(arguments); - let merging = false; - let options = args[args.length - 1]; - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop(); - } else { - options = {}; - } - const doEnd = options.end !== false; - const doPipeError = options.pipeError === true; - if (options.objectMode == null) { - options.objectMode = true; - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024; - } - const mergedStream = PassThrough(options); - function addStream() { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)); - } - mergeStream(); - return this; - } - function mergeStream() { - if (merging) { - return; - } - merging = true; - let streams = streamsQueue.shift(); - if (!streams) { - process.nextTick(endStream); - return; - } - if (!Array.isArray(streams)) { - streams = [streams]; - } - let pipesCount = streams.length + 1; - function next() { - if (--pipesCount > 0) { - return; - } - merging = false; - mergeStream(); - } - function pipe(stream2) { - function onend() { - stream2.removeListener("merge2UnpipeEnd", onend); - stream2.removeListener("end", onend); - if (doPipeError) { - stream2.removeListener("error", onerror); - } - next(); - } - function onerror(err) { - mergedStream.emit("error", err); - } - if (stream2._readableState.endEmitted) { - return next(); - } - stream2.on("merge2UnpipeEnd", onend); - stream2.on("end", onend); - if (doPipeError) { - stream2.on("error", onerror); - } - stream2.pipe(mergedStream, { end: false }); - stream2.resume(); - } - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]); - } - next(); - } - function endStream() { - merging = false; - mergedStream.emit("queueDrain"); - if (doEnd) { - mergedStream.end(); - } - } - mergedStream.setMaxListeners(0); - mergedStream.add = addStream; - mergedStream.on("unpipe", function(stream2) { - stream2.emit("merge2UnpipeEnd"); - }); - if (args.length) { - addStream.apply(null, args); - } - return mergedStream; - } - function pauseStreams(streams, options) { - if (!Array.isArray(streams)) { - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)); - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error("Only readable stream can be merged."); - } - streams.pause(); - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options); - } - } - return streams; - } - } -}); - // node_modules/fast-glob/out/utils/array.js var require_array = __commonJS({ "node_modules/fast-glob/out/utils/array.js"(exports2) { @@ -26023,7 +25894,7 @@ var require_path = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0; var os2 = require("os"); - var path11 = require("path"); + var path15 = require("path"); var IS_WINDOWS_PLATFORM = os2.platform() === "win32"; var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; @@ -26035,7 +25906,7 @@ var require_path = __commonJS({ } exports2.unixify = unixify; function makeAbsolute(cwd, filepath) { - return path11.resolve(cwd, filepath); + return path15.resolve(cwd, filepath); } exports2.makeAbsolute = makeAbsolute; function removeLeadingDotSegment(entry) { @@ -26201,7 +26072,7 @@ var require_is_glob = __commonJS({ } return false; }; - module2.exports = function isGlob(str2, options) { + module2.exports = function isGlob2(str2, options) { if (typeof str2 !== "string" || str2 === "") { return false; } @@ -26221,26 +26092,26 @@ var require_is_glob = __commonJS({ var require_glob_parent = __commonJS({ "node_modules/glob-parent/index.js"(exports2, module2) { "use strict"; - var isGlob = require_is_glob(); + var isGlob2 = require_is_glob(); var pathPosixDirname = require("path").posix.dirname; var isWin32 = require("os").platform() === "win32"; - var slash = "/"; + var slash2 = "/"; var backslash = /\\/g; var enclosure = /[\{\[].*[\}\]]$/; - var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; + var globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/; var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; module2.exports = function globParent(str2, opts) { var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); + if (options.flipBackslashes && isWin32 && str2.indexOf(slash2) < 0) { + str2 = str2.replace(backslash, slash2); } if (enclosure.test(str2)) { - str2 += slash; + str2 += slash2; } str2 += "a"; do { str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); + } while (isGlob2(str2) || globby2.test(str2)); return str2.replace(escaped, "$1"); }; } @@ -27332,7 +27203,7 @@ var require_braces = __commonJS({ var require_constants7 = __commonJS({ "node_modules/picomatch/lib/constants.js"(exports2, module2) { "use strict"; - var path11 = require("path"); + var path15 = require("path"); var WIN_SLASH = "\\\\/"; var WIN_NO_SLASH = `[^${WIN_SLASH}]`; var DOT_LITERAL = "\\."; @@ -27502,7 +27373,7 @@ var require_constants7 = __commonJS({ /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - SEP: path11.sep, + SEP: path15.sep, /** * Create EXTGLOB_CHARS */ @@ -27529,7 +27400,7 @@ var require_constants7 = __commonJS({ var require_utils6 = __commonJS({ "node_modules/picomatch/lib/utils.js"(exports2) { "use strict"; - var path11 = require("path"); + var path15 = require("path"); var win32 = process.platform === "win32"; var { REGEX_BACKSLASH, @@ -27558,7 +27429,7 @@ var require_utils6 = __commonJS({ if (options && typeof options.windows === "boolean") { return options.windows; } - return win32 === true || path11.sep === "\\"; + return win32 === true || path15.sep === "\\"; }; exports2.escapeLast = (input, char, lastIdx) => { const idx = input.lastIndexOf(char, lastIdx); @@ -27644,14 +27515,14 @@ var require_scan2 = __commonJS({ let lastIndex = 0; let isBrace = false; let isBracket = false; - let isGlob = false; + let isGlob2 = false; let isExtglob = false; let isGlobstar = false; let braceEscaped = false; let backslashes = false; let negated = false; let negatedExtglob = false; - let finished = false; + let finished2 = false; let braces = 0; let prev; let code; @@ -27687,8 +27558,8 @@ var require_scan2 = __commonJS({ } if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -27696,8 +27567,8 @@ var require_scan2 = __commonJS({ } if (braceEscaped !== true && code === CHAR_COMMA2) { isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -27708,7 +27579,7 @@ var require_scan2 = __commonJS({ if (braces === 0) { braceEscaped = false; isBrace = token.isBrace = true; - finished = true; + finished2 = true; break; } } @@ -27722,7 +27593,7 @@ var require_scan2 = __commonJS({ slashes.push(index); tokens.push(token); token = { value: "", depth: 0, isGlob: false }; - if (finished === true) continue; + if (finished2 === true) continue; if (prev === CHAR_DOT && index === start + 1) { start += 2; continue; @@ -27733,9 +27604,9 @@ var require_scan2 = __commonJS({ if (opts.noext !== true) { const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; + isGlob2 = token.isGlob = true; isExtglob = token.isExtglob = true; - finished = true; + finished2 = true; if (code === CHAR_EXCLAMATION_MARK && index === start) { negatedExtglob = true; } @@ -27747,8 +27618,8 @@ var require_scan2 = __commonJS({ continue; } if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; break; } } @@ -27759,16 +27630,16 @@ var require_scan2 = __commonJS({ } if (code === CHAR_ASTERISK2) { if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } break; } if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -27783,8 +27654,8 @@ var require_scan2 = __commonJS({ } if (next === CHAR_RIGHT_SQUARE_BRACKET2) { isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; break; } } @@ -27799,7 +27670,7 @@ var require_scan2 = __commonJS({ continue; } if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; + isGlob2 = token.isGlob = true; if (scanToEnd === true) { while (eos() !== true && (code = advance())) { if (code === CHAR_LEFT_PARENTHESES) { @@ -27808,7 +27679,7 @@ var require_scan2 = __commonJS({ continue; } if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; + finished2 = true; break; } } @@ -27816,8 +27687,8 @@ var require_scan2 = __commonJS({ } break; } - if (isGlob === true) { - finished = true; + if (isGlob2 === true) { + finished2 = true; if (scanToEnd === true) { continue; } @@ -27826,7 +27697,7 @@ var require_scan2 = __commonJS({ } if (opts.noext === true) { isExtglob = false; - isGlob = false; + isGlob2 = false; } let base = str2; let prefix = ""; @@ -27836,10 +27707,10 @@ var require_scan2 = __commonJS({ str2 = str2.slice(start); lastIndex -= start; } - if (base && isGlob === true && lastIndex > 0) { + if (base && isGlob2 === true && lastIndex > 0) { base = str2.slice(0, lastIndex); glob = str2.slice(lastIndex); - } else if (isGlob === true) { + } else if (isGlob2 === true) { base = ""; glob = str2; } else { @@ -27864,7 +27735,7 @@ var require_scan2 = __commonJS({ glob, isBrace, isBracket, - isGlob, + isGlob: isGlob2, isExtglob, isGlobstar, negated, @@ -28693,7 +28564,7 @@ var require_parse3 = __commonJS({ var require_picomatch = __commonJS({ "node_modules/picomatch/lib/picomatch.js"(exports2, module2) { "use strict"; - var path11 = require("path"); + var path15 = require("path"); var scan = require_scan2(); var parse = require_parse3(); var utils = require_utils6(); @@ -28778,7 +28649,7 @@ var require_picomatch = __commonJS({ }; picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path11.basename(input)); + return regex.test(path15.basename(input)); }; picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); picomatch.parse = (pattern, options) => { @@ -29005,7 +28876,7 @@ var require_pattern = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; - var path11 = require("path"); + var path15 = require("path"); var globParent = require_glob_parent(); var micromatch = require_micromatch(); var GLOBSTAR = "**"; @@ -29017,10 +28888,10 @@ var require_pattern = __commonJS({ var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); + return !isDynamicPattern2(pattern, options); } exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern(pattern, options = {}) { + function isDynamicPattern2(pattern, options = {}) { if (pattern === "") { return false; } @@ -29038,7 +28909,7 @@ var require_pattern = __commonJS({ } return false; } - exports2.isDynamicPattern = isDynamicPattern; + exports2.isDynamicPattern = isDynamicPattern2; function hasBraceExpansion(pattern) { const openingBraceIndex = pattern.indexOf("{"); if (openingBraceIndex === -1) { @@ -29052,23 +28923,23 @@ var require_pattern = __commonJS({ return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); } function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; + return isNegativePattern2(pattern) ? pattern.slice(1) : pattern; } exports2.convertToPositivePattern = convertToPositivePattern; function convertToNegativePattern(pattern) { return "!" + pattern; } exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern(pattern) { + function isNegativePattern2(pattern) { return pattern.startsWith("!") && pattern[1] !== "("; } - exports2.isNegativePattern = isNegativePattern; + exports2.isNegativePattern = isNegativePattern2; function isPositivePattern(pattern) { - return !isNegativePattern(pattern); + return !isNegativePattern2(pattern); } exports2.isPositivePattern = isPositivePattern; function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); + return patterns.filter(isNegativePattern2); } exports2.getNegativePatterns = getNegativePatterns; function getPositivePatterns(patterns) { @@ -29100,7 +28971,7 @@ var require_pattern = __commonJS({ } exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; function isAffectDepthOfReadingPattern(pattern) { - const basename = path11.basename(pattern); + const basename = path15.basename(pattern); return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); } exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; @@ -29158,12 +29029,131 @@ var require_pattern = __commonJS({ } exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; function isAbsolute3(pattern) { - return path11.isAbsolute(pattern); + return path15.isAbsolute(pattern); } exports2.isAbsolute = isAbsolute3; } }); +// node_modules/merge2/index.js +var require_merge2 = __commonJS({ + "node_modules/merge2/index.js"(exports2, module2) { + "use strict"; + var Stream = require("stream"); + var PassThrough = Stream.PassThrough; + var slice = Array.prototype.slice; + module2.exports = merge2; + function merge2() { + const streamsQueue = []; + const args = slice.call(arguments); + let merging = false; + let options = args[args.length - 1]; + if (options && !Array.isArray(options) && options.pipe == null) { + args.pop(); + } else { + options = {}; + } + const doEnd = options.end !== false; + const doPipeError = options.pipeError === true; + if (options.objectMode == null) { + options.objectMode = true; + } + if (options.highWaterMark == null) { + options.highWaterMark = 64 * 1024; + } + const mergedStream = PassThrough(options); + function addStream() { + for (let i = 0, len = arguments.length; i < len; i++) { + streamsQueue.push(pauseStreams(arguments[i], options)); + } + mergeStream(); + return this; + } + function mergeStream() { + if (merging) { + return; + } + merging = true; + let streams = streamsQueue.shift(); + if (!streams) { + process.nextTick(endStream2); + return; + } + if (!Array.isArray(streams)) { + streams = [streams]; + } + let pipesCount = streams.length + 1; + function next() { + if (--pipesCount > 0) { + return; + } + merging = false; + mergeStream(); + } + function pipe(stream2) { + function onend() { + stream2.removeListener("merge2UnpipeEnd", onend); + stream2.removeListener("end", onend); + if (doPipeError) { + stream2.removeListener("error", onerror); + } + next(); + } + function onerror(err) { + mergedStream.emit("error", err); + } + if (stream2._readableState.endEmitted) { + return next(); + } + stream2.on("merge2UnpipeEnd", onend); + stream2.on("end", onend); + if (doPipeError) { + stream2.on("error", onerror); + } + stream2.pipe(mergedStream, { end: false }); + stream2.resume(); + } + for (let i = 0; i < streams.length; i++) { + pipe(streams[i]); + } + next(); + } + function endStream2() { + merging = false; + mergedStream.emit("queueDrain"); + if (doEnd) { + mergedStream.end(); + } + } + mergedStream.setMaxListeners(0); + mergedStream.add = addStream; + mergedStream.on("unpipe", function(stream2) { + stream2.emit("merge2UnpipeEnd"); + }); + if (args.length) { + addStream.apply(null, args); + } + return mergedStream; + } + function pauseStreams(streams, options) { + if (!Array.isArray(streams)) { + if (!streams._readableState && streams.pipe) { + streams = streams.pipe(PassThrough(options)); + } + if (!streams._readableState || !streams.pause || !streams.pipe) { + throw new Error("Only readable stream can be merged."); + } + streams.pause(); + } else { + for (let i = 0, len = streams.length; i < len; i++) { + streams[i] = pauseStreams(streams[i], options); + } + } + return streams; + } + } +}); + // node_modules/fast-glob/out/utils/stream.js var require_stream = __commonJS({ "node_modules/fast-glob/out/utils/stream.js"(exports2) { @@ -29214,10 +29204,10 @@ var require_utils7 = __commonJS({ exports2.array = array; var errno = require_errno(); exports2.errno = errno; - var fs11 = require_fs(); - exports2.fs = fs11; - var path11 = require_path(); - exports2.path = path11; + var fs14 = require_fs(); + exports2.fs = fs14; + var path15 = require_path(); + exports2.path = path15; var pattern = require_pattern(); exports2.pattern = pattern; var stream2 = require_stream(); @@ -29329,8 +29319,8 @@ var require_async = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.read = void 0; - function read(path11, settings, callback) { - settings.fs.lstat(path11, (lstatError, lstat) => { + function read(path15, settings, callback) { + settings.fs.lstat(path15, (lstatError, lstat) => { if (lstatError !== null) { callFailureCallback(callback, lstatError); return; @@ -29339,7 +29329,7 @@ var require_async = __commonJS({ callSuccessCallback(callback, lstat); return; } - settings.fs.stat(path11, (statError, stat) => { + settings.fs.stat(path15, (statError, stat) => { if (statError !== null) { if (settings.throwErrorOnBrokenSymbolicLink) { callFailureCallback(callback, statError); @@ -29371,13 +29361,13 @@ var require_sync = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.read = void 0; - function read(path11, settings) { - const lstat = settings.fs.lstatSync(path11); + function read(path15, settings) { + const lstat = settings.fs.lstatSync(path15); if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { return lstat; } try { - const stat = settings.fs.statSync(path11); + const stat = settings.fs.statSync(path15); if (settings.markSymbolicLink) { stat.isSymbolicLink = () => true; } @@ -29399,12 +29389,12 @@ var require_fs2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs11 = require("fs"); + var fs14 = require("fs"); exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs11.lstat, - stat: fs11.stat, - lstatSync: fs11.lstatSync, - statSync: fs11.statSync + lstat: fs14.lstat, + stat: fs14.stat, + lstatSync: fs14.lstatSync, + statSync: fs14.statSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -29421,12 +29411,12 @@ var require_settings = __commonJS({ "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var fs11 = require_fs2(); + var fs14 = require_fs2(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs11.createFileSystemAdapter(this._options.fs); + this.fs = fs14.createFileSystemAdapter(this._options.fs); this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); } @@ -29448,17 +29438,17 @@ var require_out = __commonJS({ var sync = require_sync(); var settings_1 = require_settings(); exports2.Settings = settings_1.default; - function stat(path11, optionsOrSettingsOrCallback, callback) { + function stat(path15, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path11, getSettings(), optionsOrSettingsOrCallback); + async.read(path15, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path11, getSettings(optionsOrSettingsOrCallback), callback); + async.read(path15, getSettings(optionsOrSettingsOrCallback), callback); } exports2.stat = stat; - function statSync2(path11, optionsOrSettings) { + function statSync2(path15, optionsOrSettings) { const settings = getSettings(optionsOrSettings); - return sync.read(path11, settings); + return sync.read(path15, settings); } exports2.statSync = statSync2; function getSettings(settingsOrOptions = {}) { @@ -29581,8 +29571,8 @@ var require_utils8 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fs = void 0; - var fs11 = require_fs3(); - exports2.fs = fs11; + var fs14 = require_fs3(); + exports2.fs = fs14; } }); @@ -29674,16 +29664,16 @@ var require_async2 = __commonJS({ return; } const tasks = names.map((name) => { - const path11 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const path15 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); return (done) => { - fsStat.stat(path11, settings.fsStatSettings, (error2, stats) => { + fsStat.stat(path15, settings.fsStatSettings, (error2, stats) => { if (error2 !== null) { done(error2); return; } const entry = { name, - path: path11, + path: path15, dirent: utils.fs.createDirentFromStats(name, stats) }; if (settings.stats) { @@ -29777,14 +29767,14 @@ var require_fs4 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs11 = require("fs"); + var fs14 = require("fs"); exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs11.lstat, - stat: fs11.stat, - lstatSync: fs11.lstatSync, - statSync: fs11.statSync, - readdir: fs11.readdir, - readdirSync: fs11.readdirSync + lstat: fs14.lstat, + stat: fs14.stat, + lstatSync: fs14.lstatSync, + statSync: fs14.statSync, + readdir: fs14.readdir, + readdirSync: fs14.readdirSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -29801,15 +29791,15 @@ var require_settings2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path11 = require("path"); + var path15 = require("path"); var fsStat = require_out(); - var fs11 = require_fs4(); + var fs14 = require_fs4(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs11.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path11.sep); + this.fs = fs14.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep); this.stats = this._getValue(this._options.stats, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); this.fsStatSettings = new fsStat.Settings({ @@ -29836,17 +29826,17 @@ var require_out2 = __commonJS({ var sync = require_sync2(); var settings_1 = require_settings2(); exports2.Settings = settings_1.default; - function scandir(path11, optionsOrSettingsOrCallback, callback) { + function scandir(path15, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path11, getSettings(), optionsOrSettingsOrCallback); + async.read(path15, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path11, getSettings(optionsOrSettingsOrCallback), callback); + async.read(path15, getSettings(optionsOrSettingsOrCallback), callback); } exports2.scandir = scandir; - function scandirSync(path11, optionsOrSettings) { + function scandirSync(path15, optionsOrSettings) { const settings = getSettings(optionsOrSettings); - return sync.read(path11, settings); + return sync.read(path15, settings); } exports2.scandirSync = scandirSync; function getSettings(settingsOrOptions = {}) { @@ -29906,8 +29896,8 @@ var require_queue = __commonJS({ var _running = 0; var self2 = { push, - drain: noop, - saturated: noop, + drain: noop2, + saturated: noop2, pause, paused: false, concurrency, @@ -29917,7 +29907,7 @@ var require_queue = __commonJS({ length, getQueue, unshift, - empty: noop, + empty: noop2, kill, killAndDrain }; @@ -29962,7 +29952,7 @@ var require_queue = __commonJS({ current.context = context2; current.release = release; current.value = value; - current.callback = done || noop; + current.callback = done || noop2; if (_running === self2.concurrency || self2.paused) { if (queueTail) { queueTail.next = current; @@ -29982,7 +29972,7 @@ var require_queue = __commonJS({ current.context = context2; current.release = release; current.value = value; - current.callback = done || noop; + current.callback = done || noop2; if (_running === self2.concurrency || self2.paused) { if (queueHead) { current.next = queueHead; @@ -30023,28 +30013,28 @@ var require_queue = __commonJS({ function kill() { queueHead = null; queueTail = null; - self2.drain = noop; + self2.drain = noop2; } function killAndDrain() { queueHead = null; queueTail = null; self2.drain(); - self2.drain = noop; + self2.drain = noop2; } } - function noop() { + function noop2() { } function Task() { this.value = null; - this.callback = noop; + this.callback = noop2; this.next = null; - this.release = noop; + this.release = noop2; this.context = null; var self2 = this; this.worked = function worked(err, result) { var callback = self2.callback; self2.value = null; - self2.callback = noop; + self2.callback = noop2; callback.call(self2.context, err, result); self2.release(self2); }; @@ -30373,7 +30363,7 @@ var require_settings3 = __commonJS({ "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path11 = require("path"); + var path15 = require("path"); var fsScandir = require_out2(); var Settings = class { constructor(_options = {}) { @@ -30383,7 +30373,7 @@ var require_settings3 = __commonJS({ this.deepFilter = this._getValue(this._options.deepFilter, null); this.entryFilter = this._getValue(this._options.entryFilter, null); this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path11.sep); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path15.sep); this.fsScandirSettings = new fsScandir.Settings({ followSymbolicLinks: this._options.followSymbolicLinks, fs: this._options.fs, @@ -30445,7 +30435,7 @@ var require_reader2 = __commonJS({ "node_modules/fast-glob/out/readers/reader.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path11 = require("path"); + var path15 = require("path"); var fsStat = require_out(); var utils = require_utils7(); var Reader = class { @@ -30458,7 +30448,7 @@ var require_reader2 = __commonJS({ }); } _getFullEntryPath(filepath) { - return path11.resolve(this._settings.cwd, filepath); + return path15.resolve(this._settings.cwd, filepath); } _makeEntry(stats, pattern) { const entry = { @@ -30779,34 +30769,34 @@ var require_entry = __commonJS({ _onlyDirectoryFilter(entry) { return this._settings.onlyDirectories && !entry.dirent.isDirectory(); } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); + _isMatchToPatternsSet(filepath, patterns, isDirectory2) { + const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2); if (!isMatched) { return false; } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); + const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2); if (isMatchedByRelativeNegative) { return false; } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); + const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2); if (isMatchedByAbsoluteNegative) { return false; } return true; } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { + _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) { if (patternsRe.length === 0) { return false; } const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); + return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2); } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { + _isMatchToPatterns(filepath, patternsRe, isDirectory2) { if (patternsRe.length === 0) { return false; } const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { + if (!isMatched && isDirectory2) { return utils.pattern.matchAny(filepath + "/", patternsRe); } return isMatched; @@ -30874,7 +30864,7 @@ var require_provider = __commonJS({ "node_modules/fast-glob/out/providers/provider.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path11 = require("path"); + var path15 = require("path"); var deep_1 = require_deep(); var entry_1 = require_entry(); var error_1 = require_error(); @@ -30888,7 +30878,7 @@ var require_provider = __commonJS({ this.entryTransformer = new entry_2.default(this._settings); } _getRootDirectory(task) { - return path11.resolve(this._settings.cwd, task.base); + return path15.resolve(this._settings.cwd, task.base); } _getReaderOptions(task) { const basePath = task.base === "." ? "" : task.base; @@ -31069,16 +31059,16 @@ var require_settings4 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs11 = require("fs"); + var fs14 = require("fs"); var os2 = require("os"); var CPU_COUNT = Math.max(os2.cpus().length, 1); exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs11.lstat, - lstatSync: fs11.lstatSync, - stat: fs11.stat, - statSync: fs11.statSync, - readdir: fs11.readdir, - readdirSync: fs11.readdirSync + lstat: fs14.lstat, + lstatSync: fs14.lstatSync, + stat: fs14.stat, + statSync: fs14.statSync, + readdir: fs14.readdir, + readdirSync: fs14.readdirSync }; var Settings = class { constructor(_options = {}) { @@ -31134,7 +31124,7 @@ var require_out4 = __commonJS({ var settings_1 = require_settings4(); var utils = require_utils7(); async function FastGlob(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, async_1.default, options); const result = await Promise.all(works); return utils.array.flatten(result); @@ -31145,65 +31135,65 @@ var require_out4 = __commonJS({ FastGlob2.globStream = stream2; FastGlob2.async = FastGlob2; function sync(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, sync_1.default, options); return utils.array.flatten(works); } FastGlob2.sync = sync; function stream2(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, stream_1.default, options); return utils.stream.merge(works); } FastGlob2.stream = stream2; - function generateTasks(source, options) { - assertPatternsInput(source); + function generateTasks2(source, options) { + assertPatternsInput2(source); const patterns = [].concat(source); const settings = new settings_1.default(options); return taskManager.generate(patterns, settings); } - FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); + FastGlob2.generateTasks = generateTasks2; + function isDynamicPattern2(source, options) { + assertPatternsInput2(source); const settings = new settings_1.default(options); return utils.pattern.isDynamicPattern(source, settings); } - FastGlob2.isDynamicPattern = isDynamicPattern; + FastGlob2.isDynamicPattern = isDynamicPattern2; function escapePath(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escape(source); } FastGlob2.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); + function convertPathToPattern2(source) { + assertPatternsInput2(source); return utils.path.convertPathToPattern(source); } - FastGlob2.convertPathToPattern = convertPathToPattern; + FastGlob2.convertPathToPattern = convertPathToPattern2; let posix; (function(posix2) { function escapePath2(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escapePosixPath(source); } posix2.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); + function convertPathToPattern3(source) { + assertPatternsInput2(source); return utils.path.convertPosixPathToPattern(source); } - posix2.convertPathToPattern = convertPathToPattern2; + posix2.convertPathToPattern = convertPathToPattern3; })(posix = FastGlob2.posix || (FastGlob2.posix = {})); let win32; (function(win322) { function escapePath2(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escapeWindowsPath(source); } win322.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); + function convertPathToPattern3(source) { + assertPatternsInput2(source); return utils.path.convertWindowsPathToPattern(source); } - win322.convertPathToPattern = convertPathToPattern2; + win322.convertPathToPattern = convertPathToPattern3; })(win32 = FastGlob2.win32 || (FastGlob2.win32 = {})); })(FastGlob || (FastGlob = {})); function getWorks(source, _Provider, options) { @@ -31213,7 +31203,7 @@ var require_out4 = __commonJS({ const provider = new _Provider(settings); return tasks.map(provider.read, provider); } - function assertPatternsInput(input) { + function assertPatternsInput2(input) { const source = [].concat(input); const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); if (!isValidSource) { @@ -31224,117 +31214,13 @@ var require_out4 = __commonJS({ } }); -// node_modules/path-type/index.js -var require_path_type = __commonJS({ - "node_modules/path-type/index.js"(exports2) { - "use strict"; - var { promisify } = require("util"); - var fs11 = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify(fs11[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - return fs11[fsStatType](filePath)[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - exports2.isFile = isType.bind(null, "stat", "isFile"); - exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// node_modules/dir-glob/index.js -var require_dir_glob = __commonJS({ - "node_modules/dir-glob/index.js"(exports2, module2) { - "use strict"; - var path11 = require("path"); - var pathType = require_path_type(); - var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; - var getPath = (filepath, cwd) => { - const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; - return path11.isAbsolute(pth) ? pth : path11.join(cwd, pth); - }; - var addExtensions = (file, extensions) => { - if (path11.extname(file)) { - return `**/${file}`; - } - return `**/${file}.${getExtensions(extensions)}`; - }; - var getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - if (options.files && options.extensions) { - return options.files.map((x) => path11.posix.join(directory, addExtensions(x, options.extensions))); - } - if (options.files) { - return options.files.map((x) => path11.posix.join(directory, `**/${x}`)); - } - if (options.extensions) { - return [path11.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - return [path11.posix.join(directory, "**")]; - }; - module2.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = await Promise.all([].concat(input).map(async (x) => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - return [].concat.apply([], globs); - }; - module2.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - return [].concat.apply([], globs); - }; - } -}); - -// node_modules/ignore/index.js +// node_modules/globby/node_modules/ignore/index.js var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports2, module2) { + "node_modules/globby/node_modules/ignore/index.js"(exports2, module2) { function makeArray(subject) { return Array.isArray(subject) ? subject : [subject]; } + var UNDEFINED = void 0; var EMPTY = ""; var SPACE = " "; var ESCAPE = "\\"; @@ -31343,14 +31229,18 @@ var require_ignore = __commonJS({ var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + var REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/; + var REGEX_TEST_TRAILING_SLASH = /\/$/; var SLASH = "/"; var TMP_KEY_IGNORE = "node-ignore"; if (typeof Symbol !== "undefined") { TMP_KEY_IGNORE = Symbol.for("node-ignore"); } var KEY_IGNORE = TMP_KEY_IGNORE; - var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); + var define2 = (object, key, value) => { + Object.defineProperty(object, key, { value }); + return value; + }; var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; var RETURN_FALSE = () => false; var sanitizeRange = (range) => range.replace( @@ -31363,7 +31253,7 @@ var require_ignore = __commonJS({ }; var REPLACERS = [ [ - // remove BOM + // Remove BOM // TODO: // Other similar zero-width characters? /^\uFEFF/, @@ -31373,14 +31263,21 @@ var require_ignore = __commonJS({ [ // (a\ ) -> (a ) // (a ) -> (a) + // (a ) -> (a) // (a \ ) -> (a ) - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY + /((?:\\\\)*?)(\\?\s+)$/, + (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY) ], - // replace (\ ) with ' ' + // Replace (\ ) with ' ' + // (\ ) -> ' ' + // (\\ ) -> '\\ ' + // (\\\ ) -> '\\ ' [ - /\\\s/g, - () => SPACE + /(\\+?)\s/g, + (_, m1) => { + const { length } = m1; + return m1.slice(0, length - length % 2) + SPACE; + } ], // Escape metacharacters // which is written down by users but means special for regular expressions. @@ -31500,103 +31397,100 @@ var require_ignore = __commonJS({ // 'js/' will not match 'a.js' // 'js' will match 'a.js' and 'a.js/' (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } ] ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; + var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/; + var MODE_IGNORE = "regex"; + var MODE_CHECK_IGNORE = "checkRegex"; + var UNDERSCORE = "_"; + var TRAILING_WILD_CARD_REPLACERS = { + [MODE_IGNORE](_, p1) { + const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; + }, + [MODE_CHECK_IGNORE](_, p1) { + const prefix = p1 ? `${p1}[^/]*` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); }; + var makeRegexPrefix = (pattern) => REPLACERS.reduce( + (prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)), + pattern + ); var isString = (subject) => typeof subject === "string"; var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); + var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean); var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; + constructor(pattern, mark, body, ignoreCase, negative, prefix) { this.pattern = pattern; + this.mark = mark; this.negative = negative; - this.regex = regex; + define2(this, "body", body); + define2(this, "ignoreCase", ignoreCase); + define2(this, "regexPrefix", prefix); + } + get regex() { + const key = UNDERSCORE + MODE_IGNORE; + if (this[key]) { + return this[key]; + } + return this._make(MODE_IGNORE, key); + } + get checkRegex() { + const key = UNDERSCORE + MODE_CHECK_IGNORE; + if (this[key]) { + return this[key]; + } + return this._make(MODE_CHECK_IGNORE, key); + } + _make(mode, key) { + const str2 = this.regexPrefix.replace( + REGEX_REPLACE_TRAILING_WILDCARD, + // It does not need to bind pattern + TRAILING_WILD_CARD_REPLACERS[mode] + ); + const regex = this.ignoreCase ? new RegExp(str2, "i") : new RegExp(str2); + return define2(this, key, regex); } }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; + var createRule = ({ + pattern, + mark + }, ignoreCase) => { let negative = false; - if (pattern.indexOf("!") === 0) { + let body = pattern; + if (body.indexOf("!") === 0) { negative = true; - pattern = pattern.substr(1); + body = body.substr(1); } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); + body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regexPrefix = makeRegexPrefix(body); return new IgnoreRule( - origin, pattern, + mark, + body, + ignoreCase, negative, - regex + regexPrefix ); }; - var throwError2 = (message, Ctor) => { - throw new Ctor(message); - }; - var checkPath = (path11, originalPath, doThrow) => { - if (!isString(path11)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path11) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path11)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; - }; - var isNotRelative = (path11) => REGEX_TEST_INVALID_PATH.test(path11); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define2(this, KEY_IGNORE, true); - this._rules = []; + var RuleManager = class { + constructor(ignoreCase) { this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); + this._rules = []; } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); - } - _addPattern(pattern) { + _add(pattern) { if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); + this._rules = this._rules.concat(pattern._rules._rules); this._added = true; return; } - if (checkPattern(pattern)) { + if (isString(pattern)) { + pattern = { + pattern + }; + } + if (checkPattern(pattern.pattern)) { const rule = createRule(pattern, this._ignoreCase); this._added = true; this._rules.push(rule); @@ -31607,8 +31501,85 @@ var require_ignore = __commonJS({ this._added = false; makeArray( isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { + ).forEach(this._add, this); + return this._added; + } + // Test one single path without recursively checking parent directories + // + // - checkUnignored `boolean` whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE` + // @returns {TestResult} true if a file is ignored + test(path15, checkUnignored, mode) { + let ignored = false; + let unignored = false; + let matchedRule; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { + return; + } + const matched = rule[mode].test(path15); + if (!matched) { + return; + } + ignored = !negative; + unignored = negative; + matchedRule = negative ? UNDEFINED : rule; + }); + const ret = { + ignored, + unignored + }; + if (matchedRule) { + ret.rule = matchedRule; + } + return ret; + } + }; + var throwError2 = (message, Ctor) => { + throw new Ctor(message); + }; + var checkPath = (path15, originalPath, doThrow) => { + if (!isString(path15)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ); + } + if (!path15) { + return doThrow(`path must not be empty`, TypeError); + } + if (checkPath.isNotRelative(path15)) { + const r = "`path.relative()`d"; + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ); + } + return true; + }; + var isNotRelative = (path15) => REGEX_TEST_INVALID_PATH.test(path15); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ + ignorecase = true, + ignoreCase = ignorecase, + allowRelativePaths = false + } = {}) { + define2(this, KEY_IGNORE, true); + this._rules = new RuleManager(ignoreCase); + this._strictPathCheck = !allowRelativePaths; + this._initCache(); + } + _initCache() { + this._ignoreCache = /* @__PURE__ */ Object.create(null); + this._testCache = /* @__PURE__ */ Object.create(null); + } + add(pattern) { + if (this._rules.add(pattern)) { this._initCache(); } return this; @@ -31617,58 +31588,45 @@ var require_ignore = __commonJS({ addPattern(pattern) { return this.add(pattern); } - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - _testOne(path11, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path11); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; - } // @returns {TestResult} _test(originalPath, cache, checkUnignored, slices) { - const path11 = originalPath && checkPath.convert(originalPath); + const path15 = originalPath && checkPath.convert(originalPath); checkPath( - path11, + path15, originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError2 + this._strictPathCheck ? throwError2 : RETURN_FALSE ); - return this._t(path11, cache, checkUnignored, slices); + return this._t(path15, cache, checkUnignored, slices); } - _t(path11, cache, checkUnignored, slices) { - if (path11 in cache) { - return cache[path11]; + checkIgnore(path15) { + if (!REGEX_TEST_TRAILING_SLASH.test(path15)) { + return this.test(path15); + } + const slices = path15.split(SLASH).filter(Boolean); + slices.pop(); + if (slices.length) { + const parent = this._t( + slices.join(SLASH) + SLASH, + this._testCache, + true, + slices + ); + if (parent.ignored) { + return parent; + } + } + return this._rules.test(path15, false, MODE_CHECK_IGNORE); + } + _t(path15, cache, checkUnignored, slices) { + if (path15 in cache) { + return cache[path15]; } if (!slices) { - slices = path11.split(SLASH); + slices = path15.split(SLASH).filter(Boolean); } slices.pop(); if (!slices.length) { - return cache[path11] = this._testOne(path11, checkUnignored); + return cache[path15] = this._rules.test(path15, checkUnignored, MODE_IGNORE); } const parent = this._t( slices.join(SLASH) + SLASH, @@ -31676,3960 +31634,40 @@ var require_ignore = __commonJS({ checkUnignored, slices ); - return cache[path11] = parent.ignored ? parent : this._testOne(path11, checkUnignored); + return cache[path15] = parent.ignored ? parent : this._rules.test(path15, checkUnignored, MODE_IGNORE); } - ignores(path11) { - return this._test(path11, this._ignoreCache, false).ignored; + ignores(path15) { + return this._test(path15, this._ignoreCache, false).ignored; } createFilter() { - return (path11) => !this.ignores(path11); + return (path15) => !this.ignores(path15); } filter(paths) { return makeArray(paths).filter(this.createFilter()); } // @returns {TestResult} - test(path11) { - return this._test(path11, this._testCache, true); + test(path15) { + return this._test(path15, this._testCache, true); } }; var factory = (options) => new Ignore(options); - var isPathValid = (path11) => checkPath(path11 && checkPath.convert(path11), path11, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module2.exports = factory; - if ( - // Detect `process` so that it can run in browsers. - typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") - ) { + var isPathValid = (path15) => checkPath(path15 && checkPath.convert(path15), path15, RETURN_FALSE); + var setupWindows = () => { const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path11) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path11) || isNotRelative(path11); - } - } -}); - -// node_modules/slash/index.js -var require_slash = __commonJS({ - "node_modules/slash/index.js"(exports2, module2) { - "use strict"; - module2.exports = (path11) => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path11); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path11); - if (isExtendedLengthPath || hasNonAscii) { - return path11; - } - return path11.replace(/\\/g, "/"); - }; - } -}); - -// node_modules/globby/gitignore.js -var require_gitignore = __commonJS({ - "node_modules/globby/gitignore.js"(exports2, module2) { - "use strict"; - var { promisify } = require("util"); - var fs11 = require("fs"); - var path11 = require("path"); - var fastGlob = require_out4(); - var gitIgnore = require_ignore(); - var slash = require_slash(); - var DEFAULT_IGNORE = [ - "**/node_modules/**", - "**/flow-typed/**", - "**/coverage/**", - "**/.git" - ]; - var readFileP = promisify(fs11.readFile); - var mapGitIgnorePatternTo = (base) => (ignore) => { - if (ignore.startsWith("!")) { - return "!" + path11.posix.join(base, ignore.slice(1)); - } - return path11.posix.join(base, ignore); - }; - var parseGitIgnore = (content, options) => { - const base = slash(path11.relative(options.cwd, path11.dirname(options.fileName))); - return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); - }; - var reduceIgnore = (files) => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - return ignores; - }; - var ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path11.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - return path11.join(cwd, p); - }; - var getIsIgnoredPredecate = (ignores, cwd) => { - return (p) => ignores.ignores(slash(path11.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); - }; - var getFile = async (file, cwd) => { - const filePath = path11.join(cwd, file); - const content = await readFileP(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var getFileSync = (file, cwd) => { - const filePath = path11.join(cwd, file); - const content = fs11.readFileSync(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) - } = {}) => { - return { ignore, cwd }; - }; - module2.exports = async (options) => { - options = normalizeOptions(options); - const paths = await fastGlob("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - module2.exports.sync = (options) => { - options = normalizeOptions(options); - const paths = fastGlob.sync("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = paths.map((file) => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - } -}); - -// node_modules/globby/stream-utils.js -var require_stream_utils = __commonJS({ - "node_modules/globby/stream-utils.js"(exports2, module2) { - "use strict"; - var { Transform } = require("stream"); - var ObjectTransform = class extends Transform { - constructor() { - super({ - objectMode: true - }); - } - }; - var FilterStream = class extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - callback(); - } - }; - var UniqueStream = class extends ObjectTransform { - constructor() { - super(); - this._pushed = /* @__PURE__ */ new Set(); - } - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - callback(); - } - }; - module2.exports = { - FilterStream, - UniqueStream - }; - } -}); - -// node_modules/globby/index.js -var require_globby = __commonJS({ - "node_modules/globby/index.js"(exports2, module2) { - "use strict"; - var fs11 = require("fs"); - var arrayUnion = require_array_union(); - var merge2 = require_merge2(); - var fastGlob = require_out4(); - var dirGlob = require_dir_glob(); - var gitignore = require_gitignore(); - var { FilterStream, UniqueStream } = require_stream_utils(); - var DEFAULT_FILTER = () => false; - var isNegative2 = (pattern) => pattern[0] === "!"; - var assertPatternsInput = (patterns) => { - if (!patterns.every((pattern) => typeof pattern === "string")) { - throw new TypeError("Patterns must be a string or an array of strings"); - } - }; - var checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - let stat; - try { - stat = fs11.statSync(options.cwd); - } catch { - return; - } - if (!stat.isDirectory()) { - throw new Error("The `cwd` option must be a path to a directory"); - } - }; - var getPathString = (p) => p.stats instanceof fs11.Stats ? p.path : p; - var generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - const globTasks = []; - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - for (const [index, pattern] of patterns.entries()) { - if (isNegative2(pattern)) { - continue; - } - const ignore = patterns.slice(index).filter((pattern2) => isNegative2(pattern2)).map((pattern2) => pattern2.slice(1)); - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - globTasks.push({ pattern, options }); - } - return globTasks; - }; - var globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === "object") { - options = { - ...options, - ...task.options.expandDirectories - }; - } - return fn(task.pattern, options); - }; - var getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - var getFilterSync = (options) => { - return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - var globToTask = (task) => (glob) => { - const { options } = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - return { - pattern: glob, - options - }; - }; - module2.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const getFilter = async () => { - return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - const getTasks = async () => { - const tasks2 = await Promise.all(globTasks.map(async (task) => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - return arrayUnion(...tasks2); - }; - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); - return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); - }; - module2.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - return matches.filter((path_) => !filter(path_)); - }; - module2.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - const filterStream = new FilterStream((p) => !filter(p)); - const uniqueStream = new UniqueStream(); - return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); - }; - module2.exports.generateGlobTasks = generateGlobTasks; - module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); - module2.exports.gitignore = gitignore; - } -}); - -// node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - "node_modules/graceful-fs/polyfills.js"(exports2, module2) { - var constants = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs11) { - if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs11); - } - if (!fs11.lutimes) { - patchLutimes(fs11); - } - fs11.chown = chownFix(fs11.chown); - fs11.fchown = chownFix(fs11.fchown); - fs11.lchown = chownFix(fs11.lchown); - fs11.chmod = chmodFix(fs11.chmod); - fs11.fchmod = chmodFix(fs11.fchmod); - fs11.lchmod = chmodFix(fs11.lchmod); - fs11.chownSync = chownFixSync(fs11.chownSync); - fs11.fchownSync = chownFixSync(fs11.fchownSync); - fs11.lchownSync = chownFixSync(fs11.lchownSync); - fs11.chmodSync = chmodFixSync(fs11.chmodSync); - fs11.fchmodSync = chmodFixSync(fs11.fchmodSync); - fs11.lchmodSync = chmodFixSync(fs11.lchmodSync); - fs11.stat = statFix(fs11.stat); - fs11.fstat = statFix(fs11.fstat); - fs11.lstat = statFix(fs11.lstat); - fs11.statSync = statFixSync(fs11.statSync); - fs11.fstatSync = statFixSync(fs11.fstatSync); - fs11.lstatSync = statFixSync(fs11.lstatSync); - if (fs11.chmod && !fs11.lchmod) { - fs11.lchmod = function(path11, mode, cb) { - if (cb) process.nextTick(cb); - }; - fs11.lchmodSync = function() { - }; - } - if (fs11.chown && !fs11.lchown) { - fs11.lchown = function(path11, uid, gid, cb) { - if (cb) process.nextTick(cb); - }; - fs11.lchownSync = function() { - }; - } - if (platform === "win32") { - fs11.rename = typeof fs11.rename !== "function" ? fs11.rename : (function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { - setTimeout(function() { - fs11.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er); - }); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); - return rename; - })(fs11.rename); - } - fs11.read = typeof fs11.read !== "function" ? fs11.read : (function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs11, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs11, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); - return read; - })(fs11.read); - fs11.readSync = typeof fs11.readSync !== "function" ? fs11.readSync : /* @__PURE__ */ (function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs11, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - })(fs11.readSync); - function patchLchmod(fs12) { - fs12.lchmod = function(path11, mode, callback) { - fs12.open( - path11, - constants.O_WRONLY | constants.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) callback(err); - return; - } - fs12.fchmod(fd, mode, function(err2) { - fs12.close(fd, function(err22) { - if (callback) callback(err2 || err22); - }); - }); - } - ); - }; - fs12.lchmodSync = function(path11, mode) { - var fd = fs12.openSync(path11, constants.O_WRONLY | constants.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs12.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs12.closeSync(fd); - } catch (er) { - } - } else { - fs12.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs12) { - if (constants.hasOwnProperty("O_SYMLINK") && fs12.futimes) { - fs12.lutimes = function(path11, at, mt, cb) { - fs12.open(path11, constants.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) cb(er); - return; - } - fs12.futimes(fd, at, mt, function(er2) { - fs12.close(fd, function(er22) { - if (cb) cb(er2 || er22); - }); - }); - }); - }; - fs12.lutimesSync = function(path11, at, mt) { - var fd = fs12.openSync(path11, constants.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs12.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs12.closeSync(fd); - } catch (er) { - } - } else { - fs12.closeSync(fd); - } - } - return ret; - }; - } else if (fs12.futimes) { - fs12.lutimes = function(_a, _b, _c, cb) { - if (cb) process.nextTick(cb); - }; - fs12.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) return orig; - return function(target, mode, cb) { - return orig.call(fs11, target, mode, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) return orig; - return function(target, mode) { - try { - return orig.call(fs11, target, mode); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function chownFix(orig) { - if (!orig) return orig; - return function(target, uid, gid, cb) { - return orig.call(fs11, target, uid, gid, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) return orig; - return function(target, uid, gid) { - try { - return orig.call(fs11, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function statFix(orig) { - if (!orig) return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - if (cb) cb.apply(this, arguments); - } - return options ? orig.call(fs11, target, options, callback) : orig.call(fs11, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) return orig; - return function(target, options) { - var stats = options ? orig.call(fs11, target, options) : orig.call(fs11, target); - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { - var Stream = require("stream").Stream; - module2.exports = legacy; - function legacy(fs11) { - return { - ReadStream, - WriteStream - }; - function ReadStream(path11, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path11, options); - Stream.call(this); - var self2 = this; - this.path = path11; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self2._read(); - }); - return; - } - fs11.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self2.emit("error", err); - self2.readable = false; - return; - } - self2.fd = fd; - self2.emit("open", fd); - self2._read(); - }); - } - function WriteStream(path11, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path11, options); - Stream.call(this); - this.path = path11; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs11.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - "node_modules/graceful-fs/clone.js"(exports2, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs11 = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop() { - } - function publishQueue(context2, queue2) { - Object.defineProperty(context2, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug2 = noop; - if (util.debuglog) - debug2 = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug2 = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs11[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs11, queue); - fs11.close = (function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs11, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - })(fs11.close); - fs11.closeSync = (function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs11, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - })(fs11.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug2(fs11[gracefulQueue]); - require("assert").equal(fs11[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs11[gracefulQueue]); - } - module2.exports = patch(clone(fs11)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs11.__patched) { - module2.exports = patch(fs11); - fs11.__patched = true; - } - function patch(fs12) { - polyfills(fs12); - fs12.gracefulify = patch; - fs12.createReadStream = createReadStream2; - fs12.createWriteStream = createWriteStream; - var fs$readFile = fs12.readFile; - fs12.readFile = readFile; - function readFile(path11, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path11, options, cb); - function go$readFile(path12, options2, cb2, startTime) { - return fs$readFile(path12, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path12, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs12.writeFile; - fs12.writeFile = writeFile; - function writeFile(path11, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path11, data, options, cb); - function go$writeFile(path12, data2, options2, cb2, startTime) { - return fs$writeFile(path12, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path12, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs12.appendFile; - if (fs$appendFile) - fs12.appendFile = appendFile; - function appendFile(path11, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path11, data, options, cb); - function go$appendFile(path12, data2, options2, cb2, startTime) { - return fs$appendFile(path12, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path12, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs12.copyFile; - if (fs$copyFile) - fs12.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs12.readdir; - fs12.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path11, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path12, options2, cb2, startTime) { - return fs$readdir(path12, fs$readdirCallback( - path12, - options2, - cb2, - startTime - )); - } : function go$readdir2(path12, options2, cb2, startTime) { - return fs$readdir(path12, options2, fs$readdirCallback( - path12, - options2, - cb2, - startTime - )); - }; - return go$readdir(path11, options, cb); - function fs$readdirCallback(path12, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path12, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs12); - ReadStream = legStreams.ReadStream; - WriteStream = legStreams.WriteStream; - } - var fs$ReadStream = fs12.ReadStream; - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype); - ReadStream.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs12.WriteStream; - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype); - WriteStream.prototype.open = WriteStream$open; - } - Object.defineProperty(fs12, "ReadStream", { - get: function() { - return ReadStream; - }, - set: function(val2) { - ReadStream = val2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs12, "WriteStream", { - get: function() { - return WriteStream; - }, - set: function(val2) { - WriteStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream; - Object.defineProperty(fs12, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val2) { - FileReadStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream; - Object.defineProperty(fs12, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val2) { - FileWriteStream = val2; - }, - enumerable: true, - configurable: true - }); - function ReadStream(path11, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream(path11, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream2(path11, options) { - return new fs12.ReadStream(path11, options); - } - function createWriteStream(path11, options) { - return new fs12.WriteStream(path11, options); - } - var fs$open = fs12.open; - fs12.open = open; - function open(path11, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path11, flags, mode, cb); - function go$open(path12, flags2, mode2, cb2, startTime) { - return fs$open(path12, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path12, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs12; - } - function enqueue(elem) { - debug2("ENQUEUE", elem[0].name, elem[1]); - fs11[gracefulQueue].push(elem); - retry3(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs11[gracefulQueue].length; ++i) { - if (fs11[gracefulQueue][i].length > 2) { - fs11[gracefulQueue][i][3] = now; - fs11[gracefulQueue][i][4] = now; - } - } - retry3(); - } - function retry3() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs11[gracefulQueue].length === 0) - return; - var elem = fs11[gracefulQueue].shift(); - var fn = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug2("RETRY", fn.name, args); - fn.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug2("TIMEOUT", fn.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug2("RETRY", fn.name, args); - fn.apply(null, args.concat([startTime])); - } else { - fs11[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry3, 0); - } - } - } -}); - -// node_modules/is-path-cwd/index.js -var require_is_path_cwd = __commonJS({ - "node_modules/is-path-cwd/index.js"(exports2, module2) { - "use strict"; - var path11 = require("path"); - module2.exports = (path_) => { - let cwd = process.cwd(); - path_ = path11.resolve(path_); - if (process.platform === "win32") { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - return path_ === cwd; - }; - } -}); - -// node_modules/is-path-inside/index.js -var require_is_path_inside = __commonJS({ - "node_modules/is-path-inside/index.js"(exports2, module2) { - "use strict"; - var path11 = require("path"); - module2.exports = (childPath, parentPath) => { - const relation = path11.relative(parentPath, childPath); - return Boolean( - relation && relation !== ".." && !relation.startsWith(`..${path11.sep}`) && relation !== path11.resolve(childPath) - ); - }; - } -}); - -// node_modules/fs.realpath/old.js -var require_old = __commonJS({ - "node_modules/fs.realpath/old.js"(exports2) { - var pathModule = require("path"); - var isWindows = process.platform === "win32"; - var fs11 = require("fs"); - var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - function rethrow() { - var callback; - if (DEBUG) { - var backtrace = new Error(); - callback = debugCallback; - } else - callback = missingCallback; - return callback; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; - else if (!process.noDeprecation) { - var msg = "fs: missing callback " + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } - } - function maybeCallback(cb) { - return typeof cb === "function" ? cb : rethrow(); - } - var normalize2 = pathModule.normalize; - if (isWindows) { - nextPartRe = /(.*?)(?:[\/\\]+|$)/g; - } else { - nextPartRe = /(.*?)(?:[\/]+|$)/g; - } - var nextPartRe; - if (isWindows) { - splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; - } else { - splitRootRe = /^[\/]*/; - } - var splitRootRe; - exports2.realpathSync = function realpathSync(p, cache) { - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs11.lstatSync(base); - knownHard[base] = true; - } - } - while (pos < p.length) { - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - continue; - } - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - resolvedLink = cache[base]; - } else { - var stat = fs11.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs11.statSync(base); - linkTarget = fs11.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - if (cache) cache[original] = p; - return p; - }; - exports2.realpath = function realpath(p, cache, cb) { - if (typeof cb !== "function") { - cb = maybeCallback(cache); - cache = null; - } - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs11.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - function LOOP() { - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - return process.nextTick(LOOP); - } - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - return gotResolvedLink(cache[base]); - } - return fs11.lstat(base, gotStat); - } - function gotStat(err, stat) { - if (err) return cb(err); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs11.stat(base, function(err2) { - if (err2) return cb(err2); - fs11.readlink(base, function(err3, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err3, target); - }); - }); - } - function gotTarget(err, target, base2) { - if (err) return cb(err); - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base2] = resolvedLink; - gotResolvedLink(resolvedLink); - } - function gotResolvedLink(resolvedLink) { - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - }; - } -}); - -// node_modules/fs.realpath/index.js -var require_fs5 = __commonJS({ - "node_modules/fs.realpath/index.js"(exports2, module2) { - module2.exports = realpath; - realpath.realpath = realpath; - realpath.sync = realpathSync; - realpath.realpathSync = realpathSync; - realpath.monkeypatch = monkeypatch; - realpath.unmonkeypatch = unmonkeypatch; - var fs11 = require("fs"); - var origRealpath = fs11.realpath; - var origRealpathSync = fs11.realpathSync; - var version = process.version; - var ok = /^v[0-5]\./.test(version); - var old = require_old(); - function newError(er) { - return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); - } - function realpath(p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb); - } - if (typeof cache === "function") { - cb = cache; - cache = null; - } - origRealpath(p, cache, function(er, result) { - if (newError(er)) { - old.realpath(p, cache, cb); - } else { - cb(er, result); - } - }); - } - function realpathSync(p, cache) { - if (ok) { - return origRealpathSync(p, cache); - } - try { - return origRealpathSync(p, cache); - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache); - } else { - throw er; - } - } - } - function monkeypatch() { - fs11.realpath = realpath; - fs11.realpathSync = realpathSync; - } - function unmonkeypatch() { - fs11.realpath = origRealpath; - fs11.realpathSync = origRealpathSync; - } - } -}); - -// node_modules/concat-map/index.js -var require_concat_map = __commonJS({ - "node_modules/concat-map/index.js"(exports2, module2) { - module2.exports = function(xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - } -}); - -// node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ - "node_modules/balanced-match/index.js"(exports2, module2) { - "use strict"; - module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r = range(a, b, str2); - return r && { - start: r[0], - end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + a.length, r[1]), - post: str2.slice(r[1] + b.length) - }; - } - function maybeMatch(reg, str2) { - var m = str2.match(reg); - return m ? m[0] : null; - } - balanced.range = range; - function range(a, b, str2) { - var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); - var i = ai; - if (ai >= 0 && bi > 0) { - begs = []; - left = str2.length; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str2.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - bi = str2.indexOf(b, i + 1); - } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length) { - result = [left, right]; - } - } - return result; - } - } -}); - -// node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ - "node_modules/brace-expansion/index.js"(exports2, module2) { - var concatMap = require_concat_map(); - var balanced = require_balanced_match(); - module2.exports = expandTop; - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) - return [""]; - var parts = []; - var m = balanced("{", "}", str2); - if (!m) - return str2.split(","); - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; - } - function expandTop(str2) { - if (!str2) - return []; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); - } - return expand(escapeBraces(str2), true).map(unescapeBraces); - } - function embrace(str2) { - return "{" + str2 + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte5(i, y) { - return i >= y; - } - function expand(str2, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2); - } - return [str2]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand(m.post, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte5; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { - return expand(el, false); - }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - return expansions; - } - } -}); - -// node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ - "node_modules/minimatch/minimatch.js"(exports2, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path11 = (function() { - try { - return require("path"); - } catch (e) { - } - })() || { - sep: "/" - }; - minimatch.sep = path11.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand = require_brace_expansion(); - var plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" } - }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set2, c) { - set2[c] = true; - return set2; - }, {}); - } - var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { - options = options || {}; - return function(p, i, list) { - return minimatch(p, pattern, options); - }; - } - function ext(a, b) { - b = b || {}; - var t = {}; - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; - } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); - }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); - }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); - }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); - }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); - }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); - }; - m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); - }; - return m; - }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); - if (!options) options = {}; - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); - } - assertValidPattern(pattern); - if (!options) options = {}; - pattern = pattern.trim(); - if (!options.allowWindowsEscape && path11.sep !== "/") { - pattern = pattern.split(path11.sep).join("/"); - } - this.options = options; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.make(); - } - Minimatch.prototype.debug = function() { - }; - Minimatch.prototype.make = make; - function make() { - var pattern = this.pattern; - var options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); - if (options.debug) this.debug = function debug2() { - console.error.apply(console, arguments); - }; - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { - return s.split(slashSplit); - }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { - return s.map(this.parse, this); - }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { - return s.indexOf(false) === -1; - }); - this.debug(this.pattern, set2); - this.set = set2; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate2 = false; - var options = this.options; - var negateOffset = 0; - if (options.nonegate) return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate2 = !negate2; - negateOffset++; - } - if (negateOffset) this.pattern = pattern.substr(negateOffset); - this.negate = negate2; - } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return expand(pattern); - } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); - } - }; - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - assertValidPattern(pattern); - var options = this.options; - if (pattern === "**") { - if (!options.noglobstar) - return GLOBSTAR; - else - pattern = "*"; - } - if (pattern === "") return ""; - var re = ""; - var hasMagic = !!options.nocase; - var escaping = false; - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self2 = this; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; - } - self2.debug("clearStateChar %j %j", stateChar, re); - stateChar = false; - } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; - } - switch (c) { - /* istanbul ignore next */ - case "/": { - return false; - } - case "\\": - clearStateChar(); - escaping = true; - continue; - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); - if (inClass) { - this.debug(" in class"); - if (c === "!" && i === classStart + 1) c = "^"; - re += c; - continue; - } - self2.debug("call clearStateChar %j", stateChar); - clearStateChar(); - stateChar = c; - if (options.noext) clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re); - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - re += pl.close; - if (pl.type === "!") { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - clearStateChar(); - re += "|"; - continue; - // these are mostly the same in regexp and glob - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - var cs = pattern.substring(classStart + 1, i); - try { - RegExp("[" + cs + "]"); - } catch (er) { - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; - } - } - if (inClass) { - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re, pl); - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { - if (!$2) { - $2 = "\\"; - } - return $1 + $1 + $2 + "|"; - }); - this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case "[": - case ".": - case "(": - addPatternStart = true; - } - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - nlLast += nlAfter; - var openParensBefore = nlBefore.split("(").length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); - } - nlAfter = cleanAfter; - var dollar = ""; - if (nlAfter === "" && isSub !== SUBPARSE) { - dollar = "$"; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - if (re !== "" && hasMagic) { - re = "(?=.)" + re; - } - if (addPatternStart) { - re = patternStart + re; - } - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options.nocase ? "i" : ""; - try { - var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); - } - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) re = "^(?!" + re + ").*$"; - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - minimatch.match = function(list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function(f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = function match(f, partial) { - if (typeof partial === "undefined") partial = this.partial; - this.debug("match", f, this.pattern); - if (this.comment) return false; - if (this.empty) return f === ""; - if (f === "/" && partial) return true; - var options = this.options; - if (path11.sep !== "/") { - f = f.split(path11.sep).join("/"); - } - f = f.split(slashSplit); - this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) break; - } - for (i = 0; i < set2.length; i++) { - var pattern = set2[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) return true; - return !this.negate; - } - } - if (options.flipNegate) return false; - return this.negate; - }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options = this.options; - this.debug( - "matchOne", - { "this": this, file, pattern } - ); - this.debug("matchOne", file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug("matchOne loop"); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - if (p === false) return false; - if (p === GLOBSTAR) { - this.debug("GLOBSTAR", [pattern, p, f]); - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; - } - return true; - } - while (fr < fl) { - var swallowee = file[fr]; - this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { - this.debug("dot detected!", file, fr, pattern, pr); - break; - } - this.debug("globstar swallow a segment, and continue"); - fr++; - } - } - if (partial) { - this.debug("\n>>> no match, partial?", file, fr, pattern, pr); - if (fr === fl) return true; - } - return false; - } - var hit; - if (typeof p === "string") { - hit = f === p; - this.debug("string match", p, f, hit); - } else { - hit = f.match(p); - this.debug("pattern match", p, f, hit); - } - if (!hit) return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - return fi === fl - 1 && file[fi] === ""; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/inherits/inherits_browser.js -var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports2, module2) { - if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; - } - } -}); - -// node_modules/inherits/inherits.js -var require_inherits = __commonJS({ - "node_modules/inherits/inherits.js"(exports2, module2) { - try { - util = require("util"); - if (typeof util.inherits !== "function") throw ""; - module2.exports = util.inherits; - } catch (e) { - module2.exports = require_inherits_browser(); - } - var util; - } -}); - -// node_modules/path-is-absolute/index.js -var require_path_is_absolute = __commonJS({ - "node_modules/path-is-absolute/index.js"(exports2, module2) { - "use strict"; - function posix(path11) { - return path11.charAt(0) === "/"; - } - function win32(path11) { - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path11); - var device = result[1] || ""; - var isUnc = Boolean(device && device.charAt(1) !== ":"); - return Boolean(result[2] || isUnc); - } - module2.exports = process.platform === "win32" ? win32 : posix; - module2.exports.posix = posix; - module2.exports.win32 = win32; - } -}); - -// node_modules/rimraf/node_modules/glob/common.js -var require_common3 = __commonJS({ - "node_modules/rimraf/node_modules/glob/common.js"(exports2) { - exports2.setopts = setopts; - exports2.ownProp = ownProp; - exports2.makeAbs = makeAbs; - exports2.finish = finish; - exports2.mark = mark; - exports2.isIgnored = isIgnored; - exports2.childrenIgnored = childrenIgnored; - function ownProp(obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field); - } - var fs11 = require("fs"); - var path11 = require("path"); - var minimatch = require_minimatch(); - var isAbsolute3 = require_path_is_absolute(); - var Minimatch = minimatch.Minimatch; - function alphasort(a, b) { - return a.localeCompare(b, "en"); - } - function setupIgnores(self2, options) { - self2.ignore = options.ignore || []; - if (!Array.isArray(self2.ignore)) - self2.ignore = [self2.ignore]; - if (self2.ignore.length) { - self2.ignore = self2.ignore.map(ignoreMap); - } - } - function ignoreMap(pattern) { - var gmatcher = null; - if (pattern.slice(-3) === "/**") { - var gpattern = pattern.replace(/(\/\*\*)+$/, ""); - gmatcher = new Minimatch(gpattern, { dot: true }); - } - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher - }; - } - function setopts(self2, pattern, options) { - if (!options) - options = {}; - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar"); - } - pattern = "**/" + pattern; - } - self2.silent = !!options.silent; - self2.pattern = pattern; - self2.strict = options.strict !== false; - self2.realpath = !!options.realpath; - self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); - self2.follow = !!options.follow; - self2.dot = !!options.dot; - self2.mark = !!options.mark; - self2.nodir = !!options.nodir; - if (self2.nodir) - self2.mark = true; - self2.sync = !!options.sync; - self2.nounique = !!options.nounique; - self2.nonull = !!options.nonull; - self2.nosort = !!options.nosort; - self2.nocase = !!options.nocase; - self2.stat = !!options.stat; - self2.noprocess = !!options.noprocess; - self2.absolute = !!options.absolute; - self2.fs = options.fs || fs11; - self2.maxLength = options.maxLength || Infinity; - self2.cache = options.cache || /* @__PURE__ */ Object.create(null); - self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); - self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); - setupIgnores(self2, options); - self2.changedCwd = false; - var cwd = process.cwd(); - if (!ownProp(options, "cwd")) - self2.cwd = cwd; - else { - self2.cwd = path11.resolve(options.cwd); - self2.changedCwd = self2.cwd !== cwd; - } - self2.root = options.root || path11.resolve(self2.cwd, "/"); - self2.root = path11.resolve(self2.root); - if (process.platform === "win32") - self2.root = self2.root.replace(/\\/g, "/"); - self2.cwdAbs = isAbsolute3(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); - if (process.platform === "win32") - self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); - self2.nomount = !!options.nomount; - options.nonegate = true; - options.nocomment = true; - self2.minimatch = new Minimatch(pattern, options); - self2.options = self2.minimatch.options; - } - function finish(self2) { - var nou = self2.nounique; - var all = nou ? [] : /* @__PURE__ */ Object.create(null); - for (var i = 0, l = self2.matches.length; i < l; i++) { - var matches = self2.matches[i]; - if (!matches || Object.keys(matches).length === 0) { - if (self2.nonull) { - var literal = self2.minimatch.globSet[i]; - if (nou) - all.push(literal); - else - all[literal] = true; - } - } else { - var m = Object.keys(matches); - if (nou) - all.push.apply(all, m); - else - m.forEach(function(m2) { - all[m2] = true; - }); - } - } - if (!nou) - all = Object.keys(all); - if (!self2.nosort) - all = all.sort(alphasort); - if (self2.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self2._mark(all[i]); - } - if (self2.nodir) { - all = all.filter(function(e) { - var notDir = !/\/$/.test(e); - var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; - if (notDir && c) - notDir = c !== "DIR" && !Array.isArray(c); - return notDir; - }); - } - } - if (self2.ignore.length) - all = all.filter(function(m2) { - return !isIgnored(self2, m2); - }); - self2.found = all; - } - function mark(self2, p) { - var abs = makeAbs(self2, p); - var c = self2.cache[abs]; - var m = p; - if (c) { - var isDir = c === "DIR" || Array.isArray(c); - var slash = p.slice(-1) === "/"; - if (isDir && !slash) - m += "/"; - else if (!isDir && slash) - m = m.slice(0, -1); - if (m !== p) { - var mabs = makeAbs(self2, m); - self2.statCache[mabs] = self2.statCache[abs]; - self2.cache[mabs] = self2.cache[abs]; - } - } - return m; - } - function makeAbs(self2, f) { - var abs = f; - if (f.charAt(0) === "/") { - abs = path11.join(self2.root, f); - } else if (isAbsolute3(f) || f === "") { - abs = f; - } else if (self2.changedCwd) { - abs = path11.resolve(self2.cwd, f); - } else { - abs = path11.resolve(f); - } - if (process.platform === "win32") - abs = abs.replace(/\\/g, "/"); - return abs; - } - function isIgnored(self2, path12) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return item.matcher.match(path12) || !!(item.gmatcher && item.gmatcher.match(path12)); - }); - } - function childrenIgnored(self2, path12) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path12)); - }); - } - } -}); - -// node_modules/rimraf/node_modules/glob/sync.js -var require_sync7 = __commonJS({ - "node_modules/rimraf/node_modules/glob/sync.js"(exports2, module2) { - module2.exports = globSync; - globSync.GlobSync = GlobSync; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var Glob = require_glob().Glob; - var util = require("util"); - var path11 = require("path"); - var assert = require("assert"); - var isAbsolute3 = require_path_is_absolute(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - function globSync(pattern, options) { - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - return new GlobSync(pattern, options).found; - } - function GlobSync(pattern, options) { - if (!pattern) - throw new Error("must provide pattern"); - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options); - setopts(this, pattern, options); - if (this.noprocess) - return this; - var n = this.minimatch.set.length; - this.matches = new Array(n); - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false); - } - this._finish(); - } - GlobSync.prototype._finish = function() { - assert(this instanceof GlobSync); - if (this.realpath) { - var self2 = this; - this.matches.forEach(function(matchset, index) { - var set2 = self2.matches[index] = /* @__PURE__ */ Object.create(null); - for (var p in matchset) { - try { - p = self2._makeAbs(p); - var real = rp.realpathSync(p, self2.realpathCache); - set2[real] = true; - } catch (er) { - if (er.syscall === "stat") - set2[self2._makeAbs(p)] = true; - else - throw er; - } - } - }); - } - common2.finish(this); - }; - GlobSync.prototype._process = function(pattern, index, inGlobStar) { - assert(this instanceof GlobSync); - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute3(prefix) || isAbsolute3(pattern.join("/"))) { - if (!prefix || !isAbsolute3(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return; - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar); - }; - GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var pn = remain[0]; - var negate2 = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate2 && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path11.join(this.root, e); - } - this._emitMatch(index, e); - } - return; - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) - newPattern = [prefix, e]; - else - newPattern = [e]; - this._process(newPattern.concat(remain), index, inGlobStar); - } - }; - GlobSync.prototype._emitMatch = function(index, e) { - if (isIgnored(this, e)) - return; - var abs = this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) { - e = abs; - } - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - if (this.stat) - this._stat(e); - }; - GlobSync.prototype._readdirInGlobStar = function(abs) { - if (this.follow) - return this._readdir(abs, false); - var entries; - var lstat; - var stat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er.code === "ENOENT") { - return null; - } - } - var isSym = lstat && lstat.isSymbolicLink(); - this.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = "FILE"; - else - entries = this._readdir(abs, false); - return entries; - }; - GlobSync.prototype._readdir = function(abs, inGlobStar) { - var entries; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return null; - if (Array.isArray(c)) - return c; - } - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)); - } catch (er) { - this._readdirError(abs, er); - return null; - } - }; - GlobSync.prototype._readdirEntries = function(abs, entries) { - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return entries; - }; - GlobSync.prototype._readdirError = function(f, er) { - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - throw error2; - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) - throw er; - if (!this.silent) - console.error("glob error", er); - break; - } - }; - GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false); - var len = entries.length; - var isSym = this.symlinks[abs]; - if (isSym && inGlobStar) - return; - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true); - } - }; - GlobSync.prototype._processSimple = function(prefix, index) { - var exists = this._stat(prefix); - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return; - if (prefix && isAbsolute3(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path11.join(this.root, prefix); - } else { - prefix = path11.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - }; - GlobSync.prototype._stat = function(f) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return false; - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return c; - if (needDir && c === "FILE") - return false; - } - var exists; - var stat = this.statCache[abs]; - if (!stat) { - var lstat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return false; - } - } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs); - } catch (er) { - stat = lstat; - } - } else { - stat = lstat; - } - } - this.statCache[abs] = stat; - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return false; - return c; - }; - GlobSync.prototype._mark = function(p) { - return common2.mark(this, p); - }; - GlobSync.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - } -}); - -// node_modules/inflight/inflight.js -var require_inflight = __commonJS({ - "node_modules/inflight/inflight.js"(exports2, module2) { - var wrappy = require_wrappy(); - var reqs = /* @__PURE__ */ Object.create(null); - var once = require_once(); - module2.exports = wrappy(inflight); - function inflight(key, cb) { - if (reqs[key]) { - reqs[key].push(cb); - return null; - } else { - reqs[key] = [cb]; - return makeres(key); - } - } - function makeres(key) { - return once(function RES() { - var cbs = reqs[key]; - var len = cbs.length; - var args = slice(arguments); - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args); - } - } finally { - if (cbs.length > len) { - cbs.splice(0, len); - process.nextTick(function() { - RES.apply(null, args); - }); - } else { - delete reqs[key]; - } - } - }); - } - function slice(args) { - var length = args.length; - var array = []; - for (var i = 0; i < length; i++) array[i] = args[i]; - return array; - } - } -}); - -// node_modules/rimraf/node_modules/glob/glob.js -var require_glob = __commonJS({ - "node_modules/rimraf/node_modules/glob/glob.js"(exports2, module2) { - module2.exports = glob; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var inherits = require_inherits(); - var EE = require("events").EventEmitter; - var path11 = require("path"); - var assert = require("assert"); - var isAbsolute3 = require_path_is_absolute(); - var globSync = require_sync7(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var inflight = require_inflight(); - var util = require("util"); - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - var once = require_once(); - function glob(pattern, options, cb) { - if (typeof options === "function") cb = options, options = {}; - if (!options) options = {}; - if (options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return globSync(pattern, options); - } - return new Glob(pattern, options, cb); - } - glob.sync = globSync; - var GlobSync = glob.GlobSync = globSync.GlobSync; - glob.glob = glob; - function extend3(origin, add2) { - if (add2 === null || typeof add2 !== "object") { - return origin; - } - var keys = Object.keys(add2); - var i = keys.length; - while (i--) { - origin[keys[i]] = add2[keys[i]]; - } - return origin; - } - glob.hasMagic = function(pattern, options_) { - var options = extend3({}, options_); - options.noprocess = true; - var g = new Glob(pattern, options); - var set2 = g.minimatch.set; - if (!pattern) - return false; - if (set2.length > 1) - return true; - for (var j = 0; j < set2[0].length; j++) { - if (typeof set2[0][j] !== "string") - return true; - } - return false; - }; - glob.Glob = Glob; - inherits(Glob, EE); - function Glob(pattern, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - if (options && options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return new GlobSync(pattern, options); - } - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb); - setopts(this, pattern, options); - this._didRealPath = false; - var n = this.minimatch.set.length; - this.matches = new Array(n); - if (typeof cb === "function") { - cb = once(cb); - this.on("error", cb); - this.on("end", function(matches) { - cb(null, matches); - }); - } - var self2 = this; - this._processing = 0; - this._emitQueue = []; - this._processQueue = []; - this.paused = false; - if (this.noprocess) - return this; - if (n === 0) - return done(); - var sync = true; - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false, done); - } - sync = false; - function done() { - --self2._processing; - if (self2._processing <= 0) { - if (sync) { - process.nextTick(function() { - self2._finish(); - }); - } else { - self2._finish(); - } - } - } - } - Glob.prototype._finish = function() { - assert(this instanceof Glob); - if (this.aborted) - return; - if (this.realpath && !this._didRealpath) - return this._realpath(); - common2.finish(this); - this.emit("end", this.found); - }; - Glob.prototype._realpath = function() { - if (this._didRealpath) - return; - this._didRealpath = true; - var n = this.matches.length; - if (n === 0) - return this._finish(); - var self2 = this; - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next); - function next() { - if (--n === 0) - self2._finish(); - } - }; - Glob.prototype._realpathSet = function(index, cb) { - var matchset = this.matches[index]; - if (!matchset) - return cb(); - var found = Object.keys(matchset); - var self2 = this; - var n = found.length; - if (n === 0) - return cb(); - var set2 = this.matches[index] = /* @__PURE__ */ Object.create(null); - found.forEach(function(p, i) { - p = self2._makeAbs(p); - rp.realpath(p, self2.realpathCache, function(er, real) { - if (!er) - set2[real] = true; - else if (er.syscall === "stat") - set2[p] = true; - else - self2.emit("error", er); - if (--n === 0) { - self2.matches[index] = set2; - cb(); - } - }); - }); - }; - Glob.prototype._mark = function(p) { - return common2.mark(this, p); - }; - Glob.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - Glob.prototype.abort = function() { - this.aborted = true; - this.emit("abort"); - }; - Glob.prototype.pause = function() { - if (!this.paused) { - this.paused = true; - this.emit("pause"); - } - }; - Glob.prototype.resume = function() { - if (this.paused) { - this.emit("resume"); - this.paused = false; - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0); - this._emitQueue.length = 0; - for (var i = 0; i < eq.length; i++) { - var e = eq[i]; - this._emitMatch(e[0], e[1]); - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0); - this._processQueue.length = 0; - for (var i = 0; i < pq.length; i++) { - var p = pq[i]; - this._processing--; - this._process(p[0], p[1], p[2], p[3]); - } - } - } - }; - Glob.prototype._process = function(pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === "function"); - if (this.aborted) - return; - this._processing++; - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]); - return; - } - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index, cb); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute3(prefix) || isAbsolute3(pattern.join("/"))) { - if (!prefix || !isAbsolute3(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return cb(); - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); - }; - Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var pn = remain[0]; - var negate2 = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate2 && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return cb(); - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path11.join(this.root, e); - } - this._emitMatch(index, e); - } - return cb(); - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - this._process([e].concat(remain), index, inGlobStar, cb); - } - cb(); - }; - Glob.prototype._emitMatch = function(index, e) { - if (this.aborted) - return; - if (isIgnored(this, e)) - return; - if (this.paused) { - this._emitQueue.push([index, e]); - return; - } - var abs = isAbsolute3(e) ? e : this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) - e = abs; - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - var st = this.statCache[abs]; - if (st) - this.emit("stat", e, st); - this.emit("match", e); - }; - Glob.prototype._readdirInGlobStar = function(abs, cb) { - if (this.aborted) - return; - if (this.follow) - return this._readdir(abs, false, cb); - var lstatkey = "lstat\0" + abs; - var self2 = this; - var lstatcb = inflight(lstatkey, lstatcb_); - if (lstatcb) - self2.fs.lstat(abs, lstatcb); - function lstatcb_(er, lstat) { - if (er && er.code === "ENOENT") - return cb(); - var isSym = lstat && lstat.isSymbolicLink(); - self2.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) { - self2.cache[abs] = "FILE"; - cb(); - } else - self2._readdir(abs, false, cb); - } - }; - Glob.prototype._readdir = function(abs, inGlobStar, cb) { - if (this.aborted) - return; - cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); - if (!cb) - return; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return cb(); - if (Array.isArray(c)) - return cb(null, c); - } - var self2 = this; - self2.fs.readdir(abs, readdirCb(this, abs, cb)); - }; - function readdirCb(self2, abs, cb) { - return function(er, entries) { - if (er) - self2._readdirError(abs, er, cb); - else - self2._readdirEntries(abs, entries, cb); - }; - } - Glob.prototype._readdirEntries = function(abs, entries, cb) { - if (this.aborted) - return; - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return cb(null, entries); - }; - Glob.prototype._readdirError = function(f, er, cb) { - if (this.aborted) - return; - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - this.emit("error", error2); - this.abort(); - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) { - this.emit("error", er); - this.abort(); - } - if (!this.silent) - console.error("glob error", er); - break; - } - return cb(); - }; - Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false, cb); - var isSym = this.symlinks[abs]; - var len = entries.length; - if (isSym && inGlobStar) - return cb(); - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true, cb); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true, cb); - } - cb(); - }; - Glob.prototype._processSimple = function(prefix, index, cb) { - var self2 = this; - this._stat(prefix, function(er, exists) { - self2._processSimple2(prefix, index, er, exists, cb); - }); - }; - Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return cb(); - if (prefix && isAbsolute3(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path11.join(this.root, prefix); - } else { - prefix = path11.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - cb(); - }; - Glob.prototype._stat = function(f, cb) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return cb(); - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return cb(null, c); - if (needDir && c === "FILE") - return cb(); - } - var exists; - var stat = this.statCache[abs]; - if (stat !== void 0) { - if (stat === false) - return cb(null, stat); - else { - var type2 = stat.isDirectory() ? "DIR" : "FILE"; - if (needDir && type2 === "FILE") - return cb(); - else - return cb(null, type2, stat); - } - } - var self2 = this; - var statcb = inflight("stat\0" + abs, lstatcb_); - if (statcb) - self2.fs.lstat(abs, statcb); - function lstatcb_(er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - return self2.fs.stat(abs, function(er2, stat2) { - if (er2) - self2._stat2(f, abs, null, lstat, cb); - else - self2._stat2(f, abs, er2, stat2, cb); - }); - } else { - self2._stat2(f, abs, er, lstat, cb); - } - } - }; - Glob.prototype._stat2 = function(f, abs, er, stat, cb) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return cb(); - } - var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat; - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) - return cb(null, false, stat); - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return cb(); - return cb(null, c, stat); - }; - } -}); - -// node_modules/rimraf/rimraf.js -var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports2, module2) { - var assert = require("assert"); - var path11 = require("path"); - var fs11 = require("fs"); - var glob = void 0; - try { - glob = require_glob(); - } catch (_err) { - } - var defaultGlobOpts = { - nosort: true, - silent: true - }; - var timeout = 0; - var isWindows = process.platform === "win32"; - var defaults = (options) => { - const methods = [ - "unlink", - "chmod", - "stat", - "lstat", - "rmdir", - "readdir" - ]; - methods.forEach((m) => { - options[m] = options[m] || fs11[m]; - m = m + "Sync"; - options[m] = options[m] || fs11[m]; - }); - options.maxBusyTries = options.maxBusyTries || 3; - options.emfileWait = options.emfileWait || 1e3; - if (options.glob === false) { - options.disableGlob = true; - } - if (options.disableGlob !== true && glob === void 0) { - throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); - } - options.disableGlob = options.disableGlob || false; - options.glob = options.glob || defaultGlobOpts; - }; - var rimraf = (p, options, cb) => { - if (typeof options === "function") { - cb = options; - options = {}; - } - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert.equal(typeof cb, "function", "rimraf: callback function required"); - assert(options, "rimraf: invalid options argument provided"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - defaults(options); - let busyTries = 0; - let errState = null; - let n = 0; - const next = (er) => { - errState = errState || er; - if (--n === 0) - cb(errState); - }; - const afterGlob = (er, results) => { - if (er) - return cb(er); - n = results.length; - if (n === 0) - return cb(); - results.forEach((p2) => { - const CB = (er2) => { - if (er2) { - if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { - busyTries++; - return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); - } - if (er2.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p2, options, CB), timeout++); - } - if (er2.code === "ENOENT") er2 = null; - } - timeout = 0; - next(er2); - }; - rimraf_(p2, options, CB); - }); - }; - if (options.disableGlob || !glob.hasMagic(p)) - return afterGlob(null, [p]); - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]); - glob(p, options.glob, afterGlob); - }); - }; - var rimraf_ = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null); - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb); - if (st && st.isDirectory()) - return rmdir(p, options, er, cb); - options.unlink(p, (er2) => { - if (er2) { - if (er2.code === "ENOENT") - return cb(null); - if (er2.code === "EPERM") - return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); - if (er2.code === "EISDIR") - return rmdir(p, options, er2, cb); - } - return cb(er2); - }); - }); - }; - var fixWinEPERM = (p, options, er, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.chmod(p, 438, (er2) => { - if (er2) - cb(er2.code === "ENOENT" ? null : er); - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er); - else if (stats.isDirectory()) - rmdir(p, options, er, cb); - else - options.unlink(p, cb); - }); - }); - }; - var fixWinEPERMSync = (p, options, er) => { - assert(p); - assert(options); - try { - options.chmodSync(p, 438); - } catch (er2) { - if (er2.code === "ENOENT") - return; - else - throw er; - } - let stats; - try { - stats = options.statSync(p); - } catch (er3) { - if (er3.code === "ENOENT") - return; - else - throw er; - } - if (stats.isDirectory()) - rmdirSync(p, options, er); - else - options.unlinkSync(p); - }; - var rmdir = (p, options, originalEr, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.rmdir(p, (er) => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb); - else if (er && er.code === "ENOTDIR") - cb(originalEr); - else - cb(er); - }); - }; - var rmkids = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.readdir(p, (er, files) => { - if (er) - return cb(er); - let n = files.length; - if (n === 0) - return options.rmdir(p, cb); - let errState; - files.forEach((f) => { - rimraf(path11.join(p, f), options, (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--n === 0) - options.rmdir(p, cb); - }); - }); - }); - }; - var rimrafSync = (p, options) => { - options = options || {}; - defaults(options); - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert(options, "rimraf: missing options"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - let results; - if (options.disableGlob || !glob.hasMagic(p)) { - results = [p]; - } else { - try { - options.lstatSync(p); - results = [p]; - } catch (er) { - results = glob.sync(p, options.glob); - } - } - if (!results.length) - return; - for (let i = 0; i < results.length; i++) { - const p2 = results[i]; - let st; - try { - st = options.lstatSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p2, options, er); - } - try { - if (st && st.isDirectory()) - rmdirSync(p2, options, null); - else - options.unlinkSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); - if (er.code !== "EISDIR") - throw er; - rmdirSync(p2, options, er); - } - } - }; - var rmdirSync = (p, options, originalEr) => { - assert(p); - assert(options); - try { - options.rmdirSync(p); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "ENOTDIR") - throw originalEr; - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options); - } - }; - var rmkidsSync = (p, options) => { - assert(p); - assert(options); - options.readdirSync(p).forEach((f) => rimrafSync(path11.join(p, f), options)); - const retries = isWindows ? 100 : 1; - let i = 0; - do { - let threw = true; - try { - const ret = options.rmdirSync(p, options); - threw = false; - return ret; - } finally { - if (++i < retries && threw) - continue; - } - } while (true); - }; - module2.exports = rimraf; - rimraf.sync = rimrafSync; - } -}); - -// node_modules/del/node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "node_modules/del/node_modules/indent-string/index.js"(exports2, module2) { - "use strict"; - module2.exports = (string, count = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count)); - }; - } -}); - -// node_modules/del/node_modules/clean-stack/index.js -var require_clean_stack = __commonJS({ - "node_modules/del/node_modules/clean-stack/index.js"(exports2, module2) { - "use strict"; - var os2 = require("os"); - var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; - var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; - var homeDir = typeof os2.homedir === "undefined" ? "" : os2.homedir(); - module2.exports = (stack, options) => { - options = Object.assign({ pretty: false }, options); - return stack.replace(/\\/g, "/").split("\n").filter((line) => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - const match = pathMatches[1]; - if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { - return false; - } - return !pathRegex.test(match); - }).filter((line) => line.trim() !== "").map((line) => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); - } - return line; - }).join("\n"); - }; - } -}); - -// node_modules/del/node_modules/aggregate-error/index.js -var require_aggregate_error = __commonJS({ - "node_modules/del/node_modules/aggregate-error/index.js"(exports2, module2) { - "use strict"; - var indentString2 = require_indent_string(); - var cleanStack = require_clean_stack(); - var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - errors = [...errors].map((error2) => { - if (error2 instanceof Error) { - return error2; - } - if (error2 !== null && typeof error2 === "object") { - return Object.assign(new Error(error2.message), error2); - } - return new Error(error2); - }); - let message = errors.map((error2) => { - return typeof error2.stack === "string" ? cleanInternalStack(cleanStack(error2.stack)) : String(error2); - }).join("\n"); - message = "\n" + indentString2(message, 4); - super(message); - this.name = "AggregateError"; - Object.defineProperty(this, "_errors", { value: errors }); - } - *[Symbol.iterator]() { - for (const error2 of this._errors) { - yield error2; - } - } - }; - module2.exports = AggregateError; - } -}); - -// node_modules/del/node_modules/p-map/index.js -var require_p_map = __commonJS({ - "node_modules/del/node_modules/p-map/index.js"(exports2, module2) { - "use strict"; - var AggregateError = require_aggregate_error(); - module2.exports = async (iterable, mapper, { - concurrency = Infinity, - stopOnError = true - } = {}) => { - return new Promise((resolve6, reject) => { - if (typeof mapper !== "function") { - throw new TypeError("Mapper function is required"); - } - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - const next = () => { - if (isRejected) { - return; - } - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - if (nextItem.done) { - isIterableDone = true; - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve6(result); - } - } - return; - } - resolvingCount++; - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error2) { - if (stopOnError) { - isRejected = true; - reject(error2); - } else { - errors.push(error2); - resolvingCount--; - next(); - } - } - })(); - }; - for (let i = 0; i < concurrency; i++) { - next(); - if (isIterableDone) { - break; - } - } - }); - }; - } -}); - -// node_modules/del/index.js -var require_del = __commonJS({ - "node_modules/del/index.js"(exports2, module2) { - "use strict"; - var { promisify } = require("util"); - var path11 = require("path"); - var globby = require_globby(); - var isGlob = require_is_glob(); - var slash = require_slash(); - var gracefulFs = require_graceful_fs(); - var isPathCwd = require_is_path_cwd(); - var isPathInside = require_is_path_inside(); - var rimraf = require_rimraf(); - var pMap = require_p_map(); - var rimrafP = promisify(rimraf); - var rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync - }; - function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); - } - if (!isPathInside(file, cwd)) { - throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); - } - } - function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - patterns = patterns.map((pattern) => { - if (process.platform === "win32" && isGlob(pattern) === false) { - return slash(pattern); - } - return pattern; - }); - return patterns; - } - module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), onProgress = () => { - }, ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); - if (files.length === 0) { - onProgress({ - totalCount: 0, - deletedCount: 0, - percent: 1 - }); - } - let deletedCount = 0; - const mapper = async (file) => { - file = path11.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - deletedCount += 1; - onProgress({ - totalCount: files.length, - deletedCount, - percent: deletedCount / files.length - }); - return file; - }; - const removedFiles = await pMap(files, mapper, options); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); - const removedFiles = files.map((file) => { - file = path11.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - return file; - }); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; + const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path15) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path15) || isNotRelative(path15); + }; + if ( + // Detect `process` so that it can run in browsers. + typeof process !== "undefined" && process.platform === "win32" + ) { + setupWindows(); + } + module2.exports = factory; + factory.default = factory; + module2.exports.isPathValid = isPathValid; + define2(module2.exports, Symbol.for("setupWindows"), setupWindows); } }); @@ -37584,7 +33622,7 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^6.1.1", + del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -38741,18 +34779,18 @@ var require_light = __commonJS({ var done, waitForExecuting; options = parser$5.load(options, this.stopDefaults); waitForExecuting = (at) => { - var finished; - finished = () => { + var finished2; + finished2 = () => { var counts; counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; return new this.Promise((resolve6, reject) => { - if (finished()) { + if (finished2()) { return resolve6(); } else { return this.on("done", () => { - if (finished()) { + if (finished2()) { this.removeAllListeners("done"); return resolve6(); } @@ -39179,7 +35217,7 @@ var require_console_log_level = __commonJS({ "use strict"; var util = require("util"); var levels = ["trace", "debug", "info", "warn", "error", "fatal"]; - var noop = function() { + var noop2 = function() { }; module2.exports = function(opts) { opts = opts || {}; @@ -39189,7 +35227,7 @@ var require_console_log_level = __commonJS({ return levels.indexOf(level) >= levels.indexOf(opts.level); }; levels.forEach(function(level) { - logger[level] = shouldLog(level) ? log : noop; + logger[level] = shouldLog(level) ? log : noop2; function log() { var prefix = opts.prefix; var normalizedLevel; @@ -39310,7 +35348,7 @@ var require_internal_path_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path11 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -39318,7 +35356,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path11.dirname(p); + let result = path15.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -39356,7 +35394,7 @@ var require_internal_path_helper = __commonJS({ assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { - root += path11.sep; + root += path15.sep; } return root + itemPath; } @@ -39394,10 +35432,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path11.sep)) { + if (!p.endsWith(path15.sep)) { return p; } - if (p === path11.sep) { + if (p === path15.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -39508,6 +35546,796 @@ var require_internal_pattern_helper = __commonJS({ } }); +// node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str2) { + if (a instanceof RegExp) a = maybeMatch(a, str2); + if (b instanceof RegExp) b = maybeMatch(b, str2); + var r = range(a, b, str2); + return r && { + start: r[0], + end: r[1], + pre: str2.slice(0, r[0]), + body: str2.slice(r[0] + a.length, r[1]), + post: str2.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str2) { + var m = str2.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str2) { + var begs, beg, left, right, result; + var ai = str2.indexOf(a); + var bi = str2.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + begs = []; + left = str2.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str2.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str2.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str2) { + return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + } + function escapeBraces(str2) { + return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str2) { + return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str2) { + if (!str2) + return [""]; + var parts = []; + var m = balanced("{", "}", str2); + if (!m) + return str2.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str2) { + if (!str2) + return []; + if (str2.substr(0, 2) === "{}") { + str2 = "\\{\\}" + str2.substr(2); + } + return expand(escapeBraces(str2), true).map(unescapeBraces); + } + function embrace(str2) { + return "{" + str2 + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte5(i, y) { + return i >= y; + } + function expand(str2, isTop) { + var expansions = []; + var m = balanced("{", "}", str2); + if (!m || /\$$/.test(m.pre)) return [str2]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str2 = m.pre + "{" + m.body + escClose + m.post; + return expand(str2); + } + return [str2]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte5; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path15 = (function() { + try { + return require("path"); + } catch (e) { + } + })() || { + sep: "/" + }; + minimatch.sep = path15.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set2, c) { + set2[c] = true; + return set2; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path15.sep !== "/") { + pattern = pattern.split(path15.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set2 = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug2() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set2); + set2 = this.globParts = set2.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set2); + set2 = set2.map(function(s, si, set3) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set2); + set2 = set2.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set2); + this.set = set2; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate2 = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate2 = !negate2; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate2; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set2 = this.set; + if (!set2.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set2.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path15.sep !== "/") { + f = f.split(path15.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set2 = this.set; + this.debug(this.pattern, "set", set2); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set2.length; i++) { + var pattern = set2[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug( + "matchOne", + { "this": this, file, pattern } + ); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) return true; + } + return false; + } + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { @@ -39540,7 +36368,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path11 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -39555,12 +36383,12 @@ var require_internal_path = __commonJS({ assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path11.sep); + this.segments = itemPath.split(path15.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path11.basename(remaining); + const basename = path15.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -39578,7 +36406,7 @@ var require_internal_path = __commonJS({ assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path11.sep), `Parameter 'itemPath' contains unexpected path separators`); + assert_1.default(!segment.includes(path15.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -39589,12 +36417,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path11.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path15.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path11.sep; + result += path15.sep; } result += this.segments[i]; } @@ -39638,7 +36466,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os2 = __importStar4(require("os")); - var path11 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -39667,7 +36495,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path11.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path15.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -39691,8 +36519,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path11.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path11.sep}`; + if (!itemPath.endsWith(path15.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path15.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -39727,9 +36555,9 @@ var require_internal_pattern = __commonJS({ assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path11.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path15.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path11.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path15.sep}`)) { homedir = homedir || os2.homedir(); assert_1.default(homedir, "Unable to determine HOME directory"); assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); @@ -39813,8 +36641,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path11, level) { - this.path = path11; + constructor(path15, level) { + this.path = path15; this.level = level; } }; @@ -39934,9 +36762,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core12 = __importStar4(require_core()); - var fs11 = __importStar4(require("fs")); + var fs14 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path11 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var patternHelper = __importStar4(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); @@ -39986,7 +36814,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core12.debug(`Search path '${searchPath}'`); try { - yield __await4(fs11.promises.lstat(searchPath)); + yield __await4(fs14.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -40017,7 +36845,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs11.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path11.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs14.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path15.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await4(item.path); @@ -40052,7 +36880,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs11.promises.stat(item.path); + stats = yield fs14.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -40064,10 +36892,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs11.promises.lstat(item.path); + stats = yield fs14.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs11.promises.realpath(item.path); + const realPath = yield fs14.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -40086,7 +36914,7 @@ var require_internal_globber = __commonJS({ }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ +var require_glob = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -41398,11 +38226,11 @@ var require_cacheUtils = __commonJS({ exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; var core12 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); - var glob = __importStar4(require_glob2()); + var glob = __importStar4(require_glob()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs11 = __importStar4(require("fs")); - var path11 = __importStar4(require("path")); + var fs14 = __importStar4(require("fs")); + var path15 = __importStar4(require("path")); var semver8 = __importStar4(require_semver3()); var util = __importStar4(require("util")); var constants_1 = require_constants10(); @@ -41422,16 +38250,16 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path11.join(baseLocation, "actions", "temp"); + tempDirectory = path15.join(baseLocation, "actions", "temp"); } - const dest = path11.join(tempDirectory, crypto.randomUUID()); + const dest = path15.join(tempDirectory, crypto.randomUUID()); yield io6.mkdirP(dest); return dest; }); } exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs11.statSync(filePath).size; + return fs14.statSync(filePath).size; } exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { @@ -41448,7 +38276,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path11.relative(workspace, file).replace(new RegExp(`\\${path11.sep}`, "g"), "/"); + const relativeFile = path15.relative(workspace, file).replace(new RegExp(`\\${path15.sep}`, "g"), "/"); core12.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -41471,7 +38299,7 @@ var require_cacheUtils = __commonJS({ exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { return __awaiter4(this, void 0, void 0, function* () { - return util.promisify(fs11.unlink)(filePath); + return util.promisify(fs14.unlink)(filePath); }); } exports2.unlinkFile = unlinkFile; @@ -41516,7 +38344,7 @@ var require_cacheUtils = __commonJS({ exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { return __awaiter4(this, void 0, void 0, function* () { - if (fs11.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs14.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -43022,13 +39850,13 @@ var require_userAgentPlatform = __commonJS({ exports2.setPlatformSpecificData = setPlatformSpecificData; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var os2 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); + var process6 = tslib_1.__importStar(require("node:process")); function getHeaderName() { return "User-Agent"; } async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; + if (process6 && process6.versions) { + const versions = process6.versions; if (versions.bun) { map2.set("Bun", versions.bun); } else if (versions.deno) { @@ -43996,7 +40824,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common4 = __commonJS({ +var require_common3 = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -44330,7 +41158,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common4()(exports2); + module2.exports = require_common3()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -44618,7 +41446,7 @@ var require_node = __commonJS({ debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common4()(exports2); + module2.exports = require_common3()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -49354,15 +46182,15 @@ var require_urlHelpers = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path11 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path11.startsWith("/")) { - path11 = path11.substring(1); + let path15 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path15.startsWith("/")) { + path15 = path15.substring(1); } - if (isAbsoluteUrl(path11)) { - requestUrl = path11; + if (isAbsoluteUrl(path15)) { + requestUrl = path15; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path11); + requestUrl = appendPath(requestUrl, path15); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -49410,9 +46238,9 @@ var require_urlHelpers = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path11 = pathToAppend.substring(0, searchStart); + const path15 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path11; + newPath = newPath + path15; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -53289,7 +50117,7 @@ var require_dist7 = __commonJS({ var stream2 = require("stream"); var coreLro = require_dist6(); var events = require("events"); - var fs11 = require("fs"); + var fs14 = require("fs"); var util = require("util"); var buffer = require("buffer"); function _interopNamespaceDefault(e) { @@ -53312,7 +50140,7 @@ var require_dist7 = __commonJS({ } var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs11); + var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs14); var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); var logger = logger$1.createClientLogger("storage-blob"); var BaseRequestPolicy = class { @@ -53561,10 +50389,10 @@ var require_dist7 = __commonJS({ ]; function escapeURLPath(url3) { const urlParsed = new URL(url3); - let path11 = urlParsed.pathname; - path11 = path11 || "/"; - path11 = escape(path11); - urlParsed.pathname = path11; + let path15 = urlParsed.pathname; + path15 = path15 || "/"; + path15 = escape(path15); + urlParsed.pathname = path15; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -53649,9 +50477,9 @@ var require_dist7 = __commonJS({ } function appendToURLPath(url3, name) { const urlParsed = new URL(url3); - let path11 = urlParsed.pathname; - path11 = path11 ? path11.endsWith("/") ? `${path11}${name}` : `${path11}/${name}` : name; - urlParsed.pathname = path11; + let path15 = urlParsed.pathname; + path15 = path15 ? path15.endsWith("/") ? `${path15}${name}` : `${path15}/${name}` : name; + urlParsed.pathname = path15; return urlParsed.toString(); } function setURLParameter(url3, name, value) { @@ -54732,9 +51560,9 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path11 = getURLPath(request.url) || "/"; + const path15 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path11}`; + canonicalizedResourceString += `/${this.factory.accountName}${path15}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -55027,9 +51855,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path11 = getURLPath(request.url) || "/"; + const path15 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path11}`; + canonicalizedResourceString += `/${options.accountName}${path15}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -74331,8 +71159,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (this.operationCount >= BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path11 = getURLPath(subRequest.url); - if (!path11 || path11 === "") { + const path15 = getURLPath(subRequest.url); + if (!path15 || path15 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -74392,8 +71220,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; pipeline = newPipeline(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); - const path11 = getURLPath(url3); - if (path11 && path11 !== "/") { + const path15 = getURLPath(url3); + if (path15 && path15 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -77160,7 +73988,7 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); - var fs11 = __importStar4(require("fs")); + var fs14 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); var utils = __importStar4(require_cacheUtils()); @@ -77271,7 +74099,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter4(this, void 0, void 0, function* () { - const writeStream = fs11.createWriteStream(archivePath); + const writeStream = fs14.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); @@ -77297,7 +74125,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { var _a; return __awaiter4(this, void 0, void 0, function* () { - const archiveDescriptor = yield fs11.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs14.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -77414,7 +74242,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs11.openSync(archivePath, "w"); + const fd = fs14.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -77432,12 +74260,12 @@ var require_downloadUtils = __commonJS({ controller.abort(); throw new Error("Aborting cache download as the download time exceeded the timeout."); } else if (Buffer.isBuffer(result)) { - fs11.writeFileSync(fd, result); + fs14.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs11.closeSync(fd); + fs14.closeSync(fd); } } }); @@ -77736,7 +74564,7 @@ var require_cacheHttpClient = __commonJS({ var core12 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs11 = __importStar4(require("fs")); + var fs14 = __importStar4(require("fs")); var url_1 = require("url"); var utils = __importStar4(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -77874,7 +74702,7 @@ Other caches with similar key:`); return __awaiter4(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); - const fd = fs11.openSync(archivePath, "r"); + const fd = fs14.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -77888,7 +74716,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs11.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs14.createReadStream(archivePath, { fd, start, end, @@ -77899,7 +74727,7 @@ Other caches with similar key:`); } }))); } finally { - fs11.closeSync(fd); + fs14.closeSync(fd); } return; }); @@ -83117,7 +79945,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io6 = __importStar4(require_io()); var fs_1 = require("fs"); - var path11 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var constants_1 = require_constants10(); var IS_WINDOWS = process.platform === "win32"; @@ -83163,13 +79991,13 @@ var require_tar = __commonJS({ const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type2) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path11.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path15.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -83215,7 +80043,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path11.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -83224,7 +80052,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path11.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -83239,7 +80067,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -83248,7 +80076,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path11.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -83288,7 +80116,7 @@ var require_tar = __commonJS({ exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter4(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path11.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path15.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -83358,7 +80186,7 @@ var require_cache3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; var core12 = __importStar4(require_core()); - var path11 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); @@ -83448,7 +80276,7 @@ var require_cache3 = __commonJS({ core12.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path11.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core12.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core12.isDebug()) { @@ -83517,7 +80345,7 @@ var require_cache3 = __commonJS({ core12.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path11.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core12.debug(`Archive path: ${archivePath}`); core12.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -83580,7 +80408,7 @@ var require_cache3 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path11.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core12.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -83644,7 +80472,7 @@ var require_cache3 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path11.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core12.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -83777,7 +80605,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os2 = require("os"); var cp = require("child_process"); - var fs11 = require("fs"); + var fs14 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter4(this, void 0, void 0, function* () { const platFilter = os2.platform(); @@ -83841,10 +80669,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs11.existsSync(lsbReleaseFile)) { - contents = fs11.readFileSync(lsbReleaseFile).toString(); - } else if (fs11.existsSync(osReleaseFile)) { - contents = fs11.readFileSync(osReleaseFile).toString(); + if (fs14.existsSync(lsbReleaseFile)) { + contents = fs14.readFileSync(lsbReleaseFile).toString(); + } else if (fs14.existsSync(osReleaseFile)) { + contents = fs14.readFileSync(osReleaseFile).toString(); } return contents; } @@ -84021,10 +80849,10 @@ var require_tool_cache = __commonJS({ var core12 = __importStar4(require_core()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs11 = __importStar4(require("fs")); + var fs14 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); var os2 = __importStar4(require("os")); - var path11 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var httpm = __importStar4(require_lib()); var semver8 = __importStar4(require_semver2()); var stream2 = __importStar4(require("stream")); @@ -84045,8 +80873,8 @@ var require_tool_cache = __commonJS({ var userAgent = "actions/tool-cache"; function downloadTool2(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path11.join(_getTempDirectory(), crypto.randomUUID()); - yield io6.mkdirP(path11.dirname(dest)); + dest = dest || path15.join(_getTempDirectory(), crypto.randomUUID()); + yield io6.mkdirP(path15.dirname(dest)); core12.debug(`Downloading ${url2}`); core12.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -84068,7 +80896,7 @@ var require_tool_cache = __commonJS({ exports2.downloadTool = downloadTool2; function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - if (fs11.existsSync(dest)) { + if (fs14.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { @@ -84092,7 +80920,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs11.createWriteStream(dest)); + yield pipeline(readStream, fs14.createWriteStream(dest)); core12.debug("download complete"); succeeded = true; return dest; @@ -84133,7 +80961,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path11.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path15.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; @@ -84304,12 +81132,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os2.arch(); core12.debug(`Caching tool ${tool} ${version} ${arch2}`); core12.debug(`source dir: ${sourceDir}`); - if (!fs11.statSync(sourceDir).isDirectory()) { + if (!fs14.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs11.readdirSync(sourceDir)) { - const s = path11.join(sourceDir, itemName); + for (const itemName of fs14.readdirSync(sourceDir)) { + const s = path15.join(sourceDir, itemName); yield io6.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -84323,11 +81151,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os2.arch(); core12.debug(`Caching tool ${tool} ${version} ${arch2}`); core12.debug(`source file: ${sourceFile}`); - if (!fs11.statSync(sourceFile).isFile()) { + if (!fs14.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path11.join(destFolder, targetFile); + const destPath = path15.join(destFolder, targetFile); core12.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -84351,9 +81179,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; - const cachePath = path11.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path15.join(_getCacheDirectory(), toolName, versionSpec, arch2); core12.debug(`checking cache: ${cachePath}`); - if (fs11.existsSync(cachePath) && fs11.existsSync(`${cachePath}.complete`)) { + if (fs14.existsSync(cachePath) && fs14.existsSync(`${cachePath}.complete`)) { core12.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -84366,13 +81194,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os2.arch(); - const toolPath = path11.join(_getCacheDirectory(), toolName); - if (fs11.existsSync(toolPath)) { - const children = fs11.readdirSync(toolPath); + const toolPath = path15.join(_getCacheDirectory(), toolName); + if (fs14.existsSync(toolPath)) { + const children = fs14.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path11.join(toolPath, child, arch2 || ""); - if (fs11.existsSync(fullPath) && fs11.existsSync(`${fullPath}.complete`)) { + const fullPath = path15.join(toolPath, child, arch2 || ""); + if (fs14.existsSync(fullPath) && fs14.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -84426,7 +81254,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter4(this, void 0, void 0, function* () { if (!dest) { - dest = path11.join(_getTempDirectory(), crypto.randomUUID()); + dest = path15.join(_getTempDirectory(), crypto.randomUUID()); } yield io6.mkdirP(dest); return dest; @@ -84434,7 +81262,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { - const folderPath = path11.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path15.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core12.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); @@ -84444,9 +81272,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path11.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path15.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs11.writeFileSync(markerPath, ""); + fs14.writeFileSync(markerPath, ""); core12.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -84623,7 +81451,7 @@ var require_follow_redirects = __commonJS({ "ERR_STREAM_WRITE_AFTER_END", "write after end" ); - var destroy = Writable.prototype.destroy || noop; + var destroy = Writable.prototype.destroy || noop2; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); @@ -84952,7 +81780,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop() { + function noop2() { } function parseUrl(input) { var parsed; @@ -85028,7 +81856,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.removeListener(event, eventHandlers[event]); } - request.on("error", noop); + request.on("error", noop2); request.destroy(error2); } function isSubdomain(subdomain, domain) { @@ -87972,55 +84800,785 @@ __export(upload_lib_exports, { waitForProcessing: () => waitForProcessing }); module.exports = __toCommonJS(upload_lib_exports); -var fs10 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var fs13 = __toESM(require("fs")); +var path14 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core11 = __toESM(require_core()); var jsonschema = __toESM(require_lib2()); // src/actions-util.ts -var fs = __toESM(require("fs")); -var path2 = __toESM(require("path")); +var fs4 = __toESM(require("fs")); +var path6 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts -var path = __toESM(require("path")); +var path5 = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); -var import_del = __toESM(require_del()); + +// node_modules/del/index.js +var import_promises4 = __toESM(require("node:fs/promises"), 1); +var import_node_path5 = __toESM(require("node:path"), 1); +var import_node_process4 = __toESM(require("node:process"), 1); + +// node_modules/globby/index.js +var import_node_process2 = __toESM(require("node:process"), 1); +var import_node_fs3 = __toESM(require("node:fs"), 1); +var import_node_path2 = __toESM(require("node:path"), 1); + +// node_modules/globby/node_modules/@sindresorhus/merge-streams/index.js +var import_node_events = require("node:events"); +var import_node_stream = require("node:stream"); +var import_promises = require("node:stream/promises"); +function mergeStreams(streams) { + if (!Array.isArray(streams)) { + throw new TypeError(`Expected an array, got \`${typeof streams}\`.`); + } + for (const stream2 of streams) { + validateStream(stream2); + } + const objectMode = streams.some(({ readableObjectMode }) => readableObjectMode); + const highWaterMark = getHighWaterMark(streams, objectMode); + const passThroughStream = new MergedStream({ + objectMode, + writableHighWaterMark: highWaterMark, + readableHighWaterMark: highWaterMark + }); + for (const stream2 of streams) { + passThroughStream.add(stream2); + } + if (streams.length === 0) { + endStream(passThroughStream); + } + return passThroughStream; +} +var getHighWaterMark = (streams, objectMode) => { + if (streams.length === 0) { + return 16384; + } + const highWaterMarks = streams.filter(({ readableObjectMode }) => readableObjectMode === objectMode).map(({ readableHighWaterMark }) => readableHighWaterMark); + return Math.max(...highWaterMarks); +}; +var MergedStream = class extends import_node_stream.PassThrough { + #streams = /* @__PURE__ */ new Set([]); + #ended = /* @__PURE__ */ new Set([]); + #aborted = /* @__PURE__ */ new Set([]); + #onFinished; + add(stream2) { + validateStream(stream2); + if (this.#streams.has(stream2)) { + return; + } + this.#streams.add(stream2); + this.#onFinished ??= onMergedStreamFinished(this, this.#streams); + endWhenStreamsDone({ + passThroughStream: this, + stream: stream2, + streams: this.#streams, + ended: this.#ended, + aborted: this.#aborted, + onFinished: this.#onFinished + }); + stream2.pipe(this, { end: false }); + } + remove(stream2) { + validateStream(stream2); + if (!this.#streams.has(stream2)) { + return false; + } + stream2.unpipe(this); + return true; + } +}; +var onMergedStreamFinished = async (passThroughStream, streams) => { + updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT); + const controller = new AbortController(); + try { + await Promise.race([ + onMergedStreamEnd(passThroughStream, controller), + onInputStreamsUnpipe(passThroughStream, streams, controller) + ]); + } finally { + controller.abort(); + updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_COUNT); + } +}; +var onMergedStreamEnd = async (passThroughStream, { signal }) => { + await (0, import_promises.finished)(passThroughStream, { signal, cleanup: true }); +}; +var onInputStreamsUnpipe = async (passThroughStream, streams, { signal }) => { + for await (const [unpipedStream] of (0, import_node_events.on)(passThroughStream, "unpipe", { signal })) { + if (streams.has(unpipedStream)) { + unpipedStream.emit(unpipeEvent); + } + } +}; +var validateStream = (stream2) => { + if (typeof stream2?.pipe !== "function") { + throw new TypeError(`Expected a readable stream, got: \`${typeof stream2}\`.`); + } +}; +var endWhenStreamsDone = async ({ passThroughStream, stream: stream2, streams, ended, aborted, onFinished }) => { + updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM); + const controller = new AbortController(); + try { + await Promise.race([ + afterMergedStreamFinished(onFinished, stream2), + onInputStreamEnd({ passThroughStream, stream: stream2, streams, ended, aborted, controller }), + onInputStreamUnpipe({ stream: stream2, streams, ended, aborted, controller }) + ]); + } finally { + controller.abort(); + updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM); + } + if (streams.size === ended.size + aborted.size) { + if (ended.size === 0 && aborted.size > 0) { + abortStream(passThroughStream); + } else { + endStream(passThroughStream); + } + } +}; +var isAbortError = (error2) => error2?.code === "ERR_STREAM_PREMATURE_CLOSE"; +var afterMergedStreamFinished = async (onFinished, stream2) => { + try { + await onFinished; + abortStream(stream2); + } catch (error2) { + if (isAbortError(error2)) { + abortStream(stream2); + } else { + errorStream(stream2, error2); + } + } +}; +var onInputStreamEnd = async ({ passThroughStream, stream: stream2, streams, ended, aborted, controller: { signal } }) => { + try { + await (0, import_promises.finished)(stream2, { signal, cleanup: true, readable: true, writable: false }); + if (streams.has(stream2)) { + ended.add(stream2); + } + } catch (error2) { + if (signal.aborted || !streams.has(stream2)) { + return; + } + if (isAbortError(error2)) { + aborted.add(stream2); + } else { + errorStream(passThroughStream, error2); + } + } +}; +var onInputStreamUnpipe = async ({ stream: stream2, streams, ended, aborted, controller: { signal } }) => { + await (0, import_node_events.once)(stream2, unpipeEvent, { signal }); + streams.delete(stream2); + ended.delete(stream2); + aborted.delete(stream2); +}; +var unpipeEvent = Symbol("unpipe"); +var endStream = (stream2) => { + if (stream2.writable) { + stream2.end(); + } +}; +var abortStream = (stream2) => { + if (stream2.readable || stream2.writable) { + stream2.destroy(); + } +}; +var errorStream = (stream2, error2) => { + if (!stream2.destroyed) { + stream2.once("error", noop); + stream2.destroy(error2); + } +}; +var noop = () => { +}; +var updateMaxListeners = (passThroughStream, increment) => { + const maxListeners = passThroughStream.getMaxListeners(); + if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) { + passThroughStream.setMaxListeners(maxListeners + increment); + } +}; +var PASSTHROUGH_LISTENERS_COUNT = 2; +var PASSTHROUGH_LISTENERS_PER_STREAM = 1; + +// node_modules/globby/index.js +var import_fast_glob2 = __toESM(require_out4(), 1); + +// node_modules/path-type/index.js +var import_node_fs = __toESM(require("node:fs"), 1); +var import_promises2 = __toESM(require("node:fs/promises"), 1); +async function isType(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + const stats = await import_promises2.default[fsStatType](filePath); + return stats[statsMethodName](); + } catch (error2) { + if (error2.code === "ENOENT") { + return false; + } + throw error2; + } +} +function isTypeSync(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + return import_node_fs.default[fsStatType](filePath)[statsMethodName](); + } catch (error2) { + if (error2.code === "ENOENT") { + return false; + } + throw error2; + } +} +var isFile = isType.bind(void 0, "stat", "isFile"); +var isDirectory = isType.bind(void 0, "stat", "isDirectory"); +var isSymlink = isType.bind(void 0, "lstat", "isSymbolicLink"); +var isFileSync = isTypeSync.bind(void 0, "statSync", "isFile"); +var isDirectorySync = isTypeSync.bind(void 0, "statSync", "isDirectory"); +var isSymlinkSync = isTypeSync.bind(void 0, "lstatSync", "isSymbolicLink"); + +// node_modules/unicorn-magic/node.js +var import_node_util = require("node:util"); +var import_node_child_process = require("node:child_process"); +var import_node_url = require("node:url"); +var execFileOriginal = (0, import_node_util.promisify)(import_node_child_process.execFile); +function toPath(urlOrPath) { + return urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath; +} +var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024; + +// node_modules/globby/ignore.js +var import_node_process = __toESM(require("node:process"), 1); +var import_node_fs2 = __toESM(require("node:fs"), 1); +var import_promises3 = __toESM(require("node:fs/promises"), 1); +var import_node_path = __toESM(require("node:path"), 1); +var import_fast_glob = __toESM(require_out4(), 1); +var import_ignore = __toESM(require_ignore(), 1); + +// node_modules/slash/index.js +function slash(path15) { + const isExtendedLengthPath = path15.startsWith("\\\\?\\"); + if (isExtendedLengthPath) { + return path15; + } + return path15.replace(/\\/g, "/"); +} + +// node_modules/globby/utilities.js +var isNegativePattern = (pattern) => pattern[0] === "!"; + +// node_modules/globby/ignore.js +var defaultIgnoredDirectories = [ + "**/node_modules", + "**/flow-typed", + "**/coverage", + "**/.git" +]; +var ignoreFilesGlobOptions = { + absolute: true, + dot: true +}; +var GITIGNORE_FILES_PATTERN = "**/.gitignore"; +var applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" + import_node_path.default.posix.join(base, pattern.slice(1)) : import_node_path.default.posix.join(base, pattern); +var parseIgnoreFile = (file, cwd) => { + const base = slash(import_node_path.default.relative(cwd, import_node_path.default.dirname(file.filePath))); + return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base)); +}; +var toRelativePath = (fileOrDirectory, cwd) => { + cwd = slash(cwd); + if (import_node_path.default.isAbsolute(fileOrDirectory)) { + if (slash(fileOrDirectory).startsWith(cwd)) { + return import_node_path.default.relative(cwd, fileOrDirectory); + } + throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`); + } + return fileOrDirectory; +}; +var getIsIgnoredPredicate = (files, cwd) => { + const patterns = files.flatMap((file) => parseIgnoreFile(file, cwd)); + const ignores = (0, import_ignore.default)().add(patterns); + return (fileOrDirectory) => { + fileOrDirectory = toPath(fileOrDirectory); + fileOrDirectory = toRelativePath(fileOrDirectory, cwd); + return fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false; + }; +}; +var normalizeOptions = (options = {}) => ({ + cwd: toPath(options.cwd) ?? import_node_process.default.cwd(), + suppressErrors: Boolean(options.suppressErrors), + deep: typeof options.deep === "number" ? options.deep : Number.POSITIVE_INFINITY, + ignore: [...options.ignore ?? [], ...defaultIgnoredDirectories] +}); +var isIgnoredByIgnoreFiles = async (patterns, options) => { + const { cwd, suppressErrors, deep, ignore } = normalizeOptions(options); + const paths = await (0, import_fast_glob.default)(patterns, { + cwd, + suppressErrors, + deep, + ignore, + ...ignoreFilesGlobOptions + }); + const files = await Promise.all( + paths.map(async (filePath) => ({ + filePath, + content: await import_promises3.default.readFile(filePath, "utf8") + })) + ); + return getIsIgnoredPredicate(files, cwd); +}; +var isIgnoredByIgnoreFilesSync = (patterns, options) => { + const { cwd, suppressErrors, deep, ignore } = normalizeOptions(options); + const paths = import_fast_glob.default.sync(patterns, { + cwd, + suppressErrors, + deep, + ignore, + ...ignoreFilesGlobOptions + }); + const files = paths.map((filePath) => ({ + filePath, + content: import_node_fs2.default.readFileSync(filePath, "utf8") + })); + return getIsIgnoredPredicate(files, cwd); +}; + +// node_modules/globby/index.js +var assertPatternsInput = (patterns) => { + if (patterns.some((pattern) => typeof pattern !== "string")) { + throw new TypeError("Patterns must be a string or an array of strings"); + } +}; +var normalizePathForDirectoryGlob = (filePath, cwd) => { + const path15 = isNegativePattern(filePath) ? filePath.slice(1) : filePath; + return import_node_path2.default.isAbsolute(path15) ? path15 : import_node_path2.default.join(cwd, path15); +}; +var getDirectoryGlob = ({ directoryPath, files, extensions }) => { + const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : ""; + return files ? files.map((file) => import_node_path2.default.posix.join(directoryPath, `**/${import_node_path2.default.extname(file) ? file : `${file}${extensionGlob}`}`)) : [import_node_path2.default.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)]; +}; +var directoryToGlob = async (directoryPaths, { + cwd = import_node_process2.default.cwd(), + files, + extensions +} = {}) => { + const globs = await Promise.all( + directoryPaths.map(async (directoryPath) => await isDirectory(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath) + ); + return globs.flat(); +}; +var directoryToGlobSync = (directoryPaths, { + cwd = import_node_process2.default.cwd(), + files, + extensions +} = {}) => directoryPaths.flatMap((directoryPath) => isDirectorySync(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath); +var toPatternsArray = (patterns) => { + patterns = [...new Set([patterns].flat())]; + assertPatternsInput(patterns); + return patterns; +}; +var checkCwdOption = (cwd) => { + if (!cwd) { + return; + } + let stat; + try { + stat = import_node_fs3.default.statSync(cwd); + } catch { + return; + } + if (!stat.isDirectory()) { + throw new Error("The `cwd` option must be a path to a directory"); + } +}; +var normalizeOptions2 = (options = {}) => { + options = { + ...options, + ignore: options.ignore ?? [], + expandDirectories: options.expandDirectories ?? true, + cwd: toPath(options.cwd) + }; + checkCwdOption(options.cwd); + return options; +}; +var normalizeArguments = (function_) => async (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)); +var normalizeArgumentsSync = (function_) => (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)); +var getIgnoreFilesPatterns = (options) => { + const { ignoreFiles, gitignore } = options; + const patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : []; + if (gitignore) { + patterns.push(GITIGNORE_FILES_PATTERN); + } + return patterns; +}; +var getFilter = async (options) => { + const ignoreFilesPatterns = getIgnoreFilesPatterns(options); + return createFilterFunction( + ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options) + ); +}; +var getFilterSync = (options) => { + const ignoreFilesPatterns = getIgnoreFilesPatterns(options); + return createFilterFunction( + ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options) + ); +}; +var createFilterFunction = (isIgnored) => { + const seen = /* @__PURE__ */ new Set(); + return (fastGlobResult) => { + const pathKey = import_node_path2.default.normalize(fastGlobResult.path ?? fastGlobResult); + if (seen.has(pathKey) || isIgnored && isIgnored(pathKey)) { + return false; + } + seen.add(pathKey); + return true; + }; +}; +var unionFastGlobResults = (results, filter) => results.flat().filter((fastGlobResult) => filter(fastGlobResult)); +var convertNegativePatterns = (patterns, options) => { + const tasks = []; + while (patterns.length > 0) { + const index = patterns.findIndex((pattern) => isNegativePattern(pattern)); + if (index === -1) { + tasks.push({ patterns, options }); + break; + } + const ignorePattern = patterns[index].slice(1); + for (const task of tasks) { + task.options.ignore.push(ignorePattern); + } + if (index !== 0) { + tasks.push({ + patterns: patterns.slice(0, index), + options: { + ...options, + ignore: [ + ...options.ignore, + ignorePattern + ] + } + }); + } + patterns = patterns.slice(index + 1); + } + return tasks; +}; +var normalizeExpandDirectoriesOption = (options, cwd) => ({ + ...cwd ? { cwd } : {}, + ...Array.isArray(options) ? { files: options } : options +}); +var generateTasks = async (patterns, options) => { + const globTasks = convertNegativePatterns(patterns, options); + const { cwd, expandDirectories } = options; + if (!expandDirectories) { + return globTasks; + } + const directoryToGlobOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd); + return Promise.all( + globTasks.map(async (task) => { + let { patterns: patterns2, options: options2 } = task; + [ + patterns2, + options2.ignore + ] = await Promise.all([ + directoryToGlob(patterns2, directoryToGlobOptions), + directoryToGlob(options2.ignore, { cwd }) + ]); + return { patterns: patterns2, options: options2 }; + }) + ); +}; +var generateTasksSync = (patterns, options) => { + const globTasks = convertNegativePatterns(patterns, options); + const { cwd, expandDirectories } = options; + if (!expandDirectories) { + return globTasks; + } + const directoryToGlobSyncOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd); + return globTasks.map((task) => { + let { patterns: patterns2, options: options2 } = task; + patterns2 = directoryToGlobSync(patterns2, directoryToGlobSyncOptions); + options2.ignore = directoryToGlobSync(options2.ignore, { cwd }); + return { patterns: patterns2, options: options2 }; + }); +}; +var globby = normalizeArguments(async (patterns, options) => { + const [ + tasks, + filter + ] = await Promise.all([ + generateTasks(patterns, options), + getFilter(options) + ]); + const results = await Promise.all(tasks.map((task) => (0, import_fast_glob2.default)(task.patterns, task.options))); + return unionFastGlobResults(results, filter); +}); +var globbySync = normalizeArgumentsSync((patterns, options) => { + const tasks = generateTasksSync(patterns, options); + const filter = getFilterSync(options); + const results = tasks.map((task) => import_fast_glob2.default.sync(task.patterns, task.options)); + return unionFastGlobResults(results, filter); +}); +var globbyStream = normalizeArgumentsSync((patterns, options) => { + const tasks = generateTasksSync(patterns, options); + const filter = getFilterSync(options); + const streams = tasks.map((task) => import_fast_glob2.default.stream(task.patterns, task.options)); + const stream2 = mergeStreams(streams).filter((fastGlobResult) => filter(fastGlobResult)); + return stream2; +}); +var isDynamicPattern = normalizeArgumentsSync( + (patterns, options) => patterns.some((pattern) => import_fast_glob2.default.isDynamicPattern(pattern, options)) +); +var generateGlobTasks = normalizeArguments(generateTasks); +var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync); +var { convertPathToPattern } = import_fast_glob2.default; + +// node_modules/del/index.js +var import_is_glob = __toESM(require_is_glob(), 1); + +// node_modules/is-path-cwd/index.js +var import_node_process3 = __toESM(require("node:process"), 1); +var import_node_path3 = __toESM(require("node:path"), 1); +function isPathCwd(path_) { + let cwd = import_node_process3.default.cwd(); + path_ = import_node_path3.default.resolve(path_); + if (import_node_process3.default.platform === "win32") { + cwd = cwd.toLowerCase(); + path_ = path_.toLowerCase(); + } + return path_ === cwd; +} + +// node_modules/del/node_modules/is-path-inside/index.js +var import_node_path4 = __toESM(require("node:path"), 1); +function isPathInside(childPath, parentPath) { + const relation = import_node_path4.default.relative(parentPath, childPath); + return Boolean( + relation && relation !== ".." && !relation.startsWith(`..${import_node_path4.default.sep}`) && relation !== import_node_path4.default.resolve(childPath) + ); +} + +// node_modules/p-map/index.js +async function pMap(iterable, mapper, { + concurrency = Number.POSITIVE_INFINITY, + stopOnError = true, + signal +} = {}) { + return new Promise((resolve_, reject_) => { + if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) { + throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`); + } + if (typeof mapper !== "function") { + throw new TypeError("Mapper function is required"); + } + if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) { + throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); + } + const result = []; + const errors = []; + const skippedIndexesMap = /* @__PURE__ */ new Map(); + let isRejected = false; + let isResolved = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const iterator = iterable[Symbol.iterator] === void 0 ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator](); + const signalListener = () => { + reject(signal.reason); + }; + const cleanup = () => { + signal?.removeEventListener("abort", signalListener); + }; + const resolve6 = (value) => { + resolve_(value); + cleanup(); + }; + const reject = (reason) => { + isRejected = true; + isResolved = true; + reject_(reason); + cleanup(); + }; + if (signal) { + if (signal.aborted) { + reject(signal.reason); + } + signal.addEventListener("abort", signalListener, { once: true }); + } + const next = async () => { + if (isResolved) { + return; + } + const nextItem = await iterator.next(); + const index = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0 && !isResolved) { + if (!stopOnError && errors.length > 0) { + reject(new AggregateError(errors)); + return; + } + isResolved = true; + if (skippedIndexesMap.size === 0) { + resolve6(result); + return; + } + const pureResult = []; + for (const [index2, value] of result.entries()) { + if (skippedIndexesMap.get(index2) === pMapSkip) { + continue; + } + pureResult.push(value); + } + resolve6(pureResult); + } + return; + } + resolvingCount++; + (async () => { + try { + const element = await nextItem.value; + if (isResolved) { + return; + } + const value = await mapper(element, index); + if (value === pMapSkip) { + skippedIndexesMap.set(index, value); + } + result[index] = value; + resolvingCount--; + await next(); + } catch (error2) { + if (stopOnError) { + reject(error2); + } else { + errors.push(error2); + resolvingCount--; + try { + await next(); + } catch (error3) { + reject(error3); + } + } + } + })(); + }; + (async () => { + for (let index = 0; index < concurrency; index++) { + try { + await next(); + } catch (error2) { + reject(error2); + break; + } + if (isIterableDone || isRejected) { + break; + } + } + })(); + }); +} +var pMapSkip = Symbol("skip"); + +// node_modules/del/index.js +function safeCheck(file, cwd) { + if (isPathCwd(file)) { + throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); + } + if (!isPathInside(file, cwd)) { + throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); + } +} +function normalizePatterns(patterns) { + patterns = Array.isArray(patterns) ? patterns : [patterns]; + patterns = patterns.map((pattern) => { + if (import_node_process4.default.platform === "win32" && (0, import_is_glob.default)(pattern) === false) { + return slash(pattern); + } + return pattern; + }); + return patterns; +} +async function deleteAsync(patterns, { force, dryRun, cwd = import_node_process4.default.cwd(), onProgress = () => { +}, ...options } = {}) { + options = { + expandDirectories: false, + onlyFiles: false, + followSymbolicLinks: false, + cwd, + ...options + }; + patterns = normalizePatterns(patterns); + const paths = await globby(patterns, options); + const files = paths.sort((a, b) => b.localeCompare(a)); + if (files.length === 0) { + onProgress({ + totalCount: 0, + deletedCount: 0, + percent: 1 + }); + } + let deletedCount = 0; + const mapper = async (file) => { + file = import_node_path5.default.resolve(cwd, file); + if (!force) { + safeCheck(file, cwd); + } + if (!dryRun) { + await import_promises4.default.rm(file, { recursive: true, force: true }); + } + deletedCount += 1; + onProgress({ + totalCount: files.length, + deletedCount, + percent: deletedCount / files.length, + path: file + }); + return file; + }; + const removedFiles = await pMap(files, mapper, options); + removedFiles.sort((a, b) => a.localeCompare(b)); + return removedFiles; +} // node_modules/get-folder-size/index.js -var import_node_path = require("node:path"); +var import_node_path6 = require("node:path"); async function getFolderSize(itemPath, options) { return await core(itemPath, options, { errors: true }); } getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); async function core(rootItemPath, options = {}, returnType = {}) { - const fs11 = options.fs || await import("node:fs/promises"); + const fs14 = options.fs || await import("node:fs/promises"); let folderSize = 0n; const foundInos = /* @__PURE__ */ new Set(); const errors = []; await processItem(rootItemPath); async function processItem(itemPath) { if (options.ignore?.test(itemPath)) return; - const stats = returnType.strict ? await fs11.lstat(itemPath, { bigint: true }) : await fs11.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + const stats = returnType.strict ? await fs14.lstat(itemPath, { bigint: true }) : await fs14.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); if (typeof stats !== "object") return; if (!foundInos.has(stats.ino)) { foundInos.add(stats.ino); folderSize += stats.size; } if (stats.isDirectory()) { - const directoryItems = returnType.strict ? await fs11.readdir(itemPath) : await fs11.readdir(itemPath).catch((error2) => errors.push(error2)); + const directoryItems = returnType.strict ? await fs14.readdir(itemPath) : await fs14.readdir(itemPath).catch((error2) => errors.push(error2)); if (typeof directoryItems !== "object") return; await Promise.all( directoryItems.map( - (directoryItem) => processItem((0, import_node_path.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path6.join)(itemPath, directoryItem)) ) ); } @@ -90664,7 +88222,7 @@ function getToolNames(sarif) { return Object.keys(toolNames); } function getCodeQLDatabasePath(config, language) { - return path.resolve(config.dbLocation, language); + return path5.resolve(config.dbLocation, language); } function parseGitHubUrl(inputUrl) { const originalUrl = inputUrl; @@ -90779,7 +88337,7 @@ function cloneObject(obj) { async function cleanUpGlob(glob, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await (0, import_del.default)(glob, { force: true }); + const deletedPaths = await deleteAsync(glob, { force: true }); if (deletedPaths.length === 0) { logger.warning( `Failed to clean up ${name}: no files found matching ${glob}.` @@ -90833,17 +88391,17 @@ function getWorkflowEventName() { } function isRunningLocalAction() { const relativeScriptPath = getRelativeScriptPath(); - return relativeScriptPath.startsWith("..") || path2.isAbsolute(relativeScriptPath); + return relativeScriptPath.startsWith("..") || path6.isAbsolute(relativeScriptPath); } function getRelativeScriptPath() { const runnerTemp = getRequiredEnvParam("RUNNER_TEMP"); - const actionsDirectory = path2.join(path2.dirname(runnerTemp), "_actions"); - return path2.relative(actionsDirectory, __filename); + const actionsDirectory = path6.join(path6.dirname(runnerTemp), "_actions"); + return path6.relative(actionsDirectory, __filename); } function getWorkflowEvent() { const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH"); try { - return JSON.parse(fs.readFileSync(eventJsonFile, "utf-8")); + return JSON.parse(fs4.readFileSync(eventJsonFile, "utf-8")); } catch (e) { throw new Error( `Unable to read workflow event JSON from ${eventJsonFile}: ${e}` @@ -91074,8 +88632,8 @@ function wrapApiConfigurationError(e) { } // src/codeql.ts -var fs8 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var fs11 = __toESM(require("fs")); +var path12 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -91317,8 +88875,8 @@ function wrapCliConfigurationError(cliError) { } // src/config-utils.ts -var fs4 = __toESM(require("fs")); -var path5 = __toESM(require("path")); +var fs7 = __toESM(require("fs")); +var path9 = __toESM(require("path")); var semver4 = __toESM(require_semver2()); // src/analyses.ts @@ -91333,8 +88891,8 @@ var supportedAnalysisKinds = new Set(Object.values(AnalysisKind)); var core6 = __toESM(require_core()); // src/diff-informed-analysis-utils.ts -var fs3 = __toESM(require("fs")); -var path4 = __toESM(require("path")); +var fs6 = __toESM(require("fs")); +var path8 = __toESM(require("path")); // src/feature-flags.ts var semver3 = __toESM(require_semver2()); @@ -91344,8 +88902,8 @@ var bundleVersion = "codeql-bundle-v2.22.4"; var cliVersion = "2.22.4"; // src/overlay-database-utils.ts -var fs2 = __toESM(require("fs")); -var path3 = __toESM(require("path")); +var fs5 = __toESM(require("fs")); +var path7 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts @@ -91471,8 +89029,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path11 = decodeGitFilePath(match[2]); - fileOidMap[path11] = oid; + const path15 = decodeGitFilePath(match[2]); + fileOidMap[path15] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -91567,12 +89125,12 @@ async function writeBaseDatabaseOidsFile(config, sourceRoot) { const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOidsJson = JSON.stringify(gitFileOids); const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - await fs2.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); + await fs5.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); } async function readBaseDatabaseOidsFile(config, logger) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); try { - const contents = await fs2.promises.readFile( + const contents = await fs5.promises.readFile( baseDatabaseOidsFilePath, "utf-8" ); @@ -91585,7 +89143,7 @@ async function readBaseDatabaseOidsFile(config, logger) { } } function getBaseDatabaseOidsFilePath(config) { - return path3.join(config.dbLocation, "base-database-oids.json"); + return path7.join(config.dbLocation, "base-database-oids.json"); } async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); @@ -91595,14 +89153,14 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path3.join( + const overlayChangesFile = path7.join( getTemporaryDirectory(), "overlay-changes.json" ); logger.debug( `Writing overlay changed files to ${overlayChangesFile}: ${changedFilesJson}` ); - await fs2.promises.writeFile(overlayChangesFile, changedFilesJson); + await fs5.promises.writeFile(overlayChangesFile, changedFilesJson); return overlayChangesFile; } function computeChangedFiles(baseFileOids, overlayFileOids) { @@ -91789,15 +89347,15 @@ var featureConfig = { // src/diff-informed-analysis-utils.ts function getDiffRangesJsonFilePath() { - return path4.join(getTemporaryDirectory(), "pr-diff-range.json"); + return path8.join(getTemporaryDirectory(), "pr-diff-range.json"); } function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); - if (!fs3.existsSync(jsonFilePath)) { + if (!fs6.existsSync(jsonFilePath)) { logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`); return void 0; } - const jsonContents = fs3.readFileSync(jsonFilePath, "utf8"); + const jsonContents = fs6.readFileSync(jsonFilePath, "utf8"); logger.debug( `Read pr-diff-range JSON file from ${jsonFilePath}: ${jsonContents}` @@ -91850,14 +89408,14 @@ var PACK_IDENTIFIER_PATTERN = (function() { return new RegExp(`^${component}/${component}$`); })(); function getPathToParsedConfigFile(tempDir) { - return path5.join(tempDir, "config"); + return path9.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); - if (!fs4.existsSync(configFile)) { + if (!fs7.existsSync(configFile)) { return void 0; } - const configString = fs4.readFileSync(configFile, "utf8"); + const configString = fs7.readFileSync(configFile, "utf8"); logger.debug("Loaded config:"); logger.debug(configString); return JSON.parse(configString); @@ -91910,8 +89468,8 @@ function generateCodeScanningConfig(originalUserInput, augmentationProperties) { } // src/setup-codeql.ts -var fs7 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var fs10 = __toESM(require("fs")); +var path11 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver7 = __toESM(require_semver2()); @@ -91969,7 +89527,7 @@ var v4_default = v4; // src/tar.ts var import_child_process = require("child_process"); -var fs5 = __toESM(require("fs")); +var fs8 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -92042,7 +89600,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs5.mkdirSync(dest, { recursive: true }); + fs8.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -92126,9 +89684,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs6 = __toESM(require("fs")); +var fs9 = __toESM(require("fs")); var os = __toESM(require("os")); -var path6 = __toESM(require("path")); +var path10 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -92233,7 +89791,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs6.mkdirSync(dest, { recursive: true }); + fs9.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -92261,7 +89819,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path6.join( + return path10.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver6.clean(version) || version, @@ -92270,7 +89828,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs6.writeFileSync(markerFilePath, ""); + fs9.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url2) { @@ -92401,7 +89959,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs7.existsSync(path7.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs10.existsSync(path11.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -92734,7 +90292,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path7.join(tempDir, v4_default()); + return path11.join(tempDir, v4_default()); } // src/tracer-config.ts @@ -92777,7 +90335,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path8.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path12.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -92838,12 +90396,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path8.join( + const tracingConfigPath = path12.join( extractorPath, "tools", "tracing-config.lua" ); - return fs8.existsSync(tracingConfigPath); + return fs11.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -92914,7 +90472,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path8.join( + const autobuildCmd = path12.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -93302,7 +90860,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs8.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs11.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -93325,7 +90883,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path8.resolve(config.tempDir, "user-config.yaml"); + return path12.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -93346,7 +90904,7 @@ async function getJobRunUuidSarifOptions(codeql) { } // src/fingerprints.ts -var fs9 = __toESM(require("fs")); +var fs12 = __toESM(require("fs")); var import_path = __toESM(require("path")); // node_modules/long/index.js @@ -94334,7 +91892,7 @@ async function hash(callback, filepath) { } updateHash(current); }; - const readStream = fs9.createReadStream(filepath, "utf8"); + const readStream = fs12.createReadStream(filepath, "utf8"); for await (const data of readStream) { for (let i = 0; i < data.length; ++i) { processCharacter(data.charCodeAt(i)); @@ -94409,11 +91967,11 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { if (!import_path.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } - if (!fs9.existsSync(uri)) { + if (!fs12.existsSync(uri)) { logger.debug(`Unable to compute fingerprint for non-existent file: ${uri}`); return void 0; } - if (fs9.statSync(uri).isDirectory()) { + if (fs12.statSync(uri).isDirectory()) { logger.debug(`Unable to compute fingerprint for directory: ${uri}`); return void 0; } @@ -94510,7 +92068,7 @@ function combineSarifFiles(sarifFiles, logger) { for (const sarifFile of sarifFiles) { logger.debug(`Loading SARIF file: ${sarifFile}`); const sarifObject = JSON.parse( - fs10.readFileSync(sarifFile, "utf8") + fs13.readFileSync(sarifFile, "utf8") ); if (combinedSarif.version === null) { combinedSarif.version = sarifObject.version; @@ -94582,7 +92140,7 @@ async function shouldDisableCombineSarifFiles(sarifObjects, githubVersion) { async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger) { logger.info("Combining SARIF files using the CodeQL CLI"); const sarifObjects = sarifFiles.map((sarifFile) => { - return JSON.parse(fs10.readFileSync(sarifFile, "utf8")); + return JSON.parse(fs13.readFileSync(sarifFile, "utf8")); }); const deprecationWarningMessage = gitHubVersion.type === 1 /* GHES */ ? "and will be removed in GitHub Enterprise Server 3.18" : "and will be removed in July 2025"; const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-from-a-single-upload"; @@ -94652,14 +92210,14 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo } return combineSarifFiles(sarifFiles, logger); } - const baseTempDir = path10.resolve(tempDir, "combined-sarif"); - fs10.mkdirSync(baseTempDir, { recursive: true }); - const outputDirectory = fs10.mkdtempSync(path10.resolve(baseTempDir, "output-")); - const outputFile = path10.resolve(outputDirectory, "combined-sarif.sarif"); + const baseTempDir = path14.resolve(tempDir, "combined-sarif"); + fs13.mkdirSync(baseTempDir, { recursive: true }); + const outputDirectory = fs13.mkdtempSync(path14.resolve(baseTempDir, "output-")); + const outputFile = path14.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); - return JSON.parse(fs10.readFileSync(outputFile, "utf8")); + return JSON.parse(fs13.readFileSync(outputFile, "utf8")); } function populateRunAutomationDetails(sarif, category, analysis_key, environment) { const automationID = getAutomationID(category, analysis_key, environment); @@ -94693,7 +92251,7 @@ var SARIF_UPLOAD_ENDPOINT = /* @__PURE__ */ ((SARIF_UPLOAD_ENDPOINT2) => { async function uploadPayload(payload, repositoryNwo, logger, target) { logger.info("Uploading results"); if (isInTestMode()) { - const payloadSaveFile = path10.join( + const payloadSaveFile = path14.join( getTemporaryDirectory(), "payload.json" ); @@ -94701,7 +92259,7 @@ async function uploadPayload(payload, repositoryNwo, logger, target) { `In test mode. Results are not uploaded. Saving to ${payloadSaveFile}` ); logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`); - fs10.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); + fs13.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); return "test-mode-sarif-id"; } const client = getApiClient(); @@ -94734,12 +92292,12 @@ async function uploadPayload(payload, repositoryNwo, logger, target) { function findSarifFilesInDir(sarifPath, isSarif) { const sarifFiles = []; const walkSarifFiles = (dir) => { - const entries = fs10.readdirSync(dir, { withFileTypes: true }); + const entries = fs13.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path10.resolve(dir, entry.name)); + sarifFiles.push(path14.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path10.resolve(dir, entry.name)); + walkSarifFiles(path14.resolve(dir, entry.name)); } } }; @@ -94747,11 +92305,11 @@ function findSarifFilesInDir(sarifPath, isSarif) { return sarifFiles; } function getSarifFilePaths(sarifPath, isSarif) { - if (!fs10.existsSync(sarifPath)) { + if (!fs13.existsSync(sarifPath)) { throw new ConfigurationError(`Path does not exist: ${sarifPath}`); } let sarifFiles; - if (fs10.lstatSync(sarifPath).isDirectory()) { + if (fs13.lstatSync(sarifPath).isDirectory()) { sarifFiles = findSarifFilesInDir(sarifPath, isSarif); if (sarifFiles.length === 0) { throw new ConfigurationError( @@ -94781,7 +92339,7 @@ function countResultsInSarif(sarif) { } function readSarifFile(sarifFilePath) { try { - return JSON.parse(fs10.readFileSync(sarifFilePath, "utf8")); + return JSON.parse(fs13.readFileSync(sarifFilePath, "utf8")); } catch (e) { throw new InvalidSarifUploadError( `Invalid SARIF. JSON syntax error: ${getErrorMessage(e)}` @@ -94850,7 +92408,7 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo payloadObj.base_sha = mergeBaseCommitOid; } else if (process.env.GITHUB_EVENT_PATH) { const githubEvent = JSON.parse( - fs10.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8") + fs13.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8") ); payloadObj.base_ref = `refs/heads/${githubEvent.pull_request.base.ref}`; payloadObj.base_sha = githubEvent.pull_request.base.sha; @@ -95100,7 +92658,7 @@ function filterAlertsByDiffRange(logger, sarif) { if (!locationUri || locationStartLine === void 0) { return false; } - const locationPath = path10.join(checkoutPath, locationUri).replaceAll(path10.sep, "/"); + const locationPath = path14.join(checkoutPath, locationUri).replaceAll(path14.sep, "/"); return diffRanges.some( (range) => range.path === locationPath && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0) ); diff --git a/lib/upload-sarif-action-post.js b/lib/upload-sarif-action-post.js index 3b799ba74..288e4e956 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -24525,9819 +24525,8 @@ var require_github = __commonJS({ } }); -// node_modules/array-union/index.js -var require_array_union = __commonJS({ - "node_modules/array-union/index.js"(exports2, module2) { - "use strict"; - module2.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; - }; - } -}); - -// node_modules/merge2/index.js -var require_merge2 = __commonJS({ - "node_modules/merge2/index.js"(exports2, module2) { - "use strict"; - var Stream = require("stream"); - var PassThrough = Stream.PassThrough; - var slice = Array.prototype.slice; - module2.exports = merge2; - function merge2() { - const streamsQueue = []; - const args = slice.call(arguments); - let merging = false; - let options = args[args.length - 1]; - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop(); - } else { - options = {}; - } - const doEnd = options.end !== false; - const doPipeError = options.pipeError === true; - if (options.objectMode == null) { - options.objectMode = true; - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024; - } - const mergedStream = PassThrough(options); - function addStream() { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)); - } - mergeStream(); - return this; - } - function mergeStream() { - if (merging) { - return; - } - merging = true; - let streams = streamsQueue.shift(); - if (!streams) { - process.nextTick(endStream); - return; - } - if (!Array.isArray(streams)) { - streams = [streams]; - } - let pipesCount = streams.length + 1; - function next() { - if (--pipesCount > 0) { - return; - } - merging = false; - mergeStream(); - } - function pipe(stream) { - function onend() { - stream.removeListener("merge2UnpipeEnd", onend); - stream.removeListener("end", onend); - if (doPipeError) { - stream.removeListener("error", onerror); - } - next(); - } - function onerror(err) { - mergedStream.emit("error", err); - } - if (stream._readableState.endEmitted) { - return next(); - } - stream.on("merge2UnpipeEnd", onend); - stream.on("end", onend); - if (doPipeError) { - stream.on("error", onerror); - } - stream.pipe(mergedStream, { end: false }); - stream.resume(); - } - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]); - } - next(); - } - function endStream() { - merging = false; - mergedStream.emit("queueDrain"); - if (doEnd) { - mergedStream.end(); - } - } - mergedStream.setMaxListeners(0); - mergedStream.add = addStream; - mergedStream.on("unpipe", function(stream) { - stream.emit("merge2UnpipeEnd"); - }); - if (args.length) { - addStream.apply(null, args); - } - return mergedStream; - } - function pauseStreams(streams, options) { - if (!Array.isArray(streams)) { - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)); - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error("Only readable stream can be merged."); - } - streams.pause(); - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options); - } - } - return streams; - } - } -}); - -// node_modules/fast-glob/out/utils/array.js -var require_array = __commonJS({ - "node_modules/fast-glob/out/utils/array.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.splitWhen = exports2.flatten = void 0; - function flatten(items) { - return items.reduce((collection, item) => [].concat(collection, item), []); - } - exports2.flatten = flatten; - function splitWhen(items, predicate) { - const result = [[]]; - let groupIndex = 0; - for (const item of items) { - if (predicate(item)) { - groupIndex++; - result[groupIndex] = []; - } else { - result[groupIndex].push(item); - } - } - return result; - } - exports2.splitWhen = splitWhen; - } -}); - -// node_modules/fast-glob/out/utils/errno.js -var require_errno = __commonJS({ - "node_modules/fast-glob/out/utils/errno.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEnoentCodeError = void 0; - function isEnoentCodeError(error2) { - return error2.code === "ENOENT"; - } - exports2.isEnoentCodeError = isEnoentCodeError; - } -}); - -// node_modules/fast-glob/out/utils/fs.js -var require_fs = __commonJS({ - "node_modules/fast-glob/out/utils/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports2.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/fast-glob/out/utils/path.js -var require_path = __commonJS({ - "node_modules/fast-glob/out/utils/path.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0; - var os = require("os"); - var path2 = require("path"); - var IS_WINDOWS_PLATFORM = os.platform() === "win32"; - var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; - var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; - var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g; - var DOS_DEVICE_PATH_RE = /^\\\\([.?])/; - var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g; - function unixify(filepath) { - return filepath.replace(/\\/g, "/"); - } - exports2.unixify = unixify; - function makeAbsolute(cwd, filepath) { - return path2.resolve(cwd, filepath); - } - exports2.makeAbsolute = makeAbsolute; - function removeLeadingDotSegment(entry) { - if (entry.charAt(0) === ".") { - const secondCharactery = entry.charAt(1); - if (secondCharactery === "/" || secondCharactery === "\\") { - return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT); - } - } - return entry; - } - exports2.removeLeadingDotSegment = removeLeadingDotSegment; - exports2.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath; - function escapeWindowsPath(pattern) { - return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports2.escapeWindowsPath = escapeWindowsPath; - function escapePosixPath(pattern) { - return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2"); - } - exports2.escapePosixPath = escapePosixPath; - exports2.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern; - function convertWindowsPathToPattern(filepath) { - return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/"); - } - exports2.convertWindowsPathToPattern = convertWindowsPathToPattern; - function convertPosixPathToPattern(filepath) { - return escapePosixPath(filepath); - } - exports2.convertPosixPathToPattern = convertPosixPathToPattern; - } -}); - -// node_modules/is-extglob/index.js -var require_is_extglob = __commonJS({ - "node_modules/is-extglob/index.js"(exports2, module2) { - module2.exports = function isExtglob(str2) { - if (typeof str2 !== "string" || str2 === "") { - return false; - } - var match; - while (match = /(\\).|([@?!+*]\(.*\))/g.exec(str2)) { - if (match[2]) return true; - str2 = str2.slice(match.index + match[0].length); - } - return false; - }; - } -}); - -// node_modules/is-glob/index.js -var require_is_glob = __commonJS({ - "node_modules/is-glob/index.js"(exports2, module2) { - var isExtglob = require_is_extglob(); - var chars = { "{": "}", "(": ")", "[": "]" }; - var strictCheck = function(str2) { - if (str2[0] === "!") { - return true; - } - var index = 0; - var pipeIndex = -2; - var closeSquareIndex = -2; - var closeCurlyIndex = -2; - var closeParenIndex = -2; - var backSlashIndex = -2; - while (index < str2.length) { - if (str2[index] === "*") { - return true; - } - if (str2[index + 1] === "?" && /[\].+)]/.test(str2[index])) { - return true; - } - if (closeSquareIndex !== -1 && str2[index] === "[" && str2[index + 1] !== "]") { - if (closeSquareIndex < index) { - closeSquareIndex = str2.indexOf("]", index); - } - if (closeSquareIndex > index) { - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeSquareIndex) { - return true; - } - } - } - if (closeCurlyIndex !== -1 && str2[index] === "{" && str2[index + 1] !== "}") { - closeCurlyIndex = str2.indexOf("}", index); - if (closeCurlyIndex > index) { - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeCurlyIndex) { - return true; - } - } - } - if (closeParenIndex !== -1 && str2[index] === "(" && str2[index + 1] === "?" && /[:!=]/.test(str2[index + 2]) && str2[index + 3] !== ")") { - closeParenIndex = str2.indexOf(")", index); - if (closeParenIndex > index) { - backSlashIndex = str2.indexOf("\\", index); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - if (pipeIndex !== -1 && str2[index] === "(" && str2[index + 1] !== "|") { - if (pipeIndex < index) { - pipeIndex = str2.indexOf("|", index); - } - if (pipeIndex !== -1 && str2[pipeIndex + 1] !== ")") { - closeParenIndex = str2.indexOf(")", pipeIndex); - if (closeParenIndex > pipeIndex) { - backSlashIndex = str2.indexOf("\\", pipeIndex); - if (backSlashIndex === -1 || backSlashIndex > closeParenIndex) { - return true; - } - } - } - } - if (str2[index] === "\\") { - var open = str2[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str2.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str2[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - var relaxedCheck = function(str2) { - if (str2[0] === "!") { - return true; - } - var index = 0; - while (index < str2.length) { - if (/[*?{}()[\]]/.test(str2[index])) { - return true; - } - if (str2[index] === "\\") { - var open = str2[index + 1]; - index += 2; - var close = chars[open]; - if (close) { - var n = str2.indexOf(close, index); - if (n !== -1) { - index = n + 1; - } - } - if (str2[index] === "!") { - return true; - } - } else { - index++; - } - } - return false; - }; - module2.exports = function isGlob(str2, options) { - if (typeof str2 !== "string" || str2 === "") { - return false; - } - if (isExtglob(str2)) { - return true; - } - var check = strictCheck; - if (options && options.strict === false) { - check = relaxedCheck; - } - return check(str2); - }; - } -}); - -// node_modules/glob-parent/index.js -var require_glob_parent = __commonJS({ - "node_modules/glob-parent/index.js"(exports2, module2) { - "use strict"; - var isGlob = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str2, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); - } - if (enclosure.test(str2)) { - str2 += slash; - } - str2 += "a"; - do { - str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); - return str2.replace(escaped, "$1"); - }; - } -}); - -// node_modules/braces/lib/utils.js -var require_utils5 = __commonJS({ - "node_modules/braces/lib/utils.js"(exports2) { - "use strict"; - exports2.isInteger = (num) => { - if (typeof num === "number") { - return Number.isInteger(num); - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isInteger(Number(num)); - } - return false; - }; - exports2.find = (node, type2) => node.nodes.find((node2) => node2.type === type2); - exports2.exceedsLimit = (min, max, step = 1, limit) => { - if (limit === false) return false; - if (!exports2.isInteger(min) || !exports2.isInteger(max)) return false; - return (Number(max) - Number(min)) / Number(step) >= limit; - }; - exports2.escapeNode = (block, n = 0, type2) => { - const node = block.nodes[n]; - if (!node) return; - if (type2 && node.type === type2 || node.type === "open" || node.type === "close") { - if (node.escaped !== true) { - node.value = "\\" + node.value; - node.escaped = true; - } - } - }; - exports2.encloseBrace = (node) => { - if (node.type !== "brace") return false; - if (node.commas >> 0 + node.ranges >> 0 === 0) { - node.invalid = true; - return true; - } - return false; - }; - exports2.isInvalidBrace = (block) => { - if (block.type !== "brace") return false; - if (block.invalid === true || block.dollar) return true; - if (block.commas >> 0 + block.ranges >> 0 === 0) { - block.invalid = true; - return true; - } - if (block.open !== true || block.close !== true) { - block.invalid = true; - return true; - } - return false; - }; - exports2.isOpenOrClose = (node) => { - if (node.type === "open" || node.type === "close") { - return true; - } - return node.open === true || node.close === true; - }; - exports2.reduce = (nodes) => nodes.reduce((acc, node) => { - if (node.type === "text") acc.push(node.value); - if (node.type === "range") node.type = "text"; - return acc; - }, []); - exports2.flatten = (...args) => { - const result = []; - const flat = (arr) => { - for (let i = 0; i < arr.length; i++) { - const ele = arr[i]; - if (Array.isArray(ele)) { - flat(ele); - continue; - } - if (ele !== void 0) { - result.push(ele); - } - } - return result; - }; - flat(args); - return result; - }; - } -}); - -// node_modules/braces/lib/stringify.js -var require_stringify = __commonJS({ - "node_modules/braces/lib/stringify.js"(exports2, module2) { - "use strict"; - var utils = require_utils5(); - module2.exports = (ast, options = {}) => { - const stringify = (node, parent = {}) => { - const invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - let output = ""; - if (node.value) { - if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) { - return "\\" + node.value; - } - return node.value; - } - if (node.value) { - return node.value; - } - if (node.nodes) { - for (const child of node.nodes) { - output += stringify(child); - } - } - return output; - }; - return stringify(ast); - }; - } -}); - -// node_modules/is-number/index.js -var require_is_number = __commonJS({ - "node_modules/is-number/index.js"(exports2, module2) { - "use strict"; - module2.exports = function(num) { - if (typeof num === "number") { - return num - num === 0; - } - if (typeof num === "string" && num.trim() !== "") { - return Number.isFinite ? Number.isFinite(+num) : isFinite(+num); - } - return false; - }; - } -}); - -// node_modules/to-regex-range/index.js -var require_to_regex_range = __commonJS({ - "node_modules/to-regex-range/index.js"(exports2, module2) { - "use strict"; - var isNumber = require_is_number(); - var toRegexRange = (min, max, options) => { - if (isNumber(min) === false) { - throw new TypeError("toRegexRange: expected the first argument to be a number"); - } - if (max === void 0 || min === max) { - return String(min); - } - if (isNumber(max) === false) { - throw new TypeError("toRegexRange: expected the second argument to be a number."); - } - let opts = { relaxZeros: true, ...options }; - if (typeof opts.strictZeros === "boolean") { - opts.relaxZeros = opts.strictZeros === false; - } - let relax = String(opts.relaxZeros); - let shorthand = String(opts.shorthand); - let capture = String(opts.capture); - let wrap = String(opts.wrap); - let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap; - if (toRegexRange.cache.hasOwnProperty(cacheKey)) { - return toRegexRange.cache[cacheKey].result; - } - let a = Math.min(min, max); - let b = Math.max(min, max); - if (Math.abs(a - b) === 1) { - let result = min + "|" + max; - if (opts.capture) { - return `(${result})`; - } - if (opts.wrap === false) { - return result; - } - return `(?:${result})`; - } - let isPadded = hasPadding(min) || hasPadding(max); - let state = { min, max, a, b }; - let positives = []; - let negatives = []; - if (isPadded) { - state.isPadded = isPadded; - state.maxLen = String(state.max).length; - } - if (a < 0) { - let newMin = b < 0 ? Math.abs(b) : 1; - negatives = splitToPatterns(newMin, Math.abs(a), state, opts); - a = state.a = 0; - } - if (b >= 0) { - positives = splitToPatterns(a, b, state, opts); - } - state.negatives = negatives; - state.positives = positives; - state.result = collatePatterns(negatives, positives, opts); - if (opts.capture === true) { - state.result = `(${state.result})`; - } else if (opts.wrap !== false && positives.length + negatives.length > 1) { - state.result = `(?:${state.result})`; - } - toRegexRange.cache[cacheKey] = state; - return state.result; - }; - function collatePatterns(neg, pos, options) { - let onlyNegative = filterPatterns(neg, pos, "-", false, options) || []; - let onlyPositive = filterPatterns(pos, neg, "", false, options) || []; - let intersected = filterPatterns(neg, pos, "-?", true, options) || []; - let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive); - return subpatterns.join("|"); - } - function splitToRanges(min, max) { - let nines = 1; - let zeros = 1; - let stop = countNines(min, nines); - let stops = /* @__PURE__ */ new Set([max]); - while (min <= stop && stop <= max) { - stops.add(stop); - nines += 1; - stop = countNines(min, nines); - } - stop = countZeros(max + 1, zeros) - 1; - while (min < stop && stop <= max) { - stops.add(stop); - zeros += 1; - stop = countZeros(max + 1, zeros) - 1; - } - stops = [...stops]; - stops.sort(compare); - return stops; - } - function rangeToPattern(start, stop, options) { - if (start === stop) { - return { pattern: start, count: [], digits: 0 }; - } - let zipped = zip(start, stop); - let digits = zipped.length; - let pattern = ""; - let count = 0; - for (let i = 0; i < digits; i++) { - let [startDigit, stopDigit] = zipped[i]; - if (startDigit === stopDigit) { - pattern += startDigit; - } else if (startDigit !== "0" || stopDigit !== "9") { - pattern += toCharacterClass(startDigit, stopDigit, options); - } else { - count++; - } - } - if (count) { - pattern += options.shorthand === true ? "\\d" : "[0-9]"; - } - return { pattern, count: [count], digits }; - } - function splitToPatterns(min, max, tok, options) { - let ranges = splitToRanges(min, max); - let tokens = []; - let start = min; - let prev; - for (let i = 0; i < ranges.length; i++) { - let max2 = ranges[i]; - let obj = rangeToPattern(String(start), String(max2), options); - let zeros = ""; - if (!tok.isPadded && prev && prev.pattern === obj.pattern) { - if (prev.count.length > 1) { - prev.count.pop(); - } - prev.count.push(obj.count[0]); - prev.string = prev.pattern + toQuantifier(prev.count); - start = max2 + 1; - continue; - } - if (tok.isPadded) { - zeros = padZeros(max2, tok, options); - } - obj.string = zeros + obj.pattern + toQuantifier(obj.count); - tokens.push(obj); - start = max2 + 1; - prev = obj; - } - return tokens; - } - function filterPatterns(arr, comparison, prefix, intersection, options) { - let result = []; - for (let ele of arr) { - let { string } = ele; - if (!intersection && !contains(comparison, "string", string)) { - result.push(prefix + string); - } - if (intersection && contains(comparison, "string", string)) { - result.push(prefix + string); - } - } - return result; - } - function zip(a, b) { - let arr = []; - for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]); - return arr; - } - function compare(a, b) { - return a > b ? 1 : b > a ? -1 : 0; - } - function contains(arr, key, val2) { - return arr.some((ele) => ele[key] === val2); - } - function countNines(min, len) { - return Number(String(min).slice(0, -len) + "9".repeat(len)); - } - function countZeros(integer, zeros) { - return integer - integer % Math.pow(10, zeros); - } - function toQuantifier(digits) { - let [start = 0, stop = ""] = digits; - if (stop || start > 1) { - return `{${start + (stop ? "," + stop : "")}}`; - } - return ""; - } - function toCharacterClass(a, b, options) { - return `[${a}${b - a === 1 ? "" : "-"}${b}]`; - } - function hasPadding(str2) { - return /^-?(0+)\d/.test(str2); - } - function padZeros(value, tok, options) { - if (!tok.isPadded) { - return value; - } - let diff = Math.abs(tok.maxLen - String(value).length); - let relax = options.relaxZeros !== false; - switch (diff) { - case 0: - return ""; - case 1: - return relax ? "0?" : "0"; - case 2: - return relax ? "0{0,2}" : "00"; - default: { - return relax ? `0{0,${diff}}` : `0{${diff}}`; - } - } - } - toRegexRange.cache = {}; - toRegexRange.clearCache = () => toRegexRange.cache = {}; - module2.exports = toRegexRange; - } -}); - -// node_modules/fill-range/index.js -var require_fill_range = __commonJS({ - "node_modules/fill-range/index.js"(exports2, module2) { - "use strict"; - var util = require("util"); - var toRegexRange = require_to_regex_range(); - var isObject2 = (val2) => val2 !== null && typeof val2 === "object" && !Array.isArray(val2); - var transform = (toNumber) => { - return (value) => toNumber === true ? Number(value) : String(value); - }; - var isValidValue = (value) => { - return typeof value === "number" || typeof value === "string" && value !== ""; - }; - var isNumber = (num) => Number.isInteger(+num); - var zeros = (input) => { - let value = `${input}`; - let index = -1; - if (value[0] === "-") value = value.slice(1); - if (value === "0") return false; - while (value[++index] === "0") ; - return index > 0; - }; - var stringify = (start, end, options) => { - if (typeof start === "string" || typeof end === "string") { - return true; - } - return options.stringify === true; - }; - var pad = (input, maxLength, toNumber) => { - if (maxLength > 0) { - let dash = input[0] === "-" ? "-" : ""; - if (dash) input = input.slice(1); - input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); - } - if (toNumber === false) { - return String(input); - } - return input; - }; - var toMaxLen = (input, maxLength) => { - let negative = input[0] === "-" ? "-" : ""; - if (negative) { - input = input.slice(1); - maxLength--; - } - while (input.length < maxLength) input = "0" + input; - return negative ? "-" + input : input; - }; - var toSequence = (parts, options, maxLen) => { - parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0); - let prefix = options.capture ? "" : "?:"; - let positives = ""; - let negatives = ""; - let result; - if (parts.positives.length) { - positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|"); - } - if (parts.negatives.length) { - negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`; - } - if (positives && negatives) { - result = `${positives}|${negatives}`; - } else { - result = positives || negatives; - } - if (options.wrap) { - return `(${prefix}${result})`; - } - return result; - }; - var toRange = (a, b, isNumbers, options) => { - if (isNumbers) { - return toRegexRange(a, b, { wrap: false, ...options }); - } - let start = String.fromCharCode(a); - if (a === b) return start; - let stop = String.fromCharCode(b); - return `[${start}-${stop}]`; - }; - var toRegex = (start, end, options) => { - if (Array.isArray(start)) { - let wrap = options.wrap === true; - let prefix = options.capture ? "" : "?:"; - return wrap ? `(${prefix}${start.join("|")})` : start.join("|"); - } - return toRegexRange(start, end, options); - }; - var rangeError = (...args) => { - return new RangeError("Invalid range arguments: " + util.inspect(...args)); - }; - var invalidRange = (start, end, options) => { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - }; - var invalidStep = (step, options) => { - if (options.strictRanges === true) { - throw new TypeError(`Expected step "${step}" to be a number`); - } - return []; - }; - var fillNumbers = (start, end, step = 1, options = {}) => { - let a = Number(start); - let b = Number(end); - if (!Number.isInteger(a) || !Number.isInteger(b)) { - if (options.strictRanges === true) throw rangeError([start, end]); - return []; - } - if (a === 0) a = 0; - if (b === 0) b = 0; - let descending = a > b; - let startString = String(start); - let endString = String(end); - let stepString = String(step); - step = Math.max(Math.abs(step), 1); - let padded = zeros(startString) || zeros(endString) || zeros(stepString); - let maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0; - let toNumber = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber); - if (options.toRegex && step === 1) { - return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), true, options); - } - let parts = { negatives: [], positives: [] }; - let push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)); - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - if (options.toRegex === true && step > 1) { - push(a); - } else { - range.push(pad(format(a, index), maxLen, toNumber)); - } - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: false, ...options }); - } - return range; - }; - var fillLetters = (start, end, step = 1, options = {}) => { - if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) { - return invalidRange(start, end, options); - } - let format = options.transform || ((val2) => String.fromCharCode(val2)); - let a = `${start}`.charCodeAt(0); - let b = `${end}`.charCodeAt(0); - let descending = a > b; - let min = Math.min(a, b); - let max = Math.max(a, b); - if (options.toRegex && step === 1) { - return toRange(min, max, false, options); - } - let range = []; - let index = 0; - while (descending ? a >= b : a <= b) { - range.push(format(a, index)); - a = descending ? a - step : a + step; - index++; - } - if (options.toRegex === true) { - return toRegex(range, null, { wrap: false, options }); - } - return range; - }; - var fill = (start, end, step, options = {}) => { - if (end == null && isValidValue(start)) { - return [start]; - } - if (!isValidValue(start) || !isValidValue(end)) { - return invalidRange(start, end, options); - } - if (typeof step === "function") { - return fill(start, end, 1, { transform: step }); - } - if (isObject2(step)) { - return fill(start, end, 0, step); - } - let opts = { ...options }; - if (opts.capture === true) opts.wrap = true; - step = step || opts.step || 1; - if (!isNumber(step)) { - if (step != null && !isObject2(step)) return invalidStep(step, opts); - return fill(start, end, 1, step); - } - if (isNumber(start) && isNumber(end)) { - return fillNumbers(start, end, step, opts); - } - return fillLetters(start, end, Math.max(Math.abs(step), 1), opts); - }; - module2.exports = fill; - } -}); - -// node_modules/braces/lib/compile.js -var require_compile = __commonJS({ - "node_modules/braces/lib/compile.js"(exports2, module2) { - "use strict"; - var fill = require_fill_range(); - var utils = require_utils5(); - var compile = (ast, options = {}) => { - const walk = (node, parent = {}) => { - const invalidBlock = utils.isInvalidBrace(parent); - const invalidNode = node.invalid === true && options.escapeInvalid === true; - const invalid = invalidBlock === true || invalidNode === true; - const prefix = options.escapeInvalid === true ? "\\" : ""; - let output = ""; - if (node.isOpen === true) { - return prefix + node.value; - } - if (node.isClose === true) { - console.log("node.isClose", prefix, node.value); - return prefix + node.value; - } - if (node.type === "open") { - return invalid ? prefix + node.value : "("; - } - if (node.type === "close") { - return invalid ? prefix + node.value : ")"; - } - if (node.type === "comma") { - return node.prev.type === "comma" ? "" : invalid ? node.value : "|"; - } - if (node.value) { - return node.value; - } - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - const range = fill(...args, { ...options, wrap: false, toRegex: true, strictZeros: true }); - if (range.length !== 0) { - return args.length > 1 && range.length > 1 ? `(${range})` : range; - } - } - if (node.nodes) { - for (const child of node.nodes) { - output += walk(child, node); - } - } - return output; - }; - return walk(ast); - }; - module2.exports = compile; - } -}); - -// node_modules/braces/lib/expand.js -var require_expand = __commonJS({ - "node_modules/braces/lib/expand.js"(exports2, module2) { - "use strict"; - var fill = require_fill_range(); - var stringify = require_stringify(); - var utils = require_utils5(); - var append = (queue = "", stash = "", enclose = false) => { - const result = []; - queue = [].concat(queue); - stash = [].concat(stash); - if (!stash.length) return queue; - if (!queue.length) { - return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash; - } - for (const item of queue) { - if (Array.isArray(item)) { - for (const value of item) { - result.push(append(value, stash, enclose)); - } - } else { - for (let ele of stash) { - if (enclose === true && typeof ele === "string") ele = `{${ele}}`; - result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele); - } - } - } - return utils.flatten(result); - }; - var expand = (ast, options = {}) => { - const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit; - const walk = (node, parent = {}) => { - node.queue = []; - let p = parent; - let q = parent.queue; - while (p.type !== "brace" && p.type !== "root" && p.parent) { - p = p.parent; - q = p.queue; - } - if (node.invalid || node.dollar) { - q.push(append(q.pop(), stringify(node, options))); - return; - } - if (node.type === "brace" && node.invalid !== true && node.nodes.length === 2) { - q.push(append(q.pop(), ["{}"])); - return; - } - if (node.nodes && node.ranges > 0) { - const args = utils.reduce(node.nodes); - if (utils.exceedsLimit(...args, options.step, rangeLimit)) { - throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit."); - } - let range = fill(...args, options); - if (range.length === 0) { - range = stringify(node, options); - } - q.push(append(q.pop(), range)); - node.nodes = []; - return; - } - const enclose = utils.encloseBrace(node); - let queue = node.queue; - let block = node; - while (block.type !== "brace" && block.type !== "root" && block.parent) { - block = block.parent; - queue = block.queue; - } - for (let i = 0; i < node.nodes.length; i++) { - const child = node.nodes[i]; - if (child.type === "comma" && node.type === "brace") { - if (i === 1) queue.push(""); - queue.push(""); - continue; - } - if (child.type === "close") { - q.push(append(q.pop(), queue, enclose)); - continue; - } - if (child.value && child.type !== "open") { - queue.push(append(queue.pop(), child.value)); - continue; - } - if (child.nodes) { - walk(child, node); - } - } - return queue; - }; - return utils.flatten(walk(ast)); - }; - module2.exports = expand; - } -}); - -// node_modules/braces/lib/constants.js -var require_constants6 = __commonJS({ - "node_modules/braces/lib/constants.js"(exports2, module2) { - "use strict"; - module2.exports = { - MAX_LENGTH: 1e4, - // Digits - CHAR_0: "0", - /* 0 */ - CHAR_9: "9", - /* 9 */ - // Alphabet chars. - CHAR_UPPERCASE_A: "A", - /* A */ - CHAR_LOWERCASE_A: "a", - /* a */ - CHAR_UPPERCASE_Z: "Z", - /* Z */ - CHAR_LOWERCASE_Z: "z", - /* z */ - CHAR_LEFT_PARENTHESES: "(", - /* ( */ - CHAR_RIGHT_PARENTHESES: ")", - /* ) */ - CHAR_ASTERISK: "*", - /* * */ - // Non-alphabetic chars. - CHAR_AMPERSAND: "&", - /* & */ - CHAR_AT: "@", - /* @ */ - CHAR_BACKSLASH: "\\", - /* \ */ - CHAR_BACKTICK: "`", - /* ` */ - CHAR_CARRIAGE_RETURN: "\r", - /* \r */ - CHAR_CIRCUMFLEX_ACCENT: "^", - /* ^ */ - CHAR_COLON: ":", - /* : */ - CHAR_COMMA: ",", - /* , */ - CHAR_DOLLAR: "$", - /* . */ - CHAR_DOT: ".", - /* . */ - CHAR_DOUBLE_QUOTE: '"', - /* " */ - CHAR_EQUAL: "=", - /* = */ - CHAR_EXCLAMATION_MARK: "!", - /* ! */ - CHAR_FORM_FEED: "\f", - /* \f */ - CHAR_FORWARD_SLASH: "/", - /* / */ - CHAR_HASH: "#", - /* # */ - CHAR_HYPHEN_MINUS: "-", - /* - */ - CHAR_LEFT_ANGLE_BRACKET: "<", - /* < */ - CHAR_LEFT_CURLY_BRACE: "{", - /* { */ - CHAR_LEFT_SQUARE_BRACKET: "[", - /* [ */ - CHAR_LINE_FEED: "\n", - /* \n */ - CHAR_NO_BREAK_SPACE: "\xA0", - /* \u00A0 */ - CHAR_PERCENT: "%", - /* % */ - CHAR_PLUS: "+", - /* + */ - CHAR_QUESTION_MARK: "?", - /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: ">", - /* > */ - CHAR_RIGHT_CURLY_BRACE: "}", - /* } */ - CHAR_RIGHT_SQUARE_BRACKET: "]", - /* ] */ - CHAR_SEMICOLON: ";", - /* ; */ - CHAR_SINGLE_QUOTE: "'", - /* ' */ - CHAR_SPACE: " ", - /* */ - CHAR_TAB: " ", - /* \t */ - CHAR_UNDERSCORE: "_", - /* _ */ - CHAR_VERTICAL_LINE: "|", - /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF" - /* \uFEFF */ - }; - } -}); - -// node_modules/braces/lib/parse.js -var require_parse2 = __commonJS({ - "node_modules/braces/lib/parse.js"(exports2, module2) { - "use strict"; - var stringify = require_stringify(); - var { - MAX_LENGTH, - CHAR_BACKSLASH, - /* \ */ - CHAR_BACKTICK, - /* ` */ - CHAR_COMMA: CHAR_COMMA2, - /* , */ - CHAR_DOT, - /* . */ - CHAR_LEFT_PARENTHESES, - /* ( */ - CHAR_RIGHT_PARENTHESES, - /* ) */ - CHAR_LEFT_CURLY_BRACE, - /* { */ - CHAR_RIGHT_CURLY_BRACE, - /* } */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, - /* [ */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2, - /* ] */ - CHAR_DOUBLE_QUOTE: CHAR_DOUBLE_QUOTE2, - /* " */ - CHAR_SINGLE_QUOTE: CHAR_SINGLE_QUOTE2, - /* ' */ - CHAR_NO_BREAK_SPACE, - CHAR_ZERO_WIDTH_NOBREAK_SPACE - } = require_constants6(); - var parse = (input, options = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - const opts = options || {}; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - if (input.length > max) { - throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`); - } - const ast = { type: "root", input, nodes: [] }; - const stack = [ast]; - let block = ast; - let prev = ast; - let brackets = 0; - const length = input.length; - let index = 0; - let depth = 0; - let value; - const advance = () => input[index++]; - const push = (node) => { - if (node.type === "text" && prev.type === "dot") { - prev.type = "text"; - } - if (prev && prev.type === "text" && node.type === "text") { - prev.value += node.value; - return; - } - block.nodes.push(node); - node.parent = block; - node.prev = prev; - prev = node; - return node; - }; - push({ type: "bos" }); - while (index < length) { - block = stack[stack.length - 1]; - value = advance(); - if (value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE) { - continue; - } - if (value === CHAR_BACKSLASH) { - push({ type: "text", value: (options.keepEscaping ? value : "") + advance() }); - continue; - } - if (value === CHAR_RIGHT_SQUARE_BRACKET2) { - push({ type: "text", value: "\\" + value }); - continue; - } - if (value === CHAR_LEFT_SQUARE_BRACKET2) { - brackets++; - let next; - while (index < length && (next = advance())) { - value += next; - if (next === CHAR_LEFT_SQUARE_BRACKET2) { - brackets++; - continue; - } - if (next === CHAR_BACKSLASH) { - value += advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { - brackets--; - if (brackets === 0) { - break; - } - } - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_PARENTHESES) { - block = push({ type: "paren", nodes: [] }); - stack.push(block); - push({ type: "text", value }); - continue; - } - if (value === CHAR_RIGHT_PARENTHESES) { - if (block.type !== "paren") { - push({ type: "text", value }); - continue; - } - block = stack.pop(); - push({ type: "text", value }); - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_DOUBLE_QUOTE2 || value === CHAR_SINGLE_QUOTE2 || value === CHAR_BACKTICK) { - const open = value; - let next; - if (options.keepQuotes !== true) { - value = ""; - } - while (index < length && (next = advance())) { - if (next === CHAR_BACKSLASH) { - value += next + advance(); - continue; - } - if (next === open) { - if (options.keepQuotes === true) value += next; - break; - } - value += next; - } - push({ type: "text", value }); - continue; - } - if (value === CHAR_LEFT_CURLY_BRACE) { - depth++; - const dollar = prev.value && prev.value.slice(-1) === "$" || block.dollar === true; - const brace = { - type: "brace", - open: true, - close: false, - dollar, - depth, - commas: 0, - ranges: 0, - nodes: [] - }; - block = push(brace); - stack.push(block); - push({ type: "open", value }); - continue; - } - if (value === CHAR_RIGHT_CURLY_BRACE) { - if (block.type !== "brace") { - push({ type: "text", value }); - continue; - } - const type2 = "close"; - block = stack.pop(); - block.close = true; - push({ type: type2, value }); - depth--; - block = stack[stack.length - 1]; - continue; - } - if (value === CHAR_COMMA2 && depth > 0) { - if (block.ranges > 0) { - block.ranges = 0; - const open = block.nodes.shift(); - block.nodes = [open, { type: "text", value: stringify(block) }]; - } - push({ type: "comma", value }); - block.commas++; - continue; - } - if (value === CHAR_DOT && depth > 0 && block.commas === 0) { - const siblings = block.nodes; - if (depth === 0 || siblings.length === 0) { - push({ type: "text", value }); - continue; - } - if (prev.type === "dot") { - block.range = []; - prev.value += value; - prev.type = "range"; - if (block.nodes.length !== 3 && block.nodes.length !== 5) { - block.invalid = true; - block.ranges = 0; - prev.type = "text"; - continue; - } - block.ranges++; - block.args = []; - continue; - } - if (prev.type === "range") { - siblings.pop(); - const before = siblings[siblings.length - 1]; - before.value += prev.value + value; - prev = before; - block.ranges--; - continue; - } - push({ type: "dot", value }); - continue; - } - push({ type: "text", value }); - } - do { - block = stack.pop(); - if (block.type !== "root") { - block.nodes.forEach((node) => { - if (!node.nodes) { - if (node.type === "open") node.isOpen = true; - if (node.type === "close") node.isClose = true; - if (!node.nodes) node.type = "text"; - node.invalid = true; - } - }); - const parent = stack[stack.length - 1]; - const index2 = parent.nodes.indexOf(block); - parent.nodes.splice(index2, 1, ...block.nodes); - } - } while (stack.length > 0); - push({ type: "eos" }); - return ast; - }; - module2.exports = parse; - } -}); - -// node_modules/braces/index.js -var require_braces = __commonJS({ - "node_modules/braces/index.js"(exports2, module2) { - "use strict"; - var stringify = require_stringify(); - var compile = require_compile(); - var expand = require_expand(); - var parse = require_parse2(); - var braces = (input, options = {}) => { - let output = []; - if (Array.isArray(input)) { - for (const pattern of input) { - const result = braces.create(pattern, options); - if (Array.isArray(result)) { - output.push(...result); - } else { - output.push(result); - } - } - } else { - output = [].concat(braces.create(input, options)); - } - if (options && options.expand === true && options.nodupes === true) { - output = [...new Set(output)]; - } - return output; - }; - braces.parse = (input, options = {}) => parse(input, options); - braces.stringify = (input, options = {}) => { - if (typeof input === "string") { - return stringify(braces.parse(input, options), options); - } - return stringify(input, options); - }; - braces.compile = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - return compile(input, options); - }; - braces.expand = (input, options = {}) => { - if (typeof input === "string") { - input = braces.parse(input, options); - } - let result = expand(input, options); - if (options.noempty === true) { - result = result.filter(Boolean); - } - if (options.nodupes === true) { - result = [...new Set(result)]; - } - return result; - }; - braces.create = (input, options = {}) => { - if (input === "" || input.length < 3) { - return [input]; - } - return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options); - }; - module2.exports = braces; - } -}); - -// node_modules/picomatch/lib/constants.js -var require_constants7 = __commonJS({ - "node_modules/picomatch/lib/constants.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - var WIN_SLASH = "\\\\/"; - var WIN_NO_SLASH = `[^${WIN_SLASH}]`; - var DOT_LITERAL = "\\."; - var PLUS_LITERAL = "\\+"; - var QMARK_LITERAL = "\\?"; - var SLASH_LITERAL = "\\/"; - var ONE_CHAR = "(?=.)"; - var QMARK = "[^/]"; - var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`; - var START_ANCHOR = `(?:^|${SLASH_LITERAL})`; - var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`; - var NO_DOT = `(?!${DOT_LITERAL})`; - var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`; - var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`; - var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`; - var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`; - var STAR = `${QMARK}*?`; - var POSIX_CHARS = { - DOT_LITERAL, - PLUS_LITERAL, - QMARK_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - QMARK, - END_ANCHOR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK_NO_DOT, - STAR, - START_ANCHOR - }; - var WINDOWS_CHARS = { - ...POSIX_CHARS, - SLASH_LITERAL: `[${WIN_SLASH}]`, - QMARK: WIN_NO_SLASH, - STAR: `${WIN_NO_SLASH}*?`, - DOTS_SLASH: `${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$)`, - NO_DOT: `(?!${DOT_LITERAL})`, - NO_DOTS: `(?!(?:^|[${WIN_SLASH}])${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - NO_DOT_SLASH: `(?!${DOT_LITERAL}{0,1}(?:[${WIN_SLASH}]|$))`, - NO_DOTS_SLASH: `(?!${DOT_LITERAL}{1,2}(?:[${WIN_SLASH}]|$))`, - QMARK_NO_DOT: `[^.${WIN_SLASH}]`, - START_ANCHOR: `(?:^|[${WIN_SLASH}])`, - END_ANCHOR: `(?:[${WIN_SLASH}]|$)` - }; - var POSIX_REGEX_SOURCE = { - alnum: "a-zA-Z0-9", - alpha: "a-zA-Z", - ascii: "\\x00-\\x7F", - blank: " \\t", - cntrl: "\\x00-\\x1F\\x7F", - digit: "0-9", - graph: "\\x21-\\x7E", - lower: "a-z", - print: "\\x20-\\x7E ", - punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~", - space: " \\t\\r\\n\\v\\f", - upper: "A-Z", - word: "A-Za-z0-9_", - xdigit: "A-Fa-f0-9" - }; - module2.exports = { - MAX_LENGTH: 1024 * 64, - POSIX_REGEX_SOURCE, - // regular expressions - REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g, - REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/, - REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/, - REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g, - REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g, - REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g, - // Replace globs with equivalent patterns to reduce parsing time. - REPLACEMENTS: { - "***": "*", - "**/**": "**", - "**/**/**": "**" - }, - // Digits - CHAR_0: 48, - /* 0 */ - CHAR_9: 57, - /* 9 */ - // Alphabet chars. - CHAR_UPPERCASE_A: 65, - /* A */ - CHAR_LOWERCASE_A: 97, - /* a */ - CHAR_UPPERCASE_Z: 90, - /* Z */ - CHAR_LOWERCASE_Z: 122, - /* z */ - CHAR_LEFT_PARENTHESES: 40, - /* ( */ - CHAR_RIGHT_PARENTHESES: 41, - /* ) */ - CHAR_ASTERISK: 42, - /* * */ - // Non-alphabetic chars. - CHAR_AMPERSAND: 38, - /* & */ - CHAR_AT: 64, - /* @ */ - CHAR_BACKWARD_SLASH: 92, - /* \ */ - CHAR_CARRIAGE_RETURN: 13, - /* \r */ - CHAR_CIRCUMFLEX_ACCENT: 94, - /* ^ */ - CHAR_COLON: 58, - /* : */ - CHAR_COMMA: 44, - /* , */ - CHAR_DOT: 46, - /* . */ - CHAR_DOUBLE_QUOTE: 34, - /* " */ - CHAR_EQUAL: 61, - /* = */ - CHAR_EXCLAMATION_MARK: 33, - /* ! */ - CHAR_FORM_FEED: 12, - /* \f */ - CHAR_FORWARD_SLASH: 47, - /* / */ - CHAR_GRAVE_ACCENT: 96, - /* ` */ - CHAR_HASH: 35, - /* # */ - CHAR_HYPHEN_MINUS: 45, - /* - */ - CHAR_LEFT_ANGLE_BRACKET: 60, - /* < */ - CHAR_LEFT_CURLY_BRACE: 123, - /* { */ - CHAR_LEFT_SQUARE_BRACKET: 91, - /* [ */ - CHAR_LINE_FEED: 10, - /* \n */ - CHAR_NO_BREAK_SPACE: 160, - /* \u00A0 */ - CHAR_PERCENT: 37, - /* % */ - CHAR_PLUS: 43, - /* + */ - CHAR_QUESTION_MARK: 63, - /* ? */ - CHAR_RIGHT_ANGLE_BRACKET: 62, - /* > */ - CHAR_RIGHT_CURLY_BRACE: 125, - /* } */ - CHAR_RIGHT_SQUARE_BRACKET: 93, - /* ] */ - CHAR_SEMICOLON: 59, - /* ; */ - CHAR_SINGLE_QUOTE: 39, - /* ' */ - CHAR_SPACE: 32, - /* */ - CHAR_TAB: 9, - /* \t */ - CHAR_UNDERSCORE: 95, - /* _ */ - CHAR_VERTICAL_LINE: 124, - /* | */ - CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, - /* \uFEFF */ - SEP: path2.sep, - /** - * Create EXTGLOB_CHARS - */ - extglobChars(chars) { - return { - "!": { type: "negate", open: "(?:(?!(?:", close: `))${chars.STAR})` }, - "?": { type: "qmark", open: "(?:", close: ")?" }, - "+": { type: "plus", open: "(?:", close: ")+" }, - "*": { type: "star", open: "(?:", close: ")*" }, - "@": { type: "at", open: "(?:", close: ")" } - }; - }, - /** - * Create GLOB_CHARS - */ - globChars(win32) { - return win32 === true ? WINDOWS_CHARS : POSIX_CHARS; - } - }; - } -}); - -// node_modules/picomatch/lib/utils.js -var require_utils6 = __commonJS({ - "node_modules/picomatch/lib/utils.js"(exports2) { - "use strict"; - var path2 = require("path"); - var win32 = process.platform === "win32"; - var { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL - } = require_constants7(); - exports2.isObject = (val2) => val2 !== null && typeof val2 === "object" && !Array.isArray(val2); - exports2.hasRegexChars = (str2) => REGEX_SPECIAL_CHARS.test(str2); - exports2.isRegexChar = (str2) => str2.length === 1 && exports2.hasRegexChars(str2); - exports2.escapeRegex = (str2) => str2.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1"); - exports2.toPosixSlashes = (str2) => str2.replace(REGEX_BACKSLASH, "/"); - exports2.removeBackslashes = (str2) => { - return str2.replace(REGEX_REMOVE_BACKSLASH, (match) => { - return match === "\\" ? "" : match; - }); - }; - exports2.supportsLookbehinds = () => { - const segs = process.version.slice(1).split(".").map(Number); - if (segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10) { - return true; - } - return false; - }; - exports2.isWindows = (options) => { - if (options && typeof options.windows === "boolean") { - return options.windows; - } - return win32 === true || path2.sep === "\\"; - }; - exports2.escapeLast = (input, char, lastIdx) => { - const idx = input.lastIndexOf(char, lastIdx); - if (idx === -1) return input; - if (input[idx - 1] === "\\") return exports2.escapeLast(input, char, idx - 1); - return `${input.slice(0, idx)}\\${input.slice(idx)}`; - }; - exports2.removePrefix = (input, state = {}) => { - let output = input; - if (output.startsWith("./")) { - output = output.slice(2); - state.prefix = "./"; - } - return output; - }; - exports2.wrapOutput = (input, state = {}, options = {}) => { - const prepend = options.contains ? "" : "^"; - const append = options.contains ? "" : "$"; - let output = `${prepend}(?:${input})${append}`; - if (state.negated === true) { - output = `(?:^(?!${output}).*$)`; - } - return output; - }; - } -}); - -// node_modules/picomatch/lib/scan.js -var require_scan = __commonJS({ - "node_modules/picomatch/lib/scan.js"(exports2, module2) { - "use strict"; - var utils = require_utils6(); - var { - CHAR_ASTERISK: CHAR_ASTERISK2, - /* * */ - CHAR_AT, - /* @ */ - CHAR_BACKWARD_SLASH, - /* \ */ - CHAR_COMMA: CHAR_COMMA2, - /* , */ - CHAR_DOT, - /* . */ - CHAR_EXCLAMATION_MARK, - /* ! */ - CHAR_FORWARD_SLASH, - /* / */ - CHAR_LEFT_CURLY_BRACE, - /* { */ - CHAR_LEFT_PARENTHESES, - /* ( */ - CHAR_LEFT_SQUARE_BRACKET: CHAR_LEFT_SQUARE_BRACKET2, - /* [ */ - CHAR_PLUS, - /* + */ - CHAR_QUESTION_MARK, - /* ? */ - CHAR_RIGHT_CURLY_BRACE, - /* } */ - CHAR_RIGHT_PARENTHESES, - /* ) */ - CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET2 - /* ] */ - } = require_constants7(); - var isPathSeparator = (code) => { - return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH; - }; - var depth = (token) => { - if (token.isPrefix !== true) { - token.depth = token.isGlobstar ? Infinity : 1; - } - }; - var scan = (input, options) => { - const opts = options || {}; - const length = input.length - 1; - const scanToEnd = opts.parts === true || opts.scanToEnd === true; - const slashes = []; - const tokens = []; - const parts = []; - let str2 = input; - let index = -1; - let start = 0; - let lastIndex = 0; - let isBrace = false; - let isBracket = false; - let isGlob = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished = false; - let braces = 0; - let prev; - let code; - let token = { value: "", depth: 0, isGlob: false }; - const eos = () => index >= length; - const peek = () => str2.charCodeAt(index + 1); - const advance = () => { - prev = code; - return str2.charCodeAt(++index); - }; - while (index < length) { - code = advance(); - let next; - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - if (code === CHAR_LEFT_CURLY_BRACE) { - braceEscaped = true; - } - continue; - } - if (braceEscaped === true || code === CHAR_LEFT_CURLY_BRACE) { - braces++; - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (code === CHAR_LEFT_CURLY_BRACE) { - braces++; - continue; - } - if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA2) { - isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished = true; - break; - } - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_FORWARD_SLASH) { - slashes.push(index); - tokens.push(token); - token = { value: "", depth: 0, isGlob: false }; - if (finished === true) continue; - if (prev === CHAR_DOT && index === start + 1) { - start += 2; - continue; - } - lastIndex = index + 1; - continue; - } - if (opts.noext !== true) { - const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; - if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished = true; - if (code === CHAR_EXCLAMATION_MARK && index === start) { - negatedExtglob = true; - } - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_LEFT_SQUARE_BRACKET2) { - while (eos() !== true && (next = advance())) { - if (next === CHAR_BACKWARD_SLASH) { - backslashes = token.backslashes = true; - advance(); - continue; - } - if (next === CHAR_RIGHT_SQUARE_BRACKET2) { - isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; - break; - } - } - if (scanToEnd === true) { - continue; - } - break; - } - if (opts.nonegate !== true && code === CHAR_EXCLAMATION_MARK && index === start) { - negated = token.negated = true; - start++; - continue; - } - if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; - if (scanToEnd === true) { - while (eos() !== true && (code = advance())) { - if (code === CHAR_LEFT_PARENTHESES) { - backslashes = token.backslashes = true; - code = advance(); - continue; - } - if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; - break; - } - } - continue; - } - break; - } - if (isGlob === true) { - finished = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob = false; - } - let base = str2; - let prefix = ""; - let glob2 = ""; - if (start > 0) { - prefix = str2.slice(0, start); - str2 = str2.slice(start); - lastIndex -= start; - } - if (base && isGlob === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob2 = str2.slice(lastIndex); - } else if (isGlob === true) { - base = ""; - glob2 = str2; - } else { - base = str2; - } - if (base && base !== "" && base !== "/" && base !== str2) { - if (isPathSeparator(base.charCodeAt(base.length - 1))) { - base = base.slice(0, -1); - } - } - if (opts.unescape === true) { - if (glob2) glob2 = utils.removeBackslashes(glob2); - if (base && backslashes === true) { - base = utils.removeBackslashes(base); - } - } - const state = { - prefix, - input, - start, - base, - glob: glob2, - isBrace, - isBracket, - isGlob, - isExtglob, - isGlobstar, - negated, - negatedExtglob - }; - if (opts.tokens === true) { - state.maxDepth = 0; - if (!isPathSeparator(code)) { - tokens.push(token); - } - state.tokens = tokens; - } - if (opts.parts === true || opts.tokens === true) { - let prevIndex; - for (let idx = 0; idx < slashes.length; idx++) { - const n = prevIndex ? prevIndex + 1 : start; - const i = slashes[idx]; - const value = input.slice(n, i); - if (opts.tokens) { - if (idx === 0 && start !== 0) { - tokens[idx].isPrefix = true; - tokens[idx].value = prefix; - } else { - tokens[idx].value = value; - } - depth(tokens[idx]); - state.maxDepth += tokens[idx].depth; - } - if (idx !== 0 || value !== "") { - parts.push(value); - } - prevIndex = i; - } - if (prevIndex && prevIndex + 1 < input.length) { - const value = input.slice(prevIndex + 1); - parts.push(value); - if (opts.tokens) { - tokens[tokens.length - 1].value = value; - depth(tokens[tokens.length - 1]); - state.maxDepth += tokens[tokens.length - 1].depth; - } - } - state.slashes = slashes; - state.parts = parts; - } - return state; - }; - module2.exports = scan; - } -}); - -// node_modules/picomatch/lib/parse.js -var require_parse3 = __commonJS({ - "node_modules/picomatch/lib/parse.js"(exports2, module2) { - "use strict"; - var constants = require_constants7(); - var utils = require_utils6(); - var { - MAX_LENGTH, - POSIX_REGEX_SOURCE, - REGEX_NON_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_BACKREF, - REPLACEMENTS - } = constants; - var expandRange = (args, options) => { - if (typeof options.expandRange === "function") { - return options.expandRange(...args, options); - } - args.sort(); - const value = `[${args.join("-")}]`; - try { - new RegExp(value); - } catch (ex) { - return args.map((v) => utils.escapeRegex(v)).join(".."); - } - return value; - }; - var syntaxError = (type2, char) => { - return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`; - }; - var parse = (input, options) => { - if (typeof input !== "string") { - throw new TypeError("Expected a string"); - } - input = REPLACEMENTS[input] || input; - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - let len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - const bos = { type: "bos", value: "", output: opts.prepend || "" }; - const tokens = [bos]; - const capture = opts.capture ? "" : "?:"; - const win32 = utils.isWindows(options); - const PLATFORM_CHARS = constants.globChars(win32); - const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS); - const { - DOT_LITERAL, - PLUS_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOT_SLASH, - NO_DOTS_SLASH, - QMARK, - QMARK_NO_DOT, - STAR, - START_ANCHOR - } = PLATFORM_CHARS; - const globstar = (opts2) => { - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const nodot = opts.dot ? "" : NO_DOT; - const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT; - let star = opts.bash === true ? globstar(opts) : STAR; - if (opts.capture) { - star = `(${star})`; - } - if (typeof opts.noext === "boolean") { - opts.noextglob = opts.noext; - } - const state = { - input, - index: -1, - start: 0, - dot: opts.dot === true, - consumed: "", - output: "", - prefix: "", - backtrack: false, - negated: false, - brackets: 0, - braces: 0, - parens: 0, - quotes: 0, - globstar: false, - tokens - }; - input = utils.removePrefix(input, state); - len = input.length; - const extglobs = []; - const braces = []; - const stack = []; - let prev = bos; - let value; - const eos = () => state.index === len - 1; - const peek = state.peek = (n = 1) => input[state.index + n]; - const advance = state.advance = () => input[++state.index] || ""; - const remaining = () => input.slice(state.index + 1); - const consume = (value2 = "", num = 0) => { - state.consumed += value2; - state.index += num; - }; - const append = (token) => { - state.output += token.output != null ? token.output : token.value; - consume(token.value); - }; - const negate = () => { - let count = 1; - while (peek() === "!" && (peek(2) !== "(" || peek(3) === "?")) { - advance(); - state.start++; - count++; - } - if (count % 2 === 0) { - return false; - } - state.negated = true; - state.start++; - return true; - }; - const increment = (type2) => { - state[type2]++; - stack.push(type2); - }; - const decrement = (type2) => { - state[type2]--; - stack.pop(); - }; - const push = (tok) => { - if (prev.type === "globstar") { - const isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"); - const isExtglob = tok.extglob === true || extglobs.length && (tok.type === "pipe" || tok.type === "paren"); - if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) { - state.output = state.output.slice(0, -prev.output.length); - prev.type = "star"; - prev.value = "*"; - prev.output = star; - state.output += prev.output; - } - } - if (extglobs.length && tok.type !== "paren") { - extglobs[extglobs.length - 1].inner += tok.value; - } - if (tok.value || tok.output) append(tok); - if (prev && prev.type === "text" && tok.type === "text") { - prev.value += tok.value; - prev.output = (prev.output || "") + tok.value; - return; - } - tok.prev = prev; - tokens.push(tok); - prev = tok; - }; - const extglobOpen = (type2, value2) => { - const token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" }; - token.prev = prev; - token.parens = state.parens; - token.output = state.output; - const output = (opts.capture ? "(" : "") + token.open; - increment("parens"); - push({ type: type2, value: value2, output: state.output ? "" : ONE_CHAR }); - push({ type: "paren", extglob: true, value: advance(), output }); - extglobs.push(token); - }; - const extglobClose = (token) => { - let output = token.close + (opts.capture ? ")" : ""); - let rest; - if (token.type === "negate") { - let extglobStar = star; - if (token.inner && token.inner.length > 1 && token.inner.includes("/")) { - extglobStar = globstar(opts); - } - if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) { - output = token.close = `)$))${extglobStar}`; - } - if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) { - const expression = parse(rest, { ...options, fastpaths: false }).output; - output = token.close = `)${expression})${extglobStar})`; - } - if (token.prev.type === "bos") { - state.negatedExtglob = true; - } - } - push({ type: "paren", extglob: true, value, output }); - decrement("parens"); - }; - if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) { - let backslashes = false; - let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => { - if (first === "\\") { - backslashes = true; - return m; - } - if (first === "?") { - if (esc) { - return esc + first + (rest ? QMARK.repeat(rest.length) : ""); - } - if (index === 0) { - return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : ""); - } - return QMARK.repeat(chars.length); - } - if (first === ".") { - return DOT_LITERAL.repeat(chars.length); - } - if (first === "*") { - if (esc) { - return esc + first + (rest ? star : ""); - } - return star; - } - return esc ? m : `\\${m}`; - }); - if (backslashes === true) { - if (opts.unescape === true) { - output = output.replace(/\\/g, ""); - } else { - output = output.replace(/\\+/g, (m) => { - return m.length % 2 === 0 ? "\\\\" : m ? "\\" : ""; - }); - } - } - if (output === input && opts.contains === true) { - state.output = input; - return state; - } - state.output = utils.wrapOutput(output, state, options); - return state; - } - while (!eos()) { - value = advance(); - if (value === "\0") { - continue; - } - if (value === "\\") { - const next = peek(); - if (next === "/" && opts.bash !== true) { - continue; - } - if (next === "." || next === ";") { - continue; - } - if (!next) { - value += "\\"; - push({ type: "text", value }); - continue; - } - const match = /^\\+/.exec(remaining()); - let slashes = 0; - if (match && match[0].length > 2) { - slashes = match[0].length; - state.index += slashes; - if (slashes % 2 !== 0) { - value += "\\"; - } - } - if (opts.unescape === true) { - value = advance(); - } else { - value += advance(); - } - if (state.brackets === 0) { - push({ type: "text", value }); - continue; - } - } - if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) { - if (opts.posix !== false && value === ":") { - const inner = prev.value.slice(1); - if (inner.includes("[")) { - prev.posix = true; - if (inner.includes(":")) { - const idx = prev.value.lastIndexOf("["); - const pre = prev.value.slice(0, idx); - const rest2 = prev.value.slice(idx + 2); - const posix = POSIX_REGEX_SOURCE[rest2]; - if (posix) { - prev.value = pre + posix; - state.backtrack = true; - advance(); - if (!bos.output && tokens.indexOf(prev) === 1) { - bos.output = ONE_CHAR; - } - continue; - } - } - } - } - if (value === "[" && peek() !== ":" || value === "-" && peek() === "]") { - value = `\\${value}`; - } - if (value === "]" && (prev.value === "[" || prev.value === "[^")) { - value = `\\${value}`; - } - if (opts.posix === true && value === "!" && prev.value === "[") { - value = "^"; - } - prev.value += value; - append({ value }); - continue; - } - if (state.quotes === 1 && value !== '"') { - value = utils.escapeRegex(value); - prev.value += value; - append({ value }); - continue; - } - if (value === '"') { - state.quotes = state.quotes === 1 ? 0 : 1; - if (opts.keepQuotes === true) { - push({ type: "text", value }); - } - continue; - } - if (value === "(") { - increment("parens"); - push({ type: "paren", value }); - continue; - } - if (value === ")") { - if (state.parens === 0 && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "(")); - } - const extglob = extglobs[extglobs.length - 1]; - if (extglob && state.parens === extglob.parens + 1) { - extglobClose(extglobs.pop()); - continue; - } - push({ type: "paren", value, output: state.parens ? ")" : "\\)" }); - decrement("parens"); - continue; - } - if (value === "[") { - if (opts.nobracket === true || !remaining().includes("]")) { - if (opts.nobracket !== true && opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("closing", "]")); - } - value = `\\${value}`; - } else { - increment("brackets"); - } - push({ type: "bracket", value }); - continue; - } - if (value === "]") { - if (opts.nobracket === true || prev && prev.type === "bracket" && prev.value.length === 1) { - push({ type: "text", value, output: `\\${value}` }); - continue; - } - if (state.brackets === 0) { - if (opts.strictBrackets === true) { - throw new SyntaxError(syntaxError("opening", "[")); - } - push({ type: "text", value, output: `\\${value}` }); - continue; - } - decrement("brackets"); - const prevValue = prev.value.slice(1); - if (prev.posix !== true && prevValue[0] === "^" && !prevValue.includes("/")) { - value = `/${value}`; - } - prev.value += value; - append({ value }); - if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) { - continue; - } - const escaped = utils.escapeRegex(prev.value); - state.output = state.output.slice(0, -prev.value.length); - if (opts.literalBrackets === true) { - state.output += escaped; - prev.value = escaped; - continue; - } - prev.value = `(${capture}${escaped}|${prev.value})`; - state.output += prev.value; - continue; - } - if (value === "{" && opts.nobrace !== true) { - increment("braces"); - const open = { - type: "brace", - value, - output: "(", - outputIndex: state.output.length, - tokensIndex: state.tokens.length - }; - braces.push(open); - push(open); - continue; - } - if (value === "}") { - const brace = braces[braces.length - 1]; - if (opts.nobrace === true || !brace) { - push({ type: "text", value, output: value }); - continue; - } - let output = ")"; - if (brace.dots === true) { - const arr = tokens.slice(); - const range = []; - for (let i = arr.length - 1; i >= 0; i--) { - tokens.pop(); - if (arr[i].type === "brace") { - break; - } - if (arr[i].type !== "dots") { - range.unshift(arr[i].value); - } - } - output = expandRange(range, opts); - state.backtrack = true; - } - if (brace.comma !== true && brace.dots !== true) { - const out = state.output.slice(0, brace.outputIndex); - const toks = state.tokens.slice(brace.tokensIndex); - brace.value = brace.output = "\\{"; - value = output = "\\}"; - state.output = out; - for (const t of toks) { - state.output += t.output || t.value; - } - } - push({ type: "brace", value, output }); - decrement("braces"); - braces.pop(); - continue; - } - if (value === "|") { - if (extglobs.length > 0) { - extglobs[extglobs.length - 1].conditions++; - } - push({ type: "text", value }); - continue; - } - if (value === ",") { - let output = value; - const brace = braces[braces.length - 1]; - if (brace && stack[stack.length - 1] === "braces") { - brace.comma = true; - output = "|"; - } - push({ type: "comma", value, output }); - continue; - } - if (value === "/") { - if (prev.type === "dot" && state.index === state.start + 1) { - state.start = state.index + 1; - state.consumed = ""; - state.output = ""; - tokens.pop(); - prev = bos; - continue; - } - push({ type: "slash", value, output: SLASH_LITERAL }); - continue; - } - if (value === ".") { - if (state.braces > 0 && prev.type === "dot") { - if (prev.value === ".") prev.output = DOT_LITERAL; - const brace = braces[braces.length - 1]; - prev.type = "dots"; - prev.output += value; - prev.value += value; - brace.dots = true; - continue; - } - if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") { - push({ type: "text", value, output: DOT_LITERAL }); - continue; - } - push({ type: "dot", value, output: DOT_LITERAL }); - continue; - } - if (value === "?") { - const isGroup = prev && prev.value === "("; - if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("qmark", value); - continue; - } - if (prev && prev.type === "paren") { - const next = peek(); - let output = value; - if (next === "<" && !utils.supportsLookbehinds()) { - throw new Error("Node.js v10 or higher is required for regex lookbehinds"); - } - if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) { - output = `\\${value}`; - } - push({ type: "text", value, output }); - continue; - } - if (opts.dot !== true && (prev.type === "slash" || prev.type === "bos")) { - push({ type: "qmark", value, output: QMARK_NO_DOT }); - continue; - } - push({ type: "qmark", value, output: QMARK }); - continue; - } - if (value === "!") { - if (opts.noextglob !== true && peek() === "(") { - if (peek(2) !== "?" || !/[!=<:]/.test(peek(3))) { - extglobOpen("negate", value); - continue; - } - } - if (opts.nonegate !== true && state.index === 0) { - negate(); - continue; - } - } - if (value === "+") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - extglobOpen("plus", value); - continue; - } - if (prev && prev.value === "(" || opts.regex === false) { - push({ type: "plus", value, output: PLUS_LITERAL }); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren" || prev.type === "brace") || state.parens > 0) { - push({ type: "plus", value }); - continue; - } - push({ type: "plus", value: PLUS_LITERAL }); - continue; - } - if (value === "@") { - if (opts.noextglob !== true && peek() === "(" && peek(2) !== "?") { - push({ type: "at", extglob: true, value, output: "" }); - continue; - } - push({ type: "text", value }); - continue; - } - if (value !== "*") { - if (value === "$" || value === "^") { - value = `\\${value}`; - } - const match = REGEX_NON_SPECIAL_CHARS.exec(remaining()); - if (match) { - value += match[0]; - state.index += match[0].length; - } - push({ type: "text", value }); - continue; - } - if (prev && (prev.type === "globstar" || prev.star === true)) { - prev.type = "star"; - prev.star = true; - prev.value += value; - prev.output = star; - state.backtrack = true; - state.globstar = true; - consume(value); - continue; - } - let rest = remaining(); - if (opts.noextglob !== true && /^\([^?]/.test(rest)) { - extglobOpen("star", value); - continue; - } - if (prev.type === "star") { - if (opts.noglobstar === true) { - consume(value); - continue; - } - const prior = prev.prev; - const before = prior.prev; - const isStart = prior.type === "slash" || prior.type === "bos"; - const afterStar = before && (before.type === "star" || before.type === "globstar"); - if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) { - push({ type: "star", value, output: "" }); - continue; - } - const isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"); - const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren"); - if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) { - push({ type: "star", value, output: "" }); - continue; - } - while (rest.slice(0, 3) === "/**") { - const after = input[state.index + 4]; - if (after && after !== "/") { - break; - } - rest = rest.slice(3); - consume("/**", 3); - } - if (prior.type === "bos" && eos()) { - prev.type = "globstar"; - prev.value += value; - prev.output = globstar(opts); - state.output = prev.output; - state.globstar = true; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) { - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"); - prev.value += value; - state.globstar = true; - state.output += prior.output + prev.output; - consume(value); - continue; - } - if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") { - const end = rest[1] !== void 0 ? "|$" : ""; - state.output = state.output.slice(0, -(prior.output + prev.output).length); - prior.output = `(?:${prior.output}`; - prev.type = "globstar"; - prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`; - prev.value += value; - state.output += prior.output + prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - if (prior.type === "bos" && rest[0] === "/") { - prev.type = "globstar"; - prev.value += value; - prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`; - state.output = prev.output; - state.globstar = true; - consume(value + advance()); - push({ type: "slash", value: "/", output: "" }); - continue; - } - state.output = state.output.slice(0, -prev.output.length); - prev.type = "globstar"; - prev.output = globstar(opts); - prev.value += value; - state.output += prev.output; - state.globstar = true; - consume(value); - continue; - } - const token = { type: "star", value, output: star }; - if (opts.bash === true) { - token.output = ".*?"; - if (prev.type === "bos" || prev.type === "slash") { - token.output = nodot + token.output; - } - push(token); - continue; - } - if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === true) { - token.output = value; - push(token); - continue; - } - if (state.index === state.start || prev.type === "slash" || prev.type === "dot") { - if (prev.type === "dot") { - state.output += NO_DOT_SLASH; - prev.output += NO_DOT_SLASH; - } else if (opts.dot === true) { - state.output += NO_DOTS_SLASH; - prev.output += NO_DOTS_SLASH; - } else { - state.output += nodot; - prev.output += nodot; - } - if (peek() !== "*") { - state.output += ONE_CHAR; - prev.output += ONE_CHAR; - } - } - push(token); - } - while (state.brackets > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]")); - state.output = utils.escapeLast(state.output, "["); - decrement("brackets"); - } - while (state.parens > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", ")")); - state.output = utils.escapeLast(state.output, "("); - decrement("parens"); - } - while (state.braces > 0) { - if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "}")); - state.output = utils.escapeLast(state.output, "{"); - decrement("braces"); - } - if (opts.strictSlashes !== true && (prev.type === "star" || prev.type === "bracket")) { - push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }); - } - if (state.backtrack === true) { - state.output = ""; - for (const token of state.tokens) { - state.output += token.output != null ? token.output : token.value; - if (token.suffix) { - state.output += token.suffix; - } - } - } - return state; - }; - parse.fastpaths = (input, options) => { - const opts = { ...options }; - const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH; - const len = input.length; - if (len > max) { - throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`); - } - input = REPLACEMENTS[input] || input; - const win32 = utils.isWindows(options); - const { - DOT_LITERAL, - SLASH_LITERAL, - ONE_CHAR, - DOTS_SLASH, - NO_DOT, - NO_DOTS, - NO_DOTS_SLASH, - STAR, - START_ANCHOR - } = constants.globChars(win32); - const nodot = opts.dot ? NO_DOTS : NO_DOT; - const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT; - const capture = opts.capture ? "" : "?:"; - const state = { negated: false, prefix: "" }; - let star = opts.bash === true ? ".*?" : STAR; - if (opts.capture) { - star = `(${star})`; - } - const globstar = (opts2) => { - if (opts2.noglobstar === true) return star; - return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`; - }; - const create3 = (str2) => { - switch (str2) { - case "*": - return `${nodot}${ONE_CHAR}${star}`; - case ".*": - return `${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*.*": - return `${nodot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "*/*": - return `${nodot}${star}${SLASH_LITERAL}${ONE_CHAR}${slashDot}${star}`; - case "**": - return nodot + globstar(opts); - case "**/*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${ONE_CHAR}${star}`; - case "**/*.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${slashDot}${star}${DOT_LITERAL}${ONE_CHAR}${star}`; - case "**/.*": - return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`; - default: { - const match = /^(.*?)\.(\w+)$/.exec(str2); - if (!match) return; - const source2 = create3(match[1]); - if (!source2) return; - return source2 + DOT_LITERAL + match[2]; - } - } - }; - const output = utils.removePrefix(input, state); - let source = create3(output); - if (source && opts.strictSlashes !== true) { - source += `${SLASH_LITERAL}?`; - } - return source; - }; - module2.exports = parse; - } -}); - -// node_modules/picomatch/lib/picomatch.js -var require_picomatch = __commonJS({ - "node_modules/picomatch/lib/picomatch.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - var scan = require_scan(); - var parse = require_parse3(); - var utils = require_utils6(); - var constants = require_constants7(); - var isObject2 = (val2) => val2 && typeof val2 === "object" && !Array.isArray(val2); - var picomatch = (glob2, options, returnState = false) => { - if (Array.isArray(glob2)) { - const fns = glob2.map((input) => picomatch(input, options, returnState)); - const arrayMatcher = (str2) => { - for (const isMatch of fns) { - const state2 = isMatch(str2); - if (state2) return state2; - } - return false; - }; - return arrayMatcher; - } - const isState = isObject2(glob2) && glob2.tokens && glob2.input; - if (glob2 === "" || typeof glob2 !== "string" && !isState) { - throw new TypeError("Expected pattern to be a non-empty string"); - } - const opts = options || {}; - const posix = utils.isWindows(options); - const regex = isState ? picomatch.compileRe(glob2, options) : picomatch.makeRe(glob2, options, false, true); - const state = regex.state; - delete regex.state; - let isIgnored = () => false; - if (opts.ignore) { - const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null }; - isIgnored = picomatch(opts.ignore, ignoreOpts, returnState); - } - const matcher = (input, returnObject = false) => { - const { isMatch, match, output } = picomatch.test(input, regex, options, { glob: glob2, posix }); - const result = { glob: glob2, state, regex, posix, input, output, match, isMatch }; - if (typeof opts.onResult === "function") { - opts.onResult(result); - } - if (isMatch === false) { - result.isMatch = false; - return returnObject ? result : false; - } - if (isIgnored(input)) { - if (typeof opts.onIgnore === "function") { - opts.onIgnore(result); - } - result.isMatch = false; - return returnObject ? result : false; - } - if (typeof opts.onMatch === "function") { - opts.onMatch(result); - } - return returnObject ? result : true; - }; - if (returnState) { - matcher.state = state; - } - return matcher; - }; - picomatch.test = (input, regex, options, { glob: glob2, posix } = {}) => { - if (typeof input !== "string") { - throw new TypeError("Expected input to be a string"); - } - if (input === "") { - return { isMatch: false, output: "" }; - } - const opts = options || {}; - const format = opts.format || (posix ? utils.toPosixSlashes : null); - let match = input === glob2; - let output = match && format ? format(input) : input; - if (match === false) { - output = format ? format(input) : input; - match = output === glob2; - } - if (match === false || opts.capture === true) { - if (opts.matchBase === true || opts.basename === true) { - match = picomatch.matchBase(input, regex, options, posix); - } else { - match = regex.exec(output); - } - } - return { isMatch: Boolean(match), match, output }; - }; - picomatch.matchBase = (input, glob2, options, posix = utils.isWindows(options)) => { - const regex = glob2 instanceof RegExp ? glob2 : picomatch.makeRe(glob2, options); - return regex.test(path2.basename(input)); - }; - picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); - picomatch.parse = (pattern, options) => { - if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options)); - return parse(pattern, { ...options, fastpaths: false }); - }; - picomatch.scan = (input, options) => scan(input, options); - picomatch.compileRe = (state, options, returnOutput = false, returnState = false) => { - if (returnOutput === true) { - return state.output; - } - const opts = options || {}; - const prepend = opts.contains ? "" : "^"; - const append = opts.contains ? "" : "$"; - let source = `${prepend}(?:${state.output})${append}`; - if (state && state.negated === true) { - source = `^(?!${source}).*$`; - } - const regex = picomatch.toRegex(source, options); - if (returnState === true) { - regex.state = state; - } - return regex; - }; - picomatch.makeRe = (input, options = {}, returnOutput = false, returnState = false) => { - if (!input || typeof input !== "string") { - throw new TypeError("Expected a non-empty string"); - } - let parsed = { negated: false, fastpaths: true }; - if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) { - parsed.output = parse.fastpaths(input, options); - } - if (!parsed.output) { - parsed = parse(input, options); - } - return picomatch.compileRe(parsed, options, returnOutput, returnState); - }; - picomatch.toRegex = (source, options) => { - try { - const opts = options || {}; - return new RegExp(source, opts.flags || (opts.nocase ? "i" : "")); - } catch (err) { - if (options && options.debug === true) throw err; - return /$^/; - } - }; - picomatch.constants = constants; - module2.exports = picomatch; - } -}); - -// node_modules/picomatch/index.js -var require_picomatch2 = __commonJS({ - "node_modules/picomatch/index.js"(exports2, module2) { - "use strict"; - module2.exports = require_picomatch(); - } -}); - -// node_modules/micromatch/index.js -var require_micromatch = __commonJS({ - "node_modules/micromatch/index.js"(exports2, module2) { - "use strict"; - var util = require("util"); - var braces = require_braces(); - var picomatch = require_picomatch2(); - var utils = require_utils6(); - var isEmptyString = (v) => v === "" || v === "./"; - var hasBraces = (v) => { - const index = v.indexOf("{"); - return index > -1 && v.indexOf("}", index) > -1; - }; - var micromatch = (list, patterns, options) => { - patterns = [].concat(patterns); - list = [].concat(list); - let omit = /* @__PURE__ */ new Set(); - let keep = /* @__PURE__ */ new Set(); - let items = /* @__PURE__ */ new Set(); - let negatives = 0; - let onResult = (state) => { - items.add(state.output); - if (options && options.onResult) { - options.onResult(state); - } - }; - for (let i = 0; i < patterns.length; i++) { - let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, true); - let negated = isMatch.state.negated || isMatch.state.negatedExtglob; - if (negated) negatives++; - for (let item of list) { - let matched = isMatch(item, true); - let match = negated ? !matched.isMatch : matched.isMatch; - if (!match) continue; - if (negated) { - omit.add(matched.output); - } else { - omit.delete(matched.output); - keep.add(matched.output); - } - } - } - let result = negatives === patterns.length ? [...items] : [...keep]; - let matches = result.filter((item) => !omit.has(item)); - if (options && matches.length === 0) { - if (options.failglob === true) { - throw new Error(`No matches found for "${patterns.join(", ")}"`); - } - if (options.nonull === true || options.nullglob === true) { - return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns; - } - } - return matches; - }; - micromatch.match = micromatch; - micromatch.matcher = (pattern, options) => picomatch(pattern, options); - micromatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); - micromatch.any = micromatch.isMatch; - micromatch.not = (list, patterns, options = {}) => { - patterns = [].concat(patterns).map(String); - let result = /* @__PURE__ */ new Set(); - let items = []; - let onResult = (state) => { - if (options.onResult) options.onResult(state); - items.push(state.output); - }; - let matches = new Set(micromatch(list, patterns, { ...options, onResult })); - for (let item of items) { - if (!matches.has(item)) { - result.add(item); - } - } - return [...result]; - }; - micromatch.contains = (str2, pattern, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str2)}"`); - } - if (Array.isArray(pattern)) { - return pattern.some((p) => micromatch.contains(str2, p, options)); - } - if (typeof pattern === "string") { - if (isEmptyString(str2) || isEmptyString(pattern)) { - return false; - } - if (str2.includes(pattern) || str2.startsWith("./") && str2.slice(2).includes(pattern)) { - return true; - } - } - return micromatch.isMatch(str2, pattern, { ...options, contains: true }); - }; - micromatch.matchKeys = (obj, patterns, options) => { - if (!utils.isObject(obj)) { - throw new TypeError("Expected the first argument to be an object"); - } - let keys = micromatch(Object.keys(obj), patterns, options); - let res = {}; - for (let key of keys) res[key] = obj[key]; - return res; - }; - micromatch.some = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (items.some((item) => isMatch(item))) { - return true; - } - } - return false; - }; - micromatch.every = (list, patterns, options) => { - let items = [].concat(list); - for (let pattern of [].concat(patterns)) { - let isMatch = picomatch(String(pattern), options); - if (!items.every((item) => isMatch(item))) { - return false; - } - } - return true; - }; - micromatch.all = (str2, patterns, options) => { - if (typeof str2 !== "string") { - throw new TypeError(`Expected a string: "${util.inspect(str2)}"`); - } - return [].concat(patterns).every((p) => picomatch(p, options)(str2)); - }; - micromatch.capture = (glob2, input, options) => { - let posix = utils.isWindows(options); - let regex = picomatch.makeRe(String(glob2), { ...options, capture: true }); - let match = regex.exec(posix ? utils.toPosixSlashes(input) : input); - if (match) { - return match.slice(1).map((v) => v === void 0 ? "" : v); - } - }; - micromatch.makeRe = (...args) => picomatch.makeRe(...args); - micromatch.scan = (...args) => picomatch.scan(...args); - micromatch.parse = (patterns, options) => { - let res = []; - for (let pattern of [].concat(patterns || [])) { - for (let str2 of braces(String(pattern), options)) { - res.push(picomatch.parse(str2, options)); - } - } - return res; - }; - micromatch.braces = (pattern, options) => { - if (typeof pattern !== "string") throw new TypeError("Expected a string"); - if (options && options.nobrace === true || !hasBraces(pattern)) { - return [pattern]; - } - return braces(pattern, options); - }; - micromatch.braceExpand = (pattern, options) => { - if (typeof pattern !== "string") throw new TypeError("Expected a string"); - return micromatch.braces(pattern, { ...options, expand: true }); - }; - micromatch.hasBraces = hasBraces; - module2.exports = micromatch; - } -}); - -// node_modules/fast-glob/out/utils/pattern.js -var require_pattern = __commonJS({ - "node_modules/fast-glob/out/utils/pattern.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; - var path2 = require("path"); - var globParent = require_glob_parent(); - var micromatch = require_micromatch(); - var GLOBSTAR = "**"; - var ESCAPE_SYMBOL = "\\"; - var COMMON_GLOB_SYMBOLS_RE = /[*?]|^!/; - var REGEX_CHARACTER_CLASS_SYMBOLS_RE = /\[[^[]*]/; - var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/; - var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/; - var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; - var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; - function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); - } - exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern(pattern, options = {}) { - if (pattern === "") { - return false; - } - if (options.caseSensitiveMatch === false || pattern.includes(ESCAPE_SYMBOL)) { - return true; - } - if (COMMON_GLOB_SYMBOLS_RE.test(pattern) || REGEX_CHARACTER_CLASS_SYMBOLS_RE.test(pattern) || REGEX_GROUP_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.extglob !== false && GLOB_EXTENSION_SYMBOLS_RE.test(pattern)) { - return true; - } - if (options.braceExpansion !== false && hasBraceExpansion(pattern)) { - return true; - } - return false; - } - exports2.isDynamicPattern = isDynamicPattern; - function hasBraceExpansion(pattern) { - const openingBraceIndex = pattern.indexOf("{"); - if (openingBraceIndex === -1) { - return false; - } - const closingBraceIndex = pattern.indexOf("}", openingBraceIndex + 1); - if (closingBraceIndex === -1) { - return false; - } - const braceContent = pattern.slice(openingBraceIndex, closingBraceIndex); - return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); - } - function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; - } - exports2.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports2.isNegativePattern = isNegativePattern; - function isPositivePattern(pattern) { - return !isNegativePattern(pattern); - } - exports2.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); - } - exports2.getNegativePatterns = getNegativePatterns; - function getPositivePatterns(patterns) { - return patterns.filter(isPositivePattern); - } - exports2.getPositivePatterns = getPositivePatterns; - function getPatternsInsideCurrentDirectory(patterns) { - return patterns.filter((pattern) => !isPatternRelatedToParentDirectory(pattern)); - } - exports2.getPatternsInsideCurrentDirectory = getPatternsInsideCurrentDirectory; - function getPatternsOutsideCurrentDirectory(patterns) { - return patterns.filter(isPatternRelatedToParentDirectory); - } - exports2.getPatternsOutsideCurrentDirectory = getPatternsOutsideCurrentDirectory; - function isPatternRelatedToParentDirectory(pattern) { - return pattern.startsWith("..") || pattern.startsWith("./.."); - } - exports2.isPatternRelatedToParentDirectory = isPatternRelatedToParentDirectory; - function getBaseDirectory(pattern) { - return globParent(pattern, { flipBackslashes: false }); - } - exports2.getBaseDirectory = getBaseDirectory; - function hasGlobStar(pattern) { - return pattern.includes(GLOBSTAR); - } - exports2.hasGlobStar = hasGlobStar; - function endsWithSlashGlobStar(pattern) { - return pattern.endsWith("/" + GLOBSTAR); - } - exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; - function isAffectDepthOfReadingPattern(pattern) { - const basename = path2.basename(pattern); - return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); - } - exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; - function expandPatternsWithBraceExpansion(patterns) { - return patterns.reduce((collection, pattern) => { - return collection.concat(expandBraceExpansion(pattern)); - }, []); - } - exports2.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion; - function expandBraceExpansion(pattern) { - const patterns = micromatch.braces(pattern, { expand: true, nodupes: true, keepEscaping: true }); - patterns.sort((a, b) => a.length - b.length); - return patterns.filter((pattern2) => pattern2 !== ""); - } - exports2.expandBraceExpansion = expandBraceExpansion; - function getPatternParts(pattern, options) { - let { parts } = micromatch.scan(pattern, Object.assign(Object.assign({}, options), { parts: true })); - if (parts.length === 0) { - parts = [pattern]; - } - if (parts[0].startsWith("/")) { - parts[0] = parts[0].slice(1); - parts.unshift(""); - } - return parts; - } - exports2.getPatternParts = getPatternParts; - function makeRe(pattern, options) { - return micromatch.makeRe(pattern, options); - } - exports2.makeRe = makeRe; - function convertPatternsToRe(patterns, options) { - return patterns.map((pattern) => makeRe(pattern, options)); - } - exports2.convertPatternsToRe = convertPatternsToRe; - function matchAny(entry, patternsRe) { - return patternsRe.some((patternRe) => patternRe.test(entry)); - } - exports2.matchAny = matchAny; - function removeDuplicateSlashes(pattern) { - return pattern.replace(DOUBLE_SLASH_RE, "/"); - } - exports2.removeDuplicateSlashes = removeDuplicateSlashes; - function partitionAbsoluteAndRelative(patterns) { - const absolute = []; - const relative = []; - for (const pattern of patterns) { - if (isAbsolute(pattern)) { - absolute.push(pattern); - } else { - relative.push(pattern); - } - } - return [absolute, relative]; - } - exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; - function isAbsolute(pattern) { - return path2.isAbsolute(pattern); - } - exports2.isAbsolute = isAbsolute; - } -}); - -// node_modules/fast-glob/out/utils/stream.js -var require_stream = __commonJS({ - "node_modules/fast-glob/out/utils/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.merge = void 0; - var merge2 = require_merge2(); - function merge3(streams) { - const mergedStream = merge2(streams); - streams.forEach((stream) => { - stream.once("error", (error2) => mergedStream.emit("error", error2)); - }); - mergedStream.once("close", () => propagateCloseEventToSources(streams)); - mergedStream.once("end", () => propagateCloseEventToSources(streams)); - return mergedStream; - } - exports2.merge = merge3; - function propagateCloseEventToSources(streams) { - streams.forEach((stream) => stream.emit("close")); - } - } -}); - -// node_modules/fast-glob/out/utils/string.js -var require_string = __commonJS({ - "node_modules/fast-glob/out/utils/string.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.isEmpty = exports2.isString = void 0; - function isString(input) { - return typeof input === "string"; - } - exports2.isString = isString; - function isEmpty(input) { - return input === ""; - } - exports2.isEmpty = isEmpty; - } -}); - -// node_modules/fast-glob/out/utils/index.js -var require_utils7 = __commonJS({ - "node_modules/fast-glob/out/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.string = exports2.stream = exports2.pattern = exports2.path = exports2.fs = exports2.errno = exports2.array = void 0; - var array = require_array(); - exports2.array = array; - var errno = require_errno(); - exports2.errno = errno; - var fs2 = require_fs(); - exports2.fs = fs2; - var path2 = require_path(); - exports2.path = path2; - var pattern = require_pattern(); - exports2.pattern = pattern; - var stream = require_stream(); - exports2.stream = stream; - var string = require_string(); - exports2.string = string; - } -}); - -// node_modules/fast-glob/out/managers/tasks.js -var require_tasks = __commonJS({ - "node_modules/fast-glob/out/managers/tasks.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.convertPatternGroupToTask = exports2.convertPatternGroupsToTasks = exports2.groupPatternsByBaseDirectory = exports2.getNegativePatternsAsPositive = exports2.getPositivePatterns = exports2.convertPatternsToTasks = exports2.generate = void 0; - var utils = require_utils7(); - function generate(input, settings) { - const patterns = processPatterns(input, settings); - const ignore = processPatterns(settings.ignore, settings); - const positivePatterns = getPositivePatterns(patterns); - const negativePatterns = getNegativePatternsAsPositive(patterns, ignore); - const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings)); - const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings)); - const staticTasks = convertPatternsToTasks( - staticPatterns, - negativePatterns, - /* dynamic */ - false - ); - const dynamicTasks = convertPatternsToTasks( - dynamicPatterns, - negativePatterns, - /* dynamic */ - true - ); - return staticTasks.concat(dynamicTasks); - } - exports2.generate = generate; - function processPatterns(input, settings) { - let patterns = input; - if (settings.braceExpansion) { - patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns); - } - if (settings.baseNameMatch) { - patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`); - } - return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern)); - } - function convertPatternsToTasks(positive, negative, dynamic) { - const tasks = []; - const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive); - const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive); - const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory); - const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory); - tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic)); - if ("." in insideCurrentDirectoryGroup) { - tasks.push(convertPatternGroupToTask(".", patternsInsideCurrentDirectory, negative, dynamic)); - } else { - tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic)); - } - return tasks; - } - exports2.convertPatternsToTasks = convertPatternsToTasks; - function getPositivePatterns(patterns) { - return utils.pattern.getPositivePatterns(patterns); - } - exports2.getPositivePatterns = getPositivePatterns; - function getNegativePatternsAsPositive(patterns, ignore) { - const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore); - const positive = negative.map(utils.pattern.convertToPositivePattern); - return positive; - } - exports2.getNegativePatternsAsPositive = getNegativePatternsAsPositive; - function groupPatternsByBaseDirectory(patterns) { - const group = {}; - return patterns.reduce((collection, pattern) => { - const base = utils.pattern.getBaseDirectory(pattern); - if (base in collection) { - collection[base].push(pattern); - } else { - collection[base] = [pattern]; - } - return collection; - }, group); - } - exports2.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory; - function convertPatternGroupsToTasks(positive, negative, dynamic) { - return Object.keys(positive).map((base) => { - return convertPatternGroupToTask(base, positive[base], negative, dynamic); - }); - } - exports2.convertPatternGroupsToTasks = convertPatternGroupsToTasks; - function convertPatternGroupToTask(base, positive, negative, dynamic) { - return { - dynamic, - positive, - negative, - base, - patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern)) - }; - } - exports2.convertPatternGroupToTask = convertPatternGroupToTask; - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/async.js -var require_async = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.read = void 0; - function read(path2, settings, callback) { - settings.fs.lstat(path2, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path2, (statError, stat) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - callFailureCallback(callback, statError); - return; - } - callSuccessCallback(callback, lstat); - return; - } - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - callSuccessCallback(callback, stat); - }); - }); - } - exports2.read = read; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.stat/out/providers/sync.js -var require_sync = __commonJS({ - "node_modules/@nodelib/fs.stat/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.read = void 0; - function read(path2, settings) { - const lstat = settings.fs.lstatSync(path2); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path2); - if (settings.markSymbolicLink) { - stat.isSymbolicLink = () => true; - } - return stat; - } catch (error2) { - if (!settings.throwErrorOnBrokenSymbolicLink) { - return lstat; - } - throw error2; - } - } - exports2.read = read; - } -}); - -// node_modules/@nodelib/fs.stat/out/adapters/fs.js -var require_fs2 = __commonJS({ - "node_modules/@nodelib/fs.stat/out/adapters/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs2 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs2.lstat, - stat: fs2.stat, - lstatSync: fs2.lstatSync, - statSync: fs2.statSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports2.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports2.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.stat/out/settings.js -var require_settings = __commonJS({ - "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fs2 = require_fs2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs2.createFileSystemAdapter(this._options.fs); - this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.stat/out/index.js -var require_out = __commonJS({ - "node_modules/@nodelib/fs.stat/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.statSync = exports2.stat = exports2.Settings = void 0; - var async = require_async(); - var sync = require_sync(); - var settings_1 = require_settings(); - exports2.Settings = settings_1.default; - function stat(path2, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path2, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path2, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.stat = stat; - function statSync(path2, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path2, settings); - } - exports2.statSync = statSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/queue-microtask/index.js -var require_queue_microtask = __commonJS({ - "node_modules/queue-microtask/index.js"(exports2, module2) { - var promise; - module2.exports = typeof queueMicrotask === "function" ? queueMicrotask.bind(typeof window !== "undefined" ? window : global) : (cb) => (promise || (promise = Promise.resolve())).then(cb).catch((err) => setTimeout(() => { - throw err; - }, 0)); - } -}); - -// node_modules/run-parallel/index.js -var require_run_parallel = __commonJS({ - "node_modules/run-parallel/index.js"(exports2, module2) { - module2.exports = runParallel; - var queueMicrotask2 = require_queue_microtask(); - function runParallel(tasks, cb) { - let results, pending, keys; - let isSync = true; - if (Array.isArray(tasks)) { - results = []; - pending = tasks.length; - } else { - keys = Object.keys(tasks); - results = {}; - pending = keys.length; - } - function done(err) { - function end() { - if (cb) cb(err, results); - cb = null; - } - if (isSync) queueMicrotask2(end); - else end(); - } - function each(i, err, result) { - results[i] = result; - if (--pending === 0 || err) { - done(err); - } - } - if (!pending) { - done(null); - } else if (keys) { - keys.forEach(function(key) { - tasks[key](function(err, result) { - each(key, err, result); - }); - }); - } else { - tasks.forEach(function(task, i) { - task(function(err, result) { - each(i, err, result); - }); - }); - } - isSync = false; - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/constants.js -var require_constants8 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/constants.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0; - var NODE_PROCESS_VERSION_PARTS = process.versions.node.split("."); - if (NODE_PROCESS_VERSION_PARTS[0] === void 0 || NODE_PROCESS_VERSION_PARTS[1] === void 0) { - throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`); - } - var MAJOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[0], 10); - var MINOR_VERSION = Number.parseInt(NODE_PROCESS_VERSION_PARTS[1], 10); - var SUPPORTED_MAJOR_VERSION = 10; - var SUPPORTED_MINOR_VERSION = 10; - var IS_MATCHED_BY_MAJOR = MAJOR_VERSION > SUPPORTED_MAJOR_VERSION; - var IS_MATCHED_BY_MAJOR_AND_MINOR = MAJOR_VERSION === SUPPORTED_MAJOR_VERSION && MINOR_VERSION >= SUPPORTED_MINOR_VERSION; - exports2.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/fs.js -var require_fs3 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createDirentFromStats = void 0; - var DirentFromStats = class { - constructor(name, stats) { - this.name = name; - this.isBlockDevice = stats.isBlockDevice.bind(stats); - this.isCharacterDevice = stats.isCharacterDevice.bind(stats); - this.isDirectory = stats.isDirectory.bind(stats); - this.isFIFO = stats.isFIFO.bind(stats); - this.isFile = stats.isFile.bind(stats); - this.isSocket = stats.isSocket.bind(stats); - this.isSymbolicLink = stats.isSymbolicLink.bind(stats); - } - }; - function createDirentFromStats(name, stats) { - return new DirentFromStats(name, stats); - } - exports2.createDirentFromStats = createDirentFromStats; - } -}); - -// node_modules/@nodelib/fs.scandir/out/utils/index.js -var require_utils8 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/utils/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.fs = void 0; - var fs2 = require_fs3(); - exports2.fs = fs2; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/common.js -var require_common = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/common.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.joinPathSegments = void 0; - function joinPathSegments(a, b, separator) { - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports2.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/async.js -var require_async2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; - var fsStat = require_out(); - var rpl = require_run_parallel(); - var constants_1 = require_constants8(); - var utils = require_utils8(); - var common2 = require_common(); - function read(directory, settings, callback) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - readdirWithFileTypes(directory, settings, callback); - return; - } - readdir(directory, settings, callback); - } - exports2.read = read; - function readdirWithFileTypes(directory, settings, callback) { - settings.fs.readdir(directory, { withFileTypes: true }, (readdirError, dirents) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const entries = dirents.map((dirent) => ({ - dirent, - name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - })); - if (!settings.followSymbolicLinks) { - callSuccessCallback(callback, entries); - return; - } - const tasks = entries.map((entry) => makeRplTaskEntry(entry, settings)); - rpl(tasks, (rplError, rplEntries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, rplEntries); - }); - }); - } - exports2.readdirWithFileTypes = readdirWithFileTypes; - function makeRplTaskEntry(entry, settings) { - return (done) => { - if (!entry.dirent.isSymbolicLink()) { - done(null, entry); - return; - } - settings.fs.stat(entry.path, (statError, stats) => { - if (statError !== null) { - if (settings.throwErrorOnBrokenSymbolicLink) { - done(statError); - return; - } - done(null, entry); - return; - } - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - done(null, entry); - }); - }; - } - function readdir(directory, settings, callback) { - settings.fs.readdir(directory, (readdirError, names) => { - if (readdirError !== null) { - callFailureCallback(callback, readdirError); - return; - } - const tasks = names.map((name) => { - const path2 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path2, settings.fsStatSettings, (error2, stats) => { - if (error2 !== null) { - done(error2); - return; - } - const entry = { - name, - path: path2, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - done(null, entry); - }); - }; - }); - rpl(tasks, (rplError, entries) => { - if (rplError !== null) { - callFailureCallback(callback, rplError); - return; - } - callSuccessCallback(callback, entries); - }); - }); - } - exports2.readdir = readdir; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, result) { - callback(null, result); - } - } -}); - -// node_modules/@nodelib/fs.scandir/out/providers/sync.js -var require_sync2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.readdir = exports2.readdirWithFileTypes = exports2.read = void 0; - var fsStat = require_out(); - var constants_1 = require_constants8(); - var utils = require_utils8(); - var common2 = require_common(); - function read(directory, settings) { - if (!settings.stats && constants_1.IS_SUPPORT_READDIR_WITH_FILE_TYPES) { - return readdirWithFileTypes(directory, settings); - } - return readdir(directory, settings); - } - exports2.read = read; - function readdirWithFileTypes(directory, settings) { - const dirents = settings.fs.readdirSync(directory, { withFileTypes: true }); - return dirents.map((dirent) => { - const entry = { - dirent, - name: dirent.name, - path: common2.joinPathSegments(directory, dirent.name, settings.pathSegmentSeparator) - }; - if (entry.dirent.isSymbolicLink() && settings.followSymbolicLinks) { - try { - const stats = settings.fs.statSync(entry.path); - entry.dirent = utils.fs.createDirentFromStats(entry.name, stats); - } catch (error2) { - if (settings.throwErrorOnBrokenSymbolicLink) { - throw error2; - } - } - } - return entry; - }); - } - exports2.readdirWithFileTypes = readdirWithFileTypes; - function readdir(directory, settings) { - const names = settings.fs.readdirSync(directory); - return names.map((name) => { - const entryPath = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - const stats = fsStat.statSync(entryPath, settings.fsStatSettings); - const entry = { - name, - path: entryPath, - dirent: utils.fs.createDirentFromStats(name, stats) - }; - if (settings.stats) { - entry.stats = stats; - } - return entry; - }); - } - exports2.readdir = readdir; - } -}); - -// node_modules/@nodelib/fs.scandir/out/adapters/fs.js -var require_fs4 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/adapters/fs.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs2 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs2.lstat, - stat: fs2.stat, - lstatSync: fs2.lstatSync, - statSync: fs2.statSync, - readdir: fs2.readdir, - readdirSync: fs2.readdirSync - }; - function createFileSystemAdapter(fsMethods) { - if (fsMethods === void 0) { - return exports2.FILE_SYSTEM_ADAPTER; - } - return Object.assign(Object.assign({}, exports2.FILE_SYSTEM_ADAPTER), fsMethods); - } - exports2.createFileSystemAdapter = createFileSystemAdapter; - } -}); - -// node_modules/@nodelib/fs.scandir/out/settings.js -var require_settings2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path2 = require("path"); - var fsStat = require_out(); - var fs2 = require_fs4(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs2.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path2.sep); - this.stats = this._getValue(this._options.stats, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); - this.fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this.followSymbolicLinks, - fs: this.fs, - throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.scandir/out/index.js -var require_out2 = __commonJS({ - "node_modules/@nodelib/fs.scandir/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Settings = exports2.scandirSync = exports2.scandir = void 0; - var async = require_async2(); - var sync = require_sync2(); - var settings_1 = require_settings2(); - exports2.Settings = settings_1.default; - function scandir(path2, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path2, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path2, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.scandir = scandir; - function scandirSync(path2, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path2, settings); - } - exports2.scandirSync = scandirSync; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/reusify/reusify.js -var require_reusify = __commonJS({ - "node_modules/reusify/reusify.js"(exports2, module2) { - "use strict"; - function reusify(Constructor) { - var head = new Constructor(); - var tail = head; - function get() { - var current = head; - if (current.next) { - head = current.next; - } else { - head = new Constructor(); - tail = head; - } - current.next = null; - return current; - } - function release(obj) { - tail.next = obj; - tail = obj; - } - return { - get, - release - }; - } - module2.exports = reusify; - } -}); - -// node_modules/fastq/queue.js -var require_queue = __commonJS({ - "node_modules/fastq/queue.js"(exports2, module2) { - "use strict"; - var reusify = require_reusify(); - function fastqueue(context2, worker, concurrency) { - if (typeof context2 === "function") { - concurrency = worker; - worker = context2; - context2 = null; - } - var cache = reusify(Task); - var queueHead = null; - var queueTail = null; - var _running = 0; - var self2 = { - push, - drain: noop, - saturated: noop, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop, - kill, - killAndDrain - }; - return self2; - function running() { - return _running; - } - function pause() { - self2.paused = true; - } - function length() { - var current = queueHead; - var counter = 0; - while (current) { - current = current.next; - counter++; - } - return counter; - } - function getQueue() { - var current = queueHead; - var tasks = []; - while (current) { - tasks.push(current.value); - current = current.next; - } - return tasks; - } - function resume() { - if (!self2.paused) return; - self2.paused = false; - for (var i = 0; i < self2.concurrency; i++) { - _running++; - release(); - } - } - function idle() { - return _running === 0 && self2.length() === 0; - } - function push(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release; - current.value = value; - current.callback = done || noop; - if (_running === self2.concurrency || self2.paused) { - if (queueTail) { - queueTail.next = current; - queueTail = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context2, current.value, current.worked); - } - } - function unshift(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release; - current.value = value; - current.callback = done || noop; - if (_running === self2.concurrency || self2.paused) { - if (queueHead) { - current.next = queueHead; - queueHead = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context2, current.value, current.worked); - } - } - function release(holder) { - if (holder) { - cache.release(holder); - } - var next = queueHead; - if (next) { - if (!self2.paused) { - if (queueTail === queueHead) { - queueTail = null; - } - queueHead = next.next; - next.next = null; - worker.call(context2, next.value, next.worked); - if (queueTail === null) { - self2.empty(); - } - } else { - _running--; - } - } else if (--_running === 0) { - self2.drain(); - } - } - function kill() { - queueHead = null; - queueTail = null; - self2.drain = noop; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self2.drain(); - self2.drain = noop; - } - } - function noop() { - } - function Task() { - this.value = null; - this.callback = noop; - this.next = null; - this.release = noop; - this.context = null; - var self2 = this; - this.worked = function worked(err, result) { - var callback = self2.callback; - self2.value = null; - self2.callback = noop; - callback.call(self2.context, err, result); - self2.release(self2); - }; - } - module2.exports = fastqueue; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/common.js -var require_common2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/common.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.joinPathSegments = exports2.replacePathSegmentSeparator = exports2.isAppliedFilter = exports2.isFatalError = void 0; - function isFatalError(settings, error2) { - if (settings.errorFilter === null) { - return true; - } - return !settings.errorFilter(error2); - } - exports2.isFatalError = isFatalError; - function isAppliedFilter(filter, value) { - return filter === null || filter(value); - } - exports2.isAppliedFilter = isAppliedFilter; - function replacePathSegmentSeparator(filepath, separator) { - return filepath.split(/[/\\]/).join(separator); - } - exports2.replacePathSegmentSeparator = replacePathSegmentSeparator; - function joinPathSegments(a, b, separator) { - if (a === "") { - return b; - } - if (a.endsWith(separator)) { - return a + b; - } - return a + separator + b; - } - exports2.joinPathSegments = joinPathSegments; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/reader.js -var require_reader = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/reader.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var common2 = require_common2(); - var Reader = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._root = common2.replacePathSegmentSeparator(_root, _settings.pathSegmentSeparator); - } - }; - exports2.default = Reader; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/async.js -var require_async3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var events_1 = require("events"); - var fsScandir = require_out2(); - var fastq = require_queue(); - var common2 = require_common2(); - var reader_1 = require_reader(); - var AsyncReader = class extends reader_1.default { - constructor(_root, _settings) { - super(_root, _settings); - this._settings = _settings; - this._scandir = fsScandir.scandir; - this._emitter = new events_1.EventEmitter(); - this._queue = fastq(this._worker.bind(this), this._settings.concurrency); - this._isFatalError = false; - this._isDestroyed = false; - this._queue.drain = () => { - if (!this._isFatalError) { - this._emitter.emit("end"); - } - }; - } - read() { - this._isFatalError = false; - this._isDestroyed = false; - setImmediate(() => { - this._pushToQueue(this._root, this._settings.basePath); - }); - return this._emitter; - } - get isDestroyed() { - return this._isDestroyed; - } - destroy() { - if (this._isDestroyed) { - throw new Error("The reader is already destroyed"); - } - this._isDestroyed = true; - this._queue.killAndDrain(); - } - onEntry(callback) { - this._emitter.on("entry", callback); - } - onError(callback) { - this._emitter.once("error", callback); - } - onEnd(callback) { - this._emitter.once("end", callback); - } - _pushToQueue(directory, base) { - const queueItem = { directory, base }; - this._queue.push(queueItem, (error2) => { - if (error2 !== null) { - this._handleError(error2); - } - }); - } - _worker(item, done) { - this._scandir(item.directory, this._settings.fsScandirSettings, (error2, entries) => { - if (error2 !== null) { - done(error2, void 0); - return; - } - for (const entry of entries) { - this._handleEntry(entry, item.base); - } - done(null, void 0); - }); - } - _handleError(error2) { - if (this._isDestroyed || !common2.isFatalError(this._settings, error2)) { - return; - } - this._isFatalError = true; - this._isDestroyed = true; - this._emitter.emit("error", error2); - } - _handleEntry(entry, base) { - if (this._isDestroyed || this._isFatalError) { - return; - } - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { - this._emitEntry(entry); - } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _emitEntry(entry) { - this._emitter.emit("entry", entry); - } - }; - exports2.default = AsyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/async.js -var require_async4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var async_1 = require_async3(); - var AsyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._storage = []; - } - read(callback) { - this._reader.onError((error2) => { - callFailureCallback(callback, error2); - }); - this._reader.onEntry((entry) => { - this._storage.push(entry); - }); - this._reader.onEnd(() => { - callSuccessCallback(callback, this._storage); - }); - this._reader.read(); - } - }; - exports2.default = AsyncProvider; - function callFailureCallback(callback, error2) { - callback(error2); - } - function callSuccessCallback(callback, entries) { - callback(null, entries); - } - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/stream.js -var require_stream2 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var async_1 = require_async3(); - var StreamProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new async_1.default(this._root, this._settings); - this._stream = new stream_1.Readable({ - objectMode: true, - read: () => { - }, - destroy: () => { - if (!this._reader.isDestroyed) { - this._reader.destroy(); - } - } - }); - } - read() { - this._reader.onError((error2) => { - this._stream.emit("error", error2); - }); - this._reader.onEntry((entry) => { - this._stream.push(entry); - }); - this._reader.onEnd(() => { - this._stream.push(null); - }); - this._reader.read(); - return this._stream; - } - }; - exports2.default = StreamProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/readers/sync.js -var require_sync3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/readers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsScandir = require_out2(); - var common2 = require_common2(); - var reader_1 = require_reader(); - var SyncReader = class extends reader_1.default { - constructor() { - super(...arguments); - this._scandir = fsScandir.scandirSync; - this._storage = []; - this._queue = /* @__PURE__ */ new Set(); - } - read() { - this._pushToQueue(this._root, this._settings.basePath); - this._handleQueue(); - return this._storage; - } - _pushToQueue(directory, base) { - this._queue.add({ directory, base }); - } - _handleQueue() { - for (const item of this._queue.values()) { - this._handleDirectory(item.directory, item.base); - } - } - _handleDirectory(directory, base) { - try { - const entries = this._scandir(directory, this._settings.fsScandirSettings); - for (const entry of entries) { - this._handleEntry(entry, base); - } - } catch (error2) { - this._handleError(error2); - } - } - _handleError(error2) { - if (!common2.isFatalError(this._settings, error2)) { - return; - } - throw error2; - } - _handleEntry(entry, base) { - const fullpath = entry.path; - if (base !== void 0) { - entry.path = common2.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator); - } - if (common2.isAppliedFilter(this._settings.entryFilter, entry)) { - this._pushToStorage(entry); - } - if (entry.dirent.isDirectory() && common2.isAppliedFilter(this._settings.deepFilter, entry)) { - this._pushToQueue(fullpath, base === void 0 ? void 0 : entry.path); - } - } - _pushToStorage(entry) { - this._storage.push(entry); - } - }; - exports2.default = SyncReader; - } -}); - -// node_modules/@nodelib/fs.walk/out/providers/sync.js -var require_sync4 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var sync_1 = require_sync3(); - var SyncProvider = class { - constructor(_root, _settings) { - this._root = _root; - this._settings = _settings; - this._reader = new sync_1.default(this._root, this._settings); - } - read() { - return this._reader.read(); - } - }; - exports2.default = SyncProvider; - } -}); - -// node_modules/@nodelib/fs.walk/out/settings.js -var require_settings3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path2 = require("path"); - var fsScandir = require_out2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.basePath = this._getValue(this._options.basePath, void 0); - this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY); - this.deepFilter = this._getValue(this._options.deepFilter, null); - this.entryFilter = this._getValue(this._options.entryFilter, null); - this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path2.sep); - this.fsScandirSettings = new fsScandir.Settings({ - followSymbolicLinks: this._options.followSymbolicLinks, - fs: this._options.fs, - pathSegmentSeparator: this._options.pathSegmentSeparator, - stats: this._options.stats, - throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink - }); - } - _getValue(option, value) { - return option !== null && option !== void 0 ? option : value; - } - }; - exports2.default = Settings; - } -}); - -// node_modules/@nodelib/fs.walk/out/index.js -var require_out3 = __commonJS({ - "node_modules/@nodelib/fs.walk/out/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.Settings = exports2.walkStream = exports2.walkSync = exports2.walk = void 0; - var async_1 = require_async4(); - var stream_1 = require_stream2(); - var sync_1 = require_sync4(); - var settings_1 = require_settings3(); - exports2.Settings = settings_1.default; - function walk(directory, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - new async_1.default(directory, getSettings()).read(optionsOrSettingsOrCallback); - return; - } - new async_1.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback); - } - exports2.walk = walk; - function walkSync(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new sync_1.default(directory, settings); - return provider.read(); - } - exports2.walkSync = walkSync; - function walkStream(directory, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - const provider = new stream_1.default(directory, settings); - return provider.read(); - } - exports2.walkStream = walkStream; - function getSettings(settingsOrOptions = {}) { - if (settingsOrOptions instanceof settings_1.default) { - return settingsOrOptions; - } - return new settings_1.default(settingsOrOptions); - } - } -}); - -// node_modules/fast-glob/out/readers/reader.js -var require_reader2 = __commonJS({ - "node_modules/fast-glob/out/readers/reader.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path2 = require("path"); - var fsStat = require_out(); - var utils = require_utils7(); - var Reader = class { - constructor(_settings) { - this._settings = _settings; - this._fsStatSettings = new fsStat.Settings({ - followSymbolicLink: this._settings.followSymbolicLinks, - fs: this._settings.fs, - throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks - }); - } - _getFullEntryPath(filepath) { - return path2.resolve(this._settings.cwd, filepath); - } - _makeEntry(stats, pattern) { - const entry = { - name: pattern, - path: pattern, - dirent: utils.fs.createDirentFromStats(pattern, stats) - }; - if (this._settings.stats) { - entry.stats = stats; - } - return entry; - } - _isFatalError(error2) { - return !utils.errno.isEnoentCodeError(error2) && !this._settings.suppressErrors; - } - }; - exports2.default = Reader; - } -}); - -// node_modules/fast-glob/out/readers/stream.js -var require_stream3 = __commonJS({ - "node_modules/fast-glob/out/readers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderStream = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkStream = fsWalk.walkStream; - this._stat = fsStat.stat; - } - dynamic(root, options) { - return this._walkStream(root, options); - } - static(patterns, options) { - const filepaths = patterns.map(this._getFullEntryPath, this); - const stream = new stream_1.PassThrough({ objectMode: true }); - stream._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream.push(entry); - } - if (index === filepaths.length - 1) { - stream.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream.write(i); - } - return stream; - } - _getEntry(filepath, pattern, options) { - return this._getStat(filepath).then((stats) => this._makeEntry(stats, pattern)).catch((error2) => { - if (options.errorFilter(error2)) { - return null; - } - throw error2; - }); - } - _getStat(filepath) { - return new Promise((resolve2, reject) => { - this._stat(filepath, this._fsStatSettings, (error2, stats) => { - return error2 === null ? resolve2(stats) : reject(error2); - }); - }); - } - }; - exports2.default = ReaderStream; - } -}); - -// node_modules/fast-glob/out/readers/async.js -var require_async5 = __commonJS({ - "node_modules/fast-glob/out/readers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var stream_1 = require_stream3(); - var ReaderAsync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkAsync = fsWalk.walk; - this._readerStream = new stream_1.default(this._settings); - } - dynamic(root, options) { - return new Promise((resolve2, reject) => { - this._walkAsync(root, options, (error2, entries) => { - if (error2 === null) { - resolve2(entries); - } else { - reject(error2); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream = this._readerStream.static(patterns, options); - return new Promise((resolve2, reject) => { - stream.once("error", reject); - stream.on("data", (entry) => entries.push(entry)); - stream.once("end", () => resolve2(entries)); - }); - } - }; - exports2.default = ReaderAsync; - } -}); - -// node_modules/fast-glob/out/providers/matchers/matcher.js -var require_matcher = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/matcher.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var Matcher = class { - constructor(_patterns, _settings, _micromatchOptions) { - this._patterns = _patterns; - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this._storage = []; - this._fillStorage(); - } - _fillStorage() { - for (const pattern of this._patterns) { - const segments = this._getPatternSegments(pattern); - const sections = this._splitSegmentsIntoSections(segments); - this._storage.push({ - complete: sections.length <= 1, - pattern, - segments, - sections - }); - } - } - _getPatternSegments(pattern) { - const parts = utils.pattern.getPatternParts(pattern, this._micromatchOptions); - return parts.map((part) => { - const dynamic = utils.pattern.isDynamicPattern(part, this._settings); - if (!dynamic) { - return { - dynamic: false, - pattern: part - }; - } - return { - dynamic: true, - pattern: part, - patternRe: utils.pattern.makeRe(part, this._micromatchOptions) - }; - }); - } - _splitSegmentsIntoSections(segments) { - return utils.array.splitWhen(segments, (segment) => segment.dynamic && utils.pattern.hasGlobStar(segment.pattern)); - } - }; - exports2.default = Matcher; - } -}); - -// node_modules/fast-glob/out/providers/matchers/partial.js -var require_partial = __commonJS({ - "node_modules/fast-glob/out/providers/matchers/partial.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var matcher_1 = require_matcher(); - var PartialMatcher = class extends matcher_1.default { - match(filepath) { - const parts = filepath.split("/"); - const levels = parts.length; - const patterns = this._storage.filter((info5) => !info5.complete || info5.segments.length > levels); - for (const pattern of patterns) { - const section = pattern.sections[0]; - if (!pattern.complete && levels > section.length) { - return true; - } - const match = parts.every((part, index) => { - const segment = pattern.segments[index]; - if (segment.dynamic && segment.patternRe.test(part)) { - return true; - } - if (!segment.dynamic && segment.pattern === part) { - return true; - } - return false; - }); - if (match) { - return true; - } - } - return false; - } - }; - exports2.default = PartialMatcher; - } -}); - -// node_modules/fast-glob/out/providers/filters/deep.js -var require_deep = __commonJS({ - "node_modules/fast-glob/out/providers/filters/deep.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var partial_1 = require_partial(); - var DeepFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - } - getFilter(basePath, positive, negative) { - const matcher = this._getMatcher(positive); - const negativeRe = this._getNegativePatternsRe(negative); - return (entry) => this._filter(basePath, entry, matcher, negativeRe); - } - _getMatcher(patterns) { - return new partial_1.default(patterns, this._settings, this._micromatchOptions); - } - _getNegativePatternsRe(patterns) { - const affectDepthOfReadingPatterns = patterns.filter(utils.pattern.isAffectDepthOfReadingPattern); - return utils.pattern.convertPatternsToRe(affectDepthOfReadingPatterns, this._micromatchOptions); - } - _filter(basePath, entry, matcher, negativeRe) { - if (this._isSkippedByDeep(basePath, entry.path)) { - return false; - } - if (this._isSkippedSymbolicLink(entry)) { - return false; - } - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._isSkippedByPositivePatterns(filepath, matcher)) { - return false; - } - return this._isSkippedByNegativePatterns(filepath, negativeRe); - } - _isSkippedByDeep(basePath, entryPath) { - if (this._settings.deep === Infinity) { - return false; - } - return this._getEntryLevel(basePath, entryPath) >= this._settings.deep; - } - _getEntryLevel(basePath, entryPath) { - const entryPathDepth = entryPath.split("/").length; - if (basePath === "") { - return entryPathDepth; - } - const basePathDepth = basePath.split("/").length; - return entryPathDepth - basePathDepth; - } - _isSkippedSymbolicLink(entry) { - return !this._settings.followSymbolicLinks && entry.dirent.isSymbolicLink(); - } - _isSkippedByPositivePatterns(entryPath, matcher) { - return !this._settings.baseNameMatch && !matcher.match(entryPath); - } - _isSkippedByNegativePatterns(entryPath, patternsRe) { - return !utils.pattern.matchAny(entryPath, patternsRe); - } - }; - exports2.default = DeepFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/entry.js -var require_entry = __commonJS({ - "node_modules/fast-glob/out/providers/filters/entry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var EntryFilter = class { - constructor(_settings, _micromatchOptions) { - this._settings = _settings; - this._micromatchOptions = _micromatchOptions; - this.index = /* @__PURE__ */ new Map(); - } - getFilter(positive, negative) { - const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative); - const patterns = { - positive: { - all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions) - }, - negative: { - absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })), - relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })) - } - }; - return (entry) => this._filter(entry, patterns); - } - _filter(entry, patterns) { - const filepath = utils.path.removeLeadingDotSegment(entry.path); - if (this._settings.unique && this._isDuplicateEntry(filepath)) { - return false; - } - if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) { - return false; - } - const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory()); - if (this._settings.unique && isMatched) { - this._createIndexRecord(filepath); - } - return isMatched; - } - _isDuplicateEntry(filepath) { - return this.index.has(filepath); - } - _createIndexRecord(filepath) { - this.index.set(filepath, void 0); - } - _onlyFileFilter(entry) { - return this._settings.onlyFiles && !entry.dirent.isFile(); - } - _onlyDirectoryFilter(entry) { - return this._settings.onlyDirectories && !entry.dirent.isDirectory(); - } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { - if (patternsRe.length === 0) { - return false; - } - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { - return utils.pattern.matchAny(filepath + "/", patternsRe); - } - return isMatched; - } - }; - exports2.default = EntryFilter; - } -}); - -// node_modules/fast-glob/out/providers/filters/error.js -var require_error = __commonJS({ - "node_modules/fast-glob/out/providers/filters/error.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var ErrorFilter = class { - constructor(_settings) { - this._settings = _settings; - } - getFilter() { - return (error2) => this._isNonFatalError(error2); - } - _isNonFatalError(error2) { - return utils.errno.isEnoentCodeError(error2) || this._settings.suppressErrors; - } - }; - exports2.default = ErrorFilter; - } -}); - -// node_modules/fast-glob/out/providers/transformers/entry.js -var require_entry2 = __commonJS({ - "node_modules/fast-glob/out/providers/transformers/entry.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var utils = require_utils7(); - var EntryTransformer = class { - constructor(_settings) { - this._settings = _settings; - } - getTransformer() { - return (entry) => this._transform(entry); - } - _transform(entry) { - let filepath = entry.path; - if (this._settings.absolute) { - filepath = utils.path.makeAbsolute(this._settings.cwd, filepath); - filepath = utils.path.unixify(filepath); - } - if (this._settings.markDirectories && entry.dirent.isDirectory()) { - filepath += "/"; - } - if (!this._settings.objectMode) { - return filepath; - } - return Object.assign(Object.assign({}, entry), { path: filepath }); - } - }; - exports2.default = EntryTransformer; - } -}); - -// node_modules/fast-glob/out/providers/provider.js -var require_provider = __commonJS({ - "node_modules/fast-glob/out/providers/provider.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var path2 = require("path"); - var deep_1 = require_deep(); - var entry_1 = require_entry(); - var error_1 = require_error(); - var entry_2 = require_entry2(); - var Provider = class { - constructor(_settings) { - this._settings = _settings; - this.errorFilter = new error_1.default(this._settings); - this.entryFilter = new entry_1.default(this._settings, this._getMicromatchOptions()); - this.deepFilter = new deep_1.default(this._settings, this._getMicromatchOptions()); - this.entryTransformer = new entry_2.default(this._settings); - } - _getRootDirectory(task) { - return path2.resolve(this._settings.cwd, task.base); - } - _getReaderOptions(task) { - const basePath = task.base === "." ? "" : task.base; - return { - basePath, - pathSegmentSeparator: "/", - concurrency: this._settings.concurrency, - deepFilter: this.deepFilter.getFilter(basePath, task.positive, task.negative), - entryFilter: this.entryFilter.getFilter(task.positive, task.negative), - errorFilter: this.errorFilter.getFilter(), - followSymbolicLinks: this._settings.followSymbolicLinks, - fs: this._settings.fs, - stats: this._settings.stats, - throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink, - transform: this.entryTransformer.getTransformer() - }; - } - _getMicromatchOptions() { - return { - dot: this._settings.dot, - matchBase: this._settings.baseNameMatch, - nobrace: !this._settings.braceExpansion, - nocase: !this._settings.caseSensitiveMatch, - noext: !this._settings.extglob, - noglobstar: !this._settings.globstar, - posix: true, - strictSlashes: false - }; - } - }; - exports2.default = Provider; - } -}); - -// node_modules/fast-glob/out/providers/async.js -var require_async6 = __commonJS({ - "node_modules/fast-glob/out/providers/async.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var async_1 = require_async5(); - var provider_1 = require_provider(); - var ProviderAsync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new async_1.default(this._settings); - } - async read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = await this.api(root, task, options); - return entries.map((entry) => options.transform(entry)); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderAsync; - } -}); - -// node_modules/fast-glob/out/providers/stream.js -var require_stream4 = __commonJS({ - "node_modules/fast-glob/out/providers/stream.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var stream_1 = require("stream"); - var stream_2 = require_stream3(); - var provider_1 = require_provider(); - var ProviderStream = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new stream_2.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const source = this.api(root, task, options); - const destination = new stream_1.Readable({ objectMode: true, read: () => { - } }); - source.once("error", (error2) => destination.emit("error", error2)).on("data", (entry) => destination.emit("data", options.transform(entry))).once("end", () => destination.emit("end")); - destination.once("close", () => source.destroy()); - return destination; - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderStream; - } -}); - -// node_modules/fast-glob/out/readers/sync.js -var require_sync5 = __commonJS({ - "node_modules/fast-glob/out/readers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var fsStat = require_out(); - var fsWalk = require_out3(); - var reader_1 = require_reader2(); - var ReaderSync = class extends reader_1.default { - constructor() { - super(...arguments); - this._walkSync = fsWalk.walkSync; - this._statSync = fsStat.statSync; - } - dynamic(root, options) { - return this._walkSync(root, options); - } - static(patterns, options) { - const entries = []; - for (const pattern of patterns) { - const filepath = this._getFullEntryPath(pattern); - const entry = this._getEntry(filepath, pattern, options); - if (entry === null || !options.entryFilter(entry)) { - continue; - } - entries.push(entry); - } - return entries; - } - _getEntry(filepath, pattern, options) { - try { - const stats = this._getStat(filepath); - return this._makeEntry(stats, pattern); - } catch (error2) { - if (options.errorFilter(error2)) { - return null; - } - throw error2; - } - } - _getStat(filepath) { - return this._statSync(filepath, this._fsStatSettings); - } - }; - exports2.default = ReaderSync; - } -}); - -// node_modules/fast-glob/out/providers/sync.js -var require_sync6 = __commonJS({ - "node_modules/fast-glob/out/providers/sync.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - var sync_1 = require_sync5(); - var provider_1 = require_provider(); - var ProviderSync = class extends provider_1.default { - constructor() { - super(...arguments); - this._reader = new sync_1.default(this._settings); - } - read(task) { - const root = this._getRootDirectory(task); - const options = this._getReaderOptions(task); - const entries = this.api(root, task, options); - return entries.map(options.transform); - } - api(root, task, options) { - if (task.dynamic) { - return this._reader.dynamic(root, options); - } - return this._reader.static(task.patterns, options); - } - }; - exports2.default = ProviderSync; - } -}); - -// node_modules/fast-glob/out/settings.js -var require_settings4 = __commonJS({ - "node_modules/fast-glob/out/settings.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs2 = require("fs"); - var os = require("os"); - var CPU_COUNT = Math.max(os.cpus().length, 1); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs2.lstat, - lstatSync: fs2.lstatSync, - stat: fs2.stat, - statSync: fs2.statSync, - readdir: fs2.readdir, - readdirSync: fs2.readdirSync - }; - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.absolute = this._getValue(this._options.absolute, false); - this.baseNameMatch = this._getValue(this._options.baseNameMatch, false); - this.braceExpansion = this._getValue(this._options.braceExpansion, true); - this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, true); - this.concurrency = this._getValue(this._options.concurrency, CPU_COUNT); - this.cwd = this._getValue(this._options.cwd, process.cwd()); - this.deep = this._getValue(this._options.deep, Infinity); - this.dot = this._getValue(this._options.dot, false); - this.extglob = this._getValue(this._options.extglob, true); - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, true); - this.fs = this._getFileSystemMethods(this._options.fs); - this.globstar = this._getValue(this._options.globstar, true); - this.ignore = this._getValue(this._options.ignore, []); - this.markDirectories = this._getValue(this._options.markDirectories, false); - this.objectMode = this._getValue(this._options.objectMode, false); - this.onlyDirectories = this._getValue(this._options.onlyDirectories, false); - this.onlyFiles = this._getValue(this._options.onlyFiles, true); - this.stats = this._getValue(this._options.stats, false); - this.suppressErrors = this._getValue(this._options.suppressErrors, false); - this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, false); - this.unique = this._getValue(this._options.unique, true); - if (this.onlyDirectories) { - this.onlyFiles = false; - } - if (this.stats) { - this.objectMode = true; - } - this.ignore = [].concat(this.ignore); - } - _getValue(option, value) { - return option === void 0 ? value : option; - } - _getFileSystemMethods(methods = {}) { - return Object.assign(Object.assign({}, exports2.DEFAULT_FILE_SYSTEM_ADAPTER), methods); - } - }; - exports2.default = Settings; - } -}); - -// node_modules/fast-glob/out/index.js -var require_out4 = __commonJS({ - "node_modules/fast-glob/out/index.js"(exports2, module2) { - "use strict"; - var taskManager = require_tasks(); - var async_1 = require_async6(); - var stream_1 = require_stream4(); - var sync_1 = require_sync6(); - var settings_1 = require_settings4(); - var utils = require_utils7(); - async function FastGlob(source, options) { - assertPatternsInput(source); - const works = getWorks(source, async_1.default, options); - const result = await Promise.all(works); - return utils.array.flatten(result); - } - (function(FastGlob2) { - FastGlob2.glob = FastGlob2; - FastGlob2.globSync = sync; - FastGlob2.globStream = stream; - FastGlob2.async = FastGlob2; - function sync(source, options) { - assertPatternsInput(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream(source, options) { - assertPatternsInput(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream; - function generateTasks(source, options) { - assertPatternsInput(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern; - function escapePath(source) { - assertPatternsInput(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); - return utils.path.convertPathToPattern(source); - } - FastGlob2.convertPathToPattern = convertPathToPattern; - let posix; - (function(posix2) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapePosixPath(source); - } - posix2.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertPosixPathToPattern(source); - } - posix2.convertPathToPattern = convertPathToPattern2; - })(posix = FastGlob2.posix || (FastGlob2.posix = {})); - let win32; - (function(win322) { - function escapePath2(source) { - assertPatternsInput(source); - return utils.path.escapeWindowsPath(source); - } - win322.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); - return utils.path.convertWindowsPathToPattern(source); - } - win322.convertPathToPattern = convertPathToPattern2; - })(win32 = FastGlob2.win32 || (FastGlob2.win32 = {})); - })(FastGlob || (FastGlob = {})); - function getWorks(source, _Provider, options) { - const patterns = [].concat(source); - const settings = new settings_1.default(options); - const tasks = taskManager.generate(patterns, settings); - const provider = new _Provider(settings); - return tasks.map(provider.read, provider); - } - function assertPatternsInput(input) { - const source = [].concat(input); - const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); - if (!isValidSource) { - throw new TypeError("Patterns must be a string (non empty) or an array of strings"); - } - } - module2.exports = FastGlob; - } -}); - -// node_modules/path-type/index.js -var require_path_type = __commonJS({ - "node_modules/path-type/index.js"(exports2) { - "use strict"; - var { promisify } = require("util"); - var fs2 = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify(fs2[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - return fs2[fsStatType](filePath)[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - exports2.isFile = isType.bind(null, "stat", "isFile"); - exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// node_modules/dir-glob/index.js -var require_dir_glob = __commonJS({ - "node_modules/dir-glob/index.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - var pathType = require_path_type(); - var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; - var getPath = (filepath, cwd) => { - const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; - return path2.isAbsolute(pth) ? pth : path2.join(cwd, pth); - }; - var addExtensions = (file, extensions) => { - if (path2.extname(file)) { - return `**/${file}`; - } - return `**/${file}.${getExtensions(extensions)}`; - }; - var getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - if (options.files && options.extensions) { - return options.files.map((x) => path2.posix.join(directory, addExtensions(x, options.extensions))); - } - if (options.files) { - return options.files.map((x) => path2.posix.join(directory, `**/${x}`)); - } - if (options.extensions) { - return [path2.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - return [path2.posix.join(directory, "**")]; - }; - module2.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = await Promise.all([].concat(input).map(async (x) => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - return [].concat.apply([], globs); - }; - module2.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - return [].concat.apply([], globs); - }; - } -}); - -// node_modules/ignore/index.js -var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports2, module2) { - function makeArray(subject) { - return Array.isArray(subject) ? subject : [subject]; - } - var EMPTY = ""; - var SPACE = " "; - var ESCAPE = "\\"; - var REGEX_TEST_BLANK_LINE = /^\s+$/; - var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/; - var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; - var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; - var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; - var SLASH = "/"; - var TMP_KEY_IGNORE = "node-ignore"; - if (typeof Symbol !== "undefined") { - TMP_KEY_IGNORE = Symbol.for("node-ignore"); - } - var KEY_IGNORE = TMP_KEY_IGNORE; - var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); - var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; - var RETURN_FALSE = () => false; - var sanitizeRange = (range) => range.replace( - REGEX_REGEXP_RANGE, - (match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY - ); - var cleanRangeBackSlash = (slashes) => { - const { length } = slashes; - return slashes.slice(0, length - length % 2); - }; - var REPLACERS = [ - [ - // remove BOM - // TODO: - // Other similar zero-width characters? - /^\uFEFF/, - () => EMPTY - ], - // > Trailing spaces are ignored unless they are quoted with backslash ("\") - [ - // (a\ ) -> (a ) - // (a ) -> (a) - // (a \ ) -> (a ) - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY - ], - // replace (\ ) with ' ' - [ - /\\\s/g, - () => SPACE - ], - // Escape metacharacters - // which is written down by users but means special for regular expressions. - // > There are 12 characters with special meanings: - // > - the backslash \, - // > - the caret ^, - // > - the dollar sign $, - // > - the period or dot ., - // > - the vertical bar or pipe symbol |, - // > - the question mark ?, - // > - the asterisk or star *, - // > - the plus sign +, - // > - the opening parenthesis (, - // > - the closing parenthesis ), - // > - and the opening square bracket [, - // > - the opening curly brace {, - // > These special characters are often called "metacharacters". - [ - /[\\$.|*+(){^]/g, - (match) => `\\${match}` - ], - [ - // > a question mark (?) matches a single character - /(?!\\)\?/g, - () => "[^/]" - ], - // leading slash - [ - // > A leading slash matches the beginning of the pathname. - // > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c". - // A leading slash matches the beginning of the pathname - /^\//, - () => "^" - ], - // replace special metacharacter slash after the leading slash - [ - /\//g, - () => "\\/" - ], - [ - // > A leading "**" followed by a slash means match in all directories. - // > For example, "**/foo" matches file or directory "foo" anywhere, - // > the same as pattern "foo". - // > "**/foo/bar" matches file or directory "bar" anywhere that is directly - // > under directory "foo". - // Notice that the '*'s have been replaced as '\\*' - /^\^*\\\*\\\*\\\//, - // '**/foo' <-> 'foo' - () => "^(?:.*\\/)?" - ], - // starting - [ - // there will be no leading '/' - // (which has been replaced by section "leading slash") - // If starts with '**', adding a '^' to the regular expression also works - /^(?=[^^])/, - function startingReplacer() { - return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^"; - } - ], - // two globstars - [ - // Use lookahead assertions so that we could match more than one `'/**'` - /\\\/\\\*\\\*(?=\\\/|$)/g, - // Zero, one or several directories - // should not use '*', or it will be replaced by the next replacer - // Check if it is not the last `'/**'` - (_2, index, str2) => index + 6 < str2.length ? "(?:\\/[^\\/]+)*" : "\\/.+" - ], - // normal intermediate wildcards - [ - // Never replace escaped '*' - // ignore rule '\*' will match the path '*' - // 'abc.*/' -> go - // 'abc.*' -> skip this rule, - // coz trailing single wildcard will be handed by [trailing wildcard] - /(^|[^\\]+)(\\\*)+(?=.+)/g, - // '*.js' matches '.js' - // '*.js' doesn't match 'abc' - (_2, p1, p2) => { - const unescaped = p2.replace(/\\\*/g, "[^\\/]*"); - return p1 + unescaped; - } - ], - [ - // unescape, revert step 3 except for back slash - // For example, if a user escape a '\\*', - // after step 3, the result will be '\\\\\\*' - /\\\\\\(?=[$.|*+(){^])/g, - () => ESCAPE - ], - [ - // '\\\\' -> '\\' - /\\\\/g, - () => ESCAPE - ], - [ - // > The range notation, e.g. [a-zA-Z], - // > can be used to match one of the characters in a range. - // `\` is escaped by step 3 - /(\\)?\[([^\]/]*?)(\\*)($|\])/g, - (match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]" - ], - // ending - [ - // 'js' will not match 'js.' - // 'ab' will not match 'abc' - /(?:[^*])$/, - // WTF! - // https://git-scm.com/docs/gitignore - // changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1) - // which re-fixes #24, #38 - // > If there is a separator at the end of the pattern then the pattern - // > will only match directories, otherwise the pattern can match both - // > files and directories. - // 'js*' will not match 'a.js' - // 'js/' will not match 'a.js' - // 'js' will match 'a.js' and 'a.js/' - (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_2, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } - ] - ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; - } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); - }; - var isString = (subject) => typeof subject === "string"; - var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); - var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; - this.pattern = pattern; - this.negative = negative; - this.regex = regex; - } - }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; - let negative = false; - if (pattern.indexOf("!") === 0) { - negative = true; - pattern = pattern.substr(1); - } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); - return new IgnoreRule( - origin, - pattern, - negative, - regex - ); - }; - var throwError2 = (message, Ctor) => { - throw new Ctor(message); - }; - var checkPath = (path2, originalPath, doThrow) => { - if (!isString(path2)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path2) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path2)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; - }; - var isNotRelative = (path2) => REGEX_TEST_INVALID_PATH.test(path2); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define2(this, KEY_IGNORE, true); - this._rules = []; - this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); - } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); - } - _addPattern(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); - this._added = true; - return; - } - if (checkPattern(pattern)) { - const rule = createRule(pattern, this._ignoreCase); - this._added = true; - this._rules.push(rule); - } - } - // @param {Array | string | Ignore} pattern - add(pattern) { - this._added = false; - makeArray( - isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { - this._initCache(); - } - return this; - } - // legacy - addPattern(pattern) { - return this.add(pattern); - } - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - _testOne(path2, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path2); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; - } - // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { - const path2 = originalPath && checkPath.convert(originalPath); - checkPath( - path2, - originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError2 - ); - return this._t(path2, cache, checkUnignored, slices); - } - _t(path2, cache, checkUnignored, slices) { - if (path2 in cache) { - return cache[path2]; - } - if (!slices) { - slices = path2.split(SLASH); - } - slices.pop(); - if (!slices.length) { - return cache[path2] = this._testOne(path2, checkUnignored); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path2] = parent.ignored ? parent : this._testOne(path2, checkUnignored); - } - ignores(path2) { - return this._test(path2, this._ignoreCache, false).ignored; - } - createFilter() { - return (path2) => !this.ignores(path2); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path2) { - return this._test(path2, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - var isPathValid = (path2) => checkPath(path2 && checkPath.convert(path2), path2, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module2.exports = factory; - if ( - // Detect `process` so that it can run in browsers. - typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") - ) { - const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); - checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path2) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path2) || isNotRelative(path2); - } - } -}); - -// node_modules/slash/index.js -var require_slash = __commonJS({ - "node_modules/slash/index.js"(exports2, module2) { - "use strict"; - module2.exports = (path2) => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path2); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path2); - if (isExtendedLengthPath || hasNonAscii) { - return path2; - } - return path2.replace(/\\/g, "/"); - }; - } -}); - -// node_modules/globby/gitignore.js -var require_gitignore = __commonJS({ - "node_modules/globby/gitignore.js"(exports2, module2) { - "use strict"; - var { promisify } = require("util"); - var fs2 = require("fs"); - var path2 = require("path"); - var fastGlob = require_out4(); - var gitIgnore = require_ignore(); - var slash = require_slash(); - var DEFAULT_IGNORE = [ - "**/node_modules/**", - "**/flow-typed/**", - "**/coverage/**", - "**/.git" - ]; - var readFileP = promisify(fs2.readFile); - var mapGitIgnorePatternTo = (base) => (ignore) => { - if (ignore.startsWith("!")) { - return "!" + path2.posix.join(base, ignore.slice(1)); - } - return path2.posix.join(base, ignore); - }; - var parseGitIgnore = (content, options) => { - const base = slash(path2.relative(options.cwd, path2.dirname(options.fileName))); - return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); - }; - var reduceIgnore = (files) => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - return ignores; - }; - var ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path2.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - return path2.join(cwd, p); - }; - var getIsIgnoredPredecate = (ignores, cwd) => { - return (p) => ignores.ignores(slash(path2.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); - }; - var getFile = async (file, cwd) => { - const filePath = path2.join(cwd, file); - const content = await readFileP(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var getFileSync = (file, cwd) => { - const filePath = path2.join(cwd, file); - const content = fs2.readFileSync(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) - } = {}) => { - return { ignore, cwd }; - }; - module2.exports = async (options) => { - options = normalizeOptions(options); - const paths = await fastGlob("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - module2.exports.sync = (options) => { - options = normalizeOptions(options); - const paths = fastGlob.sync("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = paths.map((file) => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - } -}); - -// node_modules/globby/stream-utils.js -var require_stream_utils = __commonJS({ - "node_modules/globby/stream-utils.js"(exports2, module2) { - "use strict"; - var { Transform } = require("stream"); - var ObjectTransform = class extends Transform { - constructor() { - super({ - objectMode: true - }); - } - }; - var FilterStream = class extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - callback(); - } - }; - var UniqueStream = class extends ObjectTransform { - constructor() { - super(); - this._pushed = /* @__PURE__ */ new Set(); - } - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - callback(); - } - }; - module2.exports = { - FilterStream, - UniqueStream - }; - } -}); - -// node_modules/globby/index.js -var require_globby = __commonJS({ - "node_modules/globby/index.js"(exports2, module2) { - "use strict"; - var fs2 = require("fs"); - var arrayUnion = require_array_union(); - var merge2 = require_merge2(); - var fastGlob = require_out4(); - var dirGlob = require_dir_glob(); - var gitignore = require_gitignore(); - var { FilterStream, UniqueStream } = require_stream_utils(); - var DEFAULT_FILTER = () => false; - var isNegative = (pattern) => pattern[0] === "!"; - var assertPatternsInput = (patterns) => { - if (!patterns.every((pattern) => typeof pattern === "string")) { - throw new TypeError("Patterns must be a string or an array of strings"); - } - }; - var checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - let stat; - try { - stat = fs2.statSync(options.cwd); - } catch { - return; - } - if (!stat.isDirectory()) { - throw new Error("The `cwd` option must be a path to a directory"); - } - }; - var getPathString = (p) => p.stats instanceof fs2.Stats ? p.path : p; - var generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - const globTasks = []; - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - for (const [index, pattern] of patterns.entries()) { - if (isNegative(pattern)) { - continue; - } - const ignore = patterns.slice(index).filter((pattern2) => isNegative(pattern2)).map((pattern2) => pattern2.slice(1)); - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - globTasks.push({ pattern, options }); - } - return globTasks; - }; - var globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === "object") { - options = { - ...options, - ...task.options.expandDirectories - }; - } - return fn(task.pattern, options); - }; - var getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - var getFilterSync = (options) => { - return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - var globToTask = (task) => (glob2) => { - const { options } = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - return { - pattern: glob2, - options - }; - }; - module2.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const getFilter = async () => { - return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - const getTasks = async () => { - const tasks2 = await Promise.all(globTasks.map(async (task) => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - return arrayUnion(...tasks2); - }; - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); - return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); - }; - module2.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - return matches.filter((path_) => !filter(path_)); - }; - module2.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - const filterStream = new FilterStream((p) => !filter(p)); - const uniqueStream = new UniqueStream(); - return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); - }; - module2.exports.generateGlobTasks = generateGlobTasks; - module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); - module2.exports.gitignore = gitignore; - } -}); - -// node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - "node_modules/graceful-fs/polyfills.js"(exports2, module2) { - var constants = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs2) { - if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs2); - } - if (!fs2.lutimes) { - patchLutimes(fs2); - } - fs2.chown = chownFix(fs2.chown); - fs2.fchown = chownFix(fs2.fchown); - fs2.lchown = chownFix(fs2.lchown); - fs2.chmod = chmodFix(fs2.chmod); - fs2.fchmod = chmodFix(fs2.fchmod); - fs2.lchmod = chmodFix(fs2.lchmod); - fs2.chownSync = chownFixSync(fs2.chownSync); - fs2.fchownSync = chownFixSync(fs2.fchownSync); - fs2.lchownSync = chownFixSync(fs2.lchownSync); - fs2.chmodSync = chmodFixSync(fs2.chmodSync); - fs2.fchmodSync = chmodFixSync(fs2.fchmodSync); - fs2.lchmodSync = chmodFixSync(fs2.lchmodSync); - fs2.stat = statFix(fs2.stat); - fs2.fstat = statFix(fs2.fstat); - fs2.lstat = statFix(fs2.lstat); - fs2.statSync = statFixSync(fs2.statSync); - fs2.fstatSync = statFixSync(fs2.fstatSync); - fs2.lstatSync = statFixSync(fs2.lstatSync); - if (fs2.chmod && !fs2.lchmod) { - fs2.lchmod = function(path2, mode, cb) { - if (cb) process.nextTick(cb); - }; - fs2.lchmodSync = function() { - }; - } - if (fs2.chown && !fs2.lchown) { - fs2.lchown = function(path2, uid, gid, cb) { - if (cb) process.nextTick(cb); - }; - fs2.lchownSync = function() { - }; - } - if (platform === "win32") { - fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : (function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { - setTimeout(function() { - fs2.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er); - }); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); - return rename; - })(fs2.rename); - } - fs2.read = typeof fs2.read !== "function" ? fs2.read : (function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _2, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs2, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs2, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); - return read; - })(fs2.read); - fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : /* @__PURE__ */ (function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs2, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - })(fs2.readSync); - function patchLchmod(fs3) { - fs3.lchmod = function(path2, mode, callback) { - fs3.open( - path2, - constants.O_WRONLY | constants.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) callback(err); - return; - } - fs3.fchmod(fd, mode, function(err2) { - fs3.close(fd, function(err22) { - if (callback) callback(err2 || err22); - }); - }); - } - ); - }; - fs3.lchmodSync = function(path2, mode) { - var fd = fs3.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs3.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs3.closeSync(fd); - } catch (er) { - } - } else { - fs3.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs3) { - if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) { - fs3.lutimes = function(path2, at, mt, cb) { - fs3.open(path2, constants.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) cb(er); - return; - } - fs3.futimes(fd, at, mt, function(er2) { - fs3.close(fd, function(er22) { - if (cb) cb(er2 || er22); - }); - }); - }); - }; - fs3.lutimesSync = function(path2, at, mt) { - var fd = fs3.openSync(path2, constants.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs3.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs3.closeSync(fd); - } catch (er) { - } - } else { - fs3.closeSync(fd); - } - } - return ret; - }; - } else if (fs3.futimes) { - fs3.lutimes = function(_a, _b, _c, cb) { - if (cb) process.nextTick(cb); - }; - fs3.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) return orig; - return function(target, mode, cb) { - return orig.call(fs2, target, mode, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) return orig; - return function(target, mode) { - try { - return orig.call(fs2, target, mode); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function chownFix(orig) { - if (!orig) return orig; - return function(target, uid, gid, cb) { - return orig.call(fs2, target, uid, gid, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) return orig; - return function(target, uid, gid) { - try { - return orig.call(fs2, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function statFix(orig) { - if (!orig) return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - if (cb) cb.apply(this, arguments); - } - return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) return orig; - return function(target, options) { - var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target); - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { - var Stream = require("stream").Stream; - module2.exports = legacy; - function legacy(fs2) { - return { - ReadStream, - WriteStream - }; - function ReadStream(path2, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path2, options); - Stream.call(this); - var self2 = this; - this.path = path2; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self2._read(); - }); - return; - } - fs2.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self2.emit("error", err); - self2.readable = false; - return; - } - self2.fd = fd; - self2.emit("open", fd); - self2._read(); - }); - } - function WriteStream(path2, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path2, options); - Stream.call(this); - this.path = path2; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs2.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - "node_modules/graceful-fs/clone.js"(exports2, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs2 = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop() { - } - function publishQueue(context2, queue2) { - Object.defineProperty(context2, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug2 = noop; - if (util.debuglog) - debug2 = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug2 = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs2[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs2, queue); - fs2.close = (function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs2, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - })(fs2.close); - fs2.closeSync = (function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs2, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - })(fs2.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug2(fs2[gracefulQueue]); - require("assert").equal(fs2[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs2[gracefulQueue]); - } - module2.exports = patch(clone(fs2)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) { - module2.exports = patch(fs2); - fs2.__patched = true; - } - function patch(fs3) { - polyfills(fs3); - fs3.gracefulify = patch; - fs3.createReadStream = createReadStream; - fs3.createWriteStream = createWriteStream2; - var fs$readFile = fs3.readFile; - fs3.readFile = readFile; - function readFile(path2, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path2, options, cb); - function go$readFile(path3, options2, cb2, startTime) { - return fs$readFile(path3, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs3.writeFile; - fs3.writeFile = writeFile; - function writeFile(path2, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path2, data, options, cb); - function go$writeFile(path3, data2, options2, cb2, startTime) { - return fs$writeFile(path3, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs3.appendFile; - if (fs$appendFile) - fs3.appendFile = appendFile; - function appendFile(path2, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path2, data, options, cb); - function go$appendFile(path3, data2, options2, cb2, startTime) { - return fs$appendFile(path3, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs3.copyFile; - if (fs$copyFile) - fs3.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs3.readdir; - fs3.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path2, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options2, cb2, startTime) { - return fs$readdir(path3, fs$readdirCallback( - path3, - options2, - cb2, - startTime - )); - } : function go$readdir2(path3, options2, cb2, startTime) { - return fs$readdir(path3, options2, fs$readdirCallback( - path3, - options2, - cb2, - startTime - )); - }; - return go$readdir(path2, options, cb); - function fs$readdirCallback(path3, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path3, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs3); - ReadStream = legStreams.ReadStream; - WriteStream = legStreams.WriteStream; - } - var fs$ReadStream = fs3.ReadStream; - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype); - ReadStream.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs3.WriteStream; - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype); - WriteStream.prototype.open = WriteStream$open; - } - Object.defineProperty(fs3, "ReadStream", { - get: function() { - return ReadStream; - }, - set: function(val2) { - ReadStream = val2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs3, "WriteStream", { - get: function() { - return WriteStream; - }, - set: function(val2) { - WriteStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream; - Object.defineProperty(fs3, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val2) { - FileReadStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream; - Object.defineProperty(fs3, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val2) { - FileWriteStream = val2; - }, - enumerable: true, - configurable: true - }); - function ReadStream(path2, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream(path2, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream(path2, options) { - return new fs3.ReadStream(path2, options); - } - function createWriteStream2(path2, options) { - return new fs3.WriteStream(path2, options); - } - var fs$open = fs3.open; - fs3.open = open; - function open(path2, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path2, flags, mode, cb); - function go$open(path3, flags2, mode2, cb2, startTime) { - return fs$open(path3, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs3; - } - function enqueue(elem) { - debug2("ENQUEUE", elem[0].name, elem[1]); - fs2[gracefulQueue].push(elem); - retry3(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs2[gracefulQueue].length; ++i) { - if (fs2[gracefulQueue][i].length > 2) { - fs2[gracefulQueue][i][3] = now; - fs2[gracefulQueue][i][4] = now; - } - } - retry3(); - } - function retry3() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs2[gracefulQueue].length === 0) - return; - var elem = fs2[gracefulQueue].shift(); - var fn = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug2("RETRY", fn.name, args); - fn.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug2("TIMEOUT", fn.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug2("RETRY", fn.name, args); - fn.apply(null, args.concat([startTime])); - } else { - fs2[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry3, 0); - } - } - } -}); - -// node_modules/is-path-cwd/index.js -var require_is_path_cwd = __commonJS({ - "node_modules/is-path-cwd/index.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - module2.exports = (path_) => { - let cwd = process.cwd(); - path_ = path2.resolve(path_); - if (process.platform === "win32") { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - return path_ === cwd; - }; - } -}); - -// node_modules/is-path-inside/index.js -var require_is_path_inside = __commonJS({ - "node_modules/is-path-inside/index.js"(exports2, module2) { - "use strict"; - var path2 = require("path"); - module2.exports = (childPath, parentPath) => { - const relation = path2.relative(parentPath, childPath); - return Boolean( - relation && relation !== ".." && !relation.startsWith(`..${path2.sep}`) && relation !== path2.resolve(childPath) - ); - }; - } -}); - -// node_modules/fs.realpath/old.js -var require_old = __commonJS({ - "node_modules/fs.realpath/old.js"(exports2) { - var pathModule = require("path"); - var isWindows = process.platform === "win32"; - var fs2 = require("fs"); - var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - function rethrow() { - var callback; - if (DEBUG) { - var backtrace = new Error(); - callback = debugCallback; - } else - callback = missingCallback; - return callback; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; - else if (!process.noDeprecation) { - var msg = "fs: missing callback " + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } - } - function maybeCallback(cb) { - return typeof cb === "function" ? cb : rethrow(); - } - var normalize2 = pathModule.normalize; - if (isWindows) { - nextPartRe = /(.*?)(?:[\/\\]+|$)/g; - } else { - nextPartRe = /(.*?)(?:[\/]+|$)/g; - } - var nextPartRe; - if (isWindows) { - splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; - } else { - splitRootRe = /^[\/]*/; - } - var splitRootRe; - exports2.realpathSync = function realpathSync(p, cache) { - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs2.lstatSync(base); - knownHard[base] = true; - } - } - while (pos < p.length) { - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - continue; - } - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - resolvedLink = cache[base]; - } else { - var stat = fs2.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs2.statSync(base); - linkTarget = fs2.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - if (cache) cache[original] = p; - return p; - }; - exports2.realpath = function realpath(p, cache, cb) { - if (typeof cb !== "function") { - cb = maybeCallback(cache); - cache = null; - } - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs2.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - function LOOP() { - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - return process.nextTick(LOOP); - } - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - return gotResolvedLink(cache[base]); - } - return fs2.lstat(base, gotStat); - } - function gotStat(err, stat) { - if (err) return cb(err); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs2.stat(base, function(err2) { - if (err2) return cb(err2); - fs2.readlink(base, function(err3, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err3, target); - }); - }); - } - function gotTarget(err, target, base2) { - if (err) return cb(err); - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base2] = resolvedLink; - gotResolvedLink(resolvedLink); - } - function gotResolvedLink(resolvedLink) { - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - }; - } -}); - -// node_modules/fs.realpath/index.js -var require_fs5 = __commonJS({ - "node_modules/fs.realpath/index.js"(exports2, module2) { - module2.exports = realpath; - realpath.realpath = realpath; - realpath.sync = realpathSync; - realpath.realpathSync = realpathSync; - realpath.monkeypatch = monkeypatch; - realpath.unmonkeypatch = unmonkeypatch; - var fs2 = require("fs"); - var origRealpath = fs2.realpath; - var origRealpathSync = fs2.realpathSync; - var version = process.version; - var ok = /^v[0-5]\./.test(version); - var old = require_old(); - function newError(er) { - return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); - } - function realpath(p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb); - } - if (typeof cache === "function") { - cb = cache; - cache = null; - } - origRealpath(p, cache, function(er, result) { - if (newError(er)) { - old.realpath(p, cache, cb); - } else { - cb(er, result); - } - }); - } - function realpathSync(p, cache) { - if (ok) { - return origRealpathSync(p, cache); - } - try { - return origRealpathSync(p, cache); - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache); - } else { - throw er; - } - } - } - function monkeypatch() { - fs2.realpath = realpath; - fs2.realpathSync = realpathSync; - } - function unmonkeypatch() { - fs2.realpath = origRealpath; - fs2.realpathSync = origRealpathSync; - } - } -}); - -// node_modules/concat-map/index.js -var require_concat_map = __commonJS({ - "node_modules/concat-map/index.js"(exports2, module2) { - module2.exports = function(xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - } -}); - -// node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ - "node_modules/balanced-match/index.js"(exports2, module2) { - "use strict"; - module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r = range(a, b, str2); - return r && { - start: r[0], - end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + a.length, r[1]), - post: str2.slice(r[1] + b.length) - }; - } - function maybeMatch(reg, str2) { - var m = str2.match(reg); - return m ? m[0] : null; - } - balanced.range = range; - function range(a, b, str2) { - var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); - var i = ai; - if (ai >= 0 && bi > 0) { - begs = []; - left = str2.length; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str2.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - bi = str2.indexOf(b, i + 1); - } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length) { - result = [left, right]; - } - } - return result; - } - } -}); - -// node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ - "node_modules/brace-expansion/index.js"(exports2, module2) { - var concatMap = require_concat_map(); - var balanced = require_balanced_match(); - module2.exports = expandTop; - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) - return [""]; - var parts = []; - var m = balanced("{", "}", str2); - if (!m) - return str2.split(","); - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; - } - function expandTop(str2) { - if (!str2) - return []; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); - } - return expand(escapeBraces(str2), true).map(unescapeBraces); - } - function embrace(str2) { - return "{" + str2 + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte5(i, y) { - return i >= y; - } - function expand(str2, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2); - } - return [str2]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand(m.post, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte5; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { - return expand(el, false); - }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - return expansions; - } - } -}); - -// node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ - "node_modules/minimatch/minimatch.js"(exports2, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path2 = (function() { - try { - return require("path"); - } catch (e) { - } - })() || { - sep: "/" - }; - minimatch.sep = path2.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand = require_brace_expansion(); - var plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" } - }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set2, c) { - set2[c] = true; - return set2; - }, {}); - } - var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { - options = options || {}; - return function(p, i, list) { - return minimatch(p, pattern, options); - }; - } - function ext(a, b) { - b = b || {}; - var t = {}; - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; - } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); - }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); - }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); - }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); - }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); - }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); - }; - m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); - }; - return m; - }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); - if (!options) options = {}; - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); - } - assertValidPattern(pattern); - if (!options) options = {}; - pattern = pattern.trim(); - if (!options.allowWindowsEscape && path2.sep !== "/") { - pattern = pattern.split(path2.sep).join("/"); - } - this.options = options; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.make(); - } - Minimatch.prototype.debug = function() { - }; - Minimatch.prototype.make = make; - function make() { - var pattern = this.pattern; - var options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); - if (options.debug) this.debug = function debug2() { - console.error.apply(console, arguments); - }; - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { - return s.split(slashSplit); - }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { - return s.map(this.parse, this); - }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { - return s.indexOf(false) === -1; - }); - this.debug(this.pattern, set2); - this.set = set2; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate = false; - var options = this.options; - var negateOffset = 0; - if (options.nonegate) return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate = !negate; - negateOffset++; - } - if (negateOffset) this.pattern = pattern.substr(negateOffset); - this.negate = negate; - } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return expand(pattern); - } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); - } - }; - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - assertValidPattern(pattern); - var options = this.options; - if (pattern === "**") { - if (!options.noglobstar) - return GLOBSTAR; - else - pattern = "*"; - } - if (pattern === "") return ""; - var re = ""; - var hasMagic = !!options.nocase; - var escaping = false; - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self2 = this; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; - } - self2.debug("clearStateChar %j %j", stateChar, re); - stateChar = false; - } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; - } - switch (c) { - /* istanbul ignore next */ - case "/": { - return false; - } - case "\\": - clearStateChar(); - escaping = true; - continue; - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); - if (inClass) { - this.debug(" in class"); - if (c === "!" && i === classStart + 1) c = "^"; - re += c; - continue; - } - self2.debug("call clearStateChar %j", stateChar); - clearStateChar(); - stateChar = c; - if (options.noext) clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re); - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - re += pl.close; - if (pl.type === "!") { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - clearStateChar(); - re += "|"; - continue; - // these are mostly the same in regexp and glob - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - var cs = pattern.substring(classStart + 1, i); - try { - RegExp("[" + cs + "]"); - } catch (er) { - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; - } - } - if (inClass) { - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re, pl); - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_2, $1, $2) { - if (!$2) { - $2 = "\\"; - } - return $1 + $1 + $2 + "|"; - }); - this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case "[": - case ".": - case "(": - addPatternStart = true; - } - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - nlLast += nlAfter; - var openParensBefore = nlBefore.split("(").length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); - } - nlAfter = cleanAfter; - var dollar = ""; - if (nlAfter === "" && isSub !== SUBPARSE) { - dollar = "$"; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - if (re !== "" && hasMagic) { - re = "(?=.)" + re; - } - if (addPatternStart) { - re = patternStart + re; - } - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options.nocase ? "i" : ""; - try { - var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); - } - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) re = "^(?!" + re + ").*$"; - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - minimatch.match = function(list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function(f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = function match(f, partial) { - if (typeof partial === "undefined") partial = this.partial; - this.debug("match", f, this.pattern); - if (this.comment) return false; - if (this.empty) return f === ""; - if (f === "/" && partial) return true; - var options = this.options; - if (path2.sep !== "/") { - f = f.split(path2.sep).join("/"); - } - f = f.split(slashSplit); - this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) break; - } - for (i = 0; i < set2.length; i++) { - var pattern = set2[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) return true; - return !this.negate; - } - } - if (options.flipNegate) return false; - return this.negate; - }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options = this.options; - this.debug( - "matchOne", - { "this": this, file, pattern } - ); - this.debug("matchOne", file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug("matchOne loop"); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - if (p === false) return false; - if (p === GLOBSTAR) { - this.debug("GLOBSTAR", [pattern, p, f]); - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; - } - return true; - } - while (fr < fl) { - var swallowee = file[fr]; - this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { - this.debug("dot detected!", file, fr, pattern, pr); - break; - } - this.debug("globstar swallow a segment, and continue"); - fr++; - } - } - if (partial) { - this.debug("\n>>> no match, partial?", file, fr, pattern, pr); - if (fr === fl) return true; - } - return false; - } - var hit; - if (typeof p === "string") { - hit = f === p; - this.debug("string match", p, f, hit); - } else { - hit = f.match(p); - this.debug("pattern match", p, f, hit); - } - if (!hit) return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - return fi === fl - 1 && file[fi] === ""; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/inherits/inherits_browser.js -var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports2, module2) { - if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; - } - } -}); - -// node_modules/inherits/inherits.js -var require_inherits = __commonJS({ - "node_modules/inherits/inherits.js"(exports2, module2) { - try { - util = require("util"); - if (typeof util.inherits !== "function") throw ""; - module2.exports = util.inherits; - } catch (e) { - module2.exports = require_inherits_browser(); - } - var util; - } -}); - -// node_modules/path-is-absolute/index.js -var require_path_is_absolute = __commonJS({ - "node_modules/path-is-absolute/index.js"(exports2, module2) { - "use strict"; - function posix(path2) { - return path2.charAt(0) === "/"; - } - function win32(path2) { - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path2); - var device = result[1] || ""; - var isUnc = Boolean(device && device.charAt(1) !== ":"); - return Boolean(result[2] || isUnc); - } - module2.exports = process.platform === "win32" ? win32 : posix; - module2.exports.posix = posix; - module2.exports.win32 = win32; - } -}); - -// node_modules/rimraf/node_modules/glob/common.js -var require_common3 = __commonJS({ - "node_modules/rimraf/node_modules/glob/common.js"(exports2) { - exports2.setopts = setopts; - exports2.ownProp = ownProp; - exports2.makeAbs = makeAbs; - exports2.finish = finish; - exports2.mark = mark; - exports2.isIgnored = isIgnored; - exports2.childrenIgnored = childrenIgnored; - function ownProp(obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field); - } - var fs2 = require("fs"); - var path2 = require("path"); - var minimatch = require_minimatch(); - var isAbsolute = require_path_is_absolute(); - var Minimatch = minimatch.Minimatch; - function alphasort(a, b) { - return a.localeCompare(b, "en"); - } - function setupIgnores(self2, options) { - self2.ignore = options.ignore || []; - if (!Array.isArray(self2.ignore)) - self2.ignore = [self2.ignore]; - if (self2.ignore.length) { - self2.ignore = self2.ignore.map(ignoreMap); - } - } - function ignoreMap(pattern) { - var gmatcher = null; - if (pattern.slice(-3) === "/**") { - var gpattern = pattern.replace(/(\/\*\*)+$/, ""); - gmatcher = new Minimatch(gpattern, { dot: true }); - } - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher - }; - } - function setopts(self2, pattern, options) { - if (!options) - options = {}; - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar"); - } - pattern = "**/" + pattern; - } - self2.silent = !!options.silent; - self2.pattern = pattern; - self2.strict = options.strict !== false; - self2.realpath = !!options.realpath; - self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); - self2.follow = !!options.follow; - self2.dot = !!options.dot; - self2.mark = !!options.mark; - self2.nodir = !!options.nodir; - if (self2.nodir) - self2.mark = true; - self2.sync = !!options.sync; - self2.nounique = !!options.nounique; - self2.nonull = !!options.nonull; - self2.nosort = !!options.nosort; - self2.nocase = !!options.nocase; - self2.stat = !!options.stat; - self2.noprocess = !!options.noprocess; - self2.absolute = !!options.absolute; - self2.fs = options.fs || fs2; - self2.maxLength = options.maxLength || Infinity; - self2.cache = options.cache || /* @__PURE__ */ Object.create(null); - self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); - self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); - setupIgnores(self2, options); - self2.changedCwd = false; - var cwd = process.cwd(); - if (!ownProp(options, "cwd")) - self2.cwd = cwd; - else { - self2.cwd = path2.resolve(options.cwd); - self2.changedCwd = self2.cwd !== cwd; - } - self2.root = options.root || path2.resolve(self2.cwd, "/"); - self2.root = path2.resolve(self2.root); - if (process.platform === "win32") - self2.root = self2.root.replace(/\\/g, "/"); - self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); - if (process.platform === "win32") - self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); - self2.nomount = !!options.nomount; - options.nonegate = true; - options.nocomment = true; - self2.minimatch = new Minimatch(pattern, options); - self2.options = self2.minimatch.options; - } - function finish(self2) { - var nou = self2.nounique; - var all = nou ? [] : /* @__PURE__ */ Object.create(null); - for (var i = 0, l = self2.matches.length; i < l; i++) { - var matches = self2.matches[i]; - if (!matches || Object.keys(matches).length === 0) { - if (self2.nonull) { - var literal = self2.minimatch.globSet[i]; - if (nou) - all.push(literal); - else - all[literal] = true; - } - } else { - var m = Object.keys(matches); - if (nou) - all.push.apply(all, m); - else - m.forEach(function(m2) { - all[m2] = true; - }); - } - } - if (!nou) - all = Object.keys(all); - if (!self2.nosort) - all = all.sort(alphasort); - if (self2.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self2._mark(all[i]); - } - if (self2.nodir) { - all = all.filter(function(e) { - var notDir = !/\/$/.test(e); - var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; - if (notDir && c) - notDir = c !== "DIR" && !Array.isArray(c); - return notDir; - }); - } - } - if (self2.ignore.length) - all = all.filter(function(m2) { - return !isIgnored(self2, m2); - }); - self2.found = all; - } - function mark(self2, p) { - var abs = makeAbs(self2, p); - var c = self2.cache[abs]; - var m = p; - if (c) { - var isDir = c === "DIR" || Array.isArray(c); - var slash = p.slice(-1) === "/"; - if (isDir && !slash) - m += "/"; - else if (!isDir && slash) - m = m.slice(0, -1); - if (m !== p) { - var mabs = makeAbs(self2, m); - self2.statCache[mabs] = self2.statCache[abs]; - self2.cache[mabs] = self2.cache[abs]; - } - } - return m; - } - function makeAbs(self2, f) { - var abs = f; - if (f.charAt(0) === "/") { - abs = path2.join(self2.root, f); - } else if (isAbsolute(f) || f === "") { - abs = f; - } else if (self2.changedCwd) { - abs = path2.resolve(self2.cwd, f); - } else { - abs = path2.resolve(f); - } - if (process.platform === "win32") - abs = abs.replace(/\\/g, "/"); - return abs; - } - function isIgnored(self2, path3) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return item.matcher.match(path3) || !!(item.gmatcher && item.gmatcher.match(path3)); - }); - } - function childrenIgnored(self2, path3) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path3)); - }); - } - } -}); - -// node_modules/rimraf/node_modules/glob/sync.js -var require_sync7 = __commonJS({ - "node_modules/rimraf/node_modules/glob/sync.js"(exports2, module2) { - module2.exports = globSync; - globSync.GlobSync = GlobSync; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var Glob = require_glob().Glob; - var util = require("util"); - var path2 = require("path"); - var assert = require("assert"); - var isAbsolute = require_path_is_absolute(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - function globSync(pattern, options) { - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - return new GlobSync(pattern, options).found; - } - function GlobSync(pattern, options) { - if (!pattern) - throw new Error("must provide pattern"); - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options); - setopts(this, pattern, options); - if (this.noprocess) - return this; - var n = this.minimatch.set.length; - this.matches = new Array(n); - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false); - } - this._finish(); - } - GlobSync.prototype._finish = function() { - assert(this instanceof GlobSync); - if (this.realpath) { - var self2 = this; - this.matches.forEach(function(matchset, index) { - var set2 = self2.matches[index] = /* @__PURE__ */ Object.create(null); - for (var p in matchset) { - try { - p = self2._makeAbs(p); - var real = rp.realpathSync(p, self2.realpathCache); - set2[real] = true; - } catch (er) { - if (er.syscall === "stat") - set2[self2._makeAbs(p)] = true; - else - throw er; - } - } - }); - } - common2.finish(this); - }; - GlobSync.prototype._process = function(pattern, index, inGlobStar) { - assert(this instanceof GlobSync); - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { - if (!prefix || !isAbsolute(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return; - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar); - }; - GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path2.join(this.root, e); - } - this._emitMatch(index, e); - } - return; - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) - newPattern = [prefix, e]; - else - newPattern = [e]; - this._process(newPattern.concat(remain), index, inGlobStar); - } - }; - GlobSync.prototype._emitMatch = function(index, e) { - if (isIgnored(this, e)) - return; - var abs = this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) { - e = abs; - } - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - if (this.stat) - this._stat(e); - }; - GlobSync.prototype._readdirInGlobStar = function(abs) { - if (this.follow) - return this._readdir(abs, false); - var entries; - var lstat; - var stat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er.code === "ENOENT") { - return null; - } - } - var isSym = lstat && lstat.isSymbolicLink(); - this.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = "FILE"; - else - entries = this._readdir(abs, false); - return entries; - }; - GlobSync.prototype._readdir = function(abs, inGlobStar) { - var entries; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return null; - if (Array.isArray(c)) - return c; - } - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)); - } catch (er) { - this._readdirError(abs, er); - return null; - } - }; - GlobSync.prototype._readdirEntries = function(abs, entries) { - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return entries; - }; - GlobSync.prototype._readdirError = function(f, er) { - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - throw error2; - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) - throw er; - if (!this.silent) - console.error("glob error", er); - break; - } - }; - GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false); - var len = entries.length; - var isSym = this.symlinks[abs]; - if (isSym && inGlobStar) - return; - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true); - } - }; - GlobSync.prototype._processSimple = function(prefix, index) { - var exists = this._stat(prefix); - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return; - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path2.join(this.root, prefix); - } else { - prefix = path2.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - }; - GlobSync.prototype._stat = function(f) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return false; - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return c; - if (needDir && c === "FILE") - return false; - } - var exists; - var stat = this.statCache[abs]; - if (!stat) { - var lstat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return false; - } - } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs); - } catch (er) { - stat = lstat; - } - } else { - stat = lstat; - } - } - this.statCache[abs] = stat; - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return false; - return c; - }; - GlobSync.prototype._mark = function(p) { - return common2.mark(this, p); - }; - GlobSync.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - } -}); - -// node_modules/inflight/inflight.js -var require_inflight = __commonJS({ - "node_modules/inflight/inflight.js"(exports2, module2) { - var wrappy = require_wrappy(); - var reqs = /* @__PURE__ */ Object.create(null); - var once = require_once(); - module2.exports = wrappy(inflight); - function inflight(key, cb) { - if (reqs[key]) { - reqs[key].push(cb); - return null; - } else { - reqs[key] = [cb]; - return makeres(key); - } - } - function makeres(key) { - return once(function RES() { - var cbs = reqs[key]; - var len = cbs.length; - var args = slice(arguments); - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args); - } - } finally { - if (cbs.length > len) { - cbs.splice(0, len); - process.nextTick(function() { - RES.apply(null, args); - }); - } else { - delete reqs[key]; - } - } - }); - } - function slice(args) { - var length = args.length; - var array = []; - for (var i = 0; i < length; i++) array[i] = args[i]; - return array; - } - } -}); - -// node_modules/rimraf/node_modules/glob/glob.js -var require_glob = __commonJS({ - "node_modules/rimraf/node_modules/glob/glob.js"(exports2, module2) { - module2.exports = glob2; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var inherits = require_inherits(); - var EE = require("events").EventEmitter; - var path2 = require("path"); - var assert = require("assert"); - var isAbsolute = require_path_is_absolute(); - var globSync = require_sync7(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var inflight = require_inflight(); - var util = require("util"); - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - var once = require_once(); - function glob2(pattern, options, cb) { - if (typeof options === "function") cb = options, options = {}; - if (!options) options = {}; - if (options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return globSync(pattern, options); - } - return new Glob(pattern, options, cb); - } - glob2.sync = globSync; - var GlobSync = glob2.GlobSync = globSync.GlobSync; - glob2.glob = glob2; - function extend3(origin, add) { - if (add === null || typeof add !== "object") { - return origin; - } - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; - } - glob2.hasMagic = function(pattern, options_) { - var options = extend3({}, options_); - options.noprocess = true; - var g = new Glob(pattern, options); - var set2 = g.minimatch.set; - if (!pattern) - return false; - if (set2.length > 1) - return true; - for (var j = 0; j < set2[0].length; j++) { - if (typeof set2[0][j] !== "string") - return true; - } - return false; - }; - glob2.Glob = Glob; - inherits(Glob, EE); - function Glob(pattern, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - if (options && options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return new GlobSync(pattern, options); - } - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb); - setopts(this, pattern, options); - this._didRealPath = false; - var n = this.minimatch.set.length; - this.matches = new Array(n); - if (typeof cb === "function") { - cb = once(cb); - this.on("error", cb); - this.on("end", function(matches) { - cb(null, matches); - }); - } - var self2 = this; - this._processing = 0; - this._emitQueue = []; - this._processQueue = []; - this.paused = false; - if (this.noprocess) - return this; - if (n === 0) - return done(); - var sync = true; - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false, done); - } - sync = false; - function done() { - --self2._processing; - if (self2._processing <= 0) { - if (sync) { - process.nextTick(function() { - self2._finish(); - }); - } else { - self2._finish(); - } - } - } - } - Glob.prototype._finish = function() { - assert(this instanceof Glob); - if (this.aborted) - return; - if (this.realpath && !this._didRealpath) - return this._realpath(); - common2.finish(this); - this.emit("end", this.found); - }; - Glob.prototype._realpath = function() { - if (this._didRealpath) - return; - this._didRealpath = true; - var n = this.matches.length; - if (n === 0) - return this._finish(); - var self2 = this; - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next); - function next() { - if (--n === 0) - self2._finish(); - } - }; - Glob.prototype._realpathSet = function(index, cb) { - var matchset = this.matches[index]; - if (!matchset) - return cb(); - var found = Object.keys(matchset); - var self2 = this; - var n = found.length; - if (n === 0) - return cb(); - var set2 = this.matches[index] = /* @__PURE__ */ Object.create(null); - found.forEach(function(p, i) { - p = self2._makeAbs(p); - rp.realpath(p, self2.realpathCache, function(er, real) { - if (!er) - set2[real] = true; - else if (er.syscall === "stat") - set2[p] = true; - else - self2.emit("error", er); - if (--n === 0) { - self2.matches[index] = set2; - cb(); - } - }); - }); - }; - Glob.prototype._mark = function(p) { - return common2.mark(this, p); - }; - Glob.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - Glob.prototype.abort = function() { - this.aborted = true; - this.emit("abort"); - }; - Glob.prototype.pause = function() { - if (!this.paused) { - this.paused = true; - this.emit("pause"); - } - }; - Glob.prototype.resume = function() { - if (this.paused) { - this.emit("resume"); - this.paused = false; - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0); - this._emitQueue.length = 0; - for (var i = 0; i < eq.length; i++) { - var e = eq[i]; - this._emitMatch(e[0], e[1]); - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0); - this._processQueue.length = 0; - for (var i = 0; i < pq.length; i++) { - var p = pq[i]; - this._processing--; - this._process(p[0], p[1], p[2], p[3]); - } - } - } - }; - Glob.prototype._process = function(pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === "function"); - if (this.aborted) - return; - this._processing++; - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]); - return; - } - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index, cb); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { - if (!prefix || !isAbsolute(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return cb(); - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); - }; - Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var pn = remain[0]; - var negate = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return cb(); - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path2.join(this.root, e); - } - this._emitMatch(index, e); - } - return cb(); - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - this._process([e].concat(remain), index, inGlobStar, cb); - } - cb(); - }; - Glob.prototype._emitMatch = function(index, e) { - if (this.aborted) - return; - if (isIgnored(this, e)) - return; - if (this.paused) { - this._emitQueue.push([index, e]); - return; - } - var abs = isAbsolute(e) ? e : this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) - e = abs; - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - var st = this.statCache[abs]; - if (st) - this.emit("stat", e, st); - this.emit("match", e); - }; - Glob.prototype._readdirInGlobStar = function(abs, cb) { - if (this.aborted) - return; - if (this.follow) - return this._readdir(abs, false, cb); - var lstatkey = "lstat\0" + abs; - var self2 = this; - var lstatcb = inflight(lstatkey, lstatcb_); - if (lstatcb) - self2.fs.lstat(abs, lstatcb); - function lstatcb_(er, lstat) { - if (er && er.code === "ENOENT") - return cb(); - var isSym = lstat && lstat.isSymbolicLink(); - self2.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) { - self2.cache[abs] = "FILE"; - cb(); - } else - self2._readdir(abs, false, cb); - } - }; - Glob.prototype._readdir = function(abs, inGlobStar, cb) { - if (this.aborted) - return; - cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); - if (!cb) - return; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return cb(); - if (Array.isArray(c)) - return cb(null, c); - } - var self2 = this; - self2.fs.readdir(abs, readdirCb(this, abs, cb)); - }; - function readdirCb(self2, abs, cb) { - return function(er, entries) { - if (er) - self2._readdirError(abs, er, cb); - else - self2._readdirEntries(abs, entries, cb); - }; - } - Glob.prototype._readdirEntries = function(abs, entries, cb) { - if (this.aborted) - return; - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return cb(null, entries); - }; - Glob.prototype._readdirError = function(f, er, cb) { - if (this.aborted) - return; - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - this.emit("error", error2); - this.abort(); - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) { - this.emit("error", er); - this.abort(); - } - if (!this.silent) - console.error("glob error", er); - break; - } - return cb(); - }; - Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false, cb); - var isSym = this.symlinks[abs]; - var len = entries.length; - if (isSym && inGlobStar) - return cb(); - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true, cb); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true, cb); - } - cb(); - }; - Glob.prototype._processSimple = function(prefix, index, cb) { - var self2 = this; - this._stat(prefix, function(er, exists) { - self2._processSimple2(prefix, index, er, exists, cb); - }); - }; - Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return cb(); - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path2.join(this.root, prefix); - } else { - prefix = path2.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - cb(); - }; - Glob.prototype._stat = function(f, cb) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return cb(); - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return cb(null, c); - if (needDir && c === "FILE") - return cb(); - } - var exists; - var stat = this.statCache[abs]; - if (stat !== void 0) { - if (stat === false) - return cb(null, stat); - else { - var type2 = stat.isDirectory() ? "DIR" : "FILE"; - if (needDir && type2 === "FILE") - return cb(); - else - return cb(null, type2, stat); - } - } - var self2 = this; - var statcb = inflight("stat\0" + abs, lstatcb_); - if (statcb) - self2.fs.lstat(abs, statcb); - function lstatcb_(er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - return self2.fs.stat(abs, function(er2, stat2) { - if (er2) - self2._stat2(f, abs, null, lstat, cb); - else - self2._stat2(f, abs, er2, stat2, cb); - }); - } else { - self2._stat2(f, abs, er, lstat, cb); - } - } - }; - Glob.prototype._stat2 = function(f, abs, er, stat, cb) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return cb(); - } - var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat; - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) - return cb(null, false, stat); - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return cb(); - return cb(null, c, stat); - }; - } -}); - -// node_modules/rimraf/rimraf.js -var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports2, module2) { - var assert = require("assert"); - var path2 = require("path"); - var fs2 = require("fs"); - var glob2 = void 0; - try { - glob2 = require_glob(); - } catch (_err) { - } - var defaultGlobOpts = { - nosort: true, - silent: true - }; - var timeout = 0; - var isWindows = process.platform === "win32"; - var defaults = (options) => { - const methods = [ - "unlink", - "chmod", - "stat", - "lstat", - "rmdir", - "readdir" - ]; - methods.forEach((m) => { - options[m] = options[m] || fs2[m]; - m = m + "Sync"; - options[m] = options[m] || fs2[m]; - }); - options.maxBusyTries = options.maxBusyTries || 3; - options.emfileWait = options.emfileWait || 1e3; - if (options.glob === false) { - options.disableGlob = true; - } - if (options.disableGlob !== true && glob2 === void 0) { - throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); - } - options.disableGlob = options.disableGlob || false; - options.glob = options.glob || defaultGlobOpts; - }; - var rimraf = (p, options, cb) => { - if (typeof options === "function") { - cb = options; - options = {}; - } - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert.equal(typeof cb, "function", "rimraf: callback function required"); - assert(options, "rimraf: invalid options argument provided"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - defaults(options); - let busyTries = 0; - let errState = null; - let n = 0; - const next = (er) => { - errState = errState || er; - if (--n === 0) - cb(errState); - }; - const afterGlob = (er, results) => { - if (er) - return cb(er); - n = results.length; - if (n === 0) - return cb(); - results.forEach((p2) => { - const CB = (er2) => { - if (er2) { - if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { - busyTries++; - return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); - } - if (er2.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p2, options, CB), timeout++); - } - if (er2.code === "ENOENT") er2 = null; - } - timeout = 0; - next(er2); - }; - rimraf_(p2, options, CB); - }); - }; - if (options.disableGlob || !glob2.hasMagic(p)) - return afterGlob(null, [p]); - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]); - glob2(p, options.glob, afterGlob); - }); - }; - var rimraf_ = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null); - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb); - if (st && st.isDirectory()) - return rmdir(p, options, er, cb); - options.unlink(p, (er2) => { - if (er2) { - if (er2.code === "ENOENT") - return cb(null); - if (er2.code === "EPERM") - return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); - if (er2.code === "EISDIR") - return rmdir(p, options, er2, cb); - } - return cb(er2); - }); - }); - }; - var fixWinEPERM = (p, options, er, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.chmod(p, 438, (er2) => { - if (er2) - cb(er2.code === "ENOENT" ? null : er); - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er); - else if (stats.isDirectory()) - rmdir(p, options, er, cb); - else - options.unlink(p, cb); - }); - }); - }; - var fixWinEPERMSync = (p, options, er) => { - assert(p); - assert(options); - try { - options.chmodSync(p, 438); - } catch (er2) { - if (er2.code === "ENOENT") - return; - else - throw er; - } - let stats; - try { - stats = options.statSync(p); - } catch (er3) { - if (er3.code === "ENOENT") - return; - else - throw er; - } - if (stats.isDirectory()) - rmdirSync(p, options, er); - else - options.unlinkSync(p); - }; - var rmdir = (p, options, originalEr, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.rmdir(p, (er) => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb); - else if (er && er.code === "ENOTDIR") - cb(originalEr); - else - cb(er); - }); - }; - var rmkids = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.readdir(p, (er, files) => { - if (er) - return cb(er); - let n = files.length; - if (n === 0) - return options.rmdir(p, cb); - let errState; - files.forEach((f) => { - rimraf(path2.join(p, f), options, (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--n === 0) - options.rmdir(p, cb); - }); - }); - }); - }; - var rimrafSync = (p, options) => { - options = options || {}; - defaults(options); - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert(options, "rimraf: missing options"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - let results; - if (options.disableGlob || !glob2.hasMagic(p)) { - results = [p]; - } else { - try { - options.lstatSync(p); - results = [p]; - } catch (er) { - results = glob2.sync(p, options.glob); - } - } - if (!results.length) - return; - for (let i = 0; i < results.length; i++) { - const p2 = results[i]; - let st; - try { - st = options.lstatSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p2, options, er); - } - try { - if (st && st.isDirectory()) - rmdirSync(p2, options, null); - else - options.unlinkSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); - if (er.code !== "EISDIR") - throw er; - rmdirSync(p2, options, er); - } - } - }; - var rmdirSync = (p, options, originalEr) => { - assert(p); - assert(options); - try { - options.rmdirSync(p); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "ENOTDIR") - throw originalEr; - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options); - } - }; - var rmkidsSync = (p, options) => { - assert(p); - assert(options); - options.readdirSync(p).forEach((f) => rimrafSync(path2.join(p, f), options)); - const retries = isWindows ? 100 : 1; - let i = 0; - do { - let threw = true; - try { - const ret = options.rmdirSync(p, options); - threw = false; - return ret; - } finally { - if (++i < retries && threw) - continue; - } - } while (true); - }; - module2.exports = rimraf; - rimraf.sync = rimrafSync; - } -}); - -// node_modules/del/node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "node_modules/del/node_modules/indent-string/index.js"(exports2, module2) { - "use strict"; - module2.exports = (string, count = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count)); - }; - } -}); - -// node_modules/del/node_modules/clean-stack/index.js -var require_clean_stack = __commonJS({ - "node_modules/del/node_modules/clean-stack/index.js"(exports2, module2) { - "use strict"; - var os = require("os"); - var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; - var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; - var homeDir = typeof os.homedir === "undefined" ? "" : os.homedir(); - module2.exports = (stack, options) => { - options = Object.assign({ pretty: false }, options); - return stack.replace(/\\/g, "/").split("\n").filter((line) => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - const match = pathMatches[1]; - if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { - return false; - } - return !pathRegex.test(match); - }).filter((line) => line.trim() !== "").map((line) => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); - } - return line; - }).join("\n"); - }; - } -}); - -// node_modules/del/node_modules/aggregate-error/index.js -var require_aggregate_error = __commonJS({ - "node_modules/del/node_modules/aggregate-error/index.js"(exports2, module2) { - "use strict"; - var indentString2 = require_indent_string(); - var cleanStack = require_clean_stack(); - var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - errors = [...errors].map((error2) => { - if (error2 instanceof Error) { - return error2; - } - if (error2 !== null && typeof error2 === "object") { - return Object.assign(new Error(error2.message), error2); - } - return new Error(error2); - }); - let message = errors.map((error2) => { - return typeof error2.stack === "string" ? cleanInternalStack(cleanStack(error2.stack)) : String(error2); - }).join("\n"); - message = "\n" + indentString2(message, 4); - super(message); - this.name = "AggregateError"; - Object.defineProperty(this, "_errors", { value: errors }); - } - *[Symbol.iterator]() { - for (const error2 of this._errors) { - yield error2; - } - } - }; - module2.exports = AggregateError; - } -}); - -// node_modules/del/node_modules/p-map/index.js -var require_p_map = __commonJS({ - "node_modules/del/node_modules/p-map/index.js"(exports2, module2) { - "use strict"; - var AggregateError = require_aggregate_error(); - module2.exports = async (iterable, mapper, { - concurrency = Infinity, - stopOnError = true - } = {}) => { - return new Promise((resolve2, reject) => { - if (typeof mapper !== "function") { - throw new TypeError("Mapper function is required"); - } - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - const next = () => { - if (isRejected) { - return; - } - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - if (nextItem.done) { - isIterableDone = true; - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve2(result); - } - } - return; - } - resolvingCount++; - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error2) { - if (stopOnError) { - isRejected = true; - reject(error2); - } else { - errors.push(error2); - resolvingCount--; - next(); - } - } - })(); - }; - for (let i = 0; i < concurrency; i++) { - next(); - if (isIterableDone) { - break; - } - } - }); - }; - } -}); - -// node_modules/del/index.js -var require_del = __commonJS({ - "node_modules/del/index.js"(exports2, module2) { - "use strict"; - var { promisify } = require("util"); - var path2 = require("path"); - var globby = require_globby(); - var isGlob = require_is_glob(); - var slash = require_slash(); - var gracefulFs = require_graceful_fs(); - var isPathCwd = require_is_path_cwd(); - var isPathInside = require_is_path_inside(); - var rimraf = require_rimraf(); - var pMap = require_p_map(); - var rimrafP = promisify(rimraf); - var rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync - }; - function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); - } - if (!isPathInside(file, cwd)) { - throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); - } - } - function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - patterns = patterns.map((pattern) => { - if (process.platform === "win32" && isGlob(pattern) === false) { - return slash(pattern); - } - return pattern; - }); - return patterns; - } - module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), onProgress = () => { - }, ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); - if (files.length === 0) { - onProgress({ - totalCount: 0, - deletedCount: 0, - percent: 1 - }); - } - let deletedCount = 0; - const mapper = async (file) => { - file = path2.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - deletedCount += 1; - onProgress({ - totalCount: files.length, - deletedCount, - percent: deletedCount / files.length - }); - return file; - }; - const removedFiles = await pMap(files, mapper, options); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); - const removedFiles = files.map((file) => { - file = path2.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - return file; - }); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - } -}); - // node_modules/semver/internal/constants.js -var require_constants9 = __commonJS({ +var require_constants6 = __commonJS({ "node_modules/semver/internal/constants.js"(exports2, module2) { "use strict"; var SEMVER_SPEC_VERSION = "2.0.0"; @@ -34386,7 +24575,7 @@ var require_re = __commonJS({ MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH - } = require_constants9(); + } = require_constants6(); var debug2 = require_debug(); exports2 = module2.exports = {}; var re = exports2.re = []; @@ -34512,7 +24701,7 @@ var require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports2, module2) { "use strict"; var debug2 = require_debug(); - var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants9(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants6(); var { safeRe: re, t } = require_re(); var parseOptions = require_parse_options(); var { compareIdentifiers } = require_identifiers(); @@ -34769,7 +24958,7 @@ var require_semver = __commonJS({ }); // node_modules/semver/functions/parse.js -var require_parse4 = __commonJS({ +var require_parse2 = __commonJS({ "node_modules/semver/functions/parse.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); @@ -34794,7 +24983,7 @@ var require_parse4 = __commonJS({ var require_valid = __commonJS({ "node_modules/semver/functions/valid.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var valid3 = (version, options) => { const v = parse(version, options); return v ? v.version : null; @@ -34807,7 +24996,7 @@ var require_valid = __commonJS({ var require_clean = __commonJS({ "node_modules/semver/functions/clean.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var clean3 = (version, options) => { const s = parse(version.trim().replace(/^[=v]+/, ""), options); return s ? s.version : null; @@ -34844,7 +25033,7 @@ var require_inc = __commonJS({ var require_diff = __commonJS({ "node_modules/semver/functions/diff.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var diff = (version1, version2) => { const v1 = parse(version1, null, true); const v2 = parse(version2, null, true); @@ -34918,7 +25107,7 @@ var require_patch = __commonJS({ var require_prerelease = __commonJS({ "node_modules/semver/functions/prerelease.js"(exports2, module2) { "use strict"; - var parse = require_parse4(); + var parse = require_parse2(); var prerelease = (version, options) => { const parsed = parse(version, options); return parsed && parsed.prerelease.length ? parsed.prerelease : null; @@ -35106,7 +25295,7 @@ var require_coerce = __commonJS({ "node_modules/semver/functions/coerce.js"(exports2, module2) { "use strict"; var SemVer = require_semver(); - var parse = require_parse4(); + var parse = require_parse2(); var { safeRe: re, t } = require_re(); var coerce3 = (version, options) => { if (version instanceof SemVer) { @@ -35342,7 +25531,7 @@ var require_range = __commonJS({ tildeTrimReplace, caretTrimReplace } = require_re(); - var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants9(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants6(); var isNullSet = (c) => c.value === "<0.0.0-0"; var isAny = (c) => c.value === ""; var isSatisfiable = (comparators, options) => { @@ -36154,10 +26343,10 @@ var require_semver2 = __commonJS({ "node_modules/semver/index.js"(exports2, module2) { "use strict"; var internalRe = require_re(); - var constants = require_constants9(); + var constants = require_constants6(); var SemVer = require_semver(); var identifiers = require_identifiers(); - var parse = require_parse4(); + var parse = require_parse2(); var valid3 = require_valid(); var clean3 = require_clean(); var inc = require_inc(); @@ -36287,7 +26476,7 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^6.1.1", + del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -45413,7 +35602,7 @@ var require_object = __commonJS({ }); // node_modules/@azure/core-util/dist/commonjs/error.js -var require_error2 = __commonJS({ +var require_error = __commonJS({ "node_modules/@azure/core-util/dist/commonjs/error.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -45575,7 +35764,7 @@ var require_commonjs4 = __commonJS({ Object.defineProperty(exports2, "isObject", { enumerable: true, get: function() { return object_js_1.isObject; } }); - var error_js_1 = require_error2(); + var error_js_1 = require_error(); Object.defineProperty(exports2, "isError", { enumerable: true, get: function() { return error_js_1.isError; } }); @@ -46373,7 +36562,7 @@ var require_userAgentPlatform = __commonJS({ }); // node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js -var require_constants10 = __commonJS({ +var require_constants7 = __commonJS({ "node_modules/@azure/core-rest-pipeline/dist/commonjs/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -46391,7 +36580,7 @@ var require_userAgent = __commonJS({ exports2.getUserAgentHeaderName = getUserAgentHeaderName; exports2.getUserAgentValue = getUserAgentValue; var userAgentPlatform_js_1 = require_userAgentPlatform(); - var constants_js_1 = require_constants10(); + var constants_js_1 = require_constants7(); function getUserAgentString(telemetryInfo) { const parts = []; for (const [key, value] of telemetryInfo) { @@ -46920,7 +37109,7 @@ var require_retryPolicy = __commonJS({ var helpers_js_1 = require_helpers(); var logger_1 = require_dist(); var abort_controller_1 = require_commonjs5(); - var constants_js_1 = require_constants10(); + var constants_js_1 = require_constants7(); var retryPolicyLogger = (0, logger_1.createClientLogger)("core-rest-pipeline retryPolicy"); var retryPolicyName = "retryPolicy"; function retryPolicy(strategies, options = { maxRetries: constants_js_1.DEFAULT_RETRY_POLICY_COUNT }) { @@ -47017,7 +37206,7 @@ var require_defaultRetryPolicy = __commonJS({ var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants10(); + var constants_js_1 = require_constants7(); exports2.defaultRetryPolicyName = "defaultRetryPolicy"; function defaultRetryPolicy(options = {}) { var _a; @@ -47326,7 +37515,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common4 = __commonJS({ +var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -47660,7 +37849,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common4()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -47948,7 +38137,7 @@ var require_node = __commonJS({ debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common4()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -49019,7 +39208,7 @@ var require_tracingPolicy = __commonJS({ exports2.tracingPolicyName = void 0; exports2.tracingPolicy = tracingPolicy; var core_tracing_1 = require_commonjs6(); - var constants_js_1 = require_constants10(); + var constants_js_1 = require_constants7(); var userAgent_js_1 = require_userAgent(); var log_js_1 = require_log(); var core_util_1 = require_commonjs4(); @@ -49536,7 +39725,7 @@ var require_exponentialRetryPolicy = __commonJS({ exports2.exponentialRetryPolicy = exponentialRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants10(); + var constants_js_1 = require_constants7(); exports2.exponentialRetryPolicyName = "exponentialRetryPolicy"; function exponentialRetryPolicy(options = {}) { var _a; @@ -49558,7 +39747,7 @@ var require_systemErrorRetryPolicy = __commonJS({ exports2.systemErrorRetryPolicy = systemErrorRetryPolicy; var exponentialRetryStrategy_js_1 = require_exponentialRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants10(); + var constants_js_1 = require_constants7(); exports2.systemErrorRetryPolicyName = "systemErrorRetryPolicy"; function systemErrorRetryPolicy(options = {}) { var _a; @@ -49583,7 +39772,7 @@ var require_throttlingRetryPolicy = __commonJS({ exports2.throttlingRetryPolicy = throttlingRetryPolicy; var throttlingRetryStrategy_js_1 = require_throttlingRetryStrategy(); var retryPolicy_js_1 = require_retryPolicy(); - var constants_js_1 = require_constants10(); + var constants_js_1 = require_constants7(); exports2.throttlingRetryPolicyName = "throttlingRetryPolicy"; function throttlingRetryPolicy(options = {}) { var _a; @@ -51335,7 +41524,7 @@ var require_interfaces = __commonJS({ }); // node_modules/@azure/core-client/dist/commonjs/utils.js -var require_utils9 = __commonJS({ +var require_utils5 = __commonJS({ "node_modules/@azure/core-client/dist/commonjs/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -51410,7 +41599,7 @@ var require_serializer = __commonJS({ var tslib_1 = (init_tslib_es63(), __toCommonJS(tslib_es6_exports3)); var base64 = tslib_1.__importStar(require_base642()); var interfaces_js_1 = require_interfaces(); - var utils_js_1 = require_utils9(); + var utils_js_1 = require_utils5(); var SerializerImpl = class { constructor(modelMappers = {}, isXML = false) { this.modelMappers = modelMappers; @@ -52888,7 +43077,7 @@ var require_serviceClient = __commonJS({ exports2.ServiceClient = void 0; var core_rest_pipeline_1 = require_commonjs7(); var pipeline_js_1 = require_pipeline2(); - var utils_js_1 = require_utils9(); + var utils_js_1 = require_utils5(); var httpClientCache_js_1 = require_httpClientCache(); var operationHelpers_js_1 = require_operationHelpers(); var urlHelpers_js_1 = require_urlHelpers(); @@ -80142,15 +70331,70 @@ var require_blob_upload = __commonJS({ }); // node_modules/readdir-glob/node_modules/minimatch/lib/path.js -var require_path2 = __commonJS({ +var require_path = __commonJS({ "node_modules/readdir-glob/node_modules/minimatch/lib/path.js"(exports2, module2) { var isWindows = typeof process === "object" && process && process.platform === "win32"; module2.exports = isWindows ? { sep: "\\" } : { sep: "/" }; } }); +// node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str2) { + if (a instanceof RegExp) a = maybeMatch(a, str2); + if (b instanceof RegExp) b = maybeMatch(b, str2); + var r = range(a, b, str2); + return r && { + start: r[0], + end: r[1], + pre: str2.slice(0, r[0]), + body: str2.slice(r[0] + a.length, r[1]), + post: str2.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str2) { + var m = str2.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str2) { + var begs, beg, left, right, result; + var ai = str2.indexOf(a); + var bi = str2.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + begs = []; + left = str2.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str2.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str2.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + // node_modules/readdir-glob/node_modules/brace-expansion/index.js -var require_brace_expansion2 = __commonJS({ +var require_brace_expansion = __commonJS({ "node_modules/readdir-glob/node_modules/brace-expansion/index.js"(exports2, module2) { var balanced = require_balanced_match(); module2.exports = expandTop; @@ -80300,7 +70544,7 @@ var require_brace_expansion2 = __commonJS({ }); // node_modules/readdir-glob/node_modules/minimatch/minimatch.js -var require_minimatch2 = __commonJS({ +var require_minimatch = __commonJS({ "node_modules/readdir-glob/node_modules/minimatch/minimatch.js"(exports2, module2) { var minimatch = module2.exports = (p, pattern, options = {}) => { assertValidPattern(pattern); @@ -80310,11 +70554,11 @@ var require_minimatch2 = __commonJS({ return new Minimatch(pattern, options).match(p); }; module2.exports = minimatch; - var path2 = require_path2(); + var path2 = require_path(); minimatch.sep = path2.sep; var GLOBSTAR = Symbol("globstar **"); minimatch.GLOBSTAR = GLOBSTAR; - var expand = require_brace_expansion2(); + var expand = require_brace_expansion(); var plTypes = { "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, "?": { open: "(?:", close: ")?" }, @@ -80861,7 +71105,7 @@ var require_readdir_glob = __commonJS({ module2.exports = readdirGlob; var fs2 = require("fs"); var { EventEmitter } = require("events"); - var { Minimatch } = require_minimatch2(); + var { Minimatch } = require_minimatch(); var { resolve: resolve2 } = require("path"); function readdir(dir, strict) { return new Promise((resolve3, reject) => { @@ -81078,7 +71322,7 @@ var require_readdir_glob = __commonJS({ }); // node_modules/async/dist/async.js -var require_async7 = __commonJS({ +var require_async = __commonJS({ "node_modules/async/dist/async.js"(exports2, module2) { (function(global2, factory) { typeof exports2 === "object" && typeof module2 !== "undefined" ? factory(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.async = {})); @@ -82937,6 +73181,783 @@ var require_async7 = __commonJS({ } }); +// node_modules/graceful-fs/polyfills.js +var require_polyfills = __commonJS({ + "node_modules/graceful-fs/polyfills.js"(exports2, module2) { + var constants = require("constants"); + var origCwd = process.cwd; + var cwd = null; + var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process); + return cwd; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs2) { + if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs2); + } + if (!fs2.lutimes) { + patchLutimes(fs2); + } + fs2.chown = chownFix(fs2.chown); + fs2.fchown = chownFix(fs2.fchown); + fs2.lchown = chownFix(fs2.lchown); + fs2.chmod = chmodFix(fs2.chmod); + fs2.fchmod = chmodFix(fs2.fchmod); + fs2.lchmod = chmodFix(fs2.lchmod); + fs2.chownSync = chownFixSync(fs2.chownSync); + fs2.fchownSync = chownFixSync(fs2.fchownSync); + fs2.lchownSync = chownFixSync(fs2.lchownSync); + fs2.chmodSync = chmodFixSync(fs2.chmodSync); + fs2.fchmodSync = chmodFixSync(fs2.fchmodSync); + fs2.lchmodSync = chmodFixSync(fs2.lchmodSync); + fs2.stat = statFix(fs2.stat); + fs2.fstat = statFix(fs2.fstat); + fs2.lstat = statFix(fs2.lstat); + fs2.statSync = statFixSync(fs2.statSync); + fs2.fstatSync = statFixSync(fs2.fstatSync); + fs2.lstatSync = statFixSync(fs2.lstatSync); + if (fs2.chmod && !fs2.lchmod) { + fs2.lchmod = function(path2, mode, cb) { + if (cb) process.nextTick(cb); + }; + fs2.lchmodSync = function() { + }; + } + if (fs2.chown && !fs2.lchown) { + fs2.lchown = function(path2, uid, gid, cb) { + if (cb) process.nextTick(cb); + }; + fs2.lchownSync = function() { + }; + } + if (platform === "win32") { + fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : (function(fs$rename) { + function rename(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { + setTimeout(function() { + fs2.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er); + }); + }, backoff); + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er); + }); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); + return rename; + })(fs2.rename); + } + fs2.read = typeof fs2.read !== "function" ? fs2.read : (function(fs$read) { + function read(fd, buffer, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _2, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs2, fd, buffer, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs2, fd, buffer, offset, length, position, callback); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); + return read; + })(fs2.read); + fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : /* @__PURE__ */ (function(fs$readSync) { + return function(fd, buffer, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs2, fd, buffer, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + })(fs2.readSync); + function patchLchmod(fs3) { + fs3.lchmod = function(path2, mode, callback) { + fs3.open( + path2, + constants.O_WRONLY | constants.O_SYMLINK, + mode, + function(err, fd) { + if (err) { + if (callback) callback(err); + return; + } + fs3.fchmod(fd, mode, function(err2) { + fs3.close(fd, function(err22) { + if (callback) callback(err2 || err22); + }); + }); + } + ); + }; + fs3.lchmodSync = function(path2, mode) { + var fd = fs3.openSync(path2, constants.O_WRONLY | constants.O_SYMLINK, mode); + var threw = true; + var ret; + try { + ret = fs3.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs3.closeSync(fd); + } catch (er) { + } + } else { + fs3.closeSync(fd); + } + } + return ret; + }; + } + function patchLutimes(fs3) { + if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) { + fs3.lutimes = function(path2, at, mt, cb) { + fs3.open(path2, constants.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) cb(er); + return; + } + fs3.futimes(fd, at, mt, function(er2) { + fs3.close(fd, function(er22) { + if (cb) cb(er2 || er22); + }); + }); + }); + }; + fs3.lutimesSync = function(path2, at, mt) { + var fd = fs3.openSync(path2, constants.O_SYMLINK); + var ret; + var threw = true; + try { + ret = fs3.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs3.closeSync(fd); + } catch (er) { + } + } else { + fs3.closeSync(fd); + } + } + return ret; + }; + } else if (fs3.futimes) { + fs3.lutimes = function(_a, _b, _c, cb) { + if (cb) process.nextTick(cb); + }; + fs3.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) return orig; + return function(target, mode, cb) { + return orig.call(fs2, target, mode, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) return orig; + return function(target, mode) { + try { + return orig.call(fs2, target, mode); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function chownFix(orig) { + if (!orig) return orig; + return function(target, uid, gid, cb) { + return orig.call(fs2, target, uid, gid, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) return orig; + return function(target, uid, gid) { + try { + return orig.call(fs2, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function statFix(orig) { + if (!orig) return orig; + return function(target, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + if (cb) cb.apply(this, arguments); + } + return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) return orig; + return function(target, options) { + var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target); + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + return stats; + }; + } + function chownErOk(er) { + if (!er) + return true; + if (er.code === "ENOSYS") + return true; + var nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true; + } + return false; + } + } + } +}); + +// node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = __commonJS({ + "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { + var Stream = require("stream").Stream; + module2.exports = legacy; + function legacy(fs2) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path2, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path2, options); + Stream.call(this); + var self2 = this; + this.path = path2; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.encoding) this.setEncoding(this.encoding); + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.end === void 0) { + this.end = Infinity; + } else if ("number" !== typeof this.end) { + throw TypeError("end must be a Number"); + } + if (this.start > this.end) { + throw new Error("start must be <= end"); + } + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self2._read(); + }); + return; + } + fs2.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self2.emit("error", err); + self2.readable = false; + return; + } + self2.fd = fd; + self2.emit("open", fd); + self2._read(); + }); + } + function WriteStream(path2, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path2, options); + Stream.call(this); + this.path = path2; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.start < 0) { + throw new Error("start must be >= zero"); + } + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs2.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } + } + } + } +}); + +// node_modules/graceful-fs/clone.js +var require_clone = __commonJS({ + "node_modules/graceful-fs/clone.js"(exports2, module2) { + "use strict"; + module2.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj) { + return obj.__proto__; + }; + function clone(obj) { + if (obj === null || typeof obj !== "object") + return obj; + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) }; + else + var copy = /* @__PURE__ */ Object.create(null); + Object.getOwnPropertyNames(obj).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); + }); + return copy; + } + } +}); + +// node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = __commonJS({ + "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { + var fs2 = require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util = require("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); + } else { + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop() { + } + function publishQueue(context2, queue2) { + Object.defineProperty(context2, gracefulQueue, { + get: function() { + return queue2; + } + }); + } + var debug2 = noop; + if (util.debuglog) + debug2 = util.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug2 = function() { + var m = util.format.apply(util, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs2[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs2, queue); + fs2.close = (function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs2, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }); + return close; + })(fs2.close); + fs2.closeSync = (function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs2, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + })(fs2.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug2(fs2[gracefulQueue]); + require("assert").equal(fs2[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs2[gracefulQueue]); + } + module2.exports = patch(clone(fs2)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) { + module2.exports = patch(fs2); + fs2.__patched = true; + } + function patch(fs3) { + polyfills(fs3); + fs3.gracefulify = patch; + fs3.createReadStream = createReadStream; + fs3.createWriteStream = createWriteStream2; + var fs$readFile = fs3.readFile; + fs3.readFile = readFile; + function readFile(path2, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readFile(path2, options, cb); + function go$readFile(path3, options2, cb2, startTime) { + return fs$readFile(path3, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path3, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs3.writeFile; + fs3.writeFile = writeFile; + function writeFile(path2, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$writeFile(path2, data, options, cb); + function go$writeFile(path3, data2, options2, cb2, startTime) { + return fs$writeFile(path3, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs3.appendFile; + if (fs$appendFile) + fs3.appendFile = appendFile; + function appendFile(path2, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$appendFile(path2, data, options, cb); + function go$appendFile(path3, data2, options2, cb2, startTime) { + return fs$appendFile(path3, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path3, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs3.copyFile; + if (fs$copyFile) + fs3.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs3.readdir; + fs3.readdir = readdir; + var noReaddirOptionVersions = /^v[0-5]\./; + function readdir(path2, options, cb) { + if (typeof options === "function") + cb = options, options = null; + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path3, options2, cb2, startTime) { + return fs$readdir(path3, fs$readdirCallback( + path3, + options2, + cb2, + startTime + )); + } : function go$readdir2(path3, options2, cb2, startTime) { + return fs$readdir(path3, options2, fs$readdirCallback( + path3, + options2, + cb2, + startTime + )); + }; + return go$readdir(path2, options, cb); + function fs$readdirCallback(path3, options2, cb2, startTime) { + return function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([ + go$readdir, + [path3, options2, cb2], + err, + startTime || Date.now(), + Date.now() + ]); + else { + if (files && files.sort) + files.sort(); + if (typeof cb2 === "function") + cb2.call(this, err, files); + } + }; + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs3); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs3.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs3.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs3, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val2) { + ReadStream = val2; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs3, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val2) { + WriteStream = val2; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs3, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val2) { + FileReadStream = val2; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs3, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val2) { + FileWriteStream = val2; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path2, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this; + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream(path2, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this; + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream(path2, options) { + return new fs3.ReadStream(path2, options); + } + function createWriteStream2(path2, options) { + return new fs3.WriteStream(path2, options); + } + var fs$open = fs3.open; + fs3.open = open; + function open(path2, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path2, flags, mode, cb); + function go$open(path3, flags2, mode2, cb2, startTime) { + return fs$open(path3, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path3, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + return fs3; + } + function enqueue(elem) { + debug2("ENQUEUE", elem[0].name, elem[1]); + fs2[gracefulQueue].push(elem); + retry3(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs2[gracefulQueue].length; ++i) { + if (fs2[gracefulQueue][i].length > 2) { + fs2[gracefulQueue][i][3] = now; + fs2[gracefulQueue][i][4] = now; + } + } + retry3(); + } + function retry3() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs2[gracefulQueue].length === 0) + return; + var elem = fs2[gracefulQueue].shift(); + var fn = elem[0]; + var args = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug2("RETRY", fn.name, args); + fn.apply(null, args); + } else if (Date.now() - startTime >= 6e4) { + debug2("TIMEOUT", fn.name, args); + var cb = args.pop(); + if (typeof cb === "function") + cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + var desiredDelay = Math.min(sinceStart * 1.2, 100); + if (sinceAttempt >= desiredDelay) { + debug2("RETRY", fn.name, args); + fn.apply(null, args.concat([startTime])); + } else { + fs2[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry3, 0); + } + } + } +}); + // node_modules/archiver-utils/node_modules/is-stream/index.js var require_is_stream = __commonJS({ "node_modules/archiver-utils/node_modules/is-stream/index.js"(exports2, module2) { @@ -83006,7 +74027,7 @@ var require_isarray = __commonJS({ }); // node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream.js -var require_stream5 = __commonJS({ +var require_stream = __commonJS({ "node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { module2.exports = require("stream"); } @@ -83139,6 +74160,48 @@ var require_util11 = __commonJS({ } }); +// node_modules/inherits/inherits_browser.js +var require_inherits_browser = __commonJS({ + "node_modules/inherits/inherits_browser.js"(exports2, module2) { + if (typeof Object.create === "function") { + module2.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; + } else { + module2.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor; + var TempCtor = function() { + }; + TempCtor.prototype = superCtor.prototype; + ctor.prototype = new TempCtor(); + ctor.prototype.constructor = ctor; + }; + } + } +}); + +// node_modules/inherits/inherits.js +var require_inherits = __commonJS({ + "node_modules/inherits/inherits.js"(exports2, module2) { + try { + util = require("util"); + if (typeof util.inherits !== "function") throw ""; + module2.exports = util.inherits; + } catch (e) { + module2.exports = require_inherits_browser(); + } + var util; + } +}); + // node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js var require_BufferList = __commonJS({ "node_modules/lazystream/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports2, module2) { @@ -83315,7 +74378,7 @@ var require_stream_writable = __commonJS({ var internalUtil = { deprecate: require_node2() }; - var Stream = require_stream5(); + var Stream = require_stream(); var Buffer2 = require_safe_buffer().Buffer; var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { }; @@ -84061,7 +75124,7 @@ var require_stream_readable = __commonJS({ var EElistenerCount = function(emitter, type2) { return emitter.listeners(type2).length; }; - var Stream = require_stream5(); + var Stream = require_stream(); var Buffer2 = require_safe_buffer().Buffer; var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { }; @@ -87239,7 +78302,7 @@ var require_process = __commonJS({ }); // node_modules/readable-stream/lib/internal/streams/utils.js -var require_utils10 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/utils.js"(exports2, module2) { "use strict"; var { SymbolAsyncIterator, SymbolIterator, SymbolFor } = require_primordials(); @@ -87471,7 +78534,7 @@ var require_end_of_stream = __commonJS({ isNodeStream, willEmitClose: _willEmitClose, kIsClosedPromise - } = require_utils10(); + } = require_utils6(); var addAbortListener; function isRequest(stream) { return stream.setHeader && typeof stream.abort === "function"; @@ -87709,7 +78772,7 @@ var require_destroy2 = __commonJS({ AbortError } = require_errors3(); var { Symbol: Symbol2 } = require_primordials(); - var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils10(); + var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils6(); var kDestroy = Symbol2("kDestroy"); var kConstruct = Symbol2("kConstruct"); function checkError(err, w, r) { @@ -88047,7 +79110,7 @@ var require_add_abort_signal = __commonJS({ "use strict"; var { SymbolDispose } = require_primordials(); var { AbortError, codes } = require_errors3(); - var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils10(); + var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils6(); var eos = require_end_of_stream(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2 } = codes; var addAbortListener; @@ -89984,7 +81047,7 @@ var require_duplexify = __commonJS({ isDuplexNodeStream, isReadableStream, isWritableStream - } = require_utils10(); + } = require_utils6(); var eos = require_end_of_stream(); var { AbortError, @@ -90584,7 +81647,7 @@ var require_pipeline3 = __commonJS({ isWebStream, isReadableStream, isReadableFinished - } = require_utils10(); + } = require_utils6(); var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; var PassThrough; var Readable; @@ -90997,7 +82060,7 @@ var require_compose = __commonJS({ isTransformStream, isWritableStream, isReadableStream - } = require_utils10(); + } = require_utils6(); var { AbortError, codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } @@ -91190,7 +82253,7 @@ var require_operators = __commonJS({ var { finished } = require_end_of_stream(); var staticCompose = require_compose(); var { addAbortSignalNoValidate } = require_add_abort_signal(); - var { isWritable, isNodeStream } = require_utils10(); + var { isWritable, isNodeStream } = require_utils6(); var { deprecate } = require_util12(); var { ArrayPrototypePush, @@ -91585,10 +82648,10 @@ var require_promises = __commonJS({ "node_modules/readable-stream/lib/stream/promises.js"(exports2, module2) { "use strict"; var { ArrayPrototypePop, Promise: Promise2 } = require_primordials(); - var { isIterable, isNodeStream, isWebStream } = require_utils10(); + var { isIterable, isNodeStream, isWebStream } = require_utils6(); var { pipelineImpl: pl } = require_pipeline3(); var { finished } = require_end_of_stream(); - require_stream6(); + require_stream2(); function pipeline(...streams) { return new Promise2((resolve2, reject) => { let signal; @@ -91623,7 +82686,7 @@ var require_promises = __commonJS({ }); // node_modules/readable-stream/lib/stream.js -var require_stream6 = __commonJS({ +var require_stream2 = __commonJS({ "node_modules/readable-stream/lib/stream.js"(exports2, module2) { var { Buffer: Buffer2 } = require("buffer"); var { ObjectDefineProperty, ObjectKeys, ReflectApply } = require_primordials(); @@ -91640,7 +82703,7 @@ var require_stream6 = __commonJS({ var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); var promises = require_promises(); - var utils = require_utils10(); + var utils = require_utils6(); var Stream = module2.exports = require_legacy().Stream; Stream.isDestroyed = utils.isDestroyed; Stream.isDisturbed = utils.isDisturbed; @@ -91775,7 +82838,7 @@ var require_ours = __commonJS({ }); module2.exports.Stream = Stream.Stream; } else { - const CustomStream = require_stream6(); + const CustomStream = require_stream2(); const promises = require_promises(); const originalDestroy = CustomStream.Readable.destroy; module2.exports = CustomStream.Readable; @@ -92610,7 +83673,7 @@ var require_isPlainObject = __commonJS({ }); // node_modules/archiver-utils/node_modules/brace-expansion/index.js -var require_brace_expansion3 = __commonJS({ +var require_brace_expansion2 = __commonJS({ "node_modules/archiver-utils/node_modules/brace-expansion/index.js"(exports2, module2) { var balanced = require_balanced_match(); module2.exports = expandTop; @@ -93419,7 +84482,7 @@ var require_commonjs13 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.unescape = exports2.escape = exports2.AST = exports2.Minimatch = exports2.match = exports2.makeRe = exports2.braceExpand = exports2.defaults = exports2.filter = exports2.GLOBSTAR = exports2.sep = exports2.minimatch = void 0; - var brace_expansion_1 = __importDefault4(require_brace_expansion3()); + var brace_expansion_1 = __importDefault4(require_brace_expansion2()); var assert_valid_pattern_js_1 = require_assert_valid_pattern(); var ast_js_1 = require_ast(); var escape_js_1 = require_escape(); @@ -95211,8 +86274,8 @@ var require_commonjs14 = __commonJS({ const noDelete = allowStale || options.noDeleteOnFetchRejection; const bf2 = p; if (this.#valList[index] === p) { - const del4 = !noDelete || bf2.__staleWhileFetching === void 0; - if (del4) { + const del = !noDelete || bf2.__staleWhileFetching === void 0; + if (del) { this.#delete(k, "fetch"); } else if (!allowStaleAborted) { this.#valList[index] = bf2.__staleWhileFetching; @@ -98206,7 +89269,7 @@ var require_commonjs16 = __commonJS({ }); // node_modules/archiver-utils/node_modules/glob/dist/commonjs/pattern.js -var require_pattern2 = __commonJS({ +var require_pattern = __commonJS({ "node_modules/archiver-utils/node_modules/glob/dist/commonjs/pattern.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -98380,13 +89443,13 @@ var require_pattern2 = __commonJS({ }); // node_modules/archiver-utils/node_modules/glob/dist/commonjs/ignore.js -var require_ignore2 = __commonJS({ +var require_ignore = __commonJS({ "node_modules/archiver-utils/node_modules/glob/dist/commonjs/ignore.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Ignore = void 0; var minimatch_1 = require_commonjs13(); - var pattern_js_1 = require_pattern2(); + var pattern_js_1 = require_pattern(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; var Ignore = class { relative; @@ -98716,7 +89779,7 @@ var require_walker = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.GlobStream = exports2.GlobWalker = exports2.GlobUtil = void 0; var minipass_1 = require_commonjs15(); - var ignore_js_1 = require_ignore2(); + var ignore_js_1 = require_ignore(); var processor_js_1 = require_processor(); var makeIgnore = (ignore, opts) => typeof ignore === "string" ? new ignore_js_1.Ignore([ignore], opts) : Array.isArray(ignore) ? new ignore_js_1.Ignore(ignore, opts) : ignore; var GlobUtil = class { @@ -99050,7 +90113,7 @@ var require_walker = __commonJS({ }); // node_modules/archiver-utils/node_modules/glob/dist/commonjs/glob.js -var require_glob2 = __commonJS({ +var require_glob = __commonJS({ "node_modules/archiver-utils/node_modules/glob/dist/commonjs/glob.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -99058,7 +90121,7 @@ var require_glob2 = __commonJS({ var minimatch_1 = require_commonjs13(); var node_url_1 = require("node:url"); var path_scurry_1 = require_commonjs16(); - var pattern_js_1 = require_pattern2(); + var pattern_js_1 = require_pattern(); var walker_js_1 = require_walker(); var defaultPlatform = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux"; var Glob = class { @@ -99295,7 +90358,7 @@ var require_commonjs17 = __commonJS({ exports2.globIterateSync = globIterateSync; exports2.globIterate = globIterate; var minimatch_1 = require_commonjs13(); - var glob_js_1 = require_glob2(); + var glob_js_1 = require_glob(); var has_magic_js_1 = require_has_magic(); var minimatch_2 = require_commonjs13(); Object.defineProperty(exports2, "escape", { enumerable: true, get: function() { @@ -99304,7 +90367,7 @@ var require_commonjs17 = __commonJS({ Object.defineProperty(exports2, "unescape", { enumerable: true, get: function() { return minimatch_2.unescape; } }); - var glob_js_2 = require_glob2(); + var glob_js_2 = require_glob(); Object.defineProperty(exports2, "Glob", { enumerable: true, get: function() { return glob_js_2.Glob; } }); @@ -99312,7 +90375,7 @@ var require_commonjs17 = __commonJS({ Object.defineProperty(exports2, "hasMagic", { enumerable: true, get: function() { return has_magic_js_2.hasMagic; } }); - var ignore_js_1 = require_ignore2(); + var ignore_js_1 = require_ignore(); Object.defineProperty(exports2, "Ignore", { enumerable: true, get: function() { return ignore_js_1.Ignore; } }); @@ -99638,7 +90701,7 @@ var require_archiver_utils = __commonJS({ }); // node_modules/archiver/lib/error.js -var require_error3 = __commonJS({ +var require_error2 = __commonJS({ "node_modules/archiver/lib/error.js"(exports2, module2) { var util = require("util"); var ERROR_CODES = { @@ -99675,11 +90738,11 @@ var require_core2 = __commonJS({ "node_modules/archiver/lib/core.js"(exports2, module2) { var fs2 = require("fs"); var glob2 = require_readdir_glob(); - var async = require_async7(); + var async = require_async(); var path2 = require("path"); var util = require_archiver_utils(); var inherits = require("util").inherits; - var ArchiverError = require_error3(); + var ArchiverError = require_error2(); var Transform = require_ours().Transform; var win32 = process.platform === "win32"; var Archiver = function(format, options) { @@ -100407,7 +91470,7 @@ var require_unix_stat = __commonJS({ }); // node_modules/compress-commons/lib/archivers/zip/constants.js -var require_constants11 = __commonJS({ +var require_constants8 = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/constants.js"(exports2, module2) { module2.exports = { WORD: 4, @@ -100491,7 +91554,7 @@ var require_zip_archive_entry = __commonJS({ var ArchiveEntry = require_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); var UnixStat = require_unix_stat(); - var constants = require_constants11(); + var constants = require_constants8(); var zipUtil = require_util13(); var ZipArchiveEntry = module2.exports = function(name) { if (!(this instanceof ZipArchiveEntry)) { @@ -100983,7 +92046,7 @@ var require_zip_archive_output_stream = __commonJS({ var ArchiveOutputStream = require_archive_output_stream(); var ZipArchiveEntry = require_zip_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); - var constants = require_constants11(); + var constants = require_constants8(); var util = require_util14(); var zipUtil = require_util13(); var ZipArchiveOutputStream = module2.exports = function(options) { @@ -101414,7 +92477,7 @@ var require_zip = __commonJS({ }); // node_modules/queue-tick/queue-microtask.js -var require_queue_microtask2 = __commonJS({ +var require_queue_microtask = __commonJS({ "node_modules/queue-tick/queue-microtask.js"(exports2, module2) { module2.exports = typeof queueMicrotask === "function" ? queueMicrotask : (fn) => Promise.resolve().then(fn); } @@ -101423,7 +92486,7 @@ var require_queue_microtask2 = __commonJS({ // node_modules/queue-tick/process-next-tick.js var require_process_next_tick = __commonJS({ "node_modules/queue-tick/process-next-tick.js"(exports2, module2) { - module2.exports = typeof process !== "undefined" && typeof process.nextTick === "function" ? process.nextTick.bind(process) : require_queue_microtask2(); + module2.exports = typeof process !== "undefined" && typeof process.nextTick === "function" ? process.nextTick.bind(process) : require_queue_microtask(); } }); @@ -103381,7 +94444,7 @@ var require_extract = __commonJS({ }); // node_modules/tar-stream/constants.js -var require_constants12 = __commonJS({ +var require_constants9 = __commonJS({ "node_modules/tar-stream/constants.js"(exports2, module2) { var constants = { // just for envs without fs @@ -103405,7 +94468,7 @@ var require_pack = __commonJS({ "node_modules/tar-stream/pack.js"(exports2, module2) { var { Readable, Writable, getStreamError } = require_streamx(); var b4a = require_b4a(); - var constants = require_constants12(); + var constants = require_constants9(); var headers = require_headers2(); var DMODE = 493; var FMODE = 420; @@ -104444,7 +95507,7 @@ var require_context2 = __commonJS({ }); // node_modules/@actions/artifact/node_modules/@actions/github/lib/internal/utils.js -var require_utils11 = __commonJS({ +var require_utils7 = __commonJS({ "node_modules/@actions/artifact/node_modules/@actions/github/lib/internal/utils.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { @@ -104969,7 +96032,7 @@ var require_lib3 = __commonJS({ }); // node_modules/whatwg-url/lib/utils.js -var require_utils12 = __commonJS({ +var require_utils8 = __commonJS({ "node_modules/whatwg-url/lib/utils.js"(exports2, module2) { "use strict"; module2.exports.mixin = function mixin(target, source) { @@ -106391,7 +97454,7 @@ var require_URL = __commonJS({ "node_modules/whatwg-url/lib/URL.js"(exports2, module2) { "use strict"; var conversions = require_lib3(); - var utils = require_utils12(); + var utils = require_utils8(); var Impl = require_URL_impl(); var impl = utils.implSymbol; function URL2(url) { @@ -109485,7 +100548,7 @@ var require_dist_node23 = __commonJS({ }); // node_modules/@actions/artifact/node_modules/@actions/github/lib/utils.js -var require_utils13 = __commonJS({ +var require_utils9 = __commonJS({ "node_modules/@actions/artifact/node_modules/@actions/github/lib/utils.js"(exports2) { "use strict"; var __createBinding4 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { @@ -109514,7 +100577,7 @@ var require_utils13 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokitOptions = exports2.GitHub = exports2.defaults = exports2.context = void 0; var Context = __importStar4(require_context2()); - var Utils = __importStar4(require_utils11()); + var Utils = __importStar4(require_utils7()); var core_1 = require_dist_node21(); var plugin_rest_endpoint_methods_1 = require_dist_node22(); var plugin_paginate_rest_1 = require_dist_node23(); @@ -109569,7 +100632,7 @@ var require_github2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getOctokit = exports2.context = void 0; var Context = __importStar4(require_context2()); - var utils_1 = require_utils13(); + var utils_1 = require_utils9(); exports2.context = new Context.Context(); function getOctokit(token, options, ...additionalPlugins) { const GitHubWithPlugins = utils_1.GitHub.plugin(...additionalPlugins); @@ -110608,7 +101671,7 @@ var require_matcher_stream = __commonJS({ }); // node_modules/unzip-stream/lib/entry.js -var require_entry3 = __commonJS({ +var require_entry = __commonJS({ "node_modules/unzip-stream/lib/entry.js"(exports2, module2) { "use strict"; var stream = require("stream"); @@ -110641,7 +101704,7 @@ var require_unzip_stream = __commonJS({ var util = require("util"); var zlib = require("zlib"); var MatcherStream = require_matcher_stream(); - var Entry = require_entry3(); + var Entry = require_entry(); var states = { STREAM_START: 0, START: 1, @@ -111909,7 +102972,7 @@ var require_get_artifact = __commonJS({ var github_1 = require_github2(); var plugin_retry_1 = require_dist_node25(); var core14 = __importStar4(require_core()); - var utils_1 = require_utils13(); + var utils_1 = require_utils9(); var retry_options_1 = require_retry_options(); var plugin_request_log_1 = require_dist_node24(); var util_1 = require_util8(); @@ -112033,7 +103096,7 @@ var require_delete_artifact = __commonJS({ var github_1 = require_github2(); var user_agent_1 = require_user_agent(); var retry_options_1 = require_retry_options(); - var utils_1 = require_utils13(); + var utils_1 = require_utils9(); var plugin_request_log_1 = require_dist_node24(); var plugin_retry_1 = require_dist_node25(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); @@ -112139,7 +103202,7 @@ var require_list_artifacts = __commonJS({ var github_1 = require_github2(); var user_agent_1 = require_user_agent(); var retry_options_1 = require_retry_options(); - var utils_1 = require_utils13(); + var utils_1 = require_utils9(); var plugin_request_log_1 = require_dist_node24(); var plugin_retry_1 = require_dist_node25(); var artifact_twirp_client_1 = require_artifact_twirp_client2(); @@ -113361,7 +104424,7 @@ var require_crc64 = __commonJS({ }); // node_modules/@actions/artifact-legacy/lib/internal/utils.js -var require_utils14 = __commonJS({ +var require_utils10 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/utils.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -113671,7 +104734,7 @@ var require_http_manager = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpManager = void 0; - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var HttpManager = class { constructor(clientCount, userAgent) { if (clientCount < 1) { @@ -113926,7 +104989,7 @@ var require_requestUtils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientRequest = exports2.retry = void 0; - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var core14 = __importStar4(require_core()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { @@ -114047,7 +105110,7 @@ var require_upload_http_client = __commonJS({ var core14 = __importStar4(require_core()); var tmp = __importStar4(require_tmp_promise()); var stream = __importStar4(require("stream")); - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var config_variables_1 = require_config_variables(); var util_1 = require("util"); var url_1 = require("url"); @@ -114438,7 +105501,7 @@ var require_download_http_client = __commonJS({ var fs2 = __importStar4(require("fs")); var core14 = __importStar4(require_core()); var zlib = __importStar4(require("zlib")); - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var url_1 = require("url"); var status_reporter_1 = require_status_reporter(); var perf_hooks_1 = require("perf_hooks"); @@ -114781,7 +105844,7 @@ var require_artifact_client = __commonJS({ var core14 = __importStar4(require_core()); var upload_specification_1 = require_upload_specification(); var upload_http_client_1 = require_upload_http_client(); - var utils_1 = require_utils14(); + var utils_1 = require_utils10(); var path_and_artifact_name_validation_1 = require_path_and_artifact_name_validation2(); var download_http_client_1 = require_download_http_client(); var download_specification_1 = require_download_specification(); @@ -115216,6 +106279,741 @@ var require_internal_pattern_helper = __commonJS({ } }); +// node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// node_modules/brace-expansion/index.js +var require_brace_expansion3 = __commonJS({ + "node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str2) { + return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + } + function escapeBraces(str2) { + return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str2) { + return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str2) { + if (!str2) + return [""]; + var parts = []; + var m = balanced("{", "}", str2); + if (!m) + return str2.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str2) { + if (!str2) + return []; + if (str2.substr(0, 2) === "{}") { + str2 = "\\{\\}" + str2.substr(2); + } + return expand(escapeBraces(str2), true).map(unescapeBraces); + } + function embrace(str2) { + return "{" + str2 + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte5(i, y) { + return i >= y; + } + function expand(str2, isTop) { + var expansions = []; + var m = balanced("{", "}", str2); + if (!m || /\$$/.test(m.pre)) return [str2]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str2 = m.pre + "{" + m.body + escClose + m.post; + return expand(str2); + } + return [str2]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte5; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// node_modules/minimatch/minimatch.js +var require_minimatch2 = __commonJS({ + "node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path2 = (function() { + try { + return require("path"); + } catch (e) { + } + })() || { + sep: "/" + }; + minimatch.sep = path2.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion3(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set2, c) { + set2[c] = true; + return set2; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path2.sep !== "/") { + pattern = pattern.split(path2.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set2 = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug2() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set2); + set2 = this.globParts = set2.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set2); + set2 = set2.map(function(s, si, set3) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set2); + set2 = set2.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set2); + this.set = set2; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_2, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set2 = this.set; + if (!set2.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set2.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path2.sep !== "/") { + f = f.split(path2.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set2 = this.set; + this.debug(this.pattern, "set", set2); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set2.length; i++) { + var pattern = set2[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug( + "matchOne", + { "this": this, file, pattern } + ); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) return true; + } + return false; + } + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { @@ -115349,7 +107147,7 @@ var require_internal_pattern = __commonJS({ var path2 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); - var minimatch_1 = require_minimatch(); + var minimatch_1 = require_minimatch2(); var internal_match_kind_1 = require_internal_match_kind(); var internal_path_1 = require_internal_path(); var IS_WINDOWS = process.platform === "win32"; @@ -115794,7 +107592,7 @@ var require_internal_globber = __commonJS({ }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob3 = __commonJS({ +var require_glob2 = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -116993,7 +108791,7 @@ var require_semver3 = __commonJS({ }); // node_modules/@actions/cache/lib/internal/constants.js -var require_constants13 = __commonJS({ +var require_constants10 = __commonJS({ "node_modules/@actions/cache/lib/internal/constants.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -117106,14 +108904,14 @@ var require_cacheUtils = __commonJS({ exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); - var glob2 = __importStar4(require_glob3()); + var glob2 = __importStar4(require_glob2()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); var fs2 = __importStar4(require("fs")); var path2 = __importStar4(require("path")); var semver8 = __importStar4(require_semver3()); var util = __importStar4(require("util")); - var constants_1 = require_constants13(); + var constants_1 = require_constants10(); var versionSalt = "1.0"; function createTempDirectory() { return __awaiter4(this, void 0, void 0, function* () { @@ -117576,7 +109374,7 @@ var require_requestUtils2 = __commonJS({ exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); - var constants_1 = require_constants13(); + var constants_1 = require_constants10(); function isSuccessStatusCode(statusCode) { if (!statusCode) { return false; @@ -117750,7 +109548,7 @@ var require_downloadUtils = __commonJS({ var stream = __importStar4(require("stream")); var util = __importStar4(require("util")); var utils = __importStar4(require_cacheUtils()); - var constants_1 = require_constants13(); + var constants_1 = require_constants10(); var requestUtils_1 = require_requestUtils2(); var abort_controller_1 = require_dist5(); function pipeResponseToStream(response, output) { @@ -119479,7 +111277,7 @@ var require_tar2 = __commonJS({ var fs_1 = require("fs"); var path2 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); - var constants_1 = require_constants13(); + var constants_1 = require_constants10(); var IS_WINDOWS = process.platform === "win32"; function getTarPath() { return __awaiter4(this, void 0, void 0, function* () { @@ -119724,7 +111522,7 @@ var require_cache3 = __commonJS({ var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); var config_1 = require_config2(); var tar_1 = require_tar2(); - var constants_1 = require_constants13(); + var constants_1 = require_constants10(); var http_client_1 = require_lib(); var ValidationError = class _ValidationError extends Error { constructor(message) { @@ -121862,7 +113660,7 @@ var require_internal_pattern2 = __commonJS({ var path2 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); - var minimatch_1 = require_minimatch(); + var minimatch_1 = require_minimatch2(); var internal_match_kind_1 = require_internal_match_kind2(); var internal_path_1 = require_internal_path2(); var IS_WINDOWS = process.platform === "win32"; @@ -122456,7 +114254,7 @@ var require_internal_hash_files = __commonJS({ }); // node_modules/@actions/glob/lib/glob.js -var require_glob4 = __commonJS({ +var require_glob3 = __commonJS({ "node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -122523,7 +114321,6 @@ var io2 = __toESM(require_io()); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); -var import_del = __toESM(require_del()); // node_modules/get-folder-size/index.js var import_node_path = require("node:path"); @@ -125339,11 +117136,9 @@ var artifact = __toESM(require_artifact2()); var artifactLegacy = __toESM(require_artifact_client2()); var core12 = __toESM(require_core()); var import_archiver = __toESM(require_archiver()); -var import_del3 = __toESM(require_del()); // src/analyze.ts var io5 = __toESM(require_io()); -var import_del2 = __toESM(require_del()); // src/autobuild.ts var core11 = __toESM(require_core()); @@ -125762,7 +117557,7 @@ var STREAMING_HIGH_WATERMARK_BYTES = 4 * 1024 * 1024; // src/dependency-caching.ts var actionsCache3 = __toESM(require_cache3()); -var glob = __toESM(require_glob4()); +var glob = __toESM(require_glob3()); // src/debug-artifacts.ts function sanitizeArtifactName(name) { @@ -125901,52 +117696,6 @@ undici/lib/fetch/body.js: undici/lib/websocket/frame.js: (*! ws. MIT License. Einar Otto Stangvik *) -is-extglob/index.js: - (*! - * is-extglob - * - * Copyright (c) 2014-2016, Jon Schlinkert. - * Licensed under the MIT License. - *) - -is-glob/index.js: - (*! - * is-glob - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - *) - -is-number/index.js: - (*! - * is-number - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Released under the MIT License. - *) - -to-regex-range/index.js: - (*! - * to-regex-range - * - * Copyright (c) 2015-present, Jon Schlinkert. - * Released under the MIT License. - *) - -fill-range/index.js: - (*! - * fill-range - * - * Copyright (c) 2014-present, Jon Schlinkert. - * Licensed under the MIT License. - *) - -queue-microtask/index.js: - (*! queue-microtask. MIT License. Feross Aboukhadijeh *) - -run-parallel/index.js: - (*! run-parallel. MIT License. Feross Aboukhadijeh *) - normalize-path/index.js: (*! * normalize-path diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 3fb37f3e4..187d89373 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -185,7 +185,7 @@ var require_file_command = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; var crypto = __importStar4(require("crypto")); - var fs13 = __importStar4(require("fs")); + var fs16 = __importStar4(require("fs")); var os3 = __importStar4(require("os")); var utils_1 = require_utils(); function issueFileCommand(command, message) { @@ -193,10 +193,10 @@ var require_file_command = __commonJS({ if (!filePath) { throw new Error(`Unable to find environment variable for file command ${command}`); } - if (!fs13.existsSync(filePath)) { + if (!fs16.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs13.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + fs16.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { encoding: "utf8" }); } @@ -999,14 +999,14 @@ var require_util = __commonJS({ } const port = url2.port != null ? url2.port : url2.protocol === "https:" ? 443 : 80; let origin = url2.origin != null ? url2.origin : `${url2.protocol}//${url2.hostname}:${port}`; - let path12 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path16 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path12 && !path12.startsWith("/")) { - path12 = `/${path12}`; + if (path16 && !path16.startsWith("/")) { + path16 = `/${path16}`; } - url2 = new URL(origin + path12); + url2 = new URL(origin + path16); } return url2; } @@ -2620,20 +2620,20 @@ var require_parseParams = __commonJS({ var require_basename = __commonJS({ "node_modules/@fastify/busboy/lib/utils/basename.js"(exports2, module2) { "use strict"; - module2.exports = function basename(path12) { - if (typeof path12 !== "string") { + module2.exports = function basename(path16) { + if (typeof path16 !== "string") { return ""; } - for (var i = path12.length - 1; i >= 0; --i) { - switch (path12.charCodeAt(i)) { + for (var i = path16.length - 1; i >= 0; --i) { + switch (path16.charCodeAt(i)) { case 47: // '/' case 92: - path12 = path12.slice(i + 1); - return path12 === ".." || path12 === "." ? "" : path12; + path16 = path16.slice(i + 1); + return path16 === ".." || path16 === "." ? "" : path16; } } - return path12 === ".." || path12 === "." ? "" : path12; + return path16 === ".." || path16 === "." ? "" : path16; }; } }); @@ -2673,8 +2673,8 @@ var require_multipart = __commonJS({ } } function checkFinished() { - if (nends === 0 && finished && !boy._done) { - finished = false; + if (nends === 0 && finished2 && !boy._done) { + finished2 = false; self2.end(); } } @@ -2693,7 +2693,7 @@ var require_multipart = __commonJS({ let nends = 0; let curFile; let curField; - let finished = false; + let finished2 = false; this._needDrain = false; this._pause = false; this._cb = void 0; @@ -2879,7 +2879,7 @@ var require_multipart = __commonJS({ }).on("error", function(err) { boy.emit("error", err); }).on("finish", function() { - finished = true; + finished2 = true; checkFinished(); }); } @@ -5663,7 +5663,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path12, + path: path16, method, body, headers, @@ -5677,11 +5677,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path12 !== "string") { + if (typeof path16 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path12[0] !== "/" && !(path12.startsWith("http://") || path12.startsWith("https://")) && method !== "CONNECT") { + } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") { throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.exec(path12) !== null) { + } else if (invalidPathRegex.exec(path16) !== null) { throw new InvalidArgumentError("invalid request path"); } if (typeof method !== "string") { @@ -5744,7 +5744,7 @@ var require_request = __commonJS({ this.completed = false; this.aborted = false; this.upgrade = upgrade || null; - this.path = query ? util.buildURL(path12, query) : path12; + this.path = query ? util.buildURL(path16, query) : path16; this.origin = origin; this.idempotent = idempotent == null ? method === "HEAD" || method === "GET" : idempotent; this.blocking = blocking == null ? false : blocking; @@ -6752,9 +6752,9 @@ var require_RedirectHandler = __commonJS({ return this.handler.onHeaders(statusCode, headers, resume, statusText); } const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); - const path12 = search ? `${pathname}${search}` : pathname; + const path16 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path12; + this.opts.path = path16; this.opts.origin = origin; this.opts.maxRedirections = 0; this.opts.query = null; @@ -7994,7 +7994,7 @@ var require_client = __commonJS({ writeH2(client, client[kHTTP2Session], request); return; } - const { body, method, path: path12, host, upgrade, headers, blocking, reset } = request; + const { body, method, path: path16, host, upgrade, headers, blocking, reset } = request; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { body.read(0); @@ -8044,7 +8044,7 @@ var require_client = __commonJS({ if (blocking) { socket[kBlocking] = true; } - let header = `${method} ${path12} HTTP/1.1\r + let header = `${method} ${path16} HTTP/1.1\r `; if (typeof host === "string") { header += `host: ${host}\r @@ -8107,7 +8107,7 @@ upgrade: ${upgrade}\r return true; } function writeH2(client, session, request) { - const { body, method, path: path12, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; + const { body, method, path: path16, host, upgrade, expectContinue, signal, headers: reqHeaders } = request; let headers; if (typeof reqHeaders === "string") headers = Request[kHTTP2CopyHeaders](reqHeaders.trim()); else headers = reqHeaders; @@ -8150,7 +8150,7 @@ upgrade: ${upgrade}\r }); return true; } - headers[HTTP2_HEADER_PATH] = path12; + headers[HTTP2_HEADER_PATH] = path16; headers[HTTP2_HEADER_SCHEME] = "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; if (body && typeof body.read === "function") { @@ -8310,10 +8310,10 @@ upgrade: ${upgrade}\r }); return; } - let finished = false; + let finished2 = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { - if (finished) { + if (finished2) { return; } try { @@ -8325,7 +8325,7 @@ upgrade: ${upgrade}\r } }; const onDrain = function() { - if (finished) { + if (finished2) { return; } if (body.resume) { @@ -8333,17 +8333,17 @@ upgrade: ${upgrade}\r } }; const onAbort = function() { - if (finished) { + if (finished2) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); }; const onFinished = function(err) { - if (finished) { + if (finished2) { return; } - finished = true; + finished2 = true; assert(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); socket.off("drain", onDrain).off("error", onFinished); body.removeListener("data", onData).removeListener("end", onFinished).removeListener("error", onFinished).removeListener("close", onAbort); @@ -9217,7 +9217,7 @@ var require_readable = __commonJS({ var kBody = Symbol("kBody"); var kAbort = Symbol("abort"); var kContentType = Symbol("kContentType"); - var noop = () => { + var noop2 = () => { }; module2.exports = class BodyReadable extends Readable2 { constructor({ @@ -9339,7 +9339,7 @@ var require_readable = __commonJS({ return new Promise((resolve6, reject) => { const signalListenerCleanup = signal ? util.addAbortListener(signal, () => { this.destroy(); - }) : noop; + }) : noop2; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { @@ -9347,7 +9347,7 @@ var require_readable = __commonJS({ } else { resolve6(null); } - }).on("error", noop).on("data", function(chunk) { + }).on("error", noop2).on("data", function(chunk) { limit -= chunk.length; if (limit <= 0) { this.destroy(); @@ -9704,7 +9704,7 @@ var require_api_request = __commonJS({ var require_api_stream = __commonJS({ "node_modules/undici/lib/api/api-stream.js"(exports2, module2) { "use strict"; - var { finished, PassThrough } = require("stream"); + var { finished: finished2, PassThrough } = require("stream"); var { InvalidArgumentError, InvalidReturnValueError, @@ -9802,7 +9802,7 @@ var require_api_stream = __commonJS({ if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { throw new InvalidReturnValueError("expected Writable"); } - finished(res, { readable: false }, (err) => { + finished2(res, { readable: false }, (err) => { const { callback: callback2, res: res2, opaque: opaque2, trailers, abort } = this; this.res = null; if (err || !res2.readable) { @@ -10390,20 +10390,20 @@ var require_mock_utils = __commonJS({ } return true; } - function safeUrl(path12) { - if (typeof path12 !== "string") { - return path12; + function safeUrl(path16) { + if (typeof path16 !== "string") { + return path16; } - const pathSegments = path12.split("?"); + const pathSegments = path16.split("?"); if (pathSegments.length !== 2) { - return path12; + return path16; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path12, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path12); + function matchKey(mockDispatch2, { path: path16, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path16); const methodMatch = matchValue(mockDispatch2.method, method); const bodyMatch = typeof mockDispatch2.body !== "undefined" ? matchValue(mockDispatch2.body, body) : true; const headersMatch = matchHeaders(mockDispatch2, headers); @@ -10421,7 +10421,7 @@ var require_mock_utils = __commonJS({ function getMockDispatch(mockDispatches, key) { const basePath = key.query ? buildURL(key.path, key.query) : key.path; const resolvedPath = typeof basePath === "string" ? safeUrl(basePath) : basePath; - let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path12 }) => matchValue(safeUrl(path12), resolvedPath)); + let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path: path16 }) => matchValue(safeUrl(path16), resolvedPath)); if (matchedMockDispatches.length === 0) { throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); } @@ -10458,9 +10458,9 @@ var require_mock_utils = __commonJS({ } } function buildKey(opts) { - const { path: path12, method, body, headers, query } = opts; + const { path: path16, method, body, headers, query } = opts; return { - path: path12, + path: path16, method, body, headers, @@ -10754,7 +10754,7 @@ var require_mock_interceptor = __commonJS({ var require_mock_client = __commonJS({ "node_modules/undici/lib/mock/mock-client.js"(exports2, module2) { "use strict"; - var { promisify: promisify2 } = require("util"); + var { promisify: promisify3 } = require("util"); var Client = require_client(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10794,7 +10794,7 @@ var require_mock_client = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify2(this[kOriginalClose])(); + await promisify3(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10807,7 +10807,7 @@ var require_mock_client = __commonJS({ var require_mock_pool = __commonJS({ "node_modules/undici/lib/mock/mock-pool.js"(exports2, module2) { "use strict"; - var { promisify: promisify2 } = require("util"); + var { promisify: promisify3 } = require("util"); var Pool = require_pool(); var { buildMockDispatch } = require_mock_utils(); var { @@ -10847,7 +10847,7 @@ var require_mock_pool = __commonJS({ return new MockInterceptor(opts, this[kDispatches]); } async [kClose]() { - await promisify2(this[kOriginalClose])(); + await promisify3(this[kOriginalClose])(); this[kConnected] = 0; this[kMockAgent][Symbols.kClients].delete(this[kOrigin]); } @@ -10909,10 +10909,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path12, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path16, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path12, + Path: path16, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -15532,8 +15532,8 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path12) { - for (const char of path12) { + function validateCookiePath(path16) { + for (const char of path16) { const code = char.charCodeAt(0); if (code < 33 || char === ";") { throw new Error("Invalid cookie path"); @@ -17213,11 +17213,11 @@ var require_undici = __commonJS({ if (typeof opts.path !== "string") { throw new InvalidArgumentError("invalid opts.path"); } - let path12 = opts.path; + let path16 = opts.path; if (!opts.path.startsWith("/")) { - path12 = `/${path12}`; + path16 = `/${path16}`; } - url2 = new URL(util.parseOrigin(url2).origin + path12); + url2 = new URL(util.parseOrigin(url2).origin + path16); } else { if (!opts) { opts = typeof url2 === "object" ? url2 : {}; @@ -18440,7 +18440,7 @@ var require_path_utils = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path12 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); function toPosixPath(pth) { return pth.replace(/[\\]/g, "/"); } @@ -18450,7 +18450,7 @@ var require_path_utils = __commonJS({ } exports2.toWin32Path = toWin32Path; function toPlatformPath(pth) { - return pth.replace(/[/\\]/g, path12.sep); + return pth.replace(/[/\\]/g, path16.sep); } exports2.toPlatformPath = toPlatformPath; } @@ -18513,12 +18513,12 @@ var require_io_util = __commonJS({ var _a; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs13 = __importStar4(require("fs")); - var path12 = __importStar4(require("path")); - _a = fs13.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + var fs16 = __importStar4(require("fs")); + var path16 = __importStar4(require("path")); + _a = fs16.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs13.constants.O_RDONLY; + exports2.READONLY = fs16.constants.O_RDONLY; function exists(fsPath) { return __awaiter4(this, void 0, void 0, function* () { try { @@ -18533,13 +18533,13 @@ var require_io_util = __commonJS({ }); } exports2.exists = exists; - function isDirectory(fsPath, useStat = false) { + function isDirectory2(fsPath, useStat = false) { return __awaiter4(this, void 0, void 0, function* () { const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); return stats.isDirectory(); }); } - exports2.isDirectory = isDirectory; + exports2.isDirectory = isDirectory2; function isRooted(p) { p = normalizeSeparators(p); if (!p) { @@ -18563,7 +18563,7 @@ var require_io_util = __commonJS({ } if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { - const upperExt = path12.extname(filePath).toUpperCase(); + const upperExt = path16.extname(filePath).toUpperCase(); if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { return filePath; } @@ -18587,11 +18587,11 @@ var require_io_util = __commonJS({ if (stats && stats.isFile()) { if (exports2.IS_WINDOWS) { try { - const directory = path12.dirname(filePath); - const upperName = path12.basename(filePath).toUpperCase(); + const directory = path16.dirname(filePath); + const upperName = path16.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path12.join(directory, actualName); + filePath = path16.join(directory, actualName); break; } } @@ -18686,7 +18686,7 @@ var require_io = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.findInPath = exports2.which = exports2.mkdirP = exports2.rmRF = exports2.mv = exports2.cp = void 0; var assert_1 = require("assert"); - var path12 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var ioUtil = __importStar4(require_io_util()); function cp(source, dest, options = {}) { return __awaiter4(this, void 0, void 0, function* () { @@ -18695,7 +18695,7 @@ var require_io = __commonJS({ if (destStat && destStat.isFile() && !force) { return; } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path12.join(dest, path12.basename(source)) : dest; + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path16.join(dest, path16.basename(source)) : dest; if (!(yield ioUtil.exists(source))) { throw new Error(`no such file or directory: ${source}`); } @@ -18707,7 +18707,7 @@ var require_io = __commonJS({ yield cpDirRecursive(source, newDest, 0, force); } } else { - if (path12.relative(source, newDest) === "") { + if (path16.relative(source, newDest) === "") { throw new Error(`'${newDest}' and '${source}' are the same file`); } yield copyFile(source, newDest, force); @@ -18720,7 +18720,7 @@ var require_io = __commonJS({ if (yield ioUtil.exists(dest)) { let destExists = true; if (yield ioUtil.isDirectory(dest)) { - dest = path12.join(dest, path12.basename(source)); + dest = path16.join(dest, path16.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -18731,7 +18731,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path12.dirname(dest)); + yield mkdirP(path16.dirname(dest)); yield ioUtil.rename(source, dest); }); } @@ -18794,7 +18794,7 @@ var require_io = __commonJS({ } const extensions = []; if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path12.delimiter)) { + for (const extension of process.env["PATHEXT"].split(path16.delimiter)) { if (extension) { extensions.push(extension); } @@ -18807,12 +18807,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path12.sep)) { + if (tool.includes(path16.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path12.delimiter)) { + for (const p of process.env.PATH.split(path16.delimiter)) { if (p) { directories.push(p); } @@ -18820,7 +18820,7 @@ var require_io = __commonJS({ } const matches = []; for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path12.join(directory, tool), extensions); + const filePath = yield ioUtil.tryGetExecutablePath(path16.join(directory, tool), extensions); if (filePath) { matches.push(filePath); } @@ -18936,7 +18936,7 @@ var require_toolrunner = __commonJS({ var os3 = __importStar4(require("os")); var events = __importStar4(require("events")); var child = __importStar4(require("child_process")); - var path12 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var io6 = __importStar4(require_io()); var ioUtil = __importStar4(require_io_util()); var timers_1 = require("timers"); @@ -19151,7 +19151,7 @@ var require_toolrunner = __commonJS({ exec() { return __awaiter4(this, void 0, void 0, function* () { if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS && this.toolPath.includes("\\"))) { - this.toolPath = path12.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path16.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); return new Promise((resolve6, reject) => __awaiter4(this, void 0, void 0, function* () { @@ -19651,7 +19651,7 @@ var require_core = __commonJS({ var file_command_1 = require_file_command(); var utils_1 = require_utils(); var os3 = __importStar4(require("os")); - var path12 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var oidc_utils_1 = require_oidc_utils(); var ExitCode; (function(ExitCode2) { @@ -19679,7 +19679,7 @@ var require_core = __commonJS({ } else { (0, command_1.issueCommand)("add-path", {}, inputPath); } - process.env["PATH"] = `${inputPath}${path12.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path16.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath; function getInput2(name, options) { @@ -19835,8 +19835,8 @@ var require_context = __commonJS({ if ((0, fs_1.existsSync)(process.env.GITHUB_EVENT_PATH)) { this.payload = JSON.parse((0, fs_1.readFileSync)(process.env.GITHUB_EVENT_PATH, { encoding: "utf8" })); } else { - const path12 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path12} does not exist${os_1.EOL}`); + const path16 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path16} does not exist${os_1.EOL}`); } } this.eventName = process.env.GITHUB_EVENT_NAME; @@ -20529,12 +20529,12 @@ var require_wrappy = __commonJS({ var require_once = __commonJS({ "node_modules/once/once.js"(exports2, module2) { var wrappy = require_wrappy(); - module2.exports = wrappy(once); + module2.exports = wrappy(once2); module2.exports.strict = wrappy(onceStrict); - once.proto = once(function() { + once2.proto = once2(function() { Object.defineProperty(Function.prototype, "once", { value: function() { - return once(this); + return once2(this); }, configurable: true }); @@ -20545,7 +20545,7 @@ var require_once = __commonJS({ configurable: true }); }); - function once(fn) { + function once2(fn) { var f = function() { if (f.called) return f.value; f.called = true; @@ -21759,7 +21759,7 @@ var require_dist_node11 = __commonJS({ var import_graphql = require_dist_node9(); var import_auth_token = require_dist_node10(); var VERSION = "5.2.0"; - var noop = () => { + var noop2 = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); @@ -21838,8 +21838,8 @@ var require_dist_node11 = __commonJS({ this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); this.log = Object.assign( { - debug: noop, - info: noop, + debug: noop2, + info: noop2, warn: consoleWarn, error: consoleError }, @@ -24525,135 +24525,6 @@ var require_github = __commonJS({ } }); -// node_modules/array-union/index.js -var require_array_union = __commonJS({ - "node_modules/array-union/index.js"(exports2, module2) { - "use strict"; - module2.exports = (...arguments_) => { - return [...new Set([].concat(...arguments_))]; - }; - } -}); - -// node_modules/merge2/index.js -var require_merge2 = __commonJS({ - "node_modules/merge2/index.js"(exports2, module2) { - "use strict"; - var Stream = require("stream"); - var PassThrough = Stream.PassThrough; - var slice = Array.prototype.slice; - module2.exports = merge2; - function merge2() { - const streamsQueue = []; - const args = slice.call(arguments); - let merging = false; - let options = args[args.length - 1]; - if (options && !Array.isArray(options) && options.pipe == null) { - args.pop(); - } else { - options = {}; - } - const doEnd = options.end !== false; - const doPipeError = options.pipeError === true; - if (options.objectMode == null) { - options.objectMode = true; - } - if (options.highWaterMark == null) { - options.highWaterMark = 64 * 1024; - } - const mergedStream = PassThrough(options); - function addStream() { - for (let i = 0, len = arguments.length; i < len; i++) { - streamsQueue.push(pauseStreams(arguments[i], options)); - } - mergeStream(); - return this; - } - function mergeStream() { - if (merging) { - return; - } - merging = true; - let streams = streamsQueue.shift(); - if (!streams) { - process.nextTick(endStream); - return; - } - if (!Array.isArray(streams)) { - streams = [streams]; - } - let pipesCount = streams.length + 1; - function next() { - if (--pipesCount > 0) { - return; - } - merging = false; - mergeStream(); - } - function pipe(stream2) { - function onend() { - stream2.removeListener("merge2UnpipeEnd", onend); - stream2.removeListener("end", onend); - if (doPipeError) { - stream2.removeListener("error", onerror); - } - next(); - } - function onerror(err) { - mergedStream.emit("error", err); - } - if (stream2._readableState.endEmitted) { - return next(); - } - stream2.on("merge2UnpipeEnd", onend); - stream2.on("end", onend); - if (doPipeError) { - stream2.on("error", onerror); - } - stream2.pipe(mergedStream, { end: false }); - stream2.resume(); - } - for (let i = 0; i < streams.length; i++) { - pipe(streams[i]); - } - next(); - } - function endStream() { - merging = false; - mergedStream.emit("queueDrain"); - if (doEnd) { - mergedStream.end(); - } - } - mergedStream.setMaxListeners(0); - mergedStream.add = addStream; - mergedStream.on("unpipe", function(stream2) { - stream2.emit("merge2UnpipeEnd"); - }); - if (args.length) { - addStream.apply(null, args); - } - return mergedStream; - } - function pauseStreams(streams, options) { - if (!Array.isArray(streams)) { - if (!streams._readableState && streams.pipe) { - streams = streams.pipe(PassThrough(options)); - } - if (!streams._readableState || !streams.pause || !streams.pipe) { - throw new Error("Only readable stream can be merged."); - } - streams.pause(); - } else { - for (let i = 0, len = streams.length; i < len; i++) { - streams[i] = pauseStreams(streams[i], options); - } - } - return streams; - } - } -}); - // node_modules/fast-glob/out/utils/array.js var require_array = __commonJS({ "node_modules/fast-glob/out/utils/array.js"(exports2) { @@ -24726,7 +24597,7 @@ var require_path = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.convertPosixPathToPattern = exports2.convertWindowsPathToPattern = exports2.convertPathToPattern = exports2.escapePosixPath = exports2.escapeWindowsPath = exports2.escape = exports2.removeLeadingDotSegment = exports2.makeAbsolute = exports2.unixify = void 0; var os3 = require("os"); - var path12 = require("path"); + var path16 = require("path"); var IS_WINDOWS_PLATFORM = os3.platform() === "win32"; var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g; @@ -24738,7 +24609,7 @@ var require_path = __commonJS({ } exports2.unixify = unixify; function makeAbsolute(cwd, filepath) { - return path12.resolve(cwd, filepath); + return path16.resolve(cwd, filepath); } exports2.makeAbsolute = makeAbsolute; function removeLeadingDotSegment(entry) { @@ -24904,7 +24775,7 @@ var require_is_glob = __commonJS({ } return false; }; - module2.exports = function isGlob(str2, options) { + module2.exports = function isGlob2(str2, options) { if (typeof str2 !== "string" || str2 === "") { return false; } @@ -24924,26 +24795,26 @@ var require_is_glob = __commonJS({ var require_glob_parent = __commonJS({ "node_modules/glob-parent/index.js"(exports2, module2) { "use strict"; - var isGlob = require_is_glob(); + var isGlob2 = require_is_glob(); var pathPosixDirname = require("path").posix.dirname; var isWin32 = require("os").platform() === "win32"; - var slash = "/"; + var slash2 = "/"; var backslash = /\\/g; var enclosure = /[\{\[].*[\}\]]$/; - var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/; + var globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/; var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; module2.exports = function globParent(str2, opts) { var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash) < 0) { - str2 = str2.replace(backslash, slash); + if (options.flipBackslashes && isWin32 && str2.indexOf(slash2) < 0) { + str2 = str2.replace(backslash, slash2); } if (enclosure.test(str2)) { - str2 += slash; + str2 += slash2; } str2 += "a"; do { str2 = pathPosixDirname(str2); - } while (isGlob(str2) || globby.test(str2)); + } while (isGlob2(str2) || globby2.test(str2)); return str2.replace(escaped, "$1"); }; } @@ -26035,7 +25906,7 @@ var require_braces = __commonJS({ var require_constants7 = __commonJS({ "node_modules/picomatch/lib/constants.js"(exports2, module2) { "use strict"; - var path12 = require("path"); + var path16 = require("path"); var WIN_SLASH = "\\\\/"; var WIN_NO_SLASH = `[^${WIN_SLASH}]`; var DOT_LITERAL = "\\."; @@ -26205,7 +26076,7 @@ var require_constants7 = __commonJS({ /* | */ CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279, /* \uFEFF */ - SEP: path12.sep, + SEP: path16.sep, /** * Create EXTGLOB_CHARS */ @@ -26232,7 +26103,7 @@ var require_constants7 = __commonJS({ var require_utils6 = __commonJS({ "node_modules/picomatch/lib/utils.js"(exports2) { "use strict"; - var path12 = require("path"); + var path16 = require("path"); var win32 = process.platform === "win32"; var { REGEX_BACKSLASH, @@ -26261,7 +26132,7 @@ var require_utils6 = __commonJS({ if (options && typeof options.windows === "boolean") { return options.windows; } - return win32 === true || path12.sep === "\\"; + return win32 === true || path16.sep === "\\"; }; exports2.escapeLast = (input, char, lastIdx) => { const idx = input.lastIndexOf(char, lastIdx); @@ -26347,14 +26218,14 @@ var require_scan = __commonJS({ let lastIndex = 0; let isBrace = false; let isBracket = false; - let isGlob = false; + let isGlob2 = false; let isExtglob = false; let isGlobstar = false; let braceEscaped = false; let backslashes = false; let negated = false; let negatedExtglob = false; - let finished = false; + let finished2 = false; let braces = 0; let prev; let code; @@ -26390,8 +26261,8 @@ var require_scan = __commonJS({ } if (braceEscaped !== true && code === CHAR_DOT && (code = advance()) === CHAR_DOT) { isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -26399,8 +26270,8 @@ var require_scan = __commonJS({ } if (braceEscaped !== true && code === CHAR_COMMA2) { isBrace = token.isBrace = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -26411,7 +26282,7 @@ var require_scan = __commonJS({ if (braces === 0) { braceEscaped = false; isBrace = token.isBrace = true; - finished = true; + finished2 = true; break; } } @@ -26425,7 +26296,7 @@ var require_scan = __commonJS({ slashes.push(index); tokens.push(token); token = { value: "", depth: 0, isGlob: false }; - if (finished === true) continue; + if (finished2 === true) continue; if (prev === CHAR_DOT && index === start + 1) { start += 2; continue; @@ -26436,9 +26307,9 @@ var require_scan = __commonJS({ if (opts.noext !== true) { const isExtglobChar = code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK2 || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK; if (isExtglobChar === true && peek() === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; + isGlob2 = token.isGlob = true; isExtglob = token.isExtglob = true; - finished = true; + finished2 = true; if (code === CHAR_EXCLAMATION_MARK && index === start) { negatedExtglob = true; } @@ -26450,8 +26321,8 @@ var require_scan = __commonJS({ continue; } if (code === CHAR_RIGHT_PARENTHESES) { - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; break; } } @@ -26462,16 +26333,16 @@ var require_scan = __commonJS({ } if (code === CHAR_ASTERISK2) { if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } break; } if (code === CHAR_QUESTION_MARK) { - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; if (scanToEnd === true) { continue; } @@ -26486,8 +26357,8 @@ var require_scan = __commonJS({ } if (next === CHAR_RIGHT_SQUARE_BRACKET2) { isBracket = token.isBracket = true; - isGlob = token.isGlob = true; - finished = true; + isGlob2 = token.isGlob = true; + finished2 = true; break; } } @@ -26502,7 +26373,7 @@ var require_scan = __commonJS({ continue; } if (opts.noparen !== true && code === CHAR_LEFT_PARENTHESES) { - isGlob = token.isGlob = true; + isGlob2 = token.isGlob = true; if (scanToEnd === true) { while (eos() !== true && (code = advance())) { if (code === CHAR_LEFT_PARENTHESES) { @@ -26511,7 +26382,7 @@ var require_scan = __commonJS({ continue; } if (code === CHAR_RIGHT_PARENTHESES) { - finished = true; + finished2 = true; break; } } @@ -26519,8 +26390,8 @@ var require_scan = __commonJS({ } break; } - if (isGlob === true) { - finished = true; + if (isGlob2 === true) { + finished2 = true; if (scanToEnd === true) { continue; } @@ -26529,7 +26400,7 @@ var require_scan = __commonJS({ } if (opts.noext === true) { isExtglob = false; - isGlob = false; + isGlob2 = false; } let base = str2; let prefix = ""; @@ -26539,10 +26410,10 @@ var require_scan = __commonJS({ str2 = str2.slice(start); lastIndex -= start; } - if (base && isGlob === true && lastIndex > 0) { + if (base && isGlob2 === true && lastIndex > 0) { base = str2.slice(0, lastIndex); glob = str2.slice(lastIndex); - } else if (isGlob === true) { + } else if (isGlob2 === true) { base = ""; glob = str2; } else { @@ -26567,7 +26438,7 @@ var require_scan = __commonJS({ glob, isBrace, isBracket, - isGlob, + isGlob: isGlob2, isExtglob, isGlobstar, negated, @@ -27396,7 +27267,7 @@ var require_parse3 = __commonJS({ var require_picomatch = __commonJS({ "node_modules/picomatch/lib/picomatch.js"(exports2, module2) { "use strict"; - var path12 = require("path"); + var path16 = require("path"); var scan = require_scan(); var parse = require_parse3(); var utils = require_utils6(); @@ -27481,7 +27352,7 @@ var require_picomatch = __commonJS({ }; picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => { const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options); - return regex.test(path12.basename(input)); + return regex.test(path16.basename(input)); }; picomatch.isMatch = (str2, patterns, options) => picomatch(patterns, options)(str2); picomatch.parse = (pattern, options) => { @@ -27708,7 +27579,7 @@ var require_pattern = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isAbsolute = exports2.partitionAbsoluteAndRelative = exports2.removeDuplicateSlashes = exports2.matchAny = exports2.convertPatternsToRe = exports2.makeRe = exports2.getPatternParts = exports2.expandBraceExpansion = exports2.expandPatternsWithBraceExpansion = exports2.isAffectDepthOfReadingPattern = exports2.endsWithSlashGlobStar = exports2.hasGlobStar = exports2.getBaseDirectory = exports2.isPatternRelatedToParentDirectory = exports2.getPatternsOutsideCurrentDirectory = exports2.getPatternsInsideCurrentDirectory = exports2.getPositivePatterns = exports2.getNegativePatterns = exports2.isPositivePattern = exports2.isNegativePattern = exports2.convertToNegativePattern = exports2.convertToPositivePattern = exports2.isDynamicPattern = exports2.isStaticPattern = void 0; - var path12 = require("path"); + var path16 = require("path"); var globParent = require_glob_parent(); var micromatch = require_micromatch(); var GLOBSTAR = "**"; @@ -27720,10 +27591,10 @@ var require_pattern = __commonJS({ var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./; var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g; function isStaticPattern(pattern, options = {}) { - return !isDynamicPattern(pattern, options); + return !isDynamicPattern2(pattern, options); } exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern(pattern, options = {}) { + function isDynamicPattern2(pattern, options = {}) { if (pattern === "") { return false; } @@ -27741,7 +27612,7 @@ var require_pattern = __commonJS({ } return false; } - exports2.isDynamicPattern = isDynamicPattern; + exports2.isDynamicPattern = isDynamicPattern2; function hasBraceExpansion(pattern) { const openingBraceIndex = pattern.indexOf("{"); if (openingBraceIndex === -1) { @@ -27755,23 +27626,23 @@ var require_pattern = __commonJS({ return BRACE_EXPANSION_SEPARATORS_RE.test(braceContent); } function convertToPositivePattern(pattern) { - return isNegativePattern(pattern) ? pattern.slice(1) : pattern; + return isNegativePattern2(pattern) ? pattern.slice(1) : pattern; } exports2.convertToPositivePattern = convertToPositivePattern; function convertToNegativePattern(pattern) { return "!" + pattern; } exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern(pattern) { + function isNegativePattern2(pattern) { return pattern.startsWith("!") && pattern[1] !== "("; } - exports2.isNegativePattern = isNegativePattern; + exports2.isNegativePattern = isNegativePattern2; function isPositivePattern(pattern) { - return !isNegativePattern(pattern); + return !isNegativePattern2(pattern); } exports2.isPositivePattern = isPositivePattern; function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern); + return patterns.filter(isNegativePattern2); } exports2.getNegativePatterns = getNegativePatterns; function getPositivePatterns(patterns) { @@ -27803,7 +27674,7 @@ var require_pattern = __commonJS({ } exports2.endsWithSlashGlobStar = endsWithSlashGlobStar; function isAffectDepthOfReadingPattern(pattern) { - const basename = path12.basename(pattern); + const basename = path16.basename(pattern); return endsWithSlashGlobStar(pattern) || isStaticPattern(basename); } exports2.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern; @@ -27861,12 +27732,131 @@ var require_pattern = __commonJS({ } exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; function isAbsolute3(pattern) { - return path12.isAbsolute(pattern); + return path16.isAbsolute(pattern); } exports2.isAbsolute = isAbsolute3; } }); +// node_modules/merge2/index.js +var require_merge2 = __commonJS({ + "node_modules/merge2/index.js"(exports2, module2) { + "use strict"; + var Stream = require("stream"); + var PassThrough = Stream.PassThrough; + var slice = Array.prototype.slice; + module2.exports = merge2; + function merge2() { + const streamsQueue = []; + const args = slice.call(arguments); + let merging = false; + let options = args[args.length - 1]; + if (options && !Array.isArray(options) && options.pipe == null) { + args.pop(); + } else { + options = {}; + } + const doEnd = options.end !== false; + const doPipeError = options.pipeError === true; + if (options.objectMode == null) { + options.objectMode = true; + } + if (options.highWaterMark == null) { + options.highWaterMark = 64 * 1024; + } + const mergedStream = PassThrough(options); + function addStream() { + for (let i = 0, len = arguments.length; i < len; i++) { + streamsQueue.push(pauseStreams(arguments[i], options)); + } + mergeStream(); + return this; + } + function mergeStream() { + if (merging) { + return; + } + merging = true; + let streams = streamsQueue.shift(); + if (!streams) { + process.nextTick(endStream2); + return; + } + if (!Array.isArray(streams)) { + streams = [streams]; + } + let pipesCount = streams.length + 1; + function next() { + if (--pipesCount > 0) { + return; + } + merging = false; + mergeStream(); + } + function pipe(stream2) { + function onend() { + stream2.removeListener("merge2UnpipeEnd", onend); + stream2.removeListener("end", onend); + if (doPipeError) { + stream2.removeListener("error", onerror); + } + next(); + } + function onerror(err) { + mergedStream.emit("error", err); + } + if (stream2._readableState.endEmitted) { + return next(); + } + stream2.on("merge2UnpipeEnd", onend); + stream2.on("end", onend); + if (doPipeError) { + stream2.on("error", onerror); + } + stream2.pipe(mergedStream, { end: false }); + stream2.resume(); + } + for (let i = 0; i < streams.length; i++) { + pipe(streams[i]); + } + next(); + } + function endStream2() { + merging = false; + mergedStream.emit("queueDrain"); + if (doEnd) { + mergedStream.end(); + } + } + mergedStream.setMaxListeners(0); + mergedStream.add = addStream; + mergedStream.on("unpipe", function(stream2) { + stream2.emit("merge2UnpipeEnd"); + }); + if (args.length) { + addStream.apply(null, args); + } + return mergedStream; + } + function pauseStreams(streams, options) { + if (!Array.isArray(streams)) { + if (!streams._readableState && streams.pipe) { + streams = streams.pipe(PassThrough(options)); + } + if (!streams._readableState || !streams.pause || !streams.pipe) { + throw new Error("Only readable stream can be merged."); + } + streams.pause(); + } else { + for (let i = 0, len = streams.length; i < len; i++) { + streams[i] = pauseStreams(streams[i], options); + } + } + return streams; + } + } +}); + // node_modules/fast-glob/out/utils/stream.js var require_stream = __commonJS({ "node_modules/fast-glob/out/utils/stream.js"(exports2) { @@ -27917,10 +27907,10 @@ var require_utils7 = __commonJS({ exports2.array = array; var errno = require_errno(); exports2.errno = errno; - var fs13 = require_fs(); - exports2.fs = fs13; - var path12 = require_path(); - exports2.path = path12; + var fs16 = require_fs(); + exports2.fs = fs16; + var path16 = require_path(); + exports2.path = path16; var pattern = require_pattern(); exports2.pattern = pattern; var stream2 = require_stream(); @@ -28032,8 +28022,8 @@ var require_async = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.read = void 0; - function read(path12, settings, callback) { - settings.fs.lstat(path12, (lstatError, lstat) => { + function read(path16, settings, callback) { + settings.fs.lstat(path16, (lstatError, lstat) => { if (lstatError !== null) { callFailureCallback(callback, lstatError); return; @@ -28042,7 +28032,7 @@ var require_async = __commonJS({ callSuccessCallback(callback, lstat); return; } - settings.fs.stat(path12, (statError, stat) => { + settings.fs.stat(path16, (statError, stat) => { if (statError !== null) { if (settings.throwErrorOnBrokenSymbolicLink) { callFailureCallback(callback, statError); @@ -28074,13 +28064,13 @@ var require_sync = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.read = void 0; - function read(path12, settings) { - const lstat = settings.fs.lstatSync(path12); + function read(path16, settings) { + const lstat = settings.fs.lstatSync(path16); if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { return lstat; } try { - const stat = settings.fs.statSync(path12); + const stat = settings.fs.statSync(path16); if (settings.markSymbolicLink) { stat.isSymbolicLink = () => true; } @@ -28102,12 +28092,12 @@ var require_fs2 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs13 = require("fs"); + var fs16 = require("fs"); exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs13.lstat, - stat: fs13.stat, - lstatSync: fs13.lstatSync, - statSync: fs13.statSync + lstat: fs16.lstat, + stat: fs16.stat, + lstatSync: fs16.lstatSync, + statSync: fs16.statSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -28124,12 +28114,12 @@ var require_settings = __commonJS({ "node_modules/@nodelib/fs.stat/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var fs13 = require_fs2(); + var fs16 = require_fs2(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs13.createFileSystemAdapter(this._options.fs); + this.fs = fs16.createFileSystemAdapter(this._options.fs); this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); } @@ -28151,17 +28141,17 @@ var require_out = __commonJS({ var sync = require_sync(); var settings_1 = require_settings(); exports2.Settings = settings_1.default; - function stat(path12, optionsOrSettingsOrCallback, callback) { + function stat(path16, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path12, getSettings(), optionsOrSettingsOrCallback); + async.read(path16, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path12, getSettings(optionsOrSettingsOrCallback), callback); + async.read(path16, getSettings(optionsOrSettingsOrCallback), callback); } exports2.stat = stat; - function statSync2(path12, optionsOrSettings) { + function statSync2(path16, optionsOrSettings) { const settings = getSettings(optionsOrSettings); - return sync.read(path12, settings); + return sync.read(path16, settings); } exports2.statSync = statSync2; function getSettings(settingsOrOptions = {}) { @@ -28284,8 +28274,8 @@ var require_utils8 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.fs = void 0; - var fs13 = require_fs3(); - exports2.fs = fs13; + var fs16 = require_fs3(); + exports2.fs = fs16; } }); @@ -28377,16 +28367,16 @@ var require_async2 = __commonJS({ return; } const tasks = names.map((name) => { - const path12 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); + const path16 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); return (done) => { - fsStat.stat(path12, settings.fsStatSettings, (error2, stats) => { + fsStat.stat(path16, settings.fsStatSettings, (error2, stats) => { if (error2 !== null) { done(error2); return; } const entry = { name, - path: path12, + path: path16, dirent: utils.fs.createDirentFromStats(name, stats) }; if (settings.stats) { @@ -28480,14 +28470,14 @@ var require_fs4 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0; - var fs13 = require("fs"); + var fs16 = require("fs"); exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs13.lstat, - stat: fs13.stat, - lstatSync: fs13.lstatSync, - statSync: fs13.statSync, - readdir: fs13.readdir, - readdirSync: fs13.readdirSync + lstat: fs16.lstat, + stat: fs16.stat, + lstatSync: fs16.lstatSync, + statSync: fs16.statSync, + readdir: fs16.readdir, + readdirSync: fs16.readdirSync }; function createFileSystemAdapter(fsMethods) { if (fsMethods === void 0) { @@ -28504,15 +28494,15 @@ var require_settings2 = __commonJS({ "node_modules/@nodelib/fs.scandir/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path12 = require("path"); + var path16 = require("path"); var fsStat = require_out(); - var fs13 = require_fs4(); + var fs16 = require_fs4(); var Settings = class { constructor(_options = {}) { this._options = _options; this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs13.createFileSystemAdapter(this._options.fs); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path12.sep); + this.fs = fs16.createFileSystemAdapter(this._options.fs); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path16.sep); this.stats = this._getValue(this._options.stats, false); this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true); this.fsStatSettings = new fsStat.Settings({ @@ -28539,17 +28529,17 @@ var require_out2 = __commonJS({ var sync = require_sync2(); var settings_1 = require_settings2(); exports2.Settings = settings_1.default; - function scandir(path12, optionsOrSettingsOrCallback, callback) { + function scandir(path16, optionsOrSettingsOrCallback, callback) { if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path12, getSettings(), optionsOrSettingsOrCallback); + async.read(path16, getSettings(), optionsOrSettingsOrCallback); return; } - async.read(path12, getSettings(optionsOrSettingsOrCallback), callback); + async.read(path16, getSettings(optionsOrSettingsOrCallback), callback); } exports2.scandir = scandir; - function scandirSync(path12, optionsOrSettings) { + function scandirSync(path16, optionsOrSettings) { const settings = getSettings(optionsOrSettings); - return sync.read(path12, settings); + return sync.read(path16, settings); } exports2.scandirSync = scandirSync; function getSettings(settingsOrOptions = {}) { @@ -28609,8 +28599,8 @@ var require_queue = __commonJS({ var _running = 0; var self2 = { push, - drain: noop, - saturated: noop, + drain: noop2, + saturated: noop2, pause, paused: false, concurrency, @@ -28620,7 +28610,7 @@ var require_queue = __commonJS({ length, getQueue, unshift, - empty: noop, + empty: noop2, kill, killAndDrain }; @@ -28665,7 +28655,7 @@ var require_queue = __commonJS({ current.context = context2; current.release = release3; current.value = value; - current.callback = done || noop; + current.callback = done || noop2; if (_running === self2.concurrency || self2.paused) { if (queueTail) { queueTail.next = current; @@ -28685,7 +28675,7 @@ var require_queue = __commonJS({ current.context = context2; current.release = release3; current.value = value; - current.callback = done || noop; + current.callback = done || noop2; if (_running === self2.concurrency || self2.paused) { if (queueHead) { current.next = queueHead; @@ -28726,28 +28716,28 @@ var require_queue = __commonJS({ function kill() { queueHead = null; queueTail = null; - self2.drain = noop; + self2.drain = noop2; } function killAndDrain() { queueHead = null; queueTail = null; self2.drain(); - self2.drain = noop; + self2.drain = noop2; } } - function noop() { + function noop2() { } function Task() { this.value = null; - this.callback = noop; + this.callback = noop2; this.next = null; - this.release = noop; + this.release = noop2; this.context = null; var self2 = this; this.worked = function worked(err, result) { var callback = self2.callback; self2.value = null; - self2.callback = noop; + self2.callback = noop2; callback.call(self2.context, err, result); self2.release(self2); }; @@ -29076,7 +29066,7 @@ var require_settings3 = __commonJS({ "node_modules/@nodelib/fs.walk/out/settings.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path12 = require("path"); + var path16 = require("path"); var fsScandir = require_out2(); var Settings = class { constructor(_options = {}) { @@ -29086,7 +29076,7 @@ var require_settings3 = __commonJS({ this.deepFilter = this._getValue(this._options.deepFilter, null); this.entryFilter = this._getValue(this._options.entryFilter, null); this.errorFilter = this._getValue(this._options.errorFilter, null); - this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path12.sep); + this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path16.sep); this.fsScandirSettings = new fsScandir.Settings({ followSymbolicLinks: this._options.followSymbolicLinks, fs: this._options.fs, @@ -29148,7 +29138,7 @@ var require_reader2 = __commonJS({ "node_modules/fast-glob/out/readers/reader.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path12 = require("path"); + var path16 = require("path"); var fsStat = require_out(); var utils = require_utils7(); var Reader = class { @@ -29161,7 +29151,7 @@ var require_reader2 = __commonJS({ }); } _getFullEntryPath(filepath) { - return path12.resolve(this._settings.cwd, filepath); + return path16.resolve(this._settings.cwd, filepath); } _makeEntry(stats, pattern) { const entry = { @@ -29482,34 +29472,34 @@ var require_entry = __commonJS({ _onlyDirectoryFilter(entry) { return this._settings.onlyDirectories && !entry.dirent.isDirectory(); } - _isMatchToPatternsSet(filepath, patterns, isDirectory) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory); + _isMatchToPatternsSet(filepath, patterns, isDirectory2) { + const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2); if (!isMatched) { return false; } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory); + const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2); if (isMatchedByRelativeNegative) { return false; } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory); + const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2); if (isMatchedByAbsoluteNegative) { return false; } return true; } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) { + _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) { if (patternsRe.length === 0) { return false; } const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory); + return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2); } - _isMatchToPatterns(filepath, patternsRe, isDirectory) { + _isMatchToPatterns(filepath, patternsRe, isDirectory2) { if (patternsRe.length === 0) { return false; } const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory) { + if (!isMatched && isDirectory2) { return utils.pattern.matchAny(filepath + "/", patternsRe); } return isMatched; @@ -29577,7 +29567,7 @@ var require_provider = __commonJS({ "node_modules/fast-glob/out/providers/provider.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); - var path12 = require("path"); + var path16 = require("path"); var deep_1 = require_deep(); var entry_1 = require_entry(); var error_1 = require_error(); @@ -29591,7 +29581,7 @@ var require_provider = __commonJS({ this.entryTransformer = new entry_2.default(this._settings); } _getRootDirectory(task) { - return path12.resolve(this._settings.cwd, task.base); + return path16.resolve(this._settings.cwd, task.base); } _getReaderOptions(task) { const basePath = task.base === "." ? "" : task.base; @@ -29772,16 +29762,16 @@ var require_settings4 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0; - var fs13 = require("fs"); + var fs16 = require("fs"); var os3 = require("os"); var CPU_COUNT = Math.max(os3.cpus().length, 1); exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs13.lstat, - lstatSync: fs13.lstatSync, - stat: fs13.stat, - statSync: fs13.statSync, - readdir: fs13.readdir, - readdirSync: fs13.readdirSync + lstat: fs16.lstat, + lstatSync: fs16.lstatSync, + stat: fs16.stat, + statSync: fs16.statSync, + readdir: fs16.readdir, + readdirSync: fs16.readdirSync }; var Settings = class { constructor(_options = {}) { @@ -29837,7 +29827,7 @@ var require_out4 = __commonJS({ var settings_1 = require_settings4(); var utils = require_utils7(); async function FastGlob(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, async_1.default, options); const result = await Promise.all(works); return utils.array.flatten(result); @@ -29848,65 +29838,65 @@ var require_out4 = __commonJS({ FastGlob2.globStream = stream2; FastGlob2.async = FastGlob2; function sync(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, sync_1.default, options); return utils.array.flatten(works); } FastGlob2.sync = sync; function stream2(source, options) { - assertPatternsInput(source); + assertPatternsInput2(source); const works = getWorks(source, stream_1.default, options); return utils.stream.merge(works); } FastGlob2.stream = stream2; - function generateTasks(source, options) { - assertPatternsInput(source); + function generateTasks2(source, options) { + assertPatternsInput2(source); const patterns = [].concat(source); const settings = new settings_1.default(options); return taskManager.generate(patterns, settings); } - FastGlob2.generateTasks = generateTasks; - function isDynamicPattern(source, options) { - assertPatternsInput(source); + FastGlob2.generateTasks = generateTasks2; + function isDynamicPattern2(source, options) { + assertPatternsInput2(source); const settings = new settings_1.default(options); return utils.pattern.isDynamicPattern(source, settings); } - FastGlob2.isDynamicPattern = isDynamicPattern; + FastGlob2.isDynamicPattern = isDynamicPattern2; function escapePath(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escape(source); } FastGlob2.escapePath = escapePath; - function convertPathToPattern(source) { - assertPatternsInput(source); + function convertPathToPattern2(source) { + assertPatternsInput2(source); return utils.path.convertPathToPattern(source); } - FastGlob2.convertPathToPattern = convertPathToPattern; + FastGlob2.convertPathToPattern = convertPathToPattern2; let posix; (function(posix2) { function escapePath2(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escapePosixPath(source); } posix2.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); + function convertPathToPattern3(source) { + assertPatternsInput2(source); return utils.path.convertPosixPathToPattern(source); } - posix2.convertPathToPattern = convertPathToPattern2; + posix2.convertPathToPattern = convertPathToPattern3; })(posix = FastGlob2.posix || (FastGlob2.posix = {})); let win32; (function(win322) { function escapePath2(source) { - assertPatternsInput(source); + assertPatternsInput2(source); return utils.path.escapeWindowsPath(source); } win322.escapePath = escapePath2; - function convertPathToPattern2(source) { - assertPatternsInput(source); + function convertPathToPattern3(source) { + assertPatternsInput2(source); return utils.path.convertWindowsPathToPattern(source); } - win322.convertPathToPattern = convertPathToPattern2; + win322.convertPathToPattern = convertPathToPattern3; })(win32 = FastGlob2.win32 || (FastGlob2.win32 = {})); })(FastGlob || (FastGlob = {})); function getWorks(source, _Provider, options) { @@ -29916,7 +29906,7 @@ var require_out4 = __commonJS({ const provider = new _Provider(settings); return tasks.map(provider.read, provider); } - function assertPatternsInput(input) { + function assertPatternsInput2(input) { const source = [].concat(input); const isValidSource = source.every((item) => utils.string.isString(item) && !utils.string.isEmpty(item)); if (!isValidSource) { @@ -29927,117 +29917,13 @@ var require_out4 = __commonJS({ } }); -// node_modules/path-type/index.js -var require_path_type = __commonJS({ - "node_modules/path-type/index.js"(exports2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var fs13 = require("fs"); - async function isType(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - const stats = await promisify2(fs13[fsStatType])(filePath); - return stats[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - function isTypeSync(fsStatType, statsMethodName, filePath) { - if (typeof filePath !== "string") { - throw new TypeError(`Expected a string, got ${typeof filePath}`); - } - try { - return fs13[fsStatType](filePath)[statsMethodName](); - } catch (error2) { - if (error2.code === "ENOENT") { - return false; - } - throw error2; - } - } - exports2.isFile = isType.bind(null, "stat", "isFile"); - exports2.isDirectory = isType.bind(null, "stat", "isDirectory"); - exports2.isSymlink = isType.bind(null, "lstat", "isSymbolicLink"); - exports2.isFileSync = isTypeSync.bind(null, "statSync", "isFile"); - exports2.isDirectorySync = isTypeSync.bind(null, "statSync", "isDirectory"); - exports2.isSymlinkSync = isTypeSync.bind(null, "lstatSync", "isSymbolicLink"); - } -}); - -// node_modules/dir-glob/index.js -var require_dir_glob = __commonJS({ - "node_modules/dir-glob/index.js"(exports2, module2) { - "use strict"; - var path12 = require("path"); - var pathType = require_path_type(); - var getExtensions = (extensions) => extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]; - var getPath = (filepath, cwd) => { - const pth = filepath[0] === "!" ? filepath.slice(1) : filepath; - return path12.isAbsolute(pth) ? pth : path12.join(cwd, pth); - }; - var addExtensions = (file, extensions) => { - if (path12.extname(file)) { - return `**/${file}`; - } - return `**/${file}.${getExtensions(extensions)}`; - }; - var getGlob = (directory, options) => { - if (options.files && !Array.isArray(options.files)) { - throw new TypeError(`Expected \`files\` to be of type \`Array\` but received type \`${typeof options.files}\``); - } - if (options.extensions && !Array.isArray(options.extensions)) { - throw new TypeError(`Expected \`extensions\` to be of type \`Array\` but received type \`${typeof options.extensions}\``); - } - if (options.files && options.extensions) { - return options.files.map((x) => path12.posix.join(directory, addExtensions(x, options.extensions))); - } - if (options.files) { - return options.files.map((x) => path12.posix.join(directory, `**/${x}`)); - } - if (options.extensions) { - return [path12.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)]; - } - return [path12.posix.join(directory, "**")]; - }; - module2.exports = async (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = await Promise.all([].concat(input).map(async (x) => { - const isDirectory = await pathType.isDirectory(getPath(x, options.cwd)); - return isDirectory ? getGlob(x, options) : x; - })); - return [].concat.apply([], globs); - }; - module2.exports.sync = (input, options) => { - options = { - cwd: process.cwd(), - ...options - }; - if (typeof options.cwd !== "string") { - throw new TypeError(`Expected \`cwd\` to be of type \`string\` but received type \`${typeof options.cwd}\``); - } - const globs = [].concat(input).map((x) => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x); - return [].concat.apply([], globs); - }; - } -}); - -// node_modules/ignore/index.js +// node_modules/globby/node_modules/ignore/index.js var require_ignore = __commonJS({ - "node_modules/ignore/index.js"(exports2, module2) { + "node_modules/globby/node_modules/ignore/index.js"(exports2, module2) { function makeArray(subject) { return Array.isArray(subject) ? subject : [subject]; } + var UNDEFINED = void 0; var EMPTY = ""; var SPACE = " "; var ESCAPE = "\\"; @@ -30046,14 +29932,18 @@ var require_ignore = __commonJS({ var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/; var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/; var REGEX_SPLITALL_CRLF = /\r?\n/g; - var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/; + var REGEX_TEST_INVALID_PATH = /^\.{0,2}\/|^\.{1,2}$/; + var REGEX_TEST_TRAILING_SLASH = /\/$/; var SLASH = "/"; var TMP_KEY_IGNORE = "node-ignore"; if (typeof Symbol !== "undefined") { TMP_KEY_IGNORE = Symbol.for("node-ignore"); } var KEY_IGNORE = TMP_KEY_IGNORE; - var define2 = (object, key, value) => Object.defineProperty(object, key, { value }); + var define2 = (object, key, value) => { + Object.defineProperty(object, key, { value }); + return value; + }; var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g; var RETURN_FALSE = () => false; var sanitizeRange = (range) => range.replace( @@ -30066,7 +29956,7 @@ var require_ignore = __commonJS({ }; var REPLACERS = [ [ - // remove BOM + // Remove BOM // TODO: // Other similar zero-width characters? /^\uFEFF/, @@ -30076,14 +29966,21 @@ var require_ignore = __commonJS({ [ // (a\ ) -> (a ) // (a ) -> (a) + // (a ) -> (a) // (a \ ) -> (a ) - /\\?\s+$/, - (match) => match.indexOf("\\") === 0 ? SPACE : EMPTY + /((?:\\\\)*?)(\\?\s+)$/, + (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY) ], - // replace (\ ) with ' ' + // Replace (\ ) with ' ' + // (\ ) -> ' ' + // (\\ ) -> '\\ ' + // (\\\ ) -> '\\ ' [ - /\\\s/g, - () => SPACE + /(\\+?)\s/g, + (_, m1) => { + const { length } = m1; + return m1.slice(0, length - length % 2) + SPACE; + } ], // Escape metacharacters // which is written down by users but means special for regular expressions. @@ -30203,103 +30100,100 @@ var require_ignore = __commonJS({ // 'js/' will not match 'a.js' // 'js' will match 'a.js' and 'a.js/' (match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)` - ], - // trailing wildcard - [ - /(\^|\\\/)?\\\*$/, - (_, p1) => { - const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; - return `${prefix}(?=$|\\/$)`; - } ] ]; - var regexCache = /* @__PURE__ */ Object.create(null); - var makeRegex = (pattern, ignoreCase) => { - let source = regexCache[pattern]; - if (!source) { - source = REPLACERS.reduce( - (prev, current) => prev.replace(current[0], current[1].bind(pattern)), - pattern - ); - regexCache[pattern] = source; + var REGEX_REPLACE_TRAILING_WILDCARD = /(^|\\\/)?\\\*$/; + var MODE_IGNORE = "regex"; + var MODE_CHECK_IGNORE = "checkRegex"; + var UNDERSCORE = "_"; + var TRAILING_WILD_CARD_REPLACERS = { + [MODE_IGNORE](_, p1) { + const prefix = p1 ? `${p1}[^/]+` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; + }, + [MODE_CHECK_IGNORE](_, p1) { + const prefix = p1 ? `${p1}[^/]*` : "[^/]*"; + return `${prefix}(?=$|\\/$)`; } - return ignoreCase ? new RegExp(source, "i") : new RegExp(source); }; + var makeRegexPrefix = (pattern) => REPLACERS.reduce( + (prev, [matcher, replacer]) => prev.replace(matcher, replacer.bind(pattern)), + pattern + ); var isString = (subject) => typeof subject === "string"; var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0; - var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF); + var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF).filter(Boolean); var IgnoreRule = class { - constructor(origin, pattern, negative, regex) { - this.origin = origin; + constructor(pattern, mark, body, ignoreCase, negative, prefix) { this.pattern = pattern; + this.mark = mark; this.negative = negative; - this.regex = regex; + define2(this, "body", body); + define2(this, "ignoreCase", ignoreCase); + define2(this, "regexPrefix", prefix); + } + get regex() { + const key = UNDERSCORE + MODE_IGNORE; + if (this[key]) { + return this[key]; + } + return this._make(MODE_IGNORE, key); + } + get checkRegex() { + const key = UNDERSCORE + MODE_CHECK_IGNORE; + if (this[key]) { + return this[key]; + } + return this._make(MODE_CHECK_IGNORE, key); + } + _make(mode, key) { + const str2 = this.regexPrefix.replace( + REGEX_REPLACE_TRAILING_WILDCARD, + // It does not need to bind pattern + TRAILING_WILD_CARD_REPLACERS[mode] + ); + const regex = this.ignoreCase ? new RegExp(str2, "i") : new RegExp(str2); + return define2(this, key, regex); } }; - var createRule = (pattern, ignoreCase) => { - const origin = pattern; + var createRule = ({ + pattern, + mark + }, ignoreCase) => { let negative = false; - if (pattern.indexOf("!") === 0) { + let body = pattern; + if (body.indexOf("!") === 0) { negative = true; - pattern = pattern.substr(1); + body = body.substr(1); } - pattern = pattern.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regex = makeRegex(pattern, ignoreCase); + body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); + const regexPrefix = makeRegexPrefix(body); return new IgnoreRule( - origin, pattern, + mark, + body, + ignoreCase, negative, - regex + regexPrefix ); }; - var throwError2 = (message, Ctor) => { - throw new Ctor(message); - }; - var checkPath = (path12, originalPath, doThrow) => { - if (!isString(path12)) { - return doThrow( - `path must be a string, but got \`${originalPath}\``, - TypeError - ); - } - if (!path12) { - return doThrow(`path must not be empty`, TypeError); - } - if (checkPath.isNotRelative(path12)) { - const r = "`path.relative()`d"; - return doThrow( - `path should be a ${r} string, but got "${originalPath}"`, - RangeError - ); - } - return true; - }; - var isNotRelative = (path12) => REGEX_TEST_INVALID_PATH.test(path12); - checkPath.isNotRelative = isNotRelative; - checkPath.convert = (p) => p; - var Ignore = class { - constructor({ - ignorecase = true, - ignoreCase = ignorecase, - allowRelativePaths = false - } = {}) { - define2(this, KEY_IGNORE, true); - this._rules = []; + var RuleManager = class { + constructor(ignoreCase) { this._ignoreCase = ignoreCase; - this._allowRelativePaths = allowRelativePaths; - this._initCache(); + this._rules = []; } - _initCache() { - this._ignoreCache = /* @__PURE__ */ Object.create(null); - this._testCache = /* @__PURE__ */ Object.create(null); - } - _addPattern(pattern) { + _add(pattern) { if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules); + this._rules = this._rules.concat(pattern._rules._rules); this._added = true; return; } - if (checkPattern(pattern)) { + if (isString(pattern)) { + pattern = { + pattern + }; + } + if (checkPattern(pattern.pattern)) { const rule = createRule(pattern, this._ignoreCase); this._added = true; this._rules.push(rule); @@ -30310,8 +30204,85 @@ var require_ignore = __commonJS({ this._added = false; makeArray( isString(pattern) ? splitPattern(pattern) : pattern - ).forEach(this._addPattern, this); - if (this._added) { + ).forEach(this._add, this); + return this._added; + } + // Test one single path without recursively checking parent directories + // + // - checkUnignored `boolean` whether should check if the path is unignored, + // setting `checkUnignored` to `false` could reduce additional + // path matching. + // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE` + // @returns {TestResult} true if a file is ignored + test(path16, checkUnignored, mode) { + let ignored = false; + let unignored = false; + let matchedRule; + this._rules.forEach((rule) => { + const { negative } = rule; + if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { + return; + } + const matched = rule[mode].test(path16); + if (!matched) { + return; + } + ignored = !negative; + unignored = negative; + matchedRule = negative ? UNDEFINED : rule; + }); + const ret = { + ignored, + unignored + }; + if (matchedRule) { + ret.rule = matchedRule; + } + return ret; + } + }; + var throwError2 = (message, Ctor) => { + throw new Ctor(message); + }; + var checkPath = (path16, originalPath, doThrow) => { + if (!isString(path16)) { + return doThrow( + `path must be a string, but got \`${originalPath}\``, + TypeError + ); + } + if (!path16) { + return doThrow(`path must not be empty`, TypeError); + } + if (checkPath.isNotRelative(path16)) { + const r = "`path.relative()`d"; + return doThrow( + `path should be a ${r} string, but got "${originalPath}"`, + RangeError + ); + } + return true; + }; + var isNotRelative = (path16) => REGEX_TEST_INVALID_PATH.test(path16); + checkPath.isNotRelative = isNotRelative; + checkPath.convert = (p) => p; + var Ignore = class { + constructor({ + ignorecase = true, + ignoreCase = ignorecase, + allowRelativePaths = false + } = {}) { + define2(this, KEY_IGNORE, true); + this._rules = new RuleManager(ignoreCase); + this._strictPathCheck = !allowRelativePaths; + this._initCache(); + } + _initCache() { + this._ignoreCache = /* @__PURE__ */ Object.create(null); + this._testCache = /* @__PURE__ */ Object.create(null); + } + add(pattern) { + if (this._rules.add(pattern)) { this._initCache(); } return this; @@ -30320,58 +30291,45 @@ var require_ignore = __commonJS({ addPattern(pattern) { return this.add(pattern); } - // | ignored : unignored - // negative | 0:0 | 0:1 | 1:0 | 1:1 - // -------- | ------- | ------- | ------- | -------- - // 0 | TEST | TEST | SKIP | X - // 1 | TESTIF | SKIP | TEST | X - // - SKIP: always skip - // - TEST: always test - // - TESTIF: only test if checkUnignored - // - X: that never happen - // @param {boolean} whether should check if the path is unignored, - // setting `checkUnignored` to `false` could reduce additional - // path matching. - // @returns {TestResult} true if a file is ignored - _testOne(path12, checkUnignored) { - let ignored = false; - let unignored = false; - this._rules.forEach((rule) => { - const { negative } = rule; - if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) { - return; - } - const matched = rule.regex.test(path12); - if (matched) { - ignored = !negative; - unignored = negative; - } - }); - return { - ignored, - unignored - }; - } // @returns {TestResult} _test(originalPath, cache, checkUnignored, slices) { - const path12 = originalPath && checkPath.convert(originalPath); + const path16 = originalPath && checkPath.convert(originalPath); checkPath( - path12, + path16, originalPath, - this._allowRelativePaths ? RETURN_FALSE : throwError2 + this._strictPathCheck ? throwError2 : RETURN_FALSE ); - return this._t(path12, cache, checkUnignored, slices); + return this._t(path16, cache, checkUnignored, slices); } - _t(path12, cache, checkUnignored, slices) { - if (path12 in cache) { - return cache[path12]; + checkIgnore(path16) { + if (!REGEX_TEST_TRAILING_SLASH.test(path16)) { + return this.test(path16); + } + const slices = path16.split(SLASH).filter(Boolean); + slices.pop(); + if (slices.length) { + const parent = this._t( + slices.join(SLASH) + SLASH, + this._testCache, + true, + slices + ); + if (parent.ignored) { + return parent; + } + } + return this._rules.test(path16, false, MODE_CHECK_IGNORE); + } + _t(path16, cache, checkUnignored, slices) { + if (path16 in cache) { + return cache[path16]; } if (!slices) { - slices = path12.split(SLASH); + slices = path16.split(SLASH).filter(Boolean); } slices.pop(); if (!slices.length) { - return cache[path12] = this._testOne(path12, checkUnignored); + return cache[path16] = this._rules.test(path16, checkUnignored, MODE_IGNORE); } const parent = this._t( slices.join(SLASH) + SLASH, @@ -30379,3960 +30337,40 @@ var require_ignore = __commonJS({ checkUnignored, slices ); - return cache[path12] = parent.ignored ? parent : this._testOne(path12, checkUnignored); + return cache[path16] = parent.ignored ? parent : this._rules.test(path16, checkUnignored, MODE_IGNORE); } - ignores(path12) { - return this._test(path12, this._ignoreCache, false).ignored; + ignores(path16) { + return this._test(path16, this._ignoreCache, false).ignored; } createFilter() { - return (path12) => !this.ignores(path12); + return (path16) => !this.ignores(path16); } filter(paths) { return makeArray(paths).filter(this.createFilter()); } // @returns {TestResult} - test(path12) { - return this._test(path12, this._testCache, true); + test(path16) { + return this._test(path16, this._testCache, true); } }; var factory = (options) => new Ignore(options); - var isPathValid = (path12) => checkPath(path12 && checkPath.convert(path12), path12, RETURN_FALSE); - factory.isPathValid = isPathValid; - factory.default = factory; - module2.exports = factory; - if ( - // Detect `process` so that it can run in browsers. - typeof process !== "undefined" && (process.env && process.env.IGNORE_TEST_WIN32 || process.platform === "win32") - ) { + var isPathValid = (path16) => checkPath(path16 && checkPath.convert(path16), path16, RETURN_FALSE); + var setupWindows = () => { const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); checkPath.convert = makePosix; - const REGIX_IS_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path12) => REGIX_IS_WINDOWS_PATH_ABSOLUTE.test(path12) || isNotRelative(path12); - } - } -}); - -// node_modules/slash/index.js -var require_slash = __commonJS({ - "node_modules/slash/index.js"(exports2, module2) { - "use strict"; - module2.exports = (path12) => { - const isExtendedLengthPath = /^\\\\\?\\/.test(path12); - const hasNonAscii = /[^\u0000-\u0080]+/.test(path12); - if (isExtendedLengthPath || hasNonAscii) { - return path12; - } - return path12.replace(/\\/g, "/"); - }; - } -}); - -// node_modules/globby/gitignore.js -var require_gitignore = __commonJS({ - "node_modules/globby/gitignore.js"(exports2, module2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var fs13 = require("fs"); - var path12 = require("path"); - var fastGlob = require_out4(); - var gitIgnore = require_ignore(); - var slash = require_slash(); - var DEFAULT_IGNORE = [ - "**/node_modules/**", - "**/flow-typed/**", - "**/coverage/**", - "**/.git" - ]; - var readFileP = promisify2(fs13.readFile); - var mapGitIgnorePatternTo = (base) => (ignore) => { - if (ignore.startsWith("!")) { - return "!" + path12.posix.join(base, ignore.slice(1)); - } - return path12.posix.join(base, ignore); - }; - var parseGitIgnore = (content, options) => { - const base = slash(path12.relative(options.cwd, path12.dirname(options.fileName))); - return content.split(/\r?\n/).filter(Boolean).filter((line) => !line.startsWith("#")).map(mapGitIgnorePatternTo(base)); - }; - var reduceIgnore = (files) => { - const ignores = gitIgnore(); - for (const file of files) { - ignores.add(parseGitIgnore(file.content, { - cwd: file.cwd, - fileName: file.filePath - })); - } - return ignores; - }; - var ensureAbsolutePathForCwd = (cwd, p) => { - cwd = slash(cwd); - if (path12.isAbsolute(p)) { - if (slash(p).startsWith(cwd)) { - return p; - } - throw new Error(`Path ${p} is not in cwd ${cwd}`); - } - return path12.join(cwd, p); - }; - var getIsIgnoredPredecate = (ignores, cwd) => { - return (p) => ignores.ignores(slash(path12.relative(cwd, ensureAbsolutePathForCwd(cwd, p.path || p)))); - }; - var getFile = async (file, cwd) => { - const filePath = path12.join(cwd, file); - const content = await readFileP(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var getFileSync = (file, cwd) => { - const filePath = path12.join(cwd, file); - const content = fs13.readFileSync(filePath, "utf8"); - return { - cwd, - filePath, - content - }; - }; - var normalizeOptions = ({ - ignore = [], - cwd = slash(process.cwd()) - } = {}) => { - return { ignore, cwd }; - }; - module2.exports = async (options) => { - options = normalizeOptions(options); - const paths = await fastGlob("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = await Promise.all(paths.map((file) => getFile(file, options.cwd))); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - module2.exports.sync = (options) => { - options = normalizeOptions(options); - const paths = fastGlob.sync("**/.gitignore", { - ignore: DEFAULT_IGNORE.concat(options.ignore), - cwd: options.cwd - }); - const files = paths.map((file) => getFileSync(file, options.cwd)); - const ignores = reduceIgnore(files); - return getIsIgnoredPredecate(ignores, options.cwd); - }; - } -}); - -// node_modules/globby/stream-utils.js -var require_stream_utils = __commonJS({ - "node_modules/globby/stream-utils.js"(exports2, module2) { - "use strict"; - var { Transform } = require("stream"); - var ObjectTransform = class extends Transform { - constructor() { - super({ - objectMode: true - }); - } - }; - var FilterStream = class extends ObjectTransform { - constructor(filter) { - super(); - this._filter = filter; - } - _transform(data, encoding, callback) { - if (this._filter(data)) { - this.push(data); - } - callback(); - } - }; - var UniqueStream = class extends ObjectTransform { - constructor() { - super(); - this._pushed = /* @__PURE__ */ new Set(); - } - _transform(data, encoding, callback) { - if (!this._pushed.has(data)) { - this.push(data); - this._pushed.add(data); - } - callback(); - } - }; - module2.exports = { - FilterStream, - UniqueStream - }; - } -}); - -// node_modules/globby/index.js -var require_globby = __commonJS({ - "node_modules/globby/index.js"(exports2, module2) { - "use strict"; - var fs13 = require("fs"); - var arrayUnion = require_array_union(); - var merge2 = require_merge2(); - var fastGlob = require_out4(); - var dirGlob = require_dir_glob(); - var gitignore = require_gitignore(); - var { FilterStream, UniqueStream } = require_stream_utils(); - var DEFAULT_FILTER = () => false; - var isNegative2 = (pattern) => pattern[0] === "!"; - var assertPatternsInput = (patterns) => { - if (!patterns.every((pattern) => typeof pattern === "string")) { - throw new TypeError("Patterns must be a string or an array of strings"); - } - }; - var checkCwdOption = (options = {}) => { - if (!options.cwd) { - return; - } - let stat; - try { - stat = fs13.statSync(options.cwd); - } catch { - return; - } - if (!stat.isDirectory()) { - throw new Error("The `cwd` option must be a path to a directory"); - } - }; - var getPathString = (p) => p.stats instanceof fs13.Stats ? p.path : p; - var generateGlobTasks = (patterns, taskOptions) => { - patterns = arrayUnion([].concat(patterns)); - assertPatternsInput(patterns); - checkCwdOption(taskOptions); - const globTasks = []; - taskOptions = { - ignore: [], - expandDirectories: true, - ...taskOptions - }; - for (const [index, pattern] of patterns.entries()) { - if (isNegative2(pattern)) { - continue; - } - const ignore = patterns.slice(index).filter((pattern2) => isNegative2(pattern2)).map((pattern2) => pattern2.slice(1)); - const options = { - ...taskOptions, - ignore: taskOptions.ignore.concat(ignore) - }; - globTasks.push({ pattern, options }); - } - return globTasks; - }; - var globDirs = (task, fn) => { - let options = {}; - if (task.options.cwd) { - options.cwd = task.options.cwd; - } - if (Array.isArray(task.options.expandDirectories)) { - options = { - ...options, - files: task.options.expandDirectories - }; - } else if (typeof task.options.expandDirectories === "object") { - options = { - ...options, - ...task.options.expandDirectories - }; - } - return fn(task.pattern, options); - }; - var getPattern = (task, fn) => task.options.expandDirectories ? globDirs(task, fn) : [task.pattern]; - var getFilterSync = (options) => { - return options && options.gitignore ? gitignore.sync({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - var globToTask = (task) => (glob) => { - const { options } = task; - if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); - } - return { - pattern: glob, - options - }; - }; - module2.exports = async (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const getFilter = async () => { - return options && options.gitignore ? gitignore({ cwd: options.cwd, ignore: options.ignore }) : DEFAULT_FILTER; - }; - const getTasks = async () => { - const tasks2 = await Promise.all(globTasks.map(async (task) => { - const globs = await getPattern(task, dirGlob); - return Promise.all(globs.map(globToTask(task))); - })); - return arrayUnion(...tasks2); - }; - const [filter, tasks] = await Promise.all([getFilter(), getTasks()]); - const paths = await Promise.all(tasks.map((task) => fastGlob(task.pattern, task.options))); - return arrayUnion(...paths).filter((path_) => !filter(getPathString(path_))); - }; - module2.exports.sync = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - let matches = []; - for (const task of tasks) { - matches = arrayUnion(matches, fastGlob.sync(task.pattern, task.options)); - } - return matches.filter((path_) => !filter(path_)); - }; - module2.exports.stream = (patterns, options) => { - const globTasks = generateGlobTasks(patterns, options); - const tasks = []; - for (const task of globTasks) { - const newTask = getPattern(task, dirGlob.sync).map(globToTask(task)); - tasks.push(...newTask); - } - const filter = getFilterSync(options); - const filterStream = new FilterStream((p) => !filter(p)); - const uniqueStream = new UniqueStream(); - return merge2(tasks.map((task) => fastGlob.stream(task.pattern, task.options))).pipe(filterStream).pipe(uniqueStream); - }; - module2.exports.generateGlobTasks = generateGlobTasks; - module2.exports.hasMagic = (patterns, options) => [].concat(patterns).some((pattern) => fastGlob.isDynamicPattern(pattern, options)); - module2.exports.gitignore = gitignore; - } -}); - -// node_modules/graceful-fs/polyfills.js -var require_polyfills = __commonJS({ - "node_modules/graceful-fs/polyfills.js"(exports2, module2) { - var constants = require("constants"); - var origCwd = process.cwd; - var cwd = null; - var platform2 = process.env.GRACEFUL_FS_PLATFORM || process.platform; - process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process); - return cwd; - }; - try { - process.cwd(); - } catch (er) { - } - if (typeof process.chdir === "function") { - chdir = process.chdir; - process.chdir = function(d) { - cwd = null; - chdir.call(process, d); - }; - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); - } - var chdir; - module2.exports = patch; - function patch(fs13) { - if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs13); - } - if (!fs13.lutimes) { - patchLutimes(fs13); - } - fs13.chown = chownFix(fs13.chown); - fs13.fchown = chownFix(fs13.fchown); - fs13.lchown = chownFix(fs13.lchown); - fs13.chmod = chmodFix(fs13.chmod); - fs13.fchmod = chmodFix(fs13.fchmod); - fs13.lchmod = chmodFix(fs13.lchmod); - fs13.chownSync = chownFixSync(fs13.chownSync); - fs13.fchownSync = chownFixSync(fs13.fchownSync); - fs13.lchownSync = chownFixSync(fs13.lchownSync); - fs13.chmodSync = chmodFixSync(fs13.chmodSync); - fs13.fchmodSync = chmodFixSync(fs13.fchmodSync); - fs13.lchmodSync = chmodFixSync(fs13.lchmodSync); - fs13.stat = statFix(fs13.stat); - fs13.fstat = statFix(fs13.fstat); - fs13.lstat = statFix(fs13.lstat); - fs13.statSync = statFixSync(fs13.statSync); - fs13.fstatSync = statFixSync(fs13.fstatSync); - fs13.lstatSync = statFixSync(fs13.lstatSync); - if (fs13.chmod && !fs13.lchmod) { - fs13.lchmod = function(path12, mode, cb) { - if (cb) process.nextTick(cb); - }; - fs13.lchmodSync = function() { - }; - } - if (fs13.chown && !fs13.lchown) { - fs13.lchown = function(path12, uid, gid, cb) { - if (cb) process.nextTick(cb); - }; - fs13.lchownSync = function() { - }; - } - if (platform2 === "win32") { - fs13.rename = typeof fs13.rename !== "function" ? fs13.rename : (function(fs$rename) { - function rename(from, to, cb) { - var start = Date.now(); - var backoff = 0; - fs$rename(from, to, function CB(er) { - if (er && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 6e4) { - setTimeout(function() { - fs13.stat(to, function(stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er); - }); - }, backoff); - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er); - }); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); - return rename; - })(fs13.rename); - } - fs13.read = typeof fs13.read !== "function" ? fs13.read : (function(fs$read) { - function read(fd, buffer, offset, length, position, callback_) { - var callback; - if (callback_ && typeof callback_ === "function") { - var eagCounter = 0; - callback = function(er, _, __) { - if (er && er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - return fs$read.call(fs13, fd, buffer, offset, length, position, callback); - } - callback_.apply(this, arguments); - }; - } - return fs$read.call(fs13, fd, buffer, offset, length, position, callback); - } - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); - return read; - })(fs13.read); - fs13.readSync = typeof fs13.readSync !== "function" ? fs13.readSync : /* @__PURE__ */ (function(fs$readSync) { - return function(fd, buffer, offset, length, position) { - var eagCounter = 0; - while (true) { - try { - return fs$readSync.call(fs13, fd, buffer, offset, length, position); - } catch (er) { - if (er.code === "EAGAIN" && eagCounter < 10) { - eagCounter++; - continue; - } - throw er; - } - } - }; - })(fs13.readSync); - function patchLchmod(fs14) { - fs14.lchmod = function(path12, mode, callback) { - fs14.open( - path12, - constants.O_WRONLY | constants.O_SYMLINK, - mode, - function(err, fd) { - if (err) { - if (callback) callback(err); - return; - } - fs14.fchmod(fd, mode, function(err2) { - fs14.close(fd, function(err22) { - if (callback) callback(err2 || err22); - }); - }); - } - ); - }; - fs14.lchmodSync = function(path12, mode) { - var fd = fs14.openSync(path12, constants.O_WRONLY | constants.O_SYMLINK, mode); - var threw = true; - var ret; - try { - ret = fs14.fchmodSync(fd, mode); - threw = false; - } finally { - if (threw) { - try { - fs14.closeSync(fd); - } catch (er) { - } - } else { - fs14.closeSync(fd); - } - } - return ret; - }; - } - function patchLutimes(fs14) { - if (constants.hasOwnProperty("O_SYMLINK") && fs14.futimes) { - fs14.lutimes = function(path12, at, mt, cb) { - fs14.open(path12, constants.O_SYMLINK, function(er, fd) { - if (er) { - if (cb) cb(er); - return; - } - fs14.futimes(fd, at, mt, function(er2) { - fs14.close(fd, function(er22) { - if (cb) cb(er2 || er22); - }); - }); - }); - }; - fs14.lutimesSync = function(path12, at, mt) { - var fd = fs14.openSync(path12, constants.O_SYMLINK); - var ret; - var threw = true; - try { - ret = fs14.futimesSync(fd, at, mt); - threw = false; - } finally { - if (threw) { - try { - fs14.closeSync(fd); - } catch (er) { - } - } else { - fs14.closeSync(fd); - } - } - return ret; - }; - } else if (fs14.futimes) { - fs14.lutimes = function(_a, _b, _c, cb) { - if (cb) process.nextTick(cb); - }; - fs14.lutimesSync = function() { - }; - } - } - function chmodFix(orig) { - if (!orig) return orig; - return function(target, mode, cb) { - return orig.call(fs13, target, mode, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chmodFixSync(orig) { - if (!orig) return orig; - return function(target, mode) { - try { - return orig.call(fs13, target, mode); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function chownFix(orig) { - if (!orig) return orig; - return function(target, uid, gid, cb) { - return orig.call(fs13, target, uid, gid, function(er) { - if (chownErOk(er)) er = null; - if (cb) cb.apply(this, arguments); - }); - }; - } - function chownFixSync(orig) { - if (!orig) return orig; - return function(target, uid, gid) { - try { - return orig.call(fs13, target, uid, gid); - } catch (er) { - if (!chownErOk(er)) throw er; - } - }; - } - function statFix(orig) { - if (!orig) return orig; - return function(target, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - function callback(er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - if (cb) cb.apply(this, arguments); - } - return options ? orig.call(fs13, target, options, callback) : orig.call(fs13, target, callback); - }; - } - function statFixSync(orig) { - if (!orig) return orig; - return function(target, options) { - var stats = options ? orig.call(fs13, target, options) : orig.call(fs13, target); - if (stats) { - if (stats.uid < 0) stats.uid += 4294967296; - if (stats.gid < 0) stats.gid += 4294967296; - } - return stats; - }; - } - function chownErOk(er) { - if (!er) - return true; - if (er.code === "ENOSYS") - return true; - var nonroot = !process.getuid || process.getuid() !== 0; - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true; - } - return false; - } - } - } -}); - -// node_modules/graceful-fs/legacy-streams.js -var require_legacy_streams = __commonJS({ - "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { - var Stream = require("stream").Stream; - module2.exports = legacy; - function legacy(fs13) { - return { - ReadStream, - WriteStream - }; - function ReadStream(path12, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path12, options); - Stream.call(this); - var self2 = this; - this.path = path12; - this.fd = null; - this.readable = true; - this.paused = false; - this.flags = "r"; - this.mode = 438; - this.bufferSize = 64 * 1024; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.encoding) this.setEncoding(this.encoding); - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.end === void 0) { - this.end = Infinity; - } else if ("number" !== typeof this.end) { - throw TypeError("end must be a Number"); - } - if (this.start > this.end) { - throw new Error("start must be <= end"); - } - this.pos = this.start; - } - if (this.fd !== null) { - process.nextTick(function() { - self2._read(); - }); - return; - } - fs13.open(this.path, this.flags, this.mode, function(err, fd) { - if (err) { - self2.emit("error", err); - self2.readable = false; - return; - } - self2.fd = fd; - self2.emit("open", fd); - self2._read(); - }); - } - function WriteStream(path12, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path12, options); - Stream.call(this); - this.path = path12; - this.fd = null; - this.writable = true; - this.flags = "w"; - this.encoding = "binary"; - this.mode = 438; - this.bytesWritten = 0; - options = options || {}; - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } - if (this.start !== void 0) { - if ("number" !== typeof this.start) { - throw TypeError("start must be a Number"); - } - if (this.start < 0) { - throw new Error("start must be >= zero"); - } - this.pos = this.start; - } - this.busy = false; - this._queue = []; - if (this.fd === null) { - this._open = fs13.open; - this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); - this.flush(); - } - } - } - } -}); - -// node_modules/graceful-fs/clone.js -var require_clone = __commonJS({ - "node_modules/graceful-fs/clone.js"(exports2, module2) { - "use strict"; - module2.exports = clone; - var getPrototypeOf = Object.getPrototypeOf || function(obj) { - return obj.__proto__; - }; - function clone(obj) { - if (obj === null || typeof obj !== "object") - return obj; - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) }; - else - var copy = /* @__PURE__ */ Object.create(null); - Object.getOwnPropertyNames(obj).forEach(function(key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)); - }); - return copy; - } - } -}); - -// node_modules/graceful-fs/graceful-fs.js -var require_graceful_fs = __commonJS({ - "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { - var fs13 = require("fs"); - var polyfills = require_polyfills(); - var legacy = require_legacy_streams(); - var clone = require_clone(); - var util = require("util"); - var gracefulQueue; - var previousSymbol; - if (typeof Symbol === "function" && typeof Symbol.for === "function") { - gracefulQueue = Symbol.for("graceful-fs.queue"); - previousSymbol = Symbol.for("graceful-fs.previous"); - } else { - gracefulQueue = "___graceful-fs.queue"; - previousSymbol = "___graceful-fs.previous"; - } - function noop() { - } - function publishQueue(context2, queue2) { - Object.defineProperty(context2, gracefulQueue, { - get: function() { - return queue2; - } - }); - } - var debug4 = noop; - if (util.debuglog) - debug4 = util.debuglog("gfs4"); - else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug4 = function() { - var m = util.format.apply(util, arguments); - m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); - console.error(m); - }; - if (!fs13[gracefulQueue]) { - queue = global[gracefulQueue] || []; - publishQueue(fs13, queue); - fs13.close = (function(fs$close) { - function close(fd, cb) { - return fs$close.call(fs13, fd, function(err) { - if (!err) { - resetQueue(); - } - if (typeof cb === "function") - cb.apply(this, arguments); - }); - } - Object.defineProperty(close, previousSymbol, { - value: fs$close - }); - return close; - })(fs13.close); - fs13.closeSync = (function(fs$closeSync) { - function closeSync(fd) { - fs$closeSync.apply(fs13, arguments); - resetQueue(); - } - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync - }); - return closeSync; - })(fs13.closeSync); - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { - process.on("exit", function() { - debug4(fs13[gracefulQueue]); - require("assert").equal(fs13[gracefulQueue].length, 0); - }); - } - } - var queue; - if (!global[gracefulQueue]) { - publishQueue(global, fs13[gracefulQueue]); - } - module2.exports = patch(clone(fs13)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs13.__patched) { - module2.exports = patch(fs13); - fs13.__patched = true; - } - function patch(fs14) { - polyfills(fs14); - fs14.gracefulify = patch; - fs14.createReadStream = createReadStream2; - fs14.createWriteStream = createWriteStream; - var fs$readFile = fs14.readFile; - fs14.readFile = readFile; - function readFile(path12, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$readFile(path12, options, cb); - function go$readFile(path13, options2, cb2, startTime) { - return fs$readFile(path13, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$readFile, [path13, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$writeFile = fs14.writeFile; - fs14.writeFile = writeFile; - function writeFile(path12, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$writeFile(path12, data, options, cb); - function go$writeFile(path13, data2, options2, cb2, startTime) { - return fs$writeFile(path13, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$writeFile, [path13, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$appendFile = fs14.appendFile; - if (fs$appendFile) - fs14.appendFile = appendFile; - function appendFile(path12, data, options, cb) { - if (typeof options === "function") - cb = options, options = null; - return go$appendFile(path12, data, options, cb); - function go$appendFile(path13, data2, options2, cb2, startTime) { - return fs$appendFile(path13, data2, options2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$appendFile, [path13, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$copyFile = fs14.copyFile; - if (fs$copyFile) - fs14.copyFile = copyFile; - function copyFile(src, dest, flags, cb) { - if (typeof flags === "function") { - cb = flags; - flags = 0; - } - return go$copyFile(src, dest, flags, cb); - function go$copyFile(src2, dest2, flags2, cb2, startTime) { - return fs$copyFile(src2, dest2, flags2, function(err) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - var fs$readdir = fs14.readdir; - fs14.readdir = readdir; - var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path12, options, cb) { - if (typeof options === "function") - cb = options, options = null; - var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path13, options2, cb2, startTime) { - return fs$readdir(path13, fs$readdirCallback( - path13, - options2, - cb2, - startTime - )); - } : function go$readdir2(path13, options2, cb2, startTime) { - return fs$readdir(path13, options2, fs$readdirCallback( - path13, - options2, - cb2, - startTime - )); - }; - return go$readdir(path12, options, cb); - function fs$readdirCallback(path13, options2, cb2, startTime) { - return function(err, files) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([ - go$readdir, - [path13, options2, cb2], - err, - startTime || Date.now(), - Date.now() - ]); - else { - if (files && files.sort) - files.sort(); - if (typeof cb2 === "function") - cb2.call(this, err, files); - } - }; - } - } - if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs14); - ReadStream = legStreams.ReadStream; - WriteStream = legStreams.WriteStream; - } - var fs$ReadStream = fs14.ReadStream; - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype); - ReadStream.prototype.open = ReadStream$open; - } - var fs$WriteStream = fs14.WriteStream; - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype); - WriteStream.prototype.open = WriteStream$open; - } - Object.defineProperty(fs14, "ReadStream", { - get: function() { - return ReadStream; - }, - set: function(val2) { - ReadStream = val2; - }, - enumerable: true, - configurable: true - }); - Object.defineProperty(fs14, "WriteStream", { - get: function() { - return WriteStream; - }, - set: function(val2) { - WriteStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileReadStream = ReadStream; - Object.defineProperty(fs14, "FileReadStream", { - get: function() { - return FileReadStream; - }, - set: function(val2) { - FileReadStream = val2; - }, - enumerable: true, - configurable: true - }); - var FileWriteStream = WriteStream; - Object.defineProperty(fs14, "FileWriteStream", { - get: function() { - return FileWriteStream; - }, - set: function(val2) { - FileWriteStream = val2; - }, - enumerable: true, - configurable: true - }); - function ReadStream(path12, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this; - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments); - } - function ReadStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - if (that.autoClose) - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - that.read(); - } - }); - } - function WriteStream(path12, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this; - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments); - } - function WriteStream$open() { - var that = this; - open(that.path, that.flags, that.mode, function(err, fd) { - if (err) { - that.destroy(); - that.emit("error", err); - } else { - that.fd = fd; - that.emit("open", fd); - } - }); - } - function createReadStream2(path12, options) { - return new fs14.ReadStream(path12, options); - } - function createWriteStream(path12, options) { - return new fs14.WriteStream(path12, options); - } - var fs$open = fs14.open; - fs14.open = open; - function open(path12, flags, mode, cb) { - if (typeof mode === "function") - cb = mode, mode = null; - return go$open(path12, flags, mode, cb); - function go$open(path13, flags2, mode2, cb2, startTime) { - return fs$open(path13, flags2, mode2, function(err, fd) { - if (err && (err.code === "EMFILE" || err.code === "ENFILE")) - enqueue([go$open, [path13, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); - else { - if (typeof cb2 === "function") - cb2.apply(this, arguments); - } - }); - } - } - return fs14; - } - function enqueue(elem) { - debug4("ENQUEUE", elem[0].name, elem[1]); - fs13[gracefulQueue].push(elem); - retry3(); - } - var retryTimer; - function resetQueue() { - var now = Date.now(); - for (var i = 0; i < fs13[gracefulQueue].length; ++i) { - if (fs13[gracefulQueue][i].length > 2) { - fs13[gracefulQueue][i][3] = now; - fs13[gracefulQueue][i][4] = now; - } - } - retry3(); - } - function retry3() { - clearTimeout(retryTimer); - retryTimer = void 0; - if (fs13[gracefulQueue].length === 0) - return; - var elem = fs13[gracefulQueue].shift(); - var fn = elem[0]; - var args = elem[1]; - var err = elem[2]; - var startTime = elem[3]; - var lastTime = elem[4]; - if (startTime === void 0) { - debug4("RETRY", fn.name, args); - fn.apply(null, args); - } else if (Date.now() - startTime >= 6e4) { - debug4("TIMEOUT", fn.name, args); - var cb = args.pop(); - if (typeof cb === "function") - cb.call(null, err); - } else { - var sinceAttempt = Date.now() - lastTime; - var sinceStart = Math.max(lastTime - startTime, 1); - var desiredDelay = Math.min(sinceStart * 1.2, 100); - if (sinceAttempt >= desiredDelay) { - debug4("RETRY", fn.name, args); - fn.apply(null, args.concat([startTime])); - } else { - fs13[gracefulQueue].push(elem); - } - } - if (retryTimer === void 0) { - retryTimer = setTimeout(retry3, 0); - } - } - } -}); - -// node_modules/is-path-cwd/index.js -var require_is_path_cwd = __commonJS({ - "node_modules/is-path-cwd/index.js"(exports2, module2) { - "use strict"; - var path12 = require("path"); - module2.exports = (path_) => { - let cwd = process.cwd(); - path_ = path12.resolve(path_); - if (process.platform === "win32") { - cwd = cwd.toLowerCase(); - path_ = path_.toLowerCase(); - } - return path_ === cwd; - }; - } -}); - -// node_modules/is-path-inside/index.js -var require_is_path_inside = __commonJS({ - "node_modules/is-path-inside/index.js"(exports2, module2) { - "use strict"; - var path12 = require("path"); - module2.exports = (childPath, parentPath) => { - const relation = path12.relative(parentPath, childPath); - return Boolean( - relation && relation !== ".." && !relation.startsWith(`..${path12.sep}`) && relation !== path12.resolve(childPath) - ); - }; - } -}); - -// node_modules/fs.realpath/old.js -var require_old = __commonJS({ - "node_modules/fs.realpath/old.js"(exports2) { - var pathModule = require("path"); - var isWindows = process.platform === "win32"; - var fs13 = require("fs"); - var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - function rethrow() { - var callback; - if (DEBUG) { - var backtrace = new Error(); - callback = debugCallback; - } else - callback = missingCallback; - return callback; - function debugCallback(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - missingCallback(err); - } - } - function missingCallback(err) { - if (err) { - if (process.throwDeprecation) - throw err; - else if (!process.noDeprecation) { - var msg = "fs: missing callback " + (err.stack || err.message); - if (process.traceDeprecation) - console.trace(msg); - else - console.error(msg); - } - } - } - } - function maybeCallback(cb) { - return typeof cb === "function" ? cb : rethrow(); - } - var normalize3 = pathModule.normalize; - if (isWindows) { - nextPartRe = /(.*?)(?:[\/\\]+|$)/g; - } else { - nextPartRe = /(.*?)(?:[\/]+|$)/g; - } - var nextPartRe; - if (isWindows) { - splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; - } else { - splitRootRe = /^[\/]*/; - } - var splitRootRe; - exports2.realpathSync = function realpathSync(p, cache) { - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs13.lstatSync(base); - knownHard[base] = true; - } - } - while (pos < p.length) { - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - continue; - } - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - resolvedLink = cache[base]; - } else { - var stat = fs13.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs13.statSync(base); - linkTarget = fs13.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - if (cache) cache[original] = p; - return p; - }; - exports2.realpath = function realpath(p, cache, cb) { - if (typeof cb !== "function") { - cb = maybeCallback(cache); - cache = null; - } - p = pathModule.resolve(p); - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - var original = p, seenLinks = {}, knownHard = {}; - var pos; - var current; - var base; - var previous; - start(); - function start() { - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ""; - if (isWindows && !knownHard[base]) { - fs13.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - function LOOP() { - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - if (knownHard[base] || cache && cache[base] === base) { - return process.nextTick(LOOP); - } - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - return gotResolvedLink(cache[base]); - } - return fs13.lstat(base, gotStat); - } - function gotStat(err, stat) { - if (err) return cb(err); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - if (!isWindows) { - var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs13.stat(base, function(err2) { - if (err2) return cb(err2); - fs13.readlink(base, function(err3, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err3, target); - }); - }); - } - function gotTarget(err, target, base2) { - if (err) return cb(err); - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base2] = resolvedLink; - gotResolvedLink(resolvedLink); - } - function gotResolvedLink(resolvedLink) { - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - }; - } -}); - -// node_modules/fs.realpath/index.js -var require_fs5 = __commonJS({ - "node_modules/fs.realpath/index.js"(exports2, module2) { - module2.exports = realpath; - realpath.realpath = realpath; - realpath.sync = realpathSync; - realpath.realpathSync = realpathSync; - realpath.monkeypatch = monkeypatch; - realpath.unmonkeypatch = unmonkeypatch; - var fs13 = require("fs"); - var origRealpath = fs13.realpath; - var origRealpathSync = fs13.realpathSync; - var version = process.version; - var ok = /^v[0-5]\./.test(version); - var old = require_old(); - function newError(er) { - return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); - } - function realpath(p, cache, cb) { - if (ok) { - return origRealpath(p, cache, cb); - } - if (typeof cache === "function") { - cb = cache; - cache = null; - } - origRealpath(p, cache, function(er, result) { - if (newError(er)) { - old.realpath(p, cache, cb); - } else { - cb(er, result); - } - }); - } - function realpathSync(p, cache) { - if (ok) { - return origRealpathSync(p, cache); - } - try { - return origRealpathSync(p, cache); - } catch (er) { - if (newError(er)) { - return old.realpathSync(p, cache); - } else { - throw er; - } - } - } - function monkeypatch() { - fs13.realpath = realpath; - fs13.realpathSync = realpathSync; - } - function unmonkeypatch() { - fs13.realpath = origRealpath; - fs13.realpathSync = origRealpathSync; - } - } -}); - -// node_modules/concat-map/index.js -var require_concat_map = __commonJS({ - "node_modules/concat-map/index.js"(exports2, module2) { - module2.exports = function(xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; - }; - var isArray = Array.isArray || function(xs) { - return Object.prototype.toString.call(xs) === "[object Array]"; - }; - } -}); - -// node_modules/balanced-match/index.js -var require_balanced_match = __commonJS({ - "node_modules/balanced-match/index.js"(exports2, module2) { - "use strict"; - module2.exports = balanced; - function balanced(a, b, str2) { - if (a instanceof RegExp) a = maybeMatch(a, str2); - if (b instanceof RegExp) b = maybeMatch(b, str2); - var r = range(a, b, str2); - return r && { - start: r[0], - end: r[1], - pre: str2.slice(0, r[0]), - body: str2.slice(r[0] + a.length, r[1]), - post: str2.slice(r[1] + b.length) - }; - } - function maybeMatch(reg, str2) { - var m = str2.match(reg); - return m ? m[0] : null; - } - balanced.range = range; - function range(a, b, str2) { - var begs, beg, left, right, result; - var ai = str2.indexOf(a); - var bi = str2.indexOf(b, ai + 1); - var i = ai; - if (ai >= 0 && bi > 0) { - begs = []; - left = str2.length; - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str2.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [begs.pop(), bi]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - bi = str2.indexOf(b, i + 1); - } - i = ai < bi && ai >= 0 ? ai : bi; - } - if (begs.length) { - result = [left, right]; - } - } - return result; - } - } -}); - -// node_modules/brace-expansion/index.js -var require_brace_expansion = __commonJS({ - "node_modules/brace-expansion/index.js"(exports2, module2) { - var concatMap = require_concat_map(); - var balanced = require_balanced_match(); - module2.exports = expandTop; - var escSlash = "\0SLASH" + Math.random() + "\0"; - var escOpen = "\0OPEN" + Math.random() + "\0"; - var escClose = "\0CLOSE" + Math.random() + "\0"; - var escComma = "\0COMMA" + Math.random() + "\0"; - var escPeriod = "\0PERIOD" + Math.random() + "\0"; - function numeric(str2) { - return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); - } - function escapeBraces(str2) { - return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); - } - function unescapeBraces(str2) { - return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); - } - function parseCommaParts(str2) { - if (!str2) - return [""]; - var parts = []; - var m = balanced("{", "}", str2); - if (!m) - return str2.split(","); - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(","); - p[p.length - 1] += "{" + body + "}"; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length - 1] += postParts.shift(); - p.push.apply(p, postParts); - } - parts.push.apply(parts, p); - return parts; - } - function expandTop(str2) { - if (!str2) - return []; - if (str2.substr(0, 2) === "{}") { - str2 = "\\{\\}" + str2.substr(2); - } - return expand(escapeBraces(str2), true).map(unescapeBraces); - } - function embrace(str2) { - return "{" + str2 + "}"; - } - function isPadded(el) { - return /^-?0\d/.test(el); - } - function lte(i, y) { - return i <= y; - } - function gte5(i, y) { - return i >= y; - } - function expand(str2, isTop) { - var expansions = []; - var m = balanced("{", "}", str2); - if (!m || /\$$/.test(m.pre)) return [str2]; - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(",") >= 0; - if (!isSequence && !isOptions) { - if (m.post.match(/,.*\}/)) { - str2 = m.pre + "{" + m.body + escClose + m.post; - return expand(str2); - } - return [str2]; - } - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length ? expand(m.post, false) : [""]; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - var pre = m.pre; - var post = m.post.length ? expand(m.post, false) : [""]; - var N; - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length); - var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte5; - } - var pad = n.some(isPadded); - N = []; - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === "\\") - c = ""; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join("0"); - if (i < 0) - c = "-" + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { - return expand(el, false); - }); - } - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - return expansions; - } - } -}); - -// node_modules/minimatch/minimatch.js -var require_minimatch = __commonJS({ - "node_modules/minimatch/minimatch.js"(exports2, module2) { - module2.exports = minimatch; - minimatch.Minimatch = Minimatch; - var path12 = (function() { - try { - return require("path"); - } catch (e) { - } - })() || { - sep: "/" - }; - minimatch.sep = path12.sep; - var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; - var expand = require_brace_expansion(); - var plTypes = { - "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, - "?": { open: "(?:", close: ")?" }, - "+": { open: "(?:", close: ")+" }, - "*": { open: "(?:", close: ")*" }, - "@": { open: "(?:", close: ")" } - }; - var qmark = "[^/]"; - var star = qmark + "*?"; - var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; - var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; - var reSpecials = charSet("().*{}+?[]^$\\!"); - function charSet(s) { - return s.split("").reduce(function(set2, c) { - set2[c] = true; - return set2; - }, {}); - } - var slashSplit = /\/+/; - minimatch.filter = filter; - function filter(pattern, options) { - options = options || {}; - return function(p, i, list) { - return minimatch(p, pattern, options); - }; - } - function ext(a, b) { - b = b || {}; - var t = {}; - Object.keys(a).forEach(function(k) { - t[k] = a[k]; - }); - Object.keys(b).forEach(function(k) { - t[k] = b[k]; - }); - return t; - } - minimatch.defaults = function(def) { - if (!def || typeof def !== "object" || !Object.keys(def).length) { - return minimatch; - } - var orig = minimatch; - var m = function minimatch2(p, pattern, options) { - return orig(p, pattern, ext(def, options)); - }; - m.Minimatch = function Minimatch2(pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)); - }; - m.Minimatch.defaults = function defaults(options) { - return orig.defaults(ext(def, options)).Minimatch; - }; - m.filter = function filter2(pattern, options) { - return orig.filter(pattern, ext(def, options)); - }; - m.defaults = function defaults(options) { - return orig.defaults(ext(def, options)); - }; - m.makeRe = function makeRe2(pattern, options) { - return orig.makeRe(pattern, ext(def, options)); - }; - m.braceExpand = function braceExpand2(pattern, options) { - return orig.braceExpand(pattern, ext(def, options)); - }; - m.match = function(list, pattern, options) { - return orig.match(list, pattern, ext(def, options)); - }; - return m; - }; - Minimatch.defaults = function(def) { - return minimatch.defaults(def).Minimatch; - }; - function minimatch(p, pattern, options) { - assertValidPattern(pattern); - if (!options) options = {}; - if (!options.nocomment && pattern.charAt(0) === "#") { - return false; - } - return new Minimatch(pattern, options).match(p); - } - function Minimatch(pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options); - } - assertValidPattern(pattern); - if (!options) options = {}; - pattern = pattern.trim(); - if (!options.allowWindowsEscape && path12.sep !== "/") { - pattern = pattern.split(path12.sep).join("/"); - } - this.options = options; - this.set = []; - this.pattern = pattern; - this.regexp = null; - this.negate = false; - this.comment = false; - this.empty = false; - this.partial = !!options.partial; - this.make(); - } - Minimatch.prototype.debug = function() { - }; - Minimatch.prototype.make = make; - function make() { - var pattern = this.pattern; - var options = this.options; - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true; - return; - } - if (!pattern) { - this.empty = true; - return; - } - this.parseNegate(); - var set2 = this.globSet = this.braceExpand(); - if (options.debug) this.debug = function debug4() { - console.error.apply(console, arguments); - }; - this.debug(this.pattern, set2); - set2 = this.globParts = set2.map(function(s) { - return s.split(slashSplit); - }); - this.debug(this.pattern, set2); - set2 = set2.map(function(s, si, set3) { - return s.map(this.parse, this); - }, this); - this.debug(this.pattern, set2); - set2 = set2.filter(function(s) { - return s.indexOf(false) === -1; - }); - this.debug(this.pattern, set2); - this.set = set2; - } - Minimatch.prototype.parseNegate = parseNegate; - function parseNegate() { - var pattern = this.pattern; - var negate2 = false; - var options = this.options; - var negateOffset = 0; - if (options.nonegate) return; - for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { - negate2 = !negate2; - negateOffset++; - } - if (negateOffset) this.pattern = pattern.substr(negateOffset); - this.negate = negate2; - } - minimatch.braceExpand = function(pattern, options) { - return braceExpand(pattern, options); - }; - Minimatch.prototype.braceExpand = braceExpand; - function braceExpand(pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options; - } else { - options = {}; - } - } - pattern = typeof pattern === "undefined" ? this.pattern : pattern; - assertValidPattern(pattern); - if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { - return [pattern]; - } - return expand(pattern); - } - var MAX_PATTERN_LENGTH = 1024 * 64; - var assertValidPattern = function(pattern) { - if (typeof pattern !== "string") { - throw new TypeError("invalid pattern"); - } - if (pattern.length > MAX_PATTERN_LENGTH) { - throw new TypeError("pattern is too long"); - } - }; - Minimatch.prototype.parse = parse; - var SUBPARSE = {}; - function parse(pattern, isSub) { - assertValidPattern(pattern); - var options = this.options; - if (pattern === "**") { - if (!options.noglobstar) - return GLOBSTAR; - else - pattern = "*"; - } - if (pattern === "") return ""; - var re = ""; - var hasMagic = !!options.nocase; - var escaping = false; - var patternListStack = []; - var negativeLists = []; - var stateChar; - var inClass = false; - var reClassStart = -1; - var classStart = -1; - var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; - var self2 = this; - function clearStateChar() { - if (stateChar) { - switch (stateChar) { - case "*": - re += star; - hasMagic = true; - break; - case "?": - re += qmark; - hasMagic = true; - break; - default: - re += "\\" + stateChar; - break; - } - self2.debug("clearStateChar %j %j", stateChar, re); - stateChar = false; - } - } - for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { - this.debug("%s %s %s %j", pattern, i, re, c); - if (escaping && reSpecials[c]) { - re += "\\" + c; - escaping = false; - continue; - } - switch (c) { - /* istanbul ignore next */ - case "/": { - return false; - } - case "\\": - clearStateChar(); - escaping = true; - continue; - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); - if (inClass) { - this.debug(" in class"); - if (c === "!" && i === classStart + 1) c = "^"; - re += c; - continue; - } - self2.debug("call clearStateChar %j", stateChar); - clearStateChar(); - stateChar = c; - if (options.noext) clearStateChar(); - continue; - case "(": - if (inClass) { - re += "("; - continue; - } - if (!stateChar) { - re += "\\("; - continue; - } - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }); - re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; - this.debug("plType %j %j", stateChar, re); - stateChar = false; - continue; - case ")": - if (inClass || !patternListStack.length) { - re += "\\)"; - continue; - } - clearStateChar(); - hasMagic = true; - var pl = patternListStack.pop(); - re += pl.close; - if (pl.type === "!") { - negativeLists.push(pl); - } - pl.reEnd = re.length; - continue; - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|"; - escaping = false; - continue; - } - clearStateChar(); - re += "|"; - continue; - // these are mostly the same in regexp and glob - case "[": - clearStateChar(); - if (inClass) { - re += "\\" + c; - continue; - } - inClass = true; - classStart = i; - reClassStart = re.length; - re += c; - continue; - case "]": - if (i === classStart + 1 || !inClass) { - re += "\\" + c; - escaping = false; - continue; - } - var cs = pattern.substring(classStart + 1, i); - try { - RegExp("[" + cs + "]"); - } catch (er) { - var sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; - hasMagic = hasMagic || sp[1]; - inClass = false; - continue; - } - hasMagic = true; - inClass = false; - re += c; - continue; - default: - clearStateChar(); - if (escaping) { - escaping = false; - } else if (reSpecials[c] && !(c === "^" && inClass)) { - re += "\\"; - } - re += c; - } - } - if (inClass) { - cs = pattern.substr(classStart + 1); - sp = this.parse(cs, SUBPARSE); - re = re.substr(0, reClassStart) + "\\[" + sp[0]; - hasMagic = hasMagic || sp[1]; - } - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length); - this.debug("setting tail", re, pl); - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { - if (!$2) { - $2 = "\\"; - } - return $1 + $1 + $2 + "|"; - }); - this.debug("tail=%j\n %s", tail, tail, pl, re); - var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; - hasMagic = true; - re = re.slice(0, pl.reStart) + t + "\\(" + tail; - } - clearStateChar(); - if (escaping) { - re += "\\\\"; - } - var addPatternStart = false; - switch (re.charAt(0)) { - case "[": - case ".": - case "(": - addPatternStart = true; - } - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n]; - var nlBefore = re.slice(0, nl.reStart); - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); - var nlAfter = re.slice(nl.reEnd); - nlLast += nlAfter; - var openParensBefore = nlBefore.split("(").length - 1; - var cleanAfter = nlAfter; - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); - } - nlAfter = cleanAfter; - var dollar = ""; - if (nlAfter === "" && isSub !== SUBPARSE) { - dollar = "$"; - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; - re = newRe; - } - if (re !== "" && hasMagic) { - re = "(?=.)" + re; - } - if (addPatternStart) { - re = patternStart + re; - } - if (isSub === SUBPARSE) { - return [re, hasMagic]; - } - if (!hasMagic) { - return globUnescape(pattern); - } - var flags = options.nocase ? "i" : ""; - try { - var regExp = new RegExp("^" + re + "$", flags); - } catch (er) { - return new RegExp("$."); - } - regExp._glob = pattern; - regExp._src = re; - return regExp; - } - minimatch.makeRe = function(pattern, options) { - return new Minimatch(pattern, options || {}).makeRe(); - }; - Minimatch.prototype.makeRe = makeRe; - function makeRe() { - if (this.regexp || this.regexp === false) return this.regexp; - var set2 = this.set; - if (!set2.length) { - this.regexp = false; - return this.regexp; - } - var options = this.options; - var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; - var flags = options.nocase ? "i" : ""; - var re = set2.map(function(pattern) { - return pattern.map(function(p) { - return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; - }).join("\\/"); - }).join("|"); - re = "^(?:" + re + ")$"; - if (this.negate) re = "^(?!" + re + ").*$"; - try { - this.regexp = new RegExp(re, flags); - } catch (ex) { - this.regexp = false; - } - return this.regexp; - } - minimatch.match = function(list, pattern, options) { - options = options || {}; - var mm = new Minimatch(pattern, options); - list = list.filter(function(f) { - return mm.match(f); - }); - if (mm.options.nonull && !list.length) { - list.push(pattern); - } - return list; - }; - Minimatch.prototype.match = function match(f, partial) { - if (typeof partial === "undefined") partial = this.partial; - this.debug("match", f, this.pattern); - if (this.comment) return false; - if (this.empty) return f === ""; - if (f === "/" && partial) return true; - var options = this.options; - if (path12.sep !== "/") { - f = f.split(path12.sep).join("/"); - } - f = f.split(slashSplit); - this.debug(this.pattern, "split", f); - var set2 = this.set; - this.debug(this.pattern, "set", set2); - var filename; - var i; - for (i = f.length - 1; i >= 0; i--) { - filename = f[i]; - if (filename) break; - } - for (i = 0; i < set2.length; i++) { - var pattern = set2[i]; - var file = f; - if (options.matchBase && pattern.length === 1) { - file = [filename]; - } - var hit = this.matchOne(file, pattern, partial); - if (hit) { - if (options.flipNegate) return true; - return !this.negate; - } - } - if (options.flipNegate) return false; - return this.negate; - }; - Minimatch.prototype.matchOne = function(file, pattern, partial) { - var options = this.options; - this.debug( - "matchOne", - { "this": this, file, pattern } - ); - this.debug("matchOne", file.length, pattern.length); - for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { - this.debug("matchOne loop"); - var p = pattern[pi]; - var f = file[fi]; - this.debug(pattern, p, f); - if (p === false) return false; - if (p === GLOBSTAR) { - this.debug("GLOBSTAR", [pattern, p, f]); - var fr = fi; - var pr = pi + 1; - if (pr === pl) { - this.debug("** at the end"); - for (; fi < fl; fi++) { - if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; - } - return true; - } - while (fr < fl) { - var swallowee = file[fr]; - this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug("globstar found match!", fr, fl, swallowee); - return true; - } else { - if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { - this.debug("dot detected!", file, fr, pattern, pr); - break; - } - this.debug("globstar swallow a segment, and continue"); - fr++; - } - } - if (partial) { - this.debug("\n>>> no match, partial?", file, fr, pattern, pr); - if (fr === fl) return true; - } - return false; - } - var hit; - if (typeof p === "string") { - hit = f === p; - this.debug("string match", p, f, hit); - } else { - hit = f.match(p); - this.debug("pattern match", p, f, hit); - } - if (!hit) return false; - } - if (fi === fl && pi === pl) { - return true; - } else if (fi === fl) { - return partial; - } else if (pi === pl) { - return fi === fl - 1 && file[fi] === ""; - } - throw new Error("wtf?"); - }; - function globUnescape(s) { - return s.replace(/\\(.)/g, "$1"); - } - function regExpEscape(s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); - } - } -}); - -// node_modules/inherits/inherits_browser.js -var require_inherits_browser = __commonJS({ - "node_modules/inherits/inherits_browser.js"(exports2, module2) { - if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; - } else { - module2.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor; - var TempCtor = function() { - }; - TempCtor.prototype = superCtor.prototype; - ctor.prototype = new TempCtor(); - ctor.prototype.constructor = ctor; - }; - } - } -}); - -// node_modules/inherits/inherits.js -var require_inherits = __commonJS({ - "node_modules/inherits/inherits.js"(exports2, module2) { - try { - util = require("util"); - if (typeof util.inherits !== "function") throw ""; - module2.exports = util.inherits; - } catch (e) { - module2.exports = require_inherits_browser(); - } - var util; - } -}); - -// node_modules/path-is-absolute/index.js -var require_path_is_absolute = __commonJS({ - "node_modules/path-is-absolute/index.js"(exports2, module2) { - "use strict"; - function posix(path12) { - return path12.charAt(0) === "/"; - } - function win32(path12) { - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path12); - var device = result[1] || ""; - var isUnc = Boolean(device && device.charAt(1) !== ":"); - return Boolean(result[2] || isUnc); - } - module2.exports = process.platform === "win32" ? win32 : posix; - module2.exports.posix = posix; - module2.exports.win32 = win32; - } -}); - -// node_modules/rimraf/node_modules/glob/common.js -var require_common3 = __commonJS({ - "node_modules/rimraf/node_modules/glob/common.js"(exports2) { - exports2.setopts = setopts; - exports2.ownProp = ownProp; - exports2.makeAbs = makeAbs; - exports2.finish = finish; - exports2.mark = mark; - exports2.isIgnored = isIgnored; - exports2.childrenIgnored = childrenIgnored; - function ownProp(obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field); - } - var fs13 = require("fs"); - var path12 = require("path"); - var minimatch = require_minimatch(); - var isAbsolute3 = require_path_is_absolute(); - var Minimatch = minimatch.Minimatch; - function alphasort(a, b) { - return a.localeCompare(b, "en"); - } - function setupIgnores(self2, options) { - self2.ignore = options.ignore || []; - if (!Array.isArray(self2.ignore)) - self2.ignore = [self2.ignore]; - if (self2.ignore.length) { - self2.ignore = self2.ignore.map(ignoreMap); - } - } - function ignoreMap(pattern) { - var gmatcher = null; - if (pattern.slice(-3) === "/**") { - var gpattern = pattern.replace(/(\/\*\*)+$/, ""); - gmatcher = new Minimatch(gpattern, { dot: true }); - } - return { - matcher: new Minimatch(pattern, { dot: true }), - gmatcher - }; - } - function setopts(self2, pattern, options) { - if (!options) - options = {}; - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar"); - } - pattern = "**/" + pattern; - } - self2.silent = !!options.silent; - self2.pattern = pattern; - self2.strict = options.strict !== false; - self2.realpath = !!options.realpath; - self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); - self2.follow = !!options.follow; - self2.dot = !!options.dot; - self2.mark = !!options.mark; - self2.nodir = !!options.nodir; - if (self2.nodir) - self2.mark = true; - self2.sync = !!options.sync; - self2.nounique = !!options.nounique; - self2.nonull = !!options.nonull; - self2.nosort = !!options.nosort; - self2.nocase = !!options.nocase; - self2.stat = !!options.stat; - self2.noprocess = !!options.noprocess; - self2.absolute = !!options.absolute; - self2.fs = options.fs || fs13; - self2.maxLength = options.maxLength || Infinity; - self2.cache = options.cache || /* @__PURE__ */ Object.create(null); - self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); - self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); - setupIgnores(self2, options); - self2.changedCwd = false; - var cwd = process.cwd(); - if (!ownProp(options, "cwd")) - self2.cwd = cwd; - else { - self2.cwd = path12.resolve(options.cwd); - self2.changedCwd = self2.cwd !== cwd; - } - self2.root = options.root || path12.resolve(self2.cwd, "/"); - self2.root = path12.resolve(self2.root); - if (process.platform === "win32") - self2.root = self2.root.replace(/\\/g, "/"); - self2.cwdAbs = isAbsolute3(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); - if (process.platform === "win32") - self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); - self2.nomount = !!options.nomount; - options.nonegate = true; - options.nocomment = true; - self2.minimatch = new Minimatch(pattern, options); - self2.options = self2.minimatch.options; - } - function finish(self2) { - var nou = self2.nounique; - var all = nou ? [] : /* @__PURE__ */ Object.create(null); - for (var i = 0, l = self2.matches.length; i < l; i++) { - var matches = self2.matches[i]; - if (!matches || Object.keys(matches).length === 0) { - if (self2.nonull) { - var literal = self2.minimatch.globSet[i]; - if (nou) - all.push(literal); - else - all[literal] = true; - } - } else { - var m = Object.keys(matches); - if (nou) - all.push.apply(all, m); - else - m.forEach(function(m2) { - all[m2] = true; - }); - } - } - if (!nou) - all = Object.keys(all); - if (!self2.nosort) - all = all.sort(alphasort); - if (self2.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self2._mark(all[i]); - } - if (self2.nodir) { - all = all.filter(function(e) { - var notDir = !/\/$/.test(e); - var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; - if (notDir && c) - notDir = c !== "DIR" && !Array.isArray(c); - return notDir; - }); - } - } - if (self2.ignore.length) - all = all.filter(function(m2) { - return !isIgnored(self2, m2); - }); - self2.found = all; - } - function mark(self2, p) { - var abs = makeAbs(self2, p); - var c = self2.cache[abs]; - var m = p; - if (c) { - var isDir = c === "DIR" || Array.isArray(c); - var slash = p.slice(-1) === "/"; - if (isDir && !slash) - m += "/"; - else if (!isDir && slash) - m = m.slice(0, -1); - if (m !== p) { - var mabs = makeAbs(self2, m); - self2.statCache[mabs] = self2.statCache[abs]; - self2.cache[mabs] = self2.cache[abs]; - } - } - return m; - } - function makeAbs(self2, f) { - var abs = f; - if (f.charAt(0) === "/") { - abs = path12.join(self2.root, f); - } else if (isAbsolute3(f) || f === "") { - abs = f; - } else if (self2.changedCwd) { - abs = path12.resolve(self2.cwd, f); - } else { - abs = path12.resolve(f); - } - if (process.platform === "win32") - abs = abs.replace(/\\/g, "/"); - return abs; - } - function isIgnored(self2, path13) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return item.matcher.match(path13) || !!(item.gmatcher && item.gmatcher.match(path13)); - }); - } - function childrenIgnored(self2, path13) { - if (!self2.ignore.length) - return false; - return self2.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path13)); - }); - } - } -}); - -// node_modules/rimraf/node_modules/glob/sync.js -var require_sync7 = __commonJS({ - "node_modules/rimraf/node_modules/glob/sync.js"(exports2, module2) { - module2.exports = globSync; - globSync.GlobSync = GlobSync; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var Glob = require_glob().Glob; - var util = require("util"); - var path12 = require("path"); - var assert = require("assert"); - var isAbsolute3 = require_path_is_absolute(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - function globSync(pattern, options) { - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - return new GlobSync(pattern, options).found; - } - function GlobSync(pattern, options) { - if (!pattern) - throw new Error("must provide pattern"); - if (typeof options === "function" || arguments.length === 3) - throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options); - setopts(this, pattern, options); - if (this.noprocess) - return this; - var n = this.minimatch.set.length; - this.matches = new Array(n); - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false); - } - this._finish(); - } - GlobSync.prototype._finish = function() { - assert(this instanceof GlobSync); - if (this.realpath) { - var self2 = this; - this.matches.forEach(function(matchset, index) { - var set2 = self2.matches[index] = /* @__PURE__ */ Object.create(null); - for (var p in matchset) { - try { - p = self2._makeAbs(p); - var real = rp.realpathSync(p, self2.realpathCache); - set2[real] = true; - } catch (er) { - if (er.syscall === "stat") - set2[self2._makeAbs(p)] = true; - else - throw er; - } - } - }); - } - common2.finish(this); - }; - GlobSync.prototype._process = function(pattern, index, inGlobStar) { - assert(this instanceof GlobSync); - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute3(prefix) || isAbsolute3(pattern.join("/"))) { - if (!prefix || !isAbsolute3(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return; - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar); - }; - GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var pn = remain[0]; - var negate2 = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate2 && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return; - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix.slice(-1) !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path12.join(this.root, e); - } - this._emitMatch(index, e); - } - return; - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) - newPattern = [prefix, e]; - else - newPattern = [e]; - this._process(newPattern.concat(remain), index, inGlobStar); - } - }; - GlobSync.prototype._emitMatch = function(index, e) { - if (isIgnored(this, e)) - return; - var abs = this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) { - e = abs; - } - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - if (this.stat) - this._stat(e); - }; - GlobSync.prototype._readdirInGlobStar = function(abs) { - if (this.follow) - return this._readdir(abs, false); - var entries; - var lstat; - var stat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er.code === "ENOENT") { - return null; - } - } - var isSym = lstat && lstat.isSymbolicLink(); - this.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) - this.cache[abs] = "FILE"; - else - entries = this._readdir(abs, false); - return entries; - }; - GlobSync.prototype._readdir = function(abs, inGlobStar) { - var entries; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return null; - if (Array.isArray(c)) - return c; - } - try { - return this._readdirEntries(abs, this.fs.readdirSync(abs)); - } catch (er) { - this._readdirError(abs, er); - return null; - } - }; - GlobSync.prototype._readdirEntries = function(abs, entries) { - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return entries; - }; - GlobSync.prototype._readdirError = function(f, er) { - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - throw error2; - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) - throw er; - if (!this.silent) - console.error("glob error", er); - break; - } - }; - GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar); - if (!entries) - return; - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false); - var len = entries.length; - var isSym = this.symlinks[abs]; - if (isSym && inGlobStar) - return; - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true); - } - }; - GlobSync.prototype._processSimple = function(prefix, index) { - var exists = this._stat(prefix); - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return; - if (prefix && isAbsolute3(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path12.join(this.root, prefix); - } else { - prefix = path12.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - }; - GlobSync.prototype._stat = function(f) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return false; - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return c; - if (needDir && c === "FILE") - return false; - } - var exists; - var stat = this.statCache[abs]; - if (!stat) { - var lstat; - try { - lstat = this.fs.lstatSync(abs); - } catch (er) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return false; - } - } - if (lstat && lstat.isSymbolicLink()) { - try { - stat = this.fs.statSync(abs); - } catch (er) { - stat = lstat; - } - } else { - stat = lstat; - } - } - this.statCache[abs] = stat; - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return false; - return c; - }; - GlobSync.prototype._mark = function(p) { - return common2.mark(this, p); - }; - GlobSync.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - } -}); - -// node_modules/inflight/inflight.js -var require_inflight = __commonJS({ - "node_modules/inflight/inflight.js"(exports2, module2) { - var wrappy = require_wrappy(); - var reqs = /* @__PURE__ */ Object.create(null); - var once = require_once(); - module2.exports = wrappy(inflight); - function inflight(key, cb) { - if (reqs[key]) { - reqs[key].push(cb); - return null; - } else { - reqs[key] = [cb]; - return makeres(key); - } - } - function makeres(key) { - return once(function RES() { - var cbs = reqs[key]; - var len = cbs.length; - var args = slice(arguments); - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args); - } - } finally { - if (cbs.length > len) { - cbs.splice(0, len); - process.nextTick(function() { - RES.apply(null, args); - }); - } else { - delete reqs[key]; - } - } - }); - } - function slice(args) { - var length = args.length; - var array = []; - for (var i = 0; i < length; i++) array[i] = args[i]; - return array; - } - } -}); - -// node_modules/rimraf/node_modules/glob/glob.js -var require_glob = __commonJS({ - "node_modules/rimraf/node_modules/glob/glob.js"(exports2, module2) { - module2.exports = glob; - var rp = require_fs5(); - var minimatch = require_minimatch(); - var Minimatch = minimatch.Minimatch; - var inherits = require_inherits(); - var EE = require("events").EventEmitter; - var path12 = require("path"); - var assert = require("assert"); - var isAbsolute3 = require_path_is_absolute(); - var globSync = require_sync7(); - var common2 = require_common3(); - var setopts = common2.setopts; - var ownProp = common2.ownProp; - var inflight = require_inflight(); - var util = require("util"); - var childrenIgnored = common2.childrenIgnored; - var isIgnored = common2.isIgnored; - var once = require_once(); - function glob(pattern, options, cb) { - if (typeof options === "function") cb = options, options = {}; - if (!options) options = {}; - if (options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return globSync(pattern, options); - } - return new Glob(pattern, options, cb); - } - glob.sync = globSync; - var GlobSync = glob.GlobSync = globSync.GlobSync; - glob.glob = glob; - function extend3(origin, add2) { - if (add2 === null || typeof add2 !== "object") { - return origin; - } - var keys = Object.keys(add2); - var i = keys.length; - while (i--) { - origin[keys[i]] = add2[keys[i]]; - } - return origin; - } - glob.hasMagic = function(pattern, options_) { - var options = extend3({}, options_); - options.noprocess = true; - var g = new Glob(pattern, options); - var set2 = g.minimatch.set; - if (!pattern) - return false; - if (set2.length > 1) - return true; - for (var j = 0; j < set2[0].length; j++) { - if (typeof set2[0][j] !== "string") - return true; - } - return false; - }; - glob.Glob = Glob; - inherits(Glob, EE); - function Glob(pattern, options, cb) { - if (typeof options === "function") { - cb = options; - options = null; - } - if (options && options.sync) { - if (cb) - throw new TypeError("callback provided to sync glob"); - return new GlobSync(pattern, options); - } - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb); - setopts(this, pattern, options); - this._didRealPath = false; - var n = this.minimatch.set.length; - this.matches = new Array(n); - if (typeof cb === "function") { - cb = once(cb); - this.on("error", cb); - this.on("end", function(matches) { - cb(null, matches); - }); - } - var self2 = this; - this._processing = 0; - this._emitQueue = []; - this._processQueue = []; - this.paused = false; - if (this.noprocess) - return this; - if (n === 0) - return done(); - var sync = true; - for (var i = 0; i < n; i++) { - this._process(this.minimatch.set[i], i, false, done); - } - sync = false; - function done() { - --self2._processing; - if (self2._processing <= 0) { - if (sync) { - process.nextTick(function() { - self2._finish(); - }); - } else { - self2._finish(); - } - } - } - } - Glob.prototype._finish = function() { - assert(this instanceof Glob); - if (this.aborted) - return; - if (this.realpath && !this._didRealpath) - return this._realpath(); - common2.finish(this); - this.emit("end", this.found); - }; - Glob.prototype._realpath = function() { - if (this._didRealpath) - return; - this._didRealpath = true; - var n = this.matches.length; - if (n === 0) - return this._finish(); - var self2 = this; - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next); - function next() { - if (--n === 0) - self2._finish(); - } - }; - Glob.prototype._realpathSet = function(index, cb) { - var matchset = this.matches[index]; - if (!matchset) - return cb(); - var found = Object.keys(matchset); - var self2 = this; - var n = found.length; - if (n === 0) - return cb(); - var set2 = this.matches[index] = /* @__PURE__ */ Object.create(null); - found.forEach(function(p, i) { - p = self2._makeAbs(p); - rp.realpath(p, self2.realpathCache, function(er, real) { - if (!er) - set2[real] = true; - else if (er.syscall === "stat") - set2[p] = true; - else - self2.emit("error", er); - if (--n === 0) { - self2.matches[index] = set2; - cb(); - } - }); - }); - }; - Glob.prototype._mark = function(p) { - return common2.mark(this, p); - }; - Glob.prototype._makeAbs = function(f) { - return common2.makeAbs(this, f); - }; - Glob.prototype.abort = function() { - this.aborted = true; - this.emit("abort"); - }; - Glob.prototype.pause = function() { - if (!this.paused) { - this.paused = true; - this.emit("pause"); - } - }; - Glob.prototype.resume = function() { - if (this.paused) { - this.emit("resume"); - this.paused = false; - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0); - this._emitQueue.length = 0; - for (var i = 0; i < eq.length; i++) { - var e = eq[i]; - this._emitMatch(e[0], e[1]); - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0); - this._processQueue.length = 0; - for (var i = 0; i < pq.length; i++) { - var p = pq[i]; - this._processing--; - this._process(p[0], p[1], p[2], p[3]); - } - } - } - }; - Glob.prototype._process = function(pattern, index, inGlobStar, cb) { - assert(this instanceof Glob); - assert(typeof cb === "function"); - if (this.aborted) - return; - this._processing++; - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]); - return; - } - var n = 0; - while (typeof pattern[n] === "string") { - n++; - } - var prefix; - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join("/"), index, cb); - return; - case 0: - prefix = null; - break; - default: - prefix = pattern.slice(0, n).join("/"); - break; - } - var remain = pattern.slice(n); - var read; - if (prefix === null) - read = "."; - else if (isAbsolute3(prefix) || isAbsolute3(pattern.join("/"))) { - if (!prefix || !isAbsolute3(prefix)) - prefix = "/" + prefix; - read = prefix; - } else - read = prefix; - var abs = this._makeAbs(read); - if (childrenIgnored(this, read)) - return cb(); - var isGlobStar = remain[0] === minimatch.GLOBSTAR; - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); - }; - Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var pn = remain[0]; - var negate2 = !!this.minimatch.negate; - var rawGlob = pn._glob; - var dotOk = this.dot || rawGlob.charAt(0) === "."; - var matchedEntries = []; - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (e.charAt(0) !== "." || dotOk) { - var m; - if (negate2 && !prefix) { - m = !e.match(pn); - } else { - m = e.match(pn); - } - if (m) - matchedEntries.push(e); - } - } - var len = matchedEntries.length; - if (len === 0) - return cb(); - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path12.join(this.root, e); - } - this._emitMatch(index, e); - } - return cb(); - } - remain.shift(); - for (var i = 0; i < len; i++) { - var e = matchedEntries[i]; - var newPattern; - if (prefix) { - if (prefix !== "/") - e = prefix + "/" + e; - else - e = prefix + e; - } - this._process([e].concat(remain), index, inGlobStar, cb); - } - cb(); - }; - Glob.prototype._emitMatch = function(index, e) { - if (this.aborted) - return; - if (isIgnored(this, e)) - return; - if (this.paused) { - this._emitQueue.push([index, e]); - return; - } - var abs = isAbsolute3(e) ? e : this._makeAbs(e); - if (this.mark) - e = this._mark(e); - if (this.absolute) - e = abs; - if (this.matches[index][e]) - return; - if (this.nodir) { - var c = this.cache[abs]; - if (c === "DIR" || Array.isArray(c)) - return; - } - this.matches[index][e] = true; - var st = this.statCache[abs]; - if (st) - this.emit("stat", e, st); - this.emit("match", e); - }; - Glob.prototype._readdirInGlobStar = function(abs, cb) { - if (this.aborted) - return; - if (this.follow) - return this._readdir(abs, false, cb); - var lstatkey = "lstat\0" + abs; - var self2 = this; - var lstatcb = inflight(lstatkey, lstatcb_); - if (lstatcb) - self2.fs.lstat(abs, lstatcb); - function lstatcb_(er, lstat) { - if (er && er.code === "ENOENT") - return cb(); - var isSym = lstat && lstat.isSymbolicLink(); - self2.symlinks[abs] = isSym; - if (!isSym && lstat && !lstat.isDirectory()) { - self2.cache[abs] = "FILE"; - cb(); - } else - self2._readdir(abs, false, cb); - } - }; - Glob.prototype._readdir = function(abs, inGlobStar, cb) { - if (this.aborted) - return; - cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); - if (!cb) - return; - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb); - if (ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (!c || c === "FILE") - return cb(); - if (Array.isArray(c)) - return cb(null, c); - } - var self2 = this; - self2.fs.readdir(abs, readdirCb(this, abs, cb)); - }; - function readdirCb(self2, abs, cb) { - return function(er, entries) { - if (er) - self2._readdirError(abs, er, cb); - else - self2._readdirEntries(abs, entries, cb); - }; - } - Glob.prototype._readdirEntries = function(abs, entries, cb) { - if (this.aborted) - return; - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i++) { - var e = entries[i]; - if (abs === "/") - e = abs + e; - else - e = abs + "/" + e; - this.cache[e] = true; - } - } - this.cache[abs] = entries; - return cb(null, entries); - }; - Glob.prototype._readdirError = function(f, er, cb) { - if (this.aborted) - return; - switch (er.code) { - case "ENOTSUP": - // https://github.com/isaacs/node-glob/issues/205 - case "ENOTDIR": - var abs = this._makeAbs(f); - this.cache[abs] = "FILE"; - if (abs === this.cwdAbs) { - var error2 = new Error(er.code + " invalid cwd " + this.cwd); - error2.path = this.cwd; - error2.code = er.code; - this.emit("error", error2); - this.abort(); - } - break; - case "ENOENT": - // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.cache[this._makeAbs(f)] = false; - break; - default: - this.cache[this._makeAbs(f)] = false; - if (this.strict) { - this.emit("error", er); - this.abort(); - } - if (!this.silent) - console.error("glob error", er); - break; - } - return cb(); - }; - Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { - var self2 = this; - this._readdir(abs, inGlobStar, function(er, entries) { - self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); - }); - }; - Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { - if (!entries) - return cb(); - var remainWithoutGlobStar = remain.slice(1); - var gspref = prefix ? [prefix] : []; - var noGlobStar = gspref.concat(remainWithoutGlobStar); - this._process(noGlobStar, index, false, cb); - var isSym = this.symlinks[abs]; - var len = entries.length; - if (isSym && inGlobStar) - return cb(); - for (var i = 0; i < len; i++) { - var e = entries[i]; - if (e.charAt(0) === "." && !this.dot) - continue; - var instead = gspref.concat(entries[i], remainWithoutGlobStar); - this._process(instead, index, true, cb); - var below = gspref.concat(entries[i], remain); - this._process(below, index, true, cb); - } - cb(); - }; - Glob.prototype._processSimple = function(prefix, index, cb) { - var self2 = this; - this._stat(prefix, function(er, exists) { - self2._processSimple2(prefix, index, er, exists, cb); - }); - }; - Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { - if (!this.matches[index]) - this.matches[index] = /* @__PURE__ */ Object.create(null); - if (!exists) - return cb(); - if (prefix && isAbsolute3(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix); - if (prefix.charAt(0) === "/") { - prefix = path12.join(this.root, prefix); - } else { - prefix = path12.resolve(this.root, prefix); - if (trail) - prefix += "/"; - } - } - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/"); - this._emitMatch(index, prefix); - cb(); - }; - Glob.prototype._stat = function(f, cb) { - var abs = this._makeAbs(f); - var needDir = f.slice(-1) === "/"; - if (f.length > this.maxLength) - return cb(); - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs]; - if (Array.isArray(c)) - c = "DIR"; - if (!needDir || c === "DIR") - return cb(null, c); - if (needDir && c === "FILE") - return cb(); - } - var exists; - var stat = this.statCache[abs]; - if (stat !== void 0) { - if (stat === false) - return cb(null, stat); - else { - var type2 = stat.isDirectory() ? "DIR" : "FILE"; - if (needDir && type2 === "FILE") - return cb(); - else - return cb(null, type2, stat); - } - } - var self2 = this; - var statcb = inflight("stat\0" + abs, lstatcb_); - if (statcb) - self2.fs.lstat(abs, statcb); - function lstatcb_(er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - return self2.fs.stat(abs, function(er2, stat2) { - if (er2) - self2._stat2(f, abs, null, lstat, cb); - else - self2._stat2(f, abs, er2, stat2, cb); - }); - } else { - self2._stat2(f, abs, er, lstat, cb); - } - } - }; - Glob.prototype._stat2 = function(f, abs, er, stat, cb) { - if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { - this.statCache[abs] = false; - return cb(); - } - var needDir = f.slice(-1) === "/"; - this.statCache[abs] = stat; - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) - return cb(null, false, stat); - var c = true; - if (stat) - c = stat.isDirectory() ? "DIR" : "FILE"; - this.cache[abs] = this.cache[abs] || c; - if (needDir && c === "FILE") - return cb(); - return cb(null, c, stat); - }; - } -}); - -// node_modules/rimraf/rimraf.js -var require_rimraf = __commonJS({ - "node_modules/rimraf/rimraf.js"(exports2, module2) { - var assert = require("assert"); - var path12 = require("path"); - var fs13 = require("fs"); - var glob = void 0; - try { - glob = require_glob(); - } catch (_err) { - } - var defaultGlobOpts = { - nosort: true, - silent: true - }; - var timeout = 0; - var isWindows = process.platform === "win32"; - var defaults = (options) => { - const methods = [ - "unlink", - "chmod", - "stat", - "lstat", - "rmdir", - "readdir" - ]; - methods.forEach((m) => { - options[m] = options[m] || fs13[m]; - m = m + "Sync"; - options[m] = options[m] || fs13[m]; - }); - options.maxBusyTries = options.maxBusyTries || 3; - options.emfileWait = options.emfileWait || 1e3; - if (options.glob === false) { - options.disableGlob = true; - } - if (options.disableGlob !== true && glob === void 0) { - throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); - } - options.disableGlob = options.disableGlob || false; - options.glob = options.glob || defaultGlobOpts; - }; - var rimraf = (p, options, cb) => { - if (typeof options === "function") { - cb = options; - options = {}; - } - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert.equal(typeof cb, "function", "rimraf: callback function required"); - assert(options, "rimraf: invalid options argument provided"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - defaults(options); - let busyTries = 0; - let errState = null; - let n = 0; - const next = (er) => { - errState = errState || er; - if (--n === 0) - cb(errState); - }; - const afterGlob = (er, results) => { - if (er) - return cb(er); - n = results.length; - if (n === 0) - return cb(); - results.forEach((p2) => { - const CB = (er2) => { - if (er2) { - if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { - busyTries++; - return setTimeout(() => rimraf_(p2, options, CB), busyTries * 100); - } - if (er2.code === "EMFILE" && timeout < options.emfileWait) { - return setTimeout(() => rimraf_(p2, options, CB), timeout++); - } - if (er2.code === "ENOENT") er2 = null; - } - timeout = 0; - next(er2); - }; - rimraf_(p2, options, CB); - }); - }; - if (options.disableGlob || !glob.hasMagic(p)) - return afterGlob(null, [p]); - options.lstat(p, (er, stat) => { - if (!er) - return afterGlob(null, [p]); - glob(p, options.glob, afterGlob); - }); - }; - var rimraf_ = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.lstat(p, (er, st) => { - if (er && er.code === "ENOENT") - return cb(null); - if (er && er.code === "EPERM" && isWindows) - fixWinEPERM(p, options, er, cb); - if (st && st.isDirectory()) - return rmdir(p, options, er, cb); - options.unlink(p, (er2) => { - if (er2) { - if (er2.code === "ENOENT") - return cb(null); - if (er2.code === "EPERM") - return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); - if (er2.code === "EISDIR") - return rmdir(p, options, er2, cb); - } - return cb(er2); - }); - }); - }; - var fixWinEPERM = (p, options, er, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.chmod(p, 438, (er2) => { - if (er2) - cb(er2.code === "ENOENT" ? null : er); - else - options.stat(p, (er3, stats) => { - if (er3) - cb(er3.code === "ENOENT" ? null : er); - else if (stats.isDirectory()) - rmdir(p, options, er, cb); - else - options.unlink(p, cb); - }); - }); - }; - var fixWinEPERMSync = (p, options, er) => { - assert(p); - assert(options); - try { - options.chmodSync(p, 438); - } catch (er2) { - if (er2.code === "ENOENT") - return; - else - throw er; - } - let stats; - try { - stats = options.statSync(p); - } catch (er3) { - if (er3.code === "ENOENT") - return; - else - throw er; - } - if (stats.isDirectory()) - rmdirSync(p, options, er); - else - options.unlinkSync(p); - }; - var rmdir = (p, options, originalEr, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.rmdir(p, (er) => { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) - rmkids(p, options, cb); - else if (er && er.code === "ENOTDIR") - cb(originalEr); - else - cb(er); - }); - }; - var rmkids = (p, options, cb) => { - assert(p); - assert(options); - assert(typeof cb === "function"); - options.readdir(p, (er, files) => { - if (er) - return cb(er); - let n = files.length; - if (n === 0) - return options.rmdir(p, cb); - let errState; - files.forEach((f) => { - rimraf(path12.join(p, f), options, (er2) => { - if (errState) - return; - if (er2) - return cb(errState = er2); - if (--n === 0) - options.rmdir(p, cb); - }); - }); - }); - }; - var rimrafSync = (p, options) => { - options = options || {}; - defaults(options); - assert(p, "rimraf: missing path"); - assert.equal(typeof p, "string", "rimraf: path should be a string"); - assert(options, "rimraf: missing options"); - assert.equal(typeof options, "object", "rimraf: options should be object"); - let results; - if (options.disableGlob || !glob.hasMagic(p)) { - results = [p]; - } else { - try { - options.lstatSync(p); - results = [p]; - } catch (er) { - results = glob.sync(p, options.glob); - } - } - if (!results.length) - return; - for (let i = 0; i < results.length; i++) { - const p2 = results[i]; - let st; - try { - st = options.lstatSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM" && isWindows) - fixWinEPERMSync(p2, options, er); - } - try { - if (st && st.isDirectory()) - rmdirSync(p2, options, null); - else - options.unlinkSync(p2); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p2, options, er) : rmdirSync(p2, options, er); - if (er.code !== "EISDIR") - throw er; - rmdirSync(p2, options, er); - } - } - }; - var rmdirSync = (p, options, originalEr) => { - assert(p); - assert(options); - try { - options.rmdirSync(p); - } catch (er) { - if (er.code === "ENOENT") - return; - if (er.code === "ENOTDIR") - throw originalEr; - if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") - rmkidsSync(p, options); - } - }; - var rmkidsSync = (p, options) => { - assert(p); - assert(options); - options.readdirSync(p).forEach((f) => rimrafSync(path12.join(p, f), options)); - const retries = isWindows ? 100 : 1; - let i = 0; - do { - let threw = true; - try { - const ret = options.rmdirSync(p, options); - threw = false; - return ret; - } finally { - if (++i < retries && threw) - continue; - } - } while (true); - }; - module2.exports = rimraf; - rimraf.sync = rimrafSync; - } -}); - -// node_modules/del/node_modules/indent-string/index.js -var require_indent_string = __commonJS({ - "node_modules/del/node_modules/indent-string/index.js"(exports2, module2) { - "use strict"; - module2.exports = (string, count = 1, options) => { - options = { - indent: " ", - includeEmptyLines: false, - ...options - }; - if (typeof string !== "string") { - throw new TypeError( - `Expected \`input\` to be a \`string\`, got \`${typeof string}\`` - ); - } - if (typeof count !== "number") { - throw new TypeError( - `Expected \`count\` to be a \`number\`, got \`${typeof count}\`` - ); - } - if (typeof options.indent !== "string") { - throw new TypeError( - `Expected \`options.indent\` to be a \`string\`, got \`${typeof options.indent}\`` - ); - } - if (count === 0) { - return string; - } - const regex = options.includeEmptyLines ? /^/gm : /^(?!\s*$)/gm; - return string.replace(regex, options.indent.repeat(count)); - }; - } -}); - -// node_modules/del/node_modules/clean-stack/index.js -var require_clean_stack = __commonJS({ - "node_modules/del/node_modules/clean-stack/index.js"(exports2, module2) { - "use strict"; - var os3 = require("os"); - var extractPathRegex = /\s+at.*(?:\(|\s)(.*)\)?/; - var pathRegex = /^(?:(?:(?:node|(?:internal\/[\w/]*|.*node_modules\/(?:babel-polyfill|pirates)\/.*)?\w+)\.js:\d+:\d+)|native)/; - var homeDir = typeof os3.homedir === "undefined" ? "" : os3.homedir(); - module2.exports = (stack, options) => { - options = Object.assign({ pretty: false }, options); - return stack.replace(/\\/g, "/").split("\n").filter((line) => { - const pathMatches = line.match(extractPathRegex); - if (pathMatches === null || !pathMatches[1]) { - return true; - } - const match = pathMatches[1]; - if (match.includes(".app/Contents/Resources/electron.asar") || match.includes(".app/Contents/Resources/default_app.asar")) { - return false; - } - return !pathRegex.test(match); - }).filter((line) => line.trim() !== "").map((line) => { - if (options.pretty) { - return line.replace(extractPathRegex, (m, p1) => m.replace(p1, p1.replace(homeDir, "~"))); - } - return line; - }).join("\n"); - }; - } -}); - -// node_modules/del/node_modules/aggregate-error/index.js -var require_aggregate_error = __commonJS({ - "node_modules/del/node_modules/aggregate-error/index.js"(exports2, module2) { - "use strict"; - var indentString2 = require_indent_string(); - var cleanStack = require_clean_stack(); - var cleanInternalStack = (stack) => stack.replace(/\s+at .*aggregate-error\/index.js:\d+:\d+\)?/g, ""); - var AggregateError = class extends Error { - constructor(errors) { - if (!Array.isArray(errors)) { - throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); - } - errors = [...errors].map((error2) => { - if (error2 instanceof Error) { - return error2; - } - if (error2 !== null && typeof error2 === "object") { - return Object.assign(new Error(error2.message), error2); - } - return new Error(error2); - }); - let message = errors.map((error2) => { - return typeof error2.stack === "string" ? cleanInternalStack(cleanStack(error2.stack)) : String(error2); - }).join("\n"); - message = "\n" + indentString2(message, 4); - super(message); - this.name = "AggregateError"; - Object.defineProperty(this, "_errors", { value: errors }); - } - *[Symbol.iterator]() { - for (const error2 of this._errors) { - yield error2; - } - } - }; - module2.exports = AggregateError; - } -}); - -// node_modules/del/node_modules/p-map/index.js -var require_p_map = __commonJS({ - "node_modules/del/node_modules/p-map/index.js"(exports2, module2) { - "use strict"; - var AggregateError = require_aggregate_error(); - module2.exports = async (iterable, mapper, { - concurrency = Infinity, - stopOnError = true - } = {}) => { - return new Promise((resolve6, reject) => { - if (typeof mapper !== "function") { - throw new TypeError("Mapper function is required"); - } - if (!((Number.isSafeInteger(concurrency) || concurrency === Infinity) && concurrency >= 1)) { - throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); - } - const result = []; - const errors = []; - const iterator = iterable[Symbol.iterator](); - let isRejected = false; - let isIterableDone = false; - let resolvingCount = 0; - let currentIndex = 0; - const next = () => { - if (isRejected) { - return; - } - const nextItem = iterator.next(); - const index = currentIndex; - currentIndex++; - if (nextItem.done) { - isIterableDone = true; - if (resolvingCount === 0) { - if (!stopOnError && errors.length !== 0) { - reject(new AggregateError(errors)); - } else { - resolve6(result); - } - } - return; - } - resolvingCount++; - (async () => { - try { - const element = await nextItem.value; - result[index] = await mapper(element, index); - resolvingCount--; - next(); - } catch (error2) { - if (stopOnError) { - isRejected = true; - reject(error2); - } else { - errors.push(error2); - resolvingCount--; - next(); - } - } - })(); - }; - for (let i = 0; i < concurrency; i++) { - next(); - if (isIterableDone) { - break; - } - } - }); - }; - } -}); - -// node_modules/del/index.js -var require_del = __commonJS({ - "node_modules/del/index.js"(exports2, module2) { - "use strict"; - var { promisify: promisify2 } = require("util"); - var path12 = require("path"); - var globby = require_globby(); - var isGlob = require_is_glob(); - var slash = require_slash(); - var gracefulFs = require_graceful_fs(); - var isPathCwd = require_is_path_cwd(); - var isPathInside = require_is_path_inside(); - var rimraf = require_rimraf(); - var pMap = require_p_map(); - var rimrafP = promisify2(rimraf); - var rimrafOptions = { - glob: false, - unlink: gracefulFs.unlink, - unlinkSync: gracefulFs.unlinkSync, - chmod: gracefulFs.chmod, - chmodSync: gracefulFs.chmodSync, - stat: gracefulFs.stat, - statSync: gracefulFs.statSync, - lstat: gracefulFs.lstat, - lstatSync: gracefulFs.lstatSync, - rmdir: gracefulFs.rmdir, - rmdirSync: gracefulFs.rmdirSync, - readdir: gracefulFs.readdir, - readdirSync: gracefulFs.readdirSync - }; - function safeCheck(file, cwd) { - if (isPathCwd(file)) { - throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); - } - if (!isPathInside(file, cwd)) { - throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); - } - } - function normalizePatterns(patterns) { - patterns = Array.isArray(patterns) ? patterns : [patterns]; - patterns = patterns.map((pattern) => { - if (process.platform === "win32" && isGlob(pattern) === false) { - return slash(pattern); - } - return pattern; - }); - return patterns; - } - module2.exports = async (patterns, { force, dryRun, cwd = process.cwd(), onProgress = () => { - }, ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = (await globby(patterns, options)).sort((a, b) => b.localeCompare(a)); - if (files.length === 0) { - onProgress({ - totalCount: 0, - deletedCount: 0, - percent: 1 - }); - } - let deletedCount = 0; - const mapper = async (file) => { - file = path12.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - await rimrafP(file, rimrafOptions); - } - deletedCount += 1; - onProgress({ - totalCount: files.length, - deletedCount, - percent: deletedCount / files.length - }); - return file; - }; - const removedFiles = await pMap(files, mapper, options); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; - module2.exports.sync = (patterns, { force, dryRun, cwd = process.cwd(), ...options } = {}) => { - options = { - expandDirectories: false, - onlyFiles: false, - followSymbolicLinks: false, - cwd, - ...options - }; - patterns = normalizePatterns(patterns); - const files = globby.sync(patterns, options).sort((a, b) => b.localeCompare(a)); - const removedFiles = files.map((file) => { - file = path12.resolve(cwd, file); - if (!force) { - safeCheck(file, cwd); - } - if (!dryRun) { - rimraf.sync(file, rimrafOptions); - } - return file; - }); - removedFiles.sort((a, b) => a.localeCompare(b)); - return removedFiles; - }; + const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; + checkPath.isNotRelative = (path16) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path16) || isNotRelative(path16); + }; + if ( + // Detect `process` so that it can run in browsers. + typeof process !== "undefined" && process.platform === "win32" + ) { + setupWindows(); + } + module2.exports = factory; + factory.default = factory; + module2.exports.isPathValid = isPathValid; + define2(module2.exports, Symbol.for("setupWindows"), setupWindows); } }); @@ -36287,7 +32325,7 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^6.1.1", + del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -37444,18 +33482,18 @@ var require_light = __commonJS({ var done, waitForExecuting; options = parser$5.load(options, this.stopDefaults); waitForExecuting = (at) => { - var finished; - finished = () => { + var finished2; + finished2 = () => { var counts; counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; return new this.Promise((resolve6, reject) => { - if (finished()) { + if (finished2()) { return resolve6(); } else { return this.on("done", () => { - if (finished()) { + if (finished2()) { this.removeAllListeners("done"); return resolve6(); } @@ -37882,7 +33920,7 @@ var require_console_log_level = __commonJS({ "use strict"; var util = require("util"); var levels = ["trace", "debug", "info", "warn", "error", "fatal"]; - var noop = function() { + var noop2 = function() { }; module2.exports = function(opts) { opts = opts || {}; @@ -37892,7 +33930,7 @@ var require_console_log_level = __commonJS({ return levels.indexOf(level) >= levels.indexOf(opts.level); }; levels.forEach(function(level) { - logger[level] = shouldLog(level) ? log : noop; + logger[level] = shouldLog(level) ? log : noop2; function log() { var prefix = opts.prefix; var normalizedLevel; @@ -38013,7 +34051,7 @@ var require_internal_path_helper = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.safeTrimTrailingSeparator = exports2.normalizeSeparators = exports2.hasRoot = exports2.hasAbsoluteRoot = exports2.ensureAbsoluteRoot = exports2.dirname = void 0; - var path12 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -38021,7 +34059,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path12.dirname(p); + let result = path16.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -38059,7 +34097,7 @@ var require_internal_path_helper = __commonJS({ assert_1.default(hasAbsoluteRoot(root), `ensureAbsoluteRoot parameter 'root' must have an absolute root`); if (root.endsWith("/") || IS_WINDOWS && root.endsWith("\\")) { } else { - root += path12.sep; + root += path16.sep; } return root + itemPath; } @@ -38097,10 +34135,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path12.sep)) { + if (!p.endsWith(path16.sep)) { return p; } - if (p === path12.sep) { + if (p === path16.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -38211,6 +34249,796 @@ var require_internal_pattern_helper = __commonJS({ } }); +// node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str2) { + if (a instanceof RegExp) a = maybeMatch(a, str2); + if (b instanceof RegExp) b = maybeMatch(b, str2); + var r = range(a, b, str2); + return r && { + start: r[0], + end: r[1], + pre: str2.slice(0, r[0]), + body: str2.slice(r[0] + a.length, r[1]), + post: str2.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str2) { + var m = str2.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str2) { + var begs, beg, left, right, result; + var ai = str2.indexOf(a); + var bi = str2.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + begs = []; + left = str2.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str2.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str2.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + function numeric(str2) { + return parseInt(str2, 10) == str2 ? parseInt(str2, 10) : str2.charCodeAt(0); + } + function escapeBraces(str2) { + return str2.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str2) { + return str2.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str2) { + if (!str2) + return [""]; + var parts = []; + var m = balanced("{", "}", str2); + if (!m) + return str2.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str2) { + if (!str2) + return []; + if (str2.substr(0, 2) === "{}") { + str2 = "\\{\\}" + str2.substr(2); + } + return expand(escapeBraces(str2), true).map(unescapeBraces); + } + function embrace(str2) { + return "{" + str2 + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte5(i, y) { + return i >= y; + } + function expand(str2, isTop) { + var expansions = []; + var m = balanced("{", "}", str2); + if (!m || /\$$/.test(m.pre)) return [str2]; + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,.*\}/)) { + str2 = m.pre + "{" + m.body + escClose + m.post; + return expand(str2); + } + return [str2]; + } + var n; + if (isSequence) { + n = m.body.split(/\.\./); + } else { + n = parseCommaParts(m.body); + if (n.length === 1) { + n = expand(n[0], false).map(embrace); + if (n.length === 1) { + var post = m.post.length ? expand(m.post, false) : [""]; + return post.map(function(p) { + return m.pre + n[0] + p; + }); + } + } + } + var pre = m.pre; + var post = m.post.length ? expand(m.post, false) : [""]; + var N; + if (isSequence) { + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte5; + } + var pad = n.some(isPadded); + N = []; + for (var i = x; test(i, y); i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") + c = ""; + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) + c = "-" + z + c.slice(1); + else + c = z + c; + } + } + } + N.push(c); + } + } else { + N = concatMap(n, function(el) { + return expand(el, false); + }); + } + for (var j = 0; j < N.length; j++) { + for (var k = 0; k < post.length; k++) { + var expansion = pre + N[j] + post[k]; + if (!isTop || isSequence || expansion) + expansions.push(expansion); + } + } + return expansions; + } + } +}); + +// node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path16 = (function() { + try { + return require("path"); + } catch (e) { + } + })() || { + sep: "/" + }; + minimatch.sep = path16.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set2, c) { + set2[c] = true; + return set2; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path16.sep !== "/") { + pattern = pattern.split(path16.sep).join("/"); + } + this.options = options; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set2 = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug4() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set2); + set2 = this.globParts = set2.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set2); + set2 = set2.map(function(s, si, set3) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set2); + set2 = set2.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set2); + this.set = set2; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate2 = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l = pattern.length; i < l && pattern.charAt(i) === "!"; i++) { + negate2 = !negate2; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate2; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse; + var SUBPARSE = {}; + function parse(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set2 = this.set; + if (!set2.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set2.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path16.sep !== "/") { + f = f.split(path16.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set2 = this.set; + this.debug(this.pattern, "set", set2); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set2.length; i++) { + var pattern = set2[i]; + var file = f; + if (options.matchBase && pattern.length === 1) { + file = [filename]; + } + var hit = this.matchOne(file, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file, pattern, partial) { + var options = this.options; + this.debug( + "matchOne", + { "this": this, file, pattern } + ); + this.debug("matchOne", file.length, pattern.length); + for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file[fi]; + this.debug(pattern, p, f); + if (p === false) return false; + if (p === GLOBSTAR) { + this.debug("GLOBSTAR", [pattern, p, f]); + var fr = fi; + var pr = pi + 1; + if (pr === pl) { + this.debug("** at the end"); + for (; fi < fl; fi++) { + if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false; + } + return true; + } + while (fr < fl) { + var swallowee = file[fr]; + this.debug("\nglobstar while", file, fr, pattern, pr, swallowee); + if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { + this.debug("globstar found match!", fr, fl, swallowee); + return true; + } else { + if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") { + this.debug("dot detected!", file, fr, pattern, pr); + break; + } + this.debug("globstar swallow a segment, and continue"); + fr++; + } + } + if (partial) { + this.debug("\n>>> no match, partial?", file, fr, pattern, pr); + if (fr === fl) return true; + } + return false; + } + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + // node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js var require_internal_path = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/internal-path.js"(exports2) { @@ -38243,7 +35071,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path12 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -38258,12 +35086,12 @@ var require_internal_path = __commonJS({ assert_1.default(itemPath, `Parameter 'itemPath' must not be empty`); itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); if (!pathHelper.hasRoot(itemPath)) { - this.segments = itemPath.split(path12.sep); + this.segments = itemPath.split(path16.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path12.basename(remaining); + const basename = path16.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -38281,7 +35109,7 @@ var require_internal_path = __commonJS({ assert_1.default(segment === pathHelper.dirname(segment), `Parameter 'itemPath' root segment contains information for multiple segments`); this.segments.push(segment); } else { - assert_1.default(!segment.includes(path12.sep), `Parameter 'itemPath' contains unexpected path separators`); + assert_1.default(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -38292,12 +35120,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path12.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); + let skipSlash = result.endsWith(path16.sep) || IS_WINDOWS && /^[A-Z]:$/i.test(result); for (let i = 1; i < this.segments.length; i++) { if (skipSlash) { skipSlash = false; } else { - result += path12.sep; + result += path16.sep; } result += this.segments[i]; } @@ -38341,7 +35169,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os3 = __importStar4(require("os")); - var path12 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -38370,7 +35198,7 @@ var require_internal_pattern = __commonJS({ } pattern = _Pattern.fixupPattern(pattern, homedir); this.segments = new internal_path_1.Path(pattern).segments; - this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path12.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path16.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -38394,8 +35222,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path12.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path12.sep}`; + if (!itemPath.endsWith(path16.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path16.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -38430,9 +35258,9 @@ var require_internal_pattern = __commonJS({ assert_1.default(literalSegments.every((x, i) => (x !== "." || i === 0) && x !== ".."), `Invalid pattern '${pattern}'. Relative pathing '.' and '..' is not allowed.`); assert_1.default(!pathHelper.hasRoot(pattern) || literalSegments[0], `Invalid pattern '${pattern}'. Root segment must not contain globs.`); pattern = pathHelper.normalizeSeparators(pattern); - if (pattern === "." || pattern.startsWith(`.${path12.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path16.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path12.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path16.sep}`)) { homedir = homedir || os3.homedir(); assert_1.default(homedir, "Unable to determine HOME directory"); assert_1.default(pathHelper.hasAbsoluteRoot(homedir), `Expected HOME directory to be a rooted path. Actual '${homedir}'`); @@ -38516,8 +35344,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path12, level) { - this.path = path12; + constructor(path16, level) { + this.path = path16; this.level = level; } }; @@ -38637,9 +35465,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core14 = __importStar4(require_core()); - var fs13 = __importStar4(require("fs")); + var fs16 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path12 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var patternHelper = __importStar4(require_internal_pattern_helper()); var internal_match_kind_1 = require_internal_match_kind(); var internal_pattern_1 = require_internal_pattern(); @@ -38689,7 +35517,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await4(fs13.promises.lstat(searchPath)); + yield __await4(fs16.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -38720,7 +35548,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs13.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path12.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs16.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path16.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await4(item.path); @@ -38755,7 +35583,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs13.promises.stat(item.path); + stats = yield fs16.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -38767,10 +35595,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs13.promises.lstat(item.path); + stats = yield fs16.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs13.promises.realpath(item.path); + const realPath = yield fs16.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -38789,7 +35617,7 @@ var require_internal_globber = __commonJS({ }); // node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js -var require_glob2 = __commonJS({ +var require_glob = __commonJS({ "node_modules/@actions/cache/node_modules/@actions/glob/lib/glob.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -40101,11 +36929,11 @@ var require_cacheUtils = __commonJS({ exports2.getRuntimeToken = exports2.getCacheVersion = exports2.assertDefined = exports2.getGnuTarPathOnWindows = exports2.getCacheFileName = exports2.getCompressionMethod = exports2.unlinkFile = exports2.resolvePaths = exports2.getArchiveFileSizeInBytes = exports2.createTempDirectory = void 0; var core14 = __importStar4(require_core()); var exec2 = __importStar4(require_exec()); - var glob = __importStar4(require_glob2()); + var glob = __importStar4(require_glob()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs13 = __importStar4(require("fs")); - var path12 = __importStar4(require("path")); + var fs16 = __importStar4(require("fs")); + var path16 = __importStar4(require("path")); var semver8 = __importStar4(require_semver3()); var util = __importStar4(require("util")); var constants_1 = require_constants10(); @@ -40125,16 +36953,16 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path12.join(baseLocation, "actions", "temp"); + tempDirectory = path16.join(baseLocation, "actions", "temp"); } - const dest = path12.join(tempDirectory, crypto.randomUUID()); + const dest = path16.join(tempDirectory, crypto.randomUUID()); yield io6.mkdirP(dest); return dest; }); } exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs13.statSync(filePath).size; + return fs16.statSync(filePath).size; } exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { @@ -40151,7 +36979,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path12.relative(workspace, file).replace(new RegExp(`\\${path12.sep}`, "g"), "/"); + const relativeFile = path16.relative(workspace, file).replace(new RegExp(`\\${path16.sep}`, "g"), "/"); core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -40174,7 +37002,7 @@ var require_cacheUtils = __commonJS({ exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { return __awaiter4(this, void 0, void 0, function* () { - return util.promisify(fs13.unlink)(filePath); + return util.promisify(fs16.unlink)(filePath); }); } exports2.unlinkFile = unlinkFile; @@ -40219,7 +37047,7 @@ var require_cacheUtils = __commonJS({ exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { return __awaiter4(this, void 0, void 0, function* () { - if (fs13.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs16.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -41725,13 +38553,13 @@ var require_userAgentPlatform = __commonJS({ exports2.setPlatformSpecificData = setPlatformSpecificData; var tslib_1 = (init_tslib_es6(), __toCommonJS(tslib_es6_exports)); var os3 = tslib_1.__importStar(require("node:os")); - var process2 = tslib_1.__importStar(require("node:process")); + var process6 = tslib_1.__importStar(require("node:process")); function getHeaderName() { return "User-Agent"; } async function setPlatformSpecificData(map2) { - if (process2 && process2.versions) { - const versions = process2.versions; + if (process6 && process6.versions) { + const versions = process6.versions; if (versions.bun) { map2.set("Bun", versions.bun); } else if (versions.deno) { @@ -42699,7 +39527,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common4 = __commonJS({ +var require_common3 = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -43033,7 +39861,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common4()(exports2); + module2.exports = require_common3()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -43321,7 +40149,7 @@ var require_node = __commonJS({ debug4.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common4()(exports2); + module2.exports = require_common3()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -48057,15 +44885,15 @@ var require_urlHelpers = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path12 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path12.startsWith("/")) { - path12 = path12.substring(1); + let path16 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path16.startsWith("/")) { + path16 = path16.substring(1); } - if (isAbsoluteUrl(path12)) { - requestUrl = path12; + if (isAbsoluteUrl(path16)) { + requestUrl = path16; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path12); + requestUrl = appendPath(requestUrl, path16); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -48113,9 +44941,9 @@ var require_urlHelpers = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path12 = pathToAppend.substring(0, searchStart); + const path16 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path12; + newPath = newPath + path16; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -51992,7 +48820,7 @@ var require_dist7 = __commonJS({ var stream2 = require("stream"); var coreLro = require_dist6(); var events = require("events"); - var fs13 = require("fs"); + var fs16 = require("fs"); var util = require("util"); var buffer = require("buffer"); function _interopNamespaceDefault(e) { @@ -52015,7 +48843,7 @@ var require_dist7 = __commonJS({ } var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs13); + var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs16); var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); var logger = logger$1.createClientLogger("storage-blob"); var BaseRequestPolicy = class { @@ -52264,10 +49092,10 @@ var require_dist7 = __commonJS({ ]; function escapeURLPath(url3) { const urlParsed = new URL(url3); - let path12 = urlParsed.pathname; - path12 = path12 || "/"; - path12 = escape(path12); - urlParsed.pathname = path12; + let path16 = urlParsed.pathname; + path16 = path16 || "/"; + path16 = escape(path16); + urlParsed.pathname = path16; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -52352,9 +49180,9 @@ var require_dist7 = __commonJS({ } function appendToURLPath(url3, name) { const urlParsed = new URL(url3); - let path12 = urlParsed.pathname; - path12 = path12 ? path12.endsWith("/") ? `${path12}${name}` : `${path12}/${name}` : name; - urlParsed.pathname = path12; + let path16 = urlParsed.pathname; + path16 = path16 ? path16.endsWith("/") ? `${path16}${name}` : `${path16}/${name}` : name; + urlParsed.pathname = path16; return urlParsed.toString(); } function setURLParameter(url3, name, value) { @@ -53435,9 +50263,9 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path12 = getURLPath(request.url) || "/"; + const path16 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path12}`; + canonicalizedResourceString += `/${this.factory.accountName}${path16}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -53730,9 +50558,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path12 = getURLPath(request.url) || "/"; + const path16 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path12}`; + canonicalizedResourceString += `/${options.accountName}${path16}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -73034,8 +69862,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; if (this.operationCount >= BATCH_MAX_REQUEST) { throw new RangeError(`Cannot exceed ${BATCH_MAX_REQUEST} sub requests in a single batch`); } - const path12 = getURLPath(subRequest.url); - if (!path12 || path12 === "") { + const path16 = getURLPath(subRequest.url); + if (!path16 || path16 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -73095,8 +69923,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; pipeline = newPipeline(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); - const path12 = getURLPath(url3); - if (path12 && path12 !== "/") { + const path16 = getURLPath(url3); + if (path16 && path16 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -75863,7 +72691,7 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); - var fs13 = __importStar4(require("fs")); + var fs16 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); var utils = __importStar4(require_cacheUtils()); @@ -75974,7 +72802,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter4(this, void 0, void 0, function* () { - const writeStream = fs13.createWriteStream(archivePath); + const writeStream = fs16.createWriteStream(archivePath); const httpClient = new http_client_1.HttpClient("actions/cache"); const downloadResponse = yield (0, requestUtils_1.retryHttpClientResponse)("downloadCache", () => __awaiter4(this, void 0, void 0, function* () { return httpClient.get(archiveLocation); @@ -76000,7 +72828,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { var _a; return __awaiter4(this, void 0, void 0, function* () { - const archiveDescriptor = yield fs13.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs16.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -76117,7 +72945,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs13.openSync(archivePath, "w"); + const fd = fs16.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -76135,12 +72963,12 @@ var require_downloadUtils = __commonJS({ controller.abort(); throw new Error("Aborting cache download as the download time exceeded the timeout."); } else if (Buffer.isBuffer(result)) { - fs13.writeFileSync(fd, result); + fs16.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs13.closeSync(fd); + fs16.closeSync(fd); } } }); @@ -76439,7 +73267,7 @@ var require_cacheHttpClient = __commonJS({ var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs13 = __importStar4(require("fs")); + var fs16 = __importStar4(require("fs")); var url_1 = require("url"); var utils = __importStar4(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -76577,7 +73405,7 @@ Other caches with similar key:`); return __awaiter4(this, void 0, void 0, function* () { const fileSize = utils.getArchiveFileSizeInBytes(archivePath); const resourceUrl = getCacheApiUrl(`caches/${cacheId.toString()}`); - const fd = fs13.openSync(archivePath, "r"); + const fd = fs16.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -76591,7 +73419,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs13.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs16.createReadStream(archivePath, { fd, start, end, @@ -76602,7 +73430,7 @@ Other caches with similar key:`); } }))); } finally { - fs13.closeSync(fd); + fs16.closeSync(fd); } return; }); @@ -81820,7 +78648,7 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io6 = __importStar4(require_io()); var fs_1 = require("fs"); - var path12 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var constants_1 = require_constants10(); var IS_WINDOWS = process.platform === "win32"; @@ -81866,13 +78694,13 @@ var require_tar = __commonJS({ const BSD_TAR_ZSTD = tarPath.type === constants_1.ArchiveToolType.BSD && compressionMethod !== constants_1.CompressionMethod.Gzip && IS_WINDOWS; switch (type2) { case "create": - args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); + args.push("--posix", "-cf", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "--files-from", constants_1.ManifestFilename); break; case "extract": - args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path12.sep}`, "g"), "/")); + args.push("-xf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path16.sep}`, "g"), "/")); break; case "list": - args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), "-P"); + args.push("-tf", BSD_TAR_ZSTD ? tarFile : archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -81918,7 +78746,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -81927,7 +78755,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path12.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -81942,7 +78770,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -81951,7 +78779,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path12.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -81991,7 +78819,7 @@ var require_tar = __commonJS({ exports2.extractTar = extractTar2; function createTar(archiveFolder, sourceDirectories, compressionMethod) { return __awaiter4(this, void 0, void 0, function* () { - (0, fs_1.writeFileSync)(path12.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); + (0, fs_1.writeFileSync)(path16.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -82061,7 +78889,7 @@ var require_cache3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.ReserveCacheError = exports2.ValidationError = void 0; var core14 = __importStar4(require_core()); - var path12 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); @@ -82151,7 +78979,7 @@ var require_cache3 = __commonJS({ core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core14.isDebug()) { @@ -82220,7 +79048,7 @@ var require_cache3 = __commonJS({ core14.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core14.debug(`Archive path: ${archivePath}`); core14.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -82283,7 +79111,7 @@ var require_cache3 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path12.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path16.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -82347,7 +79175,7 @@ var require_cache3 = __commonJS({ throw new Error(`Path Validation Error: Path(s) specified in the action for caching do(es) not exist, hence no cache is being saved.`); } const archiveFolder = yield utils.createTempDirectory(); - const archivePath = path12.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path16.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -82421,14 +79249,14 @@ var require_helpers3 = __commonJS({ "node_modules/jsonschema/lib/helpers.js"(exports2, module2) { "use strict"; var uri = require("url"); - var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path12, name, argument) { - if (Array.isArray(path12)) { - this.path = path12; - this.property = path12.reduce(function(sum, item) { + var ValidationError = exports2.ValidationError = function ValidationError2(message, instance, schema2, path16, name, argument) { + if (Array.isArray(path16)) { + this.path = path16; + this.property = path16.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path12 !== void 0) { - this.property = path12; + } else if (path16 !== void 0) { + this.property = path16; } if (message) { this.message = message; @@ -82519,16 +79347,16 @@ var require_helpers3 = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path12, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path16, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path12)) { - this.path = path12; - this.propertyPath = path12.reduce(function(sum, item) { + if (Array.isArray(path16)) { + this.path = path16; + this.propertyPath = path16.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path12; + this.propertyPath = path16; } this.base = base; this.schemas = schemas; @@ -82537,10 +79365,10 @@ var require_helpers3 = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path12 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path16 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); var id = schema2.$id || schema2.id; var base = uri.resolve(this.base, id || ""); - var ctx = new SchemaContext(schema2, this.options, path12, base, Object.create(this.schemas)); + var ctx = new SchemaContext(schema2, this.options, path16, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -83777,7 +80605,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os3 = require("os"); var cp = require("child_process"); - var fs13 = require("fs"); + var fs16 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter4(this, void 0, void 0, function* () { const platFilter = os3.platform(); @@ -83841,10 +80669,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs13.existsSync(lsbReleaseFile)) { - contents = fs13.readFileSync(lsbReleaseFile).toString(); - } else if (fs13.existsSync(osReleaseFile)) { - contents = fs13.readFileSync(osReleaseFile).toString(); + if (fs16.existsSync(lsbReleaseFile)) { + contents = fs16.readFileSync(lsbReleaseFile).toString(); + } else if (fs16.existsSync(osReleaseFile)) { + contents = fs16.readFileSync(osReleaseFile).toString(); } return contents; } @@ -84021,10 +80849,10 @@ var require_tool_cache = __commonJS({ var core14 = __importStar4(require_core()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs13 = __importStar4(require("fs")); + var fs16 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); var os3 = __importStar4(require("os")); - var path12 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var httpm = __importStar4(require_lib()); var semver8 = __importStar4(require_semver2()); var stream2 = __importStar4(require("stream")); @@ -84045,8 +80873,8 @@ var require_tool_cache = __commonJS({ var userAgent = "actions/tool-cache"; function downloadTool2(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - dest = dest || path12.join(_getTempDirectory(), crypto.randomUUID()); - yield io6.mkdirP(path12.dirname(dest)); + dest = dest || path16.join(_getTempDirectory(), crypto.randomUUID()); + yield io6.mkdirP(path16.dirname(dest)); core14.debug(`Downloading ${url2}`); core14.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -84068,7 +80896,7 @@ var require_tool_cache = __commonJS({ exports2.downloadTool = downloadTool2; function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - if (fs13.existsSync(dest)) { + if (fs16.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { @@ -84092,7 +80920,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs13.createWriteStream(dest)); + yield pipeline(readStream, fs16.createWriteStream(dest)); core14.debug("download complete"); succeeded = true; return dest; @@ -84133,7 +80961,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path12.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); + const escapedScript = path16.join(__dirname, "..", "scripts", "Invoke-7zdec.ps1").replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedFile = file.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const escapedTarget = dest.replace(/'/g, "''").replace(/"|\n|\r/g, ""); const command = `& '${escapedScript}' -Source '${escapedFile}' -Target '${escapedTarget}'`; @@ -84304,12 +81132,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os3.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); core14.debug(`source dir: ${sourceDir}`); - if (!fs13.statSync(sourceDir).isDirectory()) { + if (!fs16.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs13.readdirSync(sourceDir)) { - const s = path12.join(sourceDir, itemName); + for (const itemName of fs16.readdirSync(sourceDir)) { + const s = path16.join(sourceDir, itemName); yield io6.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -84323,11 +81151,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os3.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); core14.debug(`source file: ${sourceFile}`); - if (!fs13.statSync(sourceFile).isFile()) { + if (!fs16.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path12.join(destFolder, targetFile); + const destPath = path16.join(destFolder, targetFile); core14.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -84351,9 +81179,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; - const cachePath = path12.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path16.join(_getCacheDirectory(), toolName, versionSpec, arch2); core14.debug(`checking cache: ${cachePath}`); - if (fs13.existsSync(cachePath) && fs13.existsSync(`${cachePath}.complete`)) { + if (fs16.existsSync(cachePath) && fs16.existsSync(`${cachePath}.complete`)) { core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -84366,13 +81194,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os3.arch(); - const toolPath = path12.join(_getCacheDirectory(), toolName); - if (fs13.existsSync(toolPath)) { - const children = fs13.readdirSync(toolPath); + const toolPath = path16.join(_getCacheDirectory(), toolName); + if (fs16.existsSync(toolPath)) { + const children = fs16.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path12.join(toolPath, child, arch2 || ""); - if (fs13.existsSync(fullPath) && fs13.existsSync(`${fullPath}.complete`)) { + const fullPath = path16.join(toolPath, child, arch2 || ""); + if (fs16.existsSync(fullPath) && fs16.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -84426,7 +81254,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter4(this, void 0, void 0, function* () { if (!dest) { - dest = path12.join(_getTempDirectory(), crypto.randomUUID()); + dest = path16.join(_getTempDirectory(), crypto.randomUUID()); } yield io6.mkdirP(dest); return dest; @@ -84434,7 +81262,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { - const folderPath = path12.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path16.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); @@ -84444,9 +81272,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path12.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path16.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs13.writeFileSync(markerPath, ""); + fs16.writeFileSync(markerPath, ""); core14.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -84623,7 +81451,7 @@ var require_follow_redirects = __commonJS({ "ERR_STREAM_WRITE_AFTER_END", "write after end" ); - var destroy = Writable.prototype.destroy || noop; + var destroy = Writable.prototype.destroy || noop2; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); @@ -84952,7 +81780,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop() { + function noop2() { } function parseUrl(input) { var parsed; @@ -85028,7 +81856,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.removeListener(event, eventHandlers[event]); } - request.on("error", noop); + request.on("error", noop2); request.destroy(error2); } function isSubdomain(subdomain, domain) { @@ -87950,19 +84778,19 @@ var require_sarif_schema_2_1_0 = __commonJS({ }); // src/upload-sarif-action.ts -var fs12 = __toESM(require("fs")); +var fs15 = __toESM(require("fs")); var core13 = __toESM(require_core()); // src/actions-util.ts -var fs = __toESM(require("fs")); -var path2 = __toESM(require("path")); +var fs4 = __toESM(require("fs")); +var path6 = __toESM(require("path")); var core4 = __toESM(require_core()); var toolrunner = __toESM(require_toolrunner()); var github = __toESM(require_github()); var io2 = __toESM(require_io()); // src/util.ts -var path = __toESM(require("path")); +var path5 = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -88102,36 +84930,764 @@ function checkDiskSpace(directoryPath, dependencies = { return checkUnix(directoryPath); } -// src/util.ts -var import_del = __toESM(require_del()); +// node_modules/del/index.js +var import_promises5 = __toESM(require("node:fs/promises"), 1); +var import_node_path6 = __toESM(require("node:path"), 1); +var import_node_process5 = __toESM(require("node:process"), 1); + +// node_modules/globby/index.js +var import_node_process3 = __toESM(require("node:process"), 1); +var import_node_fs3 = __toESM(require("node:fs"), 1); +var import_node_path3 = __toESM(require("node:path"), 1); + +// node_modules/globby/node_modules/@sindresorhus/merge-streams/index.js +var import_node_events = require("node:events"); +var import_node_stream = require("node:stream"); +var import_promises2 = require("node:stream/promises"); +function mergeStreams(streams) { + if (!Array.isArray(streams)) { + throw new TypeError(`Expected an array, got \`${typeof streams}\`.`); + } + for (const stream2 of streams) { + validateStream(stream2); + } + const objectMode = streams.some(({ readableObjectMode }) => readableObjectMode); + const highWaterMark = getHighWaterMark(streams, objectMode); + const passThroughStream = new MergedStream({ + objectMode, + writableHighWaterMark: highWaterMark, + readableHighWaterMark: highWaterMark + }); + for (const stream2 of streams) { + passThroughStream.add(stream2); + } + if (streams.length === 0) { + endStream(passThroughStream); + } + return passThroughStream; +} +var getHighWaterMark = (streams, objectMode) => { + if (streams.length === 0) { + return 16384; + } + const highWaterMarks = streams.filter(({ readableObjectMode }) => readableObjectMode === objectMode).map(({ readableHighWaterMark }) => readableHighWaterMark); + return Math.max(...highWaterMarks); +}; +var MergedStream = class extends import_node_stream.PassThrough { + #streams = /* @__PURE__ */ new Set([]); + #ended = /* @__PURE__ */ new Set([]); + #aborted = /* @__PURE__ */ new Set([]); + #onFinished; + add(stream2) { + validateStream(stream2); + if (this.#streams.has(stream2)) { + return; + } + this.#streams.add(stream2); + this.#onFinished ??= onMergedStreamFinished(this, this.#streams); + endWhenStreamsDone({ + passThroughStream: this, + stream: stream2, + streams: this.#streams, + ended: this.#ended, + aborted: this.#aborted, + onFinished: this.#onFinished + }); + stream2.pipe(this, { end: false }); + } + remove(stream2) { + validateStream(stream2); + if (!this.#streams.has(stream2)) { + return false; + } + stream2.unpipe(this); + return true; + } +}; +var onMergedStreamFinished = async (passThroughStream, streams) => { + updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_COUNT); + const controller = new AbortController(); + try { + await Promise.race([ + onMergedStreamEnd(passThroughStream, controller), + onInputStreamsUnpipe(passThroughStream, streams, controller) + ]); + } finally { + controller.abort(); + updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_COUNT); + } +}; +var onMergedStreamEnd = async (passThroughStream, { signal }) => { + await (0, import_promises2.finished)(passThroughStream, { signal, cleanup: true }); +}; +var onInputStreamsUnpipe = async (passThroughStream, streams, { signal }) => { + for await (const [unpipedStream] of (0, import_node_events.on)(passThroughStream, "unpipe", { signal })) { + if (streams.has(unpipedStream)) { + unpipedStream.emit(unpipeEvent); + } + } +}; +var validateStream = (stream2) => { + if (typeof stream2?.pipe !== "function") { + throw new TypeError(`Expected a readable stream, got: \`${typeof stream2}\`.`); + } +}; +var endWhenStreamsDone = async ({ passThroughStream, stream: stream2, streams, ended, aborted, onFinished }) => { + updateMaxListeners(passThroughStream, PASSTHROUGH_LISTENERS_PER_STREAM); + const controller = new AbortController(); + try { + await Promise.race([ + afterMergedStreamFinished(onFinished, stream2), + onInputStreamEnd({ passThroughStream, stream: stream2, streams, ended, aborted, controller }), + onInputStreamUnpipe({ stream: stream2, streams, ended, aborted, controller }) + ]); + } finally { + controller.abort(); + updateMaxListeners(passThroughStream, -PASSTHROUGH_LISTENERS_PER_STREAM); + } + if (streams.size === ended.size + aborted.size) { + if (ended.size === 0 && aborted.size > 0) { + abortStream(passThroughStream); + } else { + endStream(passThroughStream); + } + } +}; +var isAbortError = (error2) => error2?.code === "ERR_STREAM_PREMATURE_CLOSE"; +var afterMergedStreamFinished = async (onFinished, stream2) => { + try { + await onFinished; + abortStream(stream2); + } catch (error2) { + if (isAbortError(error2)) { + abortStream(stream2); + } else { + errorStream(stream2, error2); + } + } +}; +var onInputStreamEnd = async ({ passThroughStream, stream: stream2, streams, ended, aborted, controller: { signal } }) => { + try { + await (0, import_promises2.finished)(stream2, { signal, cleanup: true, readable: true, writable: false }); + if (streams.has(stream2)) { + ended.add(stream2); + } + } catch (error2) { + if (signal.aborted || !streams.has(stream2)) { + return; + } + if (isAbortError(error2)) { + aborted.add(stream2); + } else { + errorStream(passThroughStream, error2); + } + } +}; +var onInputStreamUnpipe = async ({ stream: stream2, streams, ended, aborted, controller: { signal } }) => { + await (0, import_node_events.once)(stream2, unpipeEvent, { signal }); + streams.delete(stream2); + ended.delete(stream2); + aborted.delete(stream2); +}; +var unpipeEvent = Symbol("unpipe"); +var endStream = (stream2) => { + if (stream2.writable) { + stream2.end(); + } +}; +var abortStream = (stream2) => { + if (stream2.readable || stream2.writable) { + stream2.destroy(); + } +}; +var errorStream = (stream2, error2) => { + if (!stream2.destroyed) { + stream2.once("error", noop); + stream2.destroy(error2); + } +}; +var noop = () => { +}; +var updateMaxListeners = (passThroughStream, increment) => { + const maxListeners = passThroughStream.getMaxListeners(); + if (maxListeners !== 0 && maxListeners !== Number.POSITIVE_INFINITY) { + passThroughStream.setMaxListeners(maxListeners + increment); + } +}; +var PASSTHROUGH_LISTENERS_COUNT = 2; +var PASSTHROUGH_LISTENERS_PER_STREAM = 1; + +// node_modules/globby/index.js +var import_fast_glob2 = __toESM(require_out4(), 1); + +// node_modules/path-type/index.js +var import_node_fs = __toESM(require("node:fs"), 1); +var import_promises3 = __toESM(require("node:fs/promises"), 1); +async function isType(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + const stats = await import_promises3.default[fsStatType](filePath); + return stats[statsMethodName](); + } catch (error2) { + if (error2.code === "ENOENT") { + return false; + } + throw error2; + } +} +function isTypeSync(fsStatType, statsMethodName, filePath) { + if (typeof filePath !== "string") { + throw new TypeError(`Expected a string, got ${typeof filePath}`); + } + try { + return import_node_fs.default[fsStatType](filePath)[statsMethodName](); + } catch (error2) { + if (error2.code === "ENOENT") { + return false; + } + throw error2; + } +} +var isFile = isType.bind(void 0, "stat", "isFile"); +var isDirectory = isType.bind(void 0, "stat", "isDirectory"); +var isSymlink = isType.bind(void 0, "lstat", "isSymbolicLink"); +var isFileSync = isTypeSync.bind(void 0, "statSync", "isFile"); +var isDirectorySync = isTypeSync.bind(void 0, "statSync", "isDirectory"); +var isSymlinkSync = isTypeSync.bind(void 0, "lstatSync", "isSymbolicLink"); + +// node_modules/unicorn-magic/node.js +var import_node_util2 = require("node:util"); +var import_node_child_process2 = require("node:child_process"); +var import_node_url = require("node:url"); +var execFileOriginal = (0, import_node_util2.promisify)(import_node_child_process2.execFile); +function toPath(urlOrPath) { + return urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath; +} +var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024; + +// node_modules/globby/ignore.js +var import_node_process2 = __toESM(require("node:process"), 1); +var import_node_fs2 = __toESM(require("node:fs"), 1); +var import_promises4 = __toESM(require("node:fs/promises"), 1); +var import_node_path2 = __toESM(require("node:path"), 1); +var import_fast_glob = __toESM(require_out4(), 1); +var import_ignore = __toESM(require_ignore(), 1); + +// node_modules/slash/index.js +function slash(path16) { + const isExtendedLengthPath = path16.startsWith("\\\\?\\"); + if (isExtendedLengthPath) { + return path16; + } + return path16.replace(/\\/g, "/"); +} + +// node_modules/globby/utilities.js +var isNegativePattern = (pattern) => pattern[0] === "!"; + +// node_modules/globby/ignore.js +var defaultIgnoredDirectories = [ + "**/node_modules", + "**/flow-typed", + "**/coverage", + "**/.git" +]; +var ignoreFilesGlobOptions = { + absolute: true, + dot: true +}; +var GITIGNORE_FILES_PATTERN = "**/.gitignore"; +var applyBaseToPattern = (pattern, base) => isNegativePattern(pattern) ? "!" + import_node_path2.default.posix.join(base, pattern.slice(1)) : import_node_path2.default.posix.join(base, pattern); +var parseIgnoreFile = (file, cwd) => { + const base = slash(import_node_path2.default.relative(cwd, import_node_path2.default.dirname(file.filePath))); + return file.content.split(/\r?\n/).filter((line) => line && !line.startsWith("#")).map((pattern) => applyBaseToPattern(pattern, base)); +}; +var toRelativePath = (fileOrDirectory, cwd) => { + cwd = slash(cwd); + if (import_node_path2.default.isAbsolute(fileOrDirectory)) { + if (slash(fileOrDirectory).startsWith(cwd)) { + return import_node_path2.default.relative(cwd, fileOrDirectory); + } + throw new Error(`Path ${fileOrDirectory} is not in cwd ${cwd}`); + } + return fileOrDirectory; +}; +var getIsIgnoredPredicate = (files, cwd) => { + const patterns = files.flatMap((file) => parseIgnoreFile(file, cwd)); + const ignores = (0, import_ignore.default)().add(patterns); + return (fileOrDirectory) => { + fileOrDirectory = toPath(fileOrDirectory); + fileOrDirectory = toRelativePath(fileOrDirectory, cwd); + return fileOrDirectory ? ignores.ignores(slash(fileOrDirectory)) : false; + }; +}; +var normalizeOptions = (options = {}) => ({ + cwd: toPath(options.cwd) ?? import_node_process2.default.cwd(), + suppressErrors: Boolean(options.suppressErrors), + deep: typeof options.deep === "number" ? options.deep : Number.POSITIVE_INFINITY, + ignore: [...options.ignore ?? [], ...defaultIgnoredDirectories] +}); +var isIgnoredByIgnoreFiles = async (patterns, options) => { + const { cwd, suppressErrors, deep, ignore } = normalizeOptions(options); + const paths = await (0, import_fast_glob.default)(patterns, { + cwd, + suppressErrors, + deep, + ignore, + ...ignoreFilesGlobOptions + }); + const files = await Promise.all( + paths.map(async (filePath) => ({ + filePath, + content: await import_promises4.default.readFile(filePath, "utf8") + })) + ); + return getIsIgnoredPredicate(files, cwd); +}; +var isIgnoredByIgnoreFilesSync = (patterns, options) => { + const { cwd, suppressErrors, deep, ignore } = normalizeOptions(options); + const paths = import_fast_glob.default.sync(patterns, { + cwd, + suppressErrors, + deep, + ignore, + ...ignoreFilesGlobOptions + }); + const files = paths.map((filePath) => ({ + filePath, + content: import_node_fs2.default.readFileSync(filePath, "utf8") + })); + return getIsIgnoredPredicate(files, cwd); +}; + +// node_modules/globby/index.js +var assertPatternsInput = (patterns) => { + if (patterns.some((pattern) => typeof pattern !== "string")) { + throw new TypeError("Patterns must be a string or an array of strings"); + } +}; +var normalizePathForDirectoryGlob = (filePath, cwd) => { + const path16 = isNegativePattern(filePath) ? filePath.slice(1) : filePath; + return import_node_path3.default.isAbsolute(path16) ? path16 : import_node_path3.default.join(cwd, path16); +}; +var getDirectoryGlob = ({ directoryPath, files, extensions }) => { + const extensionGlob = extensions?.length > 0 ? `.${extensions.length > 1 ? `{${extensions.join(",")}}` : extensions[0]}` : ""; + return files ? files.map((file) => import_node_path3.default.posix.join(directoryPath, `**/${import_node_path3.default.extname(file) ? file : `${file}${extensionGlob}`}`)) : [import_node_path3.default.posix.join(directoryPath, `**${extensionGlob ? `/*${extensionGlob}` : ""}`)]; +}; +var directoryToGlob = async (directoryPaths, { + cwd = import_node_process3.default.cwd(), + files, + extensions +} = {}) => { + const globs = await Promise.all( + directoryPaths.map(async (directoryPath) => await isDirectory(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath) + ); + return globs.flat(); +}; +var directoryToGlobSync = (directoryPaths, { + cwd = import_node_process3.default.cwd(), + files, + extensions +} = {}) => directoryPaths.flatMap((directoryPath) => isDirectorySync(normalizePathForDirectoryGlob(directoryPath, cwd)) ? getDirectoryGlob({ directoryPath, files, extensions }) : directoryPath); +var toPatternsArray = (patterns) => { + patterns = [...new Set([patterns].flat())]; + assertPatternsInput(patterns); + return patterns; +}; +var checkCwdOption = (cwd) => { + if (!cwd) { + return; + } + let stat; + try { + stat = import_node_fs3.default.statSync(cwd); + } catch { + return; + } + if (!stat.isDirectory()) { + throw new Error("The `cwd` option must be a path to a directory"); + } +}; +var normalizeOptions2 = (options = {}) => { + options = { + ...options, + ignore: options.ignore ?? [], + expandDirectories: options.expandDirectories ?? true, + cwd: toPath(options.cwd) + }; + checkCwdOption(options.cwd); + return options; +}; +var normalizeArguments = (function_) => async (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)); +var normalizeArgumentsSync = (function_) => (patterns, options) => function_(toPatternsArray(patterns), normalizeOptions2(options)); +var getIgnoreFilesPatterns = (options) => { + const { ignoreFiles, gitignore } = options; + const patterns = ignoreFiles ? toPatternsArray(ignoreFiles) : []; + if (gitignore) { + patterns.push(GITIGNORE_FILES_PATTERN); + } + return patterns; +}; +var getFilter = async (options) => { + const ignoreFilesPatterns = getIgnoreFilesPatterns(options); + return createFilterFunction( + ignoreFilesPatterns.length > 0 && await isIgnoredByIgnoreFiles(ignoreFilesPatterns, options) + ); +}; +var getFilterSync = (options) => { + const ignoreFilesPatterns = getIgnoreFilesPatterns(options); + return createFilterFunction( + ignoreFilesPatterns.length > 0 && isIgnoredByIgnoreFilesSync(ignoreFilesPatterns, options) + ); +}; +var createFilterFunction = (isIgnored) => { + const seen = /* @__PURE__ */ new Set(); + return (fastGlobResult) => { + const pathKey = import_node_path3.default.normalize(fastGlobResult.path ?? fastGlobResult); + if (seen.has(pathKey) || isIgnored && isIgnored(pathKey)) { + return false; + } + seen.add(pathKey); + return true; + }; +}; +var unionFastGlobResults = (results, filter) => results.flat().filter((fastGlobResult) => filter(fastGlobResult)); +var convertNegativePatterns = (patterns, options) => { + const tasks = []; + while (patterns.length > 0) { + const index = patterns.findIndex((pattern) => isNegativePattern(pattern)); + if (index === -1) { + tasks.push({ patterns, options }); + break; + } + const ignorePattern = patterns[index].slice(1); + for (const task of tasks) { + task.options.ignore.push(ignorePattern); + } + if (index !== 0) { + tasks.push({ + patterns: patterns.slice(0, index), + options: { + ...options, + ignore: [ + ...options.ignore, + ignorePattern + ] + } + }); + } + patterns = patterns.slice(index + 1); + } + return tasks; +}; +var normalizeExpandDirectoriesOption = (options, cwd) => ({ + ...cwd ? { cwd } : {}, + ...Array.isArray(options) ? { files: options } : options +}); +var generateTasks = async (patterns, options) => { + const globTasks = convertNegativePatterns(patterns, options); + const { cwd, expandDirectories } = options; + if (!expandDirectories) { + return globTasks; + } + const directoryToGlobOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd); + return Promise.all( + globTasks.map(async (task) => { + let { patterns: patterns2, options: options2 } = task; + [ + patterns2, + options2.ignore + ] = await Promise.all([ + directoryToGlob(patterns2, directoryToGlobOptions), + directoryToGlob(options2.ignore, { cwd }) + ]); + return { patterns: patterns2, options: options2 }; + }) + ); +}; +var generateTasksSync = (patterns, options) => { + const globTasks = convertNegativePatterns(patterns, options); + const { cwd, expandDirectories } = options; + if (!expandDirectories) { + return globTasks; + } + const directoryToGlobSyncOptions = normalizeExpandDirectoriesOption(expandDirectories, cwd); + return globTasks.map((task) => { + let { patterns: patterns2, options: options2 } = task; + patterns2 = directoryToGlobSync(patterns2, directoryToGlobSyncOptions); + options2.ignore = directoryToGlobSync(options2.ignore, { cwd }); + return { patterns: patterns2, options: options2 }; + }); +}; +var globby = normalizeArguments(async (patterns, options) => { + const [ + tasks, + filter + ] = await Promise.all([ + generateTasks(patterns, options), + getFilter(options) + ]); + const results = await Promise.all(tasks.map((task) => (0, import_fast_glob2.default)(task.patterns, task.options))); + return unionFastGlobResults(results, filter); +}); +var globbySync = normalizeArgumentsSync((patterns, options) => { + const tasks = generateTasksSync(patterns, options); + const filter = getFilterSync(options); + const results = tasks.map((task) => import_fast_glob2.default.sync(task.patterns, task.options)); + return unionFastGlobResults(results, filter); +}); +var globbyStream = normalizeArgumentsSync((patterns, options) => { + const tasks = generateTasksSync(patterns, options); + const filter = getFilterSync(options); + const streams = tasks.map((task) => import_fast_glob2.default.stream(task.patterns, task.options)); + const stream2 = mergeStreams(streams).filter((fastGlobResult) => filter(fastGlobResult)); + return stream2; +}); +var isDynamicPattern = normalizeArgumentsSync( + (patterns, options) => patterns.some((pattern) => import_fast_glob2.default.isDynamicPattern(pattern, options)) +); +var generateGlobTasks = normalizeArguments(generateTasks); +var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync); +var { convertPathToPattern } = import_fast_glob2.default; + +// node_modules/del/index.js +var import_is_glob = __toESM(require_is_glob(), 1); + +// node_modules/is-path-cwd/index.js +var import_node_process4 = __toESM(require("node:process"), 1); +var import_node_path4 = __toESM(require("node:path"), 1); +function isPathCwd(path_) { + let cwd = import_node_process4.default.cwd(); + path_ = import_node_path4.default.resolve(path_); + if (import_node_process4.default.platform === "win32") { + cwd = cwd.toLowerCase(); + path_ = path_.toLowerCase(); + } + return path_ === cwd; +} + +// node_modules/del/node_modules/is-path-inside/index.js +var import_node_path5 = __toESM(require("node:path"), 1); +function isPathInside(childPath, parentPath) { + const relation = import_node_path5.default.relative(parentPath, childPath); + return Boolean( + relation && relation !== ".." && !relation.startsWith(`..${import_node_path5.default.sep}`) && relation !== import_node_path5.default.resolve(childPath) + ); +} + +// node_modules/p-map/index.js +async function pMap(iterable, mapper, { + concurrency = Number.POSITIVE_INFINITY, + stopOnError = true, + signal +} = {}) { + return new Promise((resolve_, reject_) => { + if (iterable[Symbol.iterator] === void 0 && iterable[Symbol.asyncIterator] === void 0) { + throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`); + } + if (typeof mapper !== "function") { + throw new TypeError("Mapper function is required"); + } + if (!(Number.isSafeInteger(concurrency) && concurrency >= 1 || concurrency === Number.POSITIVE_INFINITY)) { + throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`); + } + const result = []; + const errors = []; + const skippedIndexesMap = /* @__PURE__ */ new Map(); + let isRejected = false; + let isResolved = false; + let isIterableDone = false; + let resolvingCount = 0; + let currentIndex = 0; + const iterator = iterable[Symbol.iterator] === void 0 ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator](); + const signalListener = () => { + reject(signal.reason); + }; + const cleanup = () => { + signal?.removeEventListener("abort", signalListener); + }; + const resolve6 = (value) => { + resolve_(value); + cleanup(); + }; + const reject = (reason) => { + isRejected = true; + isResolved = true; + reject_(reason); + cleanup(); + }; + if (signal) { + if (signal.aborted) { + reject(signal.reason); + } + signal.addEventListener("abort", signalListener, { once: true }); + } + const next = async () => { + if (isResolved) { + return; + } + const nextItem = await iterator.next(); + const index = currentIndex; + currentIndex++; + if (nextItem.done) { + isIterableDone = true; + if (resolvingCount === 0 && !isResolved) { + if (!stopOnError && errors.length > 0) { + reject(new AggregateError(errors)); + return; + } + isResolved = true; + if (skippedIndexesMap.size === 0) { + resolve6(result); + return; + } + const pureResult = []; + for (const [index2, value] of result.entries()) { + if (skippedIndexesMap.get(index2) === pMapSkip) { + continue; + } + pureResult.push(value); + } + resolve6(pureResult); + } + return; + } + resolvingCount++; + (async () => { + try { + const element = await nextItem.value; + if (isResolved) { + return; + } + const value = await mapper(element, index); + if (value === pMapSkip) { + skippedIndexesMap.set(index, value); + } + result[index] = value; + resolvingCount--; + await next(); + } catch (error2) { + if (stopOnError) { + reject(error2); + } else { + errors.push(error2); + resolvingCount--; + try { + await next(); + } catch (error3) { + reject(error3); + } + } + } + })(); + }; + (async () => { + for (let index = 0; index < concurrency; index++) { + try { + await next(); + } catch (error2) { + reject(error2); + break; + } + if (isIterableDone || isRejected) { + break; + } + } + })(); + }); +} +var pMapSkip = Symbol("skip"); + +// node_modules/del/index.js +function safeCheck(file, cwd) { + if (isPathCwd(file)) { + throw new Error("Cannot delete the current working directory. Can be overridden with the `force` option."); + } + if (!isPathInside(file, cwd)) { + throw new Error("Cannot delete files/directories outside the current working directory. Can be overridden with the `force` option."); + } +} +function normalizePatterns(patterns) { + patterns = Array.isArray(patterns) ? patterns : [patterns]; + patterns = patterns.map((pattern) => { + if (import_node_process5.default.platform === "win32" && (0, import_is_glob.default)(pattern) === false) { + return slash(pattern); + } + return pattern; + }); + return patterns; +} +async function deleteAsync(patterns, { force, dryRun, cwd = import_node_process5.default.cwd(), onProgress = () => { +}, ...options } = {}) { + options = { + expandDirectories: false, + onlyFiles: false, + followSymbolicLinks: false, + cwd, + ...options + }; + patterns = normalizePatterns(patterns); + const paths = await globby(patterns, options); + const files = paths.sort((a, b) => b.localeCompare(a)); + if (files.length === 0) { + onProgress({ + totalCount: 0, + deletedCount: 0, + percent: 1 + }); + } + let deletedCount = 0; + const mapper = async (file) => { + file = import_node_path6.default.resolve(cwd, file); + if (!force) { + safeCheck(file, cwd); + } + if (!dryRun) { + await import_promises5.default.rm(file, { recursive: true, force: true }); + } + deletedCount += 1; + onProgress({ + totalCount: files.length, + deletedCount, + percent: deletedCount / files.length, + path: file + }); + return file; + }; + const removedFiles = await pMap(files, mapper, options); + removedFiles.sort((a, b) => a.localeCompare(b)); + return removedFiles; +} // node_modules/get-folder-size/index.js -var import_node_path2 = require("node:path"); +var import_node_path7 = require("node:path"); async function getFolderSize(itemPath, options) { return await core(itemPath, options, { errors: true }); } getFolderSize.loose = async (itemPath, options) => await core(itemPath, options); getFolderSize.strict = async (itemPath, options) => await core(itemPath, options, { strict: true }); async function core(rootItemPath, options = {}, returnType = {}) { - const fs13 = options.fs || await import("node:fs/promises"); + const fs16 = options.fs || await import("node:fs/promises"); let folderSize = 0n; const foundInos = /* @__PURE__ */ new Set(); const errors = []; await processItem(rootItemPath); async function processItem(itemPath) { if (options.ignore?.test(itemPath)) return; - const stats = returnType.strict ? await fs13.lstat(itemPath, { bigint: true }) : await fs13.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + const stats = returnType.strict ? await fs16.lstat(itemPath, { bigint: true }) : await fs16.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); if (typeof stats !== "object") return; if (!foundInos.has(stats.ino)) { foundInos.add(stats.ino); folderSize += stats.size; } if (stats.isDirectory()) { - const directoryItems = returnType.strict ? await fs13.readdir(itemPath) : await fs13.readdir(itemPath).catch((error2) => errors.push(error2)); + const directoryItems = returnType.strict ? await fs16.readdir(itemPath) : await fs16.readdir(itemPath).catch((error2) => errors.push(error2)); if (typeof directoryItems !== "object") return; await Promise.all( directoryItems.map( - (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path7.join)(itemPath, directoryItem)) ) ); } @@ -90775,7 +88331,7 @@ function getToolNames(sarif) { return Object.keys(toolNames); } function getCodeQLDatabasePath(config, language) { - return path.resolve(config.dbLocation, language); + return path5.resolve(config.dbLocation, language); } function parseGitHubUrl(inputUrl) { const originalUrl = inputUrl; @@ -90969,7 +88525,7 @@ async function checkSipEnablement(logger) { async function cleanUpGlob(glob, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await (0, import_del.default)(glob, { force: true }); + const deletedPaths = await deleteAsync(glob, { force: true }); if (deletedPaths.length === 0) { logger.warning( `Failed to clean up ${name}: no files found matching ${glob}.` @@ -91023,17 +88579,17 @@ function getWorkflowEventName() { } function isRunningLocalAction() { const relativeScriptPath = getRelativeScriptPath(); - return relativeScriptPath.startsWith("..") || path2.isAbsolute(relativeScriptPath); + return relativeScriptPath.startsWith("..") || path6.isAbsolute(relativeScriptPath); } function getRelativeScriptPath() { const runnerTemp = getRequiredEnvParam("RUNNER_TEMP"); - const actionsDirectory = path2.join(path2.dirname(runnerTemp), "_actions"); - return path2.relative(actionsDirectory, __filename); + const actionsDirectory = path6.join(path6.dirname(runnerTemp), "_actions"); + return path6.relative(actionsDirectory, __filename); } function getWorkflowEvent() { const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH"); try { - return JSON.parse(fs.readFileSync(eventJsonFile, "utf-8")); + return JSON.parse(fs4.readFileSync(eventJsonFile, "utf-8")); } catch (e) { throw new Error( `Unable to read workflow event JSON from ${eventJsonFile}: ${e}` @@ -91301,8 +88857,8 @@ function wrapApiConfigurationError(e) { } // src/feature-flags.ts -var fs3 = __toESM(require("fs")); -var path4 = __toESM(require("path")); +var fs6 = __toESM(require("fs")); +var path8 = __toESM(require("path")); var semver3 = __toESM(require_semver2()); // src/defaults.json @@ -91310,8 +88866,8 @@ var bundleVersion = "codeql-bundle-v2.22.4"; var cliVersion = "2.22.4"; // src/overlay-database-utils.ts -var fs2 = __toESM(require("fs")); -var path3 = __toESM(require("path")); +var fs5 = __toESM(require("fs")); +var path7 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts @@ -91437,8 +88993,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path12 = decodeGitFilePath(match[2]); - fileOidMap[path12] = oid; + const path16 = decodeGitFilePath(match[2]); + fileOidMap[path16] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -91536,12 +89092,12 @@ async function writeBaseDatabaseOidsFile(config, sourceRoot) { const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOidsJson = JSON.stringify(gitFileOids); const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - await fs2.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); + await fs5.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); } async function readBaseDatabaseOidsFile(config, logger) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); try { - const contents = await fs2.promises.readFile( + const contents = await fs5.promises.readFile( baseDatabaseOidsFilePath, "utf-8" ); @@ -91554,7 +89110,7 @@ async function readBaseDatabaseOidsFile(config, logger) { } } function getBaseDatabaseOidsFilePath(config) { - return path3.join(config.dbLocation, "base-database-oids.json"); + return path7.join(config.dbLocation, "base-database-oids.json"); } async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); @@ -91564,14 +89120,14 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path3.join( + const overlayChangesFile = path7.join( getTemporaryDirectory(), "overlay-changes.json" ); logger.debug( `Writing overlay changed files to ${overlayChangesFile}: ${changedFilesJson}` ); - await fs2.promises.writeFile(overlayChangesFile, changedFilesJson); + await fs5.promises.writeFile(overlayChangesFile, changedFilesJson); return overlayChangesFile; } function computeChangedFiles(baseFileOids, overlayFileOids) { @@ -91764,7 +89320,7 @@ var Features = class { this.gitHubFeatureFlags = new GitHubFeatureFlags( gitHubVersion, repositoryNwo, - path4.join(tempDir, FEATURE_FLAGS_FILE_NAME), + path8.join(tempDir, FEATURE_FLAGS_FILE_NAME), logger ); } @@ -91943,12 +89499,12 @@ var GitHubFeatureFlags = class { } async readLocalFlags() { try { - if (fs3.existsSync(this.featureFlagsFile)) { + if (fs6.existsSync(this.featureFlagsFile)) { this.logger.debug( `Loading feature flags from ${this.featureFlagsFile}` ); return JSON.parse( - fs3.readFileSync(this.featureFlagsFile, "utf8") + fs6.readFileSync(this.featureFlagsFile, "utf8") ); } } catch (e) { @@ -91961,7 +89517,7 @@ var GitHubFeatureFlags = class { async writeLocalFlags(flags) { try { this.logger.debug(`Writing feature flags to ${this.featureFlagsFile}`); - fs3.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); + fs6.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); } catch (e) { this.logger.warning( `Error writing cached feature flags file ${this.featureFlagsFile}: ${e}.` @@ -92201,16 +89757,16 @@ async function sendStatusReport(statusReport) { } // src/upload-lib.ts -var fs11 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var fs14 = __toESM(require("fs")); +var path15 = __toESM(require("path")); var url = __toESM(require("url")); var import_zlib = __toESM(require("zlib")); var core12 = __toESM(require_core()); var jsonschema = __toESM(require_lib2()); // src/codeql.ts -var fs9 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var fs12 = __toESM(require("fs")); +var path13 = __toESM(require("path")); var core11 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -92452,8 +90008,8 @@ function wrapCliConfigurationError(cliError) { } // src/config-utils.ts -var fs5 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var fs8 = __toESM(require("fs")); +var path10 = __toESM(require("path")); var semver4 = __toESM(require_semver2()); // src/analyses.ts @@ -92468,18 +90024,18 @@ var supportedAnalysisKinds = new Set(Object.values(AnalysisKind)); var core9 = __toESM(require_core()); // src/diff-informed-analysis-utils.ts -var fs4 = __toESM(require("fs")); -var path5 = __toESM(require("path")); +var fs7 = __toESM(require("fs")); +var path9 = __toESM(require("path")); function getDiffRangesJsonFilePath() { - return path5.join(getTemporaryDirectory(), "pr-diff-range.json"); + return path9.join(getTemporaryDirectory(), "pr-diff-range.json"); } function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); - if (!fs4.existsSync(jsonFilePath)) { + if (!fs7.existsSync(jsonFilePath)) { logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`); return void 0; } - const jsonContents = fs4.readFileSync(jsonFilePath, "utf8"); + const jsonContents = fs7.readFileSync(jsonFilePath, "utf8"); logger.debug( `Read pr-diff-range JSON file from ${jsonFilePath}: ${jsonContents}` @@ -92532,14 +90088,14 @@ var PACK_IDENTIFIER_PATTERN = (function() { return new RegExp(`^${component}/${component}$`); })(); function getPathToParsedConfigFile(tempDir) { - return path6.join(tempDir, "config"); + return path10.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); - if (!fs5.existsSync(configFile)) { + if (!fs8.existsSync(configFile)) { return void 0; } - const configString = fs5.readFileSync(configFile, "utf8"); + const configString = fs8.readFileSync(configFile, "utf8"); logger.debug("Loaded config:"); logger.debug(configString); return JSON.parse(configString); @@ -92592,8 +90148,8 @@ function generateCodeScanningConfig(originalUserInput, augmentationProperties) { } // src/setup-codeql.ts -var fs8 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var fs11 = __toESM(require("fs")); +var path12 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver7 = __toESM(require_semver2()); @@ -92651,7 +90207,7 @@ var v4_default = v4; // src/tar.ts var import_child_process = require("child_process"); -var fs6 = __toESM(require("fs")); +var fs9 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -92724,7 +90280,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs6.mkdirSync(dest, { recursive: true }); + fs9.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -92808,9 +90364,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs7 = __toESM(require("fs")); +var fs10 = __toESM(require("fs")); var os2 = __toESM(require("os")); -var path7 = __toESM(require("path")); +var path11 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core10 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -92915,7 +90471,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs7.mkdirSync(dest, { recursive: true }); + fs10.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -92943,7 +90499,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path7.join( + return path11.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver6.clean(version) || version, @@ -92952,7 +90508,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs7.writeFileSync(markerFilePath, ""); + fs10.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url2) { @@ -93083,7 +90639,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs8.existsSync(path8.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs11.existsSync(path12.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -93416,7 +90972,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path8.join(tempDir, v4_default()); + return path12.join(tempDir, v4_default()); } // src/tracer-config.ts @@ -93459,7 +91015,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path9.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path13.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -93520,12 +91076,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path9.join( + const tracingConfigPath = path13.join( extractorPath, "tools", "tracing-config.lua" ); - return fs9.existsSync(tracingConfigPath); + return fs12.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -93596,7 +91152,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path9.join( + const autobuildCmd = path13.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -93984,7 +91540,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs9.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs12.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -94007,7 +91563,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path9.resolve(config.tempDir, "user-config.yaml"); + return path13.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -94028,7 +91584,7 @@ async function getJobRunUuidSarifOptions(codeql) { } // src/fingerprints.ts -var fs10 = __toESM(require("fs")); +var fs13 = __toESM(require("fs")); var import_path = __toESM(require("path")); // node_modules/long/index.js @@ -95016,7 +92572,7 @@ async function hash(callback, filepath) { } updateHash(current); }; - const readStream = fs10.createReadStream(filepath, "utf8"); + const readStream = fs13.createReadStream(filepath, "utf8"); for await (const data of readStream) { for (let i = 0; i < data.length; ++i) { processCharacter(data.charCodeAt(i)); @@ -95091,11 +92647,11 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { if (!import_path.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } - if (!fs10.existsSync(uri)) { + if (!fs13.existsSync(uri)) { logger.debug(`Unable to compute fingerprint for non-existent file: ${uri}`); return void 0; } - if (fs10.statSync(uri).isDirectory()) { + if (fs13.statSync(uri).isDirectory()) { logger.debug(`Unable to compute fingerprint for directory: ${uri}`); return void 0; } @@ -95192,7 +92748,7 @@ function combineSarifFiles(sarifFiles, logger) { for (const sarifFile of sarifFiles) { logger.debug(`Loading SARIF file: ${sarifFile}`); const sarifObject = JSON.parse( - fs11.readFileSync(sarifFile, "utf8") + fs14.readFileSync(sarifFile, "utf8") ); if (combinedSarif.version === null) { combinedSarif.version = sarifObject.version; @@ -95264,7 +92820,7 @@ async function shouldDisableCombineSarifFiles(sarifObjects, githubVersion) { async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, logger) { logger.info("Combining SARIF files using the CodeQL CLI"); const sarifObjects = sarifFiles.map((sarifFile) => { - return JSON.parse(fs11.readFileSync(sarifFile, "utf8")); + return JSON.parse(fs14.readFileSync(sarifFile, "utf8")); }); const deprecationWarningMessage = gitHubVersion.type === 1 /* GHES */ ? "and will be removed in GitHub Enterprise Server 3.18" : "and will be removed in July 2025"; const deprecationMoreInformationMessage = "For more information, see https://github.blog/changelog/2024-05-06-code-scanning-will-stop-combining-runs-from-a-single-upload"; @@ -95334,14 +92890,14 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo } return combineSarifFiles(sarifFiles, logger); } - const baseTempDir = path11.resolve(tempDir, "combined-sarif"); - fs11.mkdirSync(baseTempDir, { recursive: true }); - const outputDirectory = fs11.mkdtempSync(path11.resolve(baseTempDir, "output-")); - const outputFile = path11.resolve(outputDirectory, "combined-sarif.sarif"); + const baseTempDir = path15.resolve(tempDir, "combined-sarif"); + fs14.mkdirSync(baseTempDir, { recursive: true }); + const outputDirectory = fs14.mkdtempSync(path15.resolve(baseTempDir, "output-")); + const outputFile = path15.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); - return JSON.parse(fs11.readFileSync(outputFile, "utf8")); + return JSON.parse(fs14.readFileSync(outputFile, "utf8")); } function populateRunAutomationDetails(sarif, category, analysis_key, environment) { const automationID = getAutomationID(category, analysis_key, environment); @@ -95370,7 +92926,7 @@ function getAutomationID(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, target) { logger.info("Uploading results"); if (isInTestMode()) { - const payloadSaveFile = path11.join( + const payloadSaveFile = path15.join( getTemporaryDirectory(), "payload.json" ); @@ -95378,7 +92934,7 @@ async function uploadPayload(payload, repositoryNwo, logger, target) { `In test mode. Results are not uploaded. Saving to ${payloadSaveFile}` ); logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`); - fs11.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); + fs14.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); return "test-mode-sarif-id"; } const client = getApiClient(); @@ -95411,12 +92967,12 @@ async function uploadPayload(payload, repositoryNwo, logger, target) { function findSarifFilesInDir(sarifPath, isSarif) { const sarifFiles = []; const walkSarifFiles = (dir) => { - const entries = fs11.readdirSync(dir, { withFileTypes: true }); + const entries = fs14.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path11.resolve(dir, entry.name)); + sarifFiles.push(path15.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path11.resolve(dir, entry.name)); + walkSarifFiles(path15.resolve(dir, entry.name)); } } }; @@ -95424,11 +92980,11 @@ function findSarifFilesInDir(sarifPath, isSarif) { return sarifFiles; } function getSarifFilePaths(sarifPath, isSarif) { - if (!fs11.existsSync(sarifPath)) { + if (!fs14.existsSync(sarifPath)) { throw new ConfigurationError(`Path does not exist: ${sarifPath}`); } let sarifFiles; - if (fs11.lstatSync(sarifPath).isDirectory()) { + if (fs14.lstatSync(sarifPath).isDirectory()) { sarifFiles = findSarifFilesInDir(sarifPath, isSarif); if (sarifFiles.length === 0) { throw new ConfigurationError( @@ -95458,7 +93014,7 @@ function countResultsInSarif(sarif) { } function readSarifFile(sarifFilePath) { try { - return JSON.parse(fs11.readFileSync(sarifFilePath, "utf8")); + return JSON.parse(fs14.readFileSync(sarifFilePath, "utf8")); } catch (e) { throw new InvalidSarifUploadError( `Invalid SARIF. JSON syntax error: ${getErrorMessage(e)}` @@ -95527,7 +93083,7 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo payloadObj.base_sha = mergeBaseCommitOid; } else if (process.env.GITHUB_EVENT_PATH) { const githubEvent = JSON.parse( - fs11.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8") + fs14.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8") ); payloadObj.base_ref = `refs/heads/${githubEvent.pull_request.base.ref}`; payloadObj.base_sha = githubEvent.pull_request.base.sha; @@ -95777,7 +93333,7 @@ function filterAlertsByDiffRange(logger, sarif) { if (!locationUri || locationStartLine === void 0) { return false; } - const locationPath = path11.join(checkoutPath, locationUri).replaceAll(path11.sep, "/"); + const locationPath = path15.join(checkoutPath, locationUri).replaceAll(path15.sep, "/"); return diffRanges.some( (range) => range.path === locationPath && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0) ); @@ -95844,7 +93400,7 @@ async function run() { CodeScanningTarget ); core13.setOutput("sarif-id", uploadResult.sarifID); - if (fs12.lstatSync(sarifPath).isDirectory()) { + if (fs15.lstatSync(sarifPath).isDirectory()) { const qualitySarifFiles = findSarifFilesInDir( sarifPath, CodeQualityTarget.sarifPredicate diff --git a/package-lock.json b/package-lock.json index a11d49614..3ba5308df 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "archiver": "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - "del": "^6.1.1", + "del": "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -3677,13 +3677,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array-union": { - "version": "2.1.0", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, "node_modules/array.prototype.findlastindex": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", @@ -3866,18 +3859,6 @@ } } }, - "node_modules/ava/node_modules/@sindresorhus/merge-streams": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", - "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ava/node_modules/ansi-regex": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", @@ -3902,47 +3883,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ava/node_modules/globby": { - "version": "14.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", - "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", - "dev": true, - "dependencies": { - "@sindresorhus/merge-streams": "^2.1.0", - "fast-glob": "^3.3.3", - "ignore": "^7.0.3", - "path-type": "^6.0.0", - "slash": "^5.1.0", - "unicorn-magic": "^0.3.0" - }, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ava/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/ava/node_modules/path-type": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", - "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", - "dev": true, - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ava/node_modules/picomatch": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", @@ -3955,18 +3895,6 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, - "node_modules/ava/node_modules/slash": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", - "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ava/node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -4697,58 +4625,32 @@ } }, "node_modules/del": { - "version": "6.1.1", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/del/-/del-8.0.0.tgz", + "integrity": "sha512-R6ep6JJ+eOBZsBr9esiNN1gxFbZE4Q2cULkUSFumGYecAiS6qodDvcPx/sFuWHMNul7DWmrtoEOpYSm7o6tbSA==", "license": "MIT", "dependencies": { - "globby": "^11.0.1", - "graceful-fs": "^4.2.4", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.2", - "p-map": "^4.0.0", - "rimraf": "^3.0.2", - "slash": "^3.0.0" + "globby": "^14.0.2", + "is-glob": "^4.0.3", + "is-path-cwd": "^3.0.0", + "is-path-inside": "^4.0.0", + "p-map": "^7.0.2", + "slash": "^5.1.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/del/node_modules/aggregate-error": { - "version": "3.1.0", - "license": "MIT", - "dependencies": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/del/node_modules/clean-stack": { - "version": "2.2.0", - "license": "MIT", - "engines": { - "node": ">=6" - } - }, - "node_modules/del/node_modules/indent-string": { + "node_modules/del/node_modules/is-path-inside": { "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-4.0.0.tgz", + "integrity": "sha512-lJJV/5dYS+RcL8uQdBDW9c9uWFLLBNRyFhnAKXw5tVqLlKZ4RMGZKv+YQ/IA3OhD+RpbJa1LLFM1FQPGyIXvOA==", "license": "MIT", "engines": { - "node": ">=8" - } - }, - "node_modules/del/node_modules/p-map": { - "version": "4.0.0", - "license": "MIT", - "dependencies": { - "aggregate-error": "^3.0.0" - }, - "engines": { - "node": ">=10" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -4783,16 +4685,6 @@ "node": ">=0.3.1" } }, - "node_modules/dir-glob": { - "version": "3.0.1", - "license": "MIT", - "dependencies": { - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "2.1.0", "dev": true, @@ -5998,6 +5890,7 @@ }, "node_modules/fs.realpath": { "version": "1.0.0", + "dev": true, "license": "ISC" }, "node_modules/function-bind": { @@ -6226,23 +6119,46 @@ } }, "node_modules/globby": { - "version": "11.1.0", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", + "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", "license": "MIT", "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.3", + "ignore": "^7.0.3", + "path-type": "^6.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.3.0" }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globby/node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/gopd": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", @@ -6397,6 +6313,7 @@ }, "node_modules/ignore": { "version": "5.3.1", + "dev": true, "license": "MIT", "engines": { "node": ">= 4" @@ -6456,6 +6373,7 @@ }, "node_modules/inflight": { "version": "1.0.6", + "dev": true, "license": "ISC", "dependencies": { "once": "^1.3.0", @@ -6660,14 +6578,20 @@ } }, "node_modules/is-path-cwd": { - "version": "2.2.0", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-3.0.0.tgz", + "integrity": "sha512-kyiNFFLU0Ampr6SDZitD/DwUo4Zs1nSdnygUBqsu3LooL00Qvb5j+UnvApUn/TTj1J3OuE6BTdQ5rudKmU2ZaA==", "license": "MIT", "engines": { - "node": ">=6" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/is-path-inside": { "version": "3.0.3", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -7606,7 +7530,6 @@ "version": "7.0.3", "resolved": "https://registry.npmjs.org/p-map/-/p-map-7.0.3.tgz", "integrity": "sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA==", - "dev": true, "engines": { "node": ">=18" }, @@ -7661,6 +7584,7 @@ }, "node_modules/path-is-absolute": { "version": "1.0.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -7696,10 +7620,15 @@ } }, "node_modules/path-type": { - "version": "4.0.0", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", + "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", "license": "MIT", "engines": { - "node": ">=8" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/picocolors": { @@ -7986,6 +7915,7 @@ }, "node_modules/rimraf": { "version": "3.0.2", + "dev": true, "license": "ISC", "dependencies": { "glob": "^7.1.3" @@ -7999,6 +7929,7 @@ }, "node_modules/rimraf/node_modules/glob": { "version": "7.2.0", + "dev": true, "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", @@ -8224,10 +8155,15 @@ } }, "node_modules/slash": { - "version": "3.0.0", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", "license": "MIT", "engines": { - "node": ">=8" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/slice-ansi": { @@ -9073,7 +9009,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.3.0.tgz", "integrity": "sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==", - "dev": true, "engines": { "node": ">=18" }, diff --git a/package.json b/package.json index 6e7cc4ece..a02f31055 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "archiver": "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - "del": "^6.1.1", + "del": "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", diff --git a/src/analyze.ts b/src/analyze.ts index dad12d78c..2a4242db5 100644 --- a/src/analyze.ts +++ b/src/analyze.ts @@ -3,7 +3,7 @@ import * as path from "path"; import { performance } from "perf_hooks"; import * as io from "@actions/io"; -import del from "del"; +import * as del from "del"; import * as yaml from "js-yaml"; import { @@ -812,7 +812,7 @@ export async function runFinalize( logger: Logger, ): Promise { try { - await del(outputDir, { force: true }); + await del.deleteAsync(outputDir, { force: true }); } catch (error: any) { if (error?.code !== "ENOENT") { throw error; diff --git a/src/codeql.test.ts b/src/codeql.test.ts index a370fd8d8..29e4b27ef 100644 --- a/src/codeql.test.ts +++ b/src/codeql.test.ts @@ -5,7 +5,7 @@ import * as toolrunner from "@actions/exec/lib/toolrunner"; import * as io from "@actions/io"; import * as toolcache from "@actions/tool-cache"; import test, { ExecutionContext } from "ava"; -import del from "del"; +import * as del from "del"; import * as yaml from "js-yaml"; import nock from "nock"; import * as sinon from "sinon"; @@ -523,7 +523,7 @@ const injectedConfigMacro = test.macro({ const augmentedConfig = yaml.load(fs.readFileSync(configFile, "utf8")); t.deepEqual(augmentedConfig, expectedConfig); - await del(configFile, { force: true }); + await del.deleteAsync(configFile, { force: true }); }); }, @@ -1012,7 +1012,7 @@ test("Avoids duplicating --overwrite flag if specified in CODEQL_ACTION_EXTRA_OP ); t.truthy(configArg, "Should have injected a codescanning config"); const configFile = configArg!.split("=")[1]; - await del(configFile, { force: true }); + await del.deleteAsync(configFile, { force: true }); }); export function stubToolRunnerConstructor( diff --git a/src/debug-artifacts.ts b/src/debug-artifacts.ts index 41db26fc9..a355341d0 100644 --- a/src/debug-artifacts.ts +++ b/src/debug-artifacts.ts @@ -5,7 +5,7 @@ import * as artifact from "@actions/artifact"; import * as artifactLegacy from "@actions/artifact-legacy"; import * as core from "@actions/core"; import archiver from "archiver"; -import del from "del"; +import * as del from "del"; import { getOptionalInput, getTemporaryDirectory } from "./actions-util"; import { dbIsFinalized } from "./analyze"; @@ -345,7 +345,7 @@ async function createPartialDatabaseBundle( ); // See `bundleDb` for explanation behind deleting existing db bundle. if (fs.existsSync(databaseBundlePath)) { - await del(databaseBundlePath, { force: true }); + await del.deleteAsync(databaseBundlePath, { force: true }); } const output = fs.createWriteStream(databaseBundlePath); const zip = archiver("zip"); diff --git a/src/util.ts b/src/util.ts index ef024ffde..1ac24ad12 100644 --- a/src/util.ts +++ b/src/util.ts @@ -6,7 +6,7 @@ import * as core from "@actions/core"; import * as exec from "@actions/exec/lib/exec"; import * as io from "@actions/io"; import checkDiskSpace from "check-disk-space"; -import del from "del"; +import * as del from "del"; import getFolderSize from "get-folder-size"; import * as yaml from "js-yaml"; import * as semver from "semver"; @@ -167,7 +167,7 @@ export async function withTmpDir( ): Promise { const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "codeql-action-")); const result = await body(tmpDir); - await del(tmpDir, { force: true }); + await del.deleteAsync(tmpDir, { force: true }); return result; } @@ -731,7 +731,7 @@ export async function bundleDb( // from somewhere else or someone trying to make the action upload a // non-database file. if (fs.existsSync(databaseBundlePath)) { - await del(databaseBundlePath, { force: true }); + await del.deleteAsync(databaseBundlePath, { force: true }); } await codeql.databaseBundle(databasePath, databaseBundlePath, dbName); return databaseBundlePath; @@ -1234,7 +1234,7 @@ export async function checkSipEnablement( export async function cleanUpGlob(glob: string, name: string, logger: Logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await del(glob, { force: true }); + const deletedPaths = await del.deleteAsync(glob, { force: true }); if (deletedPaths.length === 0) { logger.warning( `Failed to clean up ${name}: no files found matching ${glob}.`,