From 41c0a262137e6d0fb07479869cf7c7ece9f5602f Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 28 Oct 2025 13:00:25 +0000 Subject: [PATCH 1/2] Use Node `fs` APIs instead of `del` --- lib/analyze-action-post.js | 31 +- lib/analyze-action.js | 7513 ++----------------------- lib/autobuild-action.js | 1 - lib/init-action-post.js | 8685 ++++------------------------- lib/init-action.js | 7465 ++----------------------- lib/resolve-environment-action.js | 1 - lib/setup-codeql-action.js | 7290 ++---------------------- lib/start-proxy-action-post.js | 1 - lib/start-proxy-action.js | 1 - lib/upload-lib.js | 7350 ++---------------------- lib/upload-sarif-action-post.js | 31 +- lib/upload-sarif-action.js | 7366 ++---------------------- package-lock.json | 70 +- package.json | 1 - src/analyze.ts | 3 +- src/codeql.test.ts | 5 +- src/debug-artifacts.ts | 3 +- src/util.ts | 19 +- 18 files changed, 3002 insertions(+), 42834 deletions(-) diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 6d292eacea..9084e78fb0 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -26500,7 +26500,6 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -26721,7 +26720,7 @@ var require_light = __commonJS({ } } async trigger(name, ...args) { - var e, promises2; + var e, promises3; try { if (name !== "debug") { this.trigger("debug", `Event triggered: ${name}`, args); @@ -26732,7 +26731,7 @@ var require_light = __commonJS({ this._events[name] = this._events[name].filter(function(listener) { return listener.status !== "none"; }); - promises2 = this._events[name].map(async (listener) => { + promises3 = this._events[name].map(async (listener) => { var e2, returned; if (listener.status === "none") { return; @@ -26755,7 +26754,7 @@ var require_light = __commonJS({ return null; } }); - return (await Promise.all(promises2)).find(function(x) { + return (await Promise.all(promises3)).find(function(x) { return x != null; }); } catch (error2) { @@ -91278,7 +91277,7 @@ var require_stream2 = __commonJS({ var { pipeline } = require_pipeline3(); var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); - var promises2 = require_promises(); + var promises3 = require_promises(); var utils = require_utils6(); var Stream = module2.exports = require_legacy().Stream; Stream.isDestroyed = utils.isDestroyed; @@ -91356,21 +91355,21 @@ var require_stream2 = __commonJS({ configurable: true, enumerable: true, get() { - return promises2; + return promises3; } }); ObjectDefineProperty(pipeline, customPromisify, { __proto__: null, enumerable: true, get() { - return promises2.pipeline; + return promises3.pipeline; } }); ObjectDefineProperty(eos, customPromisify, { __proto__: null, enumerable: true, get() { - return promises2.finished; + return promises3.finished; } }); Stream.Stream = Stream; @@ -91389,7 +91388,7 @@ var require_ours = __commonJS({ "use strict"; var Stream = require("stream"); if (Stream && process.env.READABLE_STREAM === "disable") { - const promises2 = Stream.promises; + const promises3 = Stream.promises; module2.exports._uint8ArrayToBuffer = Stream._uint8ArrayToBuffer; module2.exports._isUint8Array = Stream._isUint8Array; module2.exports.isDisturbed = Stream.isDisturbed; @@ -91409,13 +91408,13 @@ var require_ours = __commonJS({ configurable: true, enumerable: true, get() { - return promises2; + return promises3; } }); module2.exports.Stream = Stream.Stream; } else { const CustomStream = require_stream2(); - const promises2 = require_promises(); + const promises3 = require_promises(); const originalDestroy = CustomStream.Readable.destroy; module2.exports = CustomStream.Readable; module2.exports._uint8ArrayToBuffer = CustomStream._uint8ArrayToBuffer; @@ -91438,7 +91437,7 @@ var require_ours = __commonJS({ configurable: true, enumerable: true, get() { - return promises2; + return promises3; } }); module2.exports.Stream = CustomStream.Stream; @@ -97669,14 +97668,14 @@ var require_commonjs16 = __commonJS({ if (er) return results.emit("error", er); if (follow && !didRealpaths) { - const promises2 = []; + const promises3 = []; for (const e of entries) { if (e.isSymbolicLink()) { - promises2.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r)); + promises3.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r)); } } - if (promises2.length) { - Promise.all(promises2).then(() => onReaddir(null, entries, true)); + if (promises3.length) { + Promise.all(promises3).then(() => onReaddir(null, entries, true)); return; } } diff --git a/lib/analyze-action.js b/lib/analyze-action.js index d3148efde0..f12d73777e 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 crypto2 = __importStar4(require("crypto")); - var fs20 = __importStar4(require("fs")); + var fs17 = __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 (!fs20.existsSync(filePath)) { + if (!fs17.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs20.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os5.EOL}`, { + fs17.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 path20 = 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 (path20 && !path20.startsWith("/")) { - path20 = `/${path20}`; + if (path16 && !path16.startsWith("/")) { + path16 = `/${path16}`; } - url2 = new URL(origin + path20); + 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(path20) { - if (typeof path20 !== "string") { + module2.exports = function basename(path16) { + if (typeof path16 !== "string") { return ""; } - for (var i = path20.length - 1; i >= 0; --i) { - switch (path20.charCodeAt(i)) { + for (var i = path16.length - 1; i >= 0; --i) { + switch (path16.charCodeAt(i)) { case 47: // '/' case 92: - path20 = path20.slice(i + 1); - return path20 === ".." || path20 === "." ? "" : path20; + path16 = path16.slice(i + 1); + return path16 === ".." || path16 === "." ? "" : path16; } } - return path20 === ".." || path20 === "." ? "" : path20; + return path16 === ".." || path16 === "." ? "" : path16; }; } }); @@ -2673,8 +2673,8 @@ var require_multipart = __commonJS({ } } function checkFinished() { - if (nends === 0 && finished2 && !boy._done) { - finished2 = false; + if (nends === 0 && finished && !boy._done) { + finished = false; self2.end(); } } @@ -2693,7 +2693,7 @@ var require_multipart = __commonJS({ let nends = 0; let curFile; let curField; - let finished2 = false; + let finished = 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() { - finished2 = true; + finished = true; checkFinished(); }); } @@ -5663,7 +5663,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path20, + path: path16, method, body, headers, @@ -5677,11 +5677,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path20 !== "string") { + if (typeof path16 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path20[0] !== "/" && !(path20.startsWith("http://") || path20.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(path20) !== 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(path20, query) : path20; + 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 path20 = 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 = path20; + 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: path20, 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} ${path20} 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: path20, 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] = path20; + 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 finished2 = false; + let finished = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { - if (finished2) { + if (finished) { return; } try { @@ -8325,7 +8325,7 @@ upgrade: ${upgrade}\r } }; const onDrain = function() { - if (finished2) { + if (finished) { return; } if (body.resume) { @@ -8333,17 +8333,17 @@ upgrade: ${upgrade}\r } }; const onAbort = function() { - if (finished2) { + if (finished) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); }; const onFinished = function(err) { - if (finished2) { + if (finished) { return; } - finished2 = true; + finished = 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 noop2 = () => { + var noop = () => { }; 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(); - }) : noop2; + }) : noop; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { @@ -9347,7 +9347,7 @@ var require_readable = __commonJS({ } else { resolve8(null); } - }).on("error", noop2).on("data", function(chunk) { + }).on("error", noop).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: finished2, PassThrough } = require("stream"); + var { finished, 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"); } - finished2(res, { readable: false }, (err) => { + finished(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(path20) { - if (typeof path20 !== "string") { - return path20; + function safeUrl(path16) { + if (typeof path16 !== "string") { + return path16; } - const pathSegments = path20.split("?"); + const pathSegments = path16.split("?"); if (pathSegments.length !== 2) { - return path20; + return path16; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path20, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path20); + 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: path20 }) => matchValue(safeUrl(path20), 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: path20, method, body, headers, query } = opts; + const { path: path16, method, body, headers, query } = opts; return { - path: path20, + 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: 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]); } @@ -10909,10 +10909,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path20, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path16, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path20, + Path: path16, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -15532,8 +15532,8 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path20) { - for (const char of path20) { + 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 path20 = opts.path; + let path16 = opts.path; if (!opts.path.startsWith("/")) { - path20 = `/${path20}`; + path16 = `/${path16}`; } - url2 = new URL(util.parseOrigin(url2).origin + path20); + 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 path20 = __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, path20.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 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; + 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; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs20.constants.O_RDONLY; + exports2.READONLY = fs17.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 isDirectory2(fsPath, useStat = false) { + function isDirectory(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 = isDirectory2; + exports2.isDirectory = isDirectory; 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 = path20.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 = path20.dirname(filePath); - const upperName = path20.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 = path20.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 path20 = __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 ? path20.join(dest, path20.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 (path20.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 = path20.join(dest, path20.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(path20.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(path20.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(path20.sep)) { + if (tool.includes(path16.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path20.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(path20.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 os5 = __importStar4(require("os")); var events = __importStar4(require("events")); var child = __importStar4(require("child_process")); - var path20 = __importStar4(require("path")); + var path16 = __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 = path20.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 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 path20 = __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}${path20.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 path20 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path20} 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(once2); + module2.exports = wrappy(once); module2.exports.strict = wrappy(onceStrict); - once2.proto = once2(function() { + once.proto = once(function() { Object.defineProperty(Function.prototype, "once", { value: function() { - return once2(this); + return once(this); }, configurable: true }); @@ -20545,7 +20545,7 @@ var require_once = __commonJS({ configurable: true }); }); - function once2(fn) { + function once(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 noop2 = () => { + var noop = () => { }; 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: noop2, - info: noop2, + debug: noop, + info: noop, warn: consoleWarn, error: consoleError }, @@ -24525,5857 +24525,8 @@ var require_github = __commonJS({ } }); -// 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 os5 = require("os"); - 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; - 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 path20.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 isGlob2(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 isGlob2 = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash2 = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str2, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash2) < 0) { - str2 = str2.replace(backslash, slash2); - } - if (enclosure.test(str2)) { - str2 += slash2; - } - str2 += "a"; - do { - str2 = pathPosixDirname(str2); - } while (isGlob2(str2) || globby2.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 cacheKey3 = min + ":" + max + "=" + relax + shorthand + capture + wrap; - if (toRegexRange.cache.hasOwnProperty(cacheKey3)) { - return toRegexRange.cache[cacheKey3].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[cacheKey3] = 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(compare3); - 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 compare3(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 = (toNumber2) => { - return (value) => toNumber2 === 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, toNumber2) => { - if (maxLength > 0) { - let dash = input[0] === "-" ? "-" : ""; - if (dash) input = input.slice(1); - input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); - } - if (toNumber2 === 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 toNumber2 = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber2); - 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, toNumber2)); - } - 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 path20 = 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: path20.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 path20 = 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 || path20.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 isGlob2 = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished2 = 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; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA2) { - isBrace = token.isBrace = true; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished2 = 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 (finished2 === 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) { - isGlob2 = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished2 = 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) { - isGlob2 = token.isGlob = true; - finished2 = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob2 = token.isGlob = true; - finished2 = 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; - isGlob2 = token.isGlob = true; - finished2 = 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) { - isGlob2 = 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) { - finished2 = true; - break; - } - } - continue; - } - break; - } - if (isGlob2 === true) { - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob2 = false; - } - let base = str2; - let prefix = ""; - let glob2 = ""; - if (start > 0) { - prefix = str2.slice(0, start); - str2 = str2.slice(start); - lastIndex -= start; - } - if (base && isGlob2 === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob2 = str2.slice(lastIndex); - } else if (isGlob2 === 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: isGlob2, - 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 negate2 = () => { - 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) { - negate2(); - 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 create2 = (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 = create2(match[1]); - if (!source2) return; - return source2 + DOT_LITERAL + match[2]; - } - } - }; - const output = utils.removePrefix(input, state); - let source = create2(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 path20 = 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(path20.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 path20 = 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 !isDynamicPattern2(pattern, options); - } - exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern2(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 = isDynamicPattern2; - 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 isNegativePattern2(pattern) ? pattern.slice(1) : pattern; - } - exports2.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern2(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports2.isNegativePattern = isNegativePattern2; - function isPositivePattern(pattern) { - return !isNegativePattern2(pattern); - } - exports2.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern2); - } - 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 = path20.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 relative2 = []; - for (const pattern of patterns) { - if (isAbsolute2(pattern)) { - absolute.push(pattern); - } else { - relative2.push(pattern); - } - } - return [absolute, relative2]; - } - exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; - function isAbsolute2(pattern) { - return path20.isAbsolute(pattern); - } - exports2.isAbsolute = isAbsolute2; - } -}); - -// 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) { - "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((stream2) => { - stream2.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((stream2) => stream2.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 fs20 = require_fs(); - exports2.fs = fs20; - var path20 = require_path(); - exports2.path = path20; - var pattern = require_pattern(); - exports2.pattern = pattern; - var stream2 = require_stream(); - exports2.stream = stream2; - 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(path20, settings, callback) { - settings.fs.lstat(path20, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path20, (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(path20, settings) { - const lstat = settings.fs.lstatSync(path20); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path20); - 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 fs20 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs20.lstat, - stat: fs20.stat, - lstatSync: fs20.lstatSync, - statSync: fs20.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 fs20 = require_fs2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs20.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(path20, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path20, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path20, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.stat = stat; - function statSync4(path20, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path20, settings); - } - exports2.statSync = statSync4; - 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 fs20 = require_fs3(); - exports2.fs = fs20; - } -}); - -// 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 path20 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path20, settings.fsStatSettings, (error2, stats) => { - if (error2 !== null) { - done(error2); - return; - } - const entry = { - name, - path: path20, - 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 fs20 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - 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) { - 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 path20 = require("path"); - var fsStat = require_out(); - var fs20 = require_fs4(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - 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({ - 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(path20, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path20, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path20, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.scandir = scandir; - function scandirSync(path20, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path20, 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: noop2, - saturated: noop2, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop2, - 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 || noop2; - 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 || noop2; - 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 = noop2; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self2.drain(); - self2.drain = noop2; - } - } - function noop2() { - } - function Task() { - this.value = null; - this.callback = noop2; - this.next = null; - this.release = noop2; - this.context = null; - var self2 = this; - this.worked = function worked(err, result) { - var callback = self2.callback; - self2.value = null; - self2.callback = noop2; - 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 path20 = 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, path20.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 path20 = 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 path20.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 stream2 = new stream_1.PassThrough({ objectMode: true }); - stream2._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream2.push(entry); - } - if (index === filepaths.length - 1) { - stream2.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream2.write(i); - } - return stream2; - } - _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((resolve8, reject) => { - this._stat(filepath, this._fsStatSettings, (error2, stats) => { - return error2 === null ? resolve8(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((resolve8, reject) => { - this._walkAsync(root, options, (error2, entries) => { - if (error2 === null) { - resolve8(entries); - } else { - reject(error2); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream2 = this._readerStream.static(patterns, options); - return new Promise((resolve8, reject) => { - stream2.once("error", reject); - stream2.on("data", (entry) => entries.push(entry)); - stream2.once("end", () => resolve8(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, isDirectory2) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory2) { - if (patternsRe.length === 0) { - return false; - } - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory2) { - 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 path20 = 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 path20.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 fs20 = require("fs"); - var os5 = require("os"); - var CPU_COUNT = Math.max(os5.cpus().length, 1); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs20.lstat, - lstatSync: fs20.lstatSync, - stat: fs20.stat, - statSync: fs20.statSync, - readdir: fs20.readdir, - readdirSync: fs20.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) { - assertPatternsInput2(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 = stream2; - FastGlob2.async = FastGlob2; - function sync(source, options) { - assertPatternsInput2(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream2(source, options) { - assertPatternsInput2(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream2; - function generateTasks2(source, options) { - assertPatternsInput2(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks2; - function isDynamicPattern2(source, options) { - assertPatternsInput2(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern2; - function escapePath(source) { - assertPatternsInput2(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - function convertPathToPattern2(source) { - assertPatternsInput2(source); - return utils.path.convertPathToPattern(source); - } - FastGlob2.convertPathToPattern = convertPathToPattern2; - let posix; - (function(posix2) { - function escapePath2(source) { - assertPatternsInput2(source); - return utils.path.escapePosixPath(source); - } - posix2.escapePath = escapePath2; - function convertPathToPattern3(source) { - assertPatternsInput2(source); - return utils.path.convertPosixPathToPattern(source); - } - posix2.convertPathToPattern = convertPathToPattern3; - })(posix = FastGlob2.posix || (FastGlob2.posix = {})); - let win32; - (function(win322) { - function escapePath2(source) { - assertPatternsInput2(source); - return utils.path.escapeWindowsPath(source); - } - win322.escapePath = escapePath2; - function convertPathToPattern3(source) { - assertPatternsInput2(source); - return utils.path.convertWindowsPathToPattern(source); - } - win322.convertPathToPattern = convertPathToPattern3; - })(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 assertPatternsInput2(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/globby/node_modules/ignore/index.js -var require_ignore = __commonJS({ - "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 = "\\"; - 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 = /^\.{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 }); - return 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) - // (a \ ) -> (a ) - /((?:\\\\)*?)(\\?\s+)$/, - (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY) - ], - // Replace (\ ) with ' ' - // (\ ) -> ' ' - // (\\ ) -> '\\ ' - // (\\\ ) -> '\\ ' - [ - /(\\+?)\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. - // > 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}(?=$|\\/$)` - ] - ]; - 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}(?=$|\\/$)`; - } - }; - 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).filter(Boolean); - var IgnoreRule = class { - constructor(pattern, mark, body, ignoreCase, negative, prefix) { - this.pattern = pattern; - this.mark = mark; - this.negative = negative; - 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, - mark - }, ignoreCase) => { - let negative = false; - let body = pattern; - if (body.indexOf("!") === 0) { - negative = true; - body = body.substr(1); - } - body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regexPrefix = makeRegexPrefix(body); - return new IgnoreRule( - pattern, - mark, - body, - ignoreCase, - negative, - regexPrefix - ); - }; - var RuleManager = class { - constructor(ignoreCase) { - this._ignoreCase = ignoreCase; - this._rules = []; - } - _add(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules._rules); - this._added = true; - return; - } - if (isString(pattern)) { - pattern = { - pattern - }; - } - if (checkPattern(pattern.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._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; - } - // legacy - addPattern(pattern) { - return this.add(pattern); - } - // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { - const path20 = originalPath && checkPath.convert(originalPath); - checkPath( - path20, - originalPath, - this._strictPathCheck ? throwError2 : RETURN_FALSE - ); - return this._t(path20, cache, checkUnignored, slices); - } - 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 = path20.split(SLASH).filter(Boolean); - } - slices.pop(); - if (!slices.length) { - return cache[path20] = this._rules.test(path20, checkUnignored, MODE_IGNORE); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path20] = parent.ignored ? parent : this._rules.test(path20, checkUnignored, MODE_IGNORE); - } - ignores(path20) { - return this._test(path20, this._ignoreCache, false).ignored; - } - createFilter() { - return (path20) => !this.ignores(path20); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path20) { - return this._test(path20, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - 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 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); - } -}); - // 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"; @@ -30424,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 = []; @@ -30553,7 +24704,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(); @@ -30828,7 +24979,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(); @@ -30853,7 +25004,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; @@ -30866,7 +25017,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; @@ -30903,7 +25054,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); @@ -30977,7 +25128,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; @@ -31165,7 +25316,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) { @@ -31401,7 +25552,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) => { @@ -32214,10 +26365,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(); @@ -32349,7 +26500,6 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -32570,7 +26720,7 @@ var require_light = __commonJS({ } } async trigger(name, ...args) { - var e, promises3; + var e, promises4; try { if (name !== "debug") { this.trigger("debug", `Event triggered: ${name}`, args); @@ -32581,7 +26731,7 @@ var require_light = __commonJS({ this._events[name] = this._events[name].filter(function(listener) { return listener.status !== "none"; }); - promises3 = this._events[name].map(async (listener) => { + promises4 = this._events[name].map(async (listener) => { var e2, returned; if (listener.status === "none") { return; @@ -32604,7 +26754,7 @@ var require_light = __commonJS({ return null; } }); - return (await Promise.all(promises3)).find(function(x) { + return (await Promise.all(promises4)).find(function(x) { return x != null; }); } catch (error2) { @@ -33505,18 +27655,18 @@ var require_light = __commonJS({ var done, waitForExecuting; options = parser$5.load(options, this.stopDefaults); waitForExecuting = (at) => { - var finished2; - finished2 = () => { + var finished; + finished = () => { var counts; counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; return new this.Promise((resolve8, reject) => { - if (finished2()) { + if (finished()) { return resolve8(); } else { return this.on("done", () => { - if (finished2()) { + if (finished()) { this.removeAllListeners("done"); return resolve8(); } @@ -33943,7 +28093,7 @@ var require_console_log_level = __commonJS({ "use strict"; var util = require("util"); var levels = ["trace", "debug", "info", "warn", "error", "fatal"]; - var noop2 = function() { + var noop = function() { }; module2.exports = function(opts) { opts = opts || {}; @@ -33953,7 +28103,7 @@ var require_console_log_level = __commonJS({ return levels.indexOf(level) >= levels.indexOf(opts.level); }; levels.forEach(function(level) { - logger[level] = shouldLog(level) ? log : noop2; + logger[level] = shouldLog(level) ? log : noop; function log() { var prefix = opts.prefix; var normalizedLevel; @@ -33991,14 +28141,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, path20, name, argument) { - if (Array.isArray(path20)) { - this.path = path20; - this.property = path20.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 (path20 !== void 0) { - this.property = path20; + } else if (path16 !== void 0) { + this.property = path16; } if (message) { this.message = message; @@ -34089,16 +28239,16 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path20, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path16, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path20)) { - this.path = path20; - this.propertyPath = path20.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 = path20; + this.propertyPath = path16; } this.base = base; this.schemas = schemas; @@ -34107,10 +28257,10 @@ var require_helpers = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path20 = 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, path20, 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; } @@ -34975,7 +29125,7 @@ var require_attribute = __commonJS({ }); // node_modules/jsonschema/lib/scan.js -var require_scan2 = __commonJS({ +var require_scan = __commonJS({ "node_modules/jsonschema/lib/scan.js"(exports2, module2) { "use strict"; var urilib = require("url"); @@ -35049,7 +29199,7 @@ var require_validator = __commonJS({ var urilib = require("url"); var attribute = require_attribute(); var helpers = require_helpers(); - var scanSchema = require_scan2().scan; + var scanSchema = require_scan().scan; var ValidatorResult = helpers.ValidatorResult; var ValidatorResultError = helpers.ValidatorResultError; var SchemaError = helpers.SchemaError; @@ -35274,8 +29424,8 @@ var require_lib2 = __commonJS({ module2.exports.ValidatorResultError = require_helpers().ValidatorResultError; module2.exports.ValidationError = require_helpers().ValidationError; module2.exports.SchemaError = require_helpers().SchemaError; - module2.exports.SchemaScanResult = require_scan2().SchemaScanResult; - module2.exports.scan = require_scan2().scan; + module2.exports.SchemaScanResult = require_scan().SchemaScanResult; + module2.exports.scan = require_scan().scan; module2.exports.validate = function(instance, schema2, options) { var v = new Validator3(); return v.validate(instance, schema2, options); @@ -35371,7 +29521,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 path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -35379,7 +29529,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path20.dirname(p); + let result = path16.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -35417,7 +29567,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 += path20.sep; + root += path16.sep; } return root + itemPath; } @@ -35455,10 +29605,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path20.sep)) { + if (!p.endsWith(path16.sep)) { return p; } - if (p === path20.sep) { + if (p === path16.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -35791,7 +29941,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path20 = (function() { + var path16 = (function() { try { return require("path"); } catch (e) { @@ -35799,7 +29949,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path20.sep; + minimatch.sep = path16.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { @@ -35888,8 +30038,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path20.sep !== "/") { - pattern = pattern.split(path20.sep).join("/"); + if (!options.allowWindowsEscape && path16.sep !== "/") { + pattern = pattern.split(path16.sep).join("/"); } this.options = options; this.set = []; @@ -36258,8 +30408,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path20.sep !== "/") { - f = f.split(path20.sep).join("/"); + if (path16.sep !== "/") { + f = f.split(path16.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -36391,7 +30541,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path20 = __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"; @@ -36406,12 +30556,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(path20.sep); + this.segments = itemPath.split(path16.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path20.basename(remaining); + const basename = path16.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -36429,7 +30579,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(path20.sep), `Parameter 'itemPath' contains unexpected path separators`); + assert_1.default(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -36440,12 +30590,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path20.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 += path20.sep; + result += path16.sep; } result += this.segments[i]; } @@ -36489,7 +30639,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os5 = __importStar4(require("os")); - var path20 = __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(); @@ -36518,7 +30668,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(path20.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 === "")); @@ -36542,8 +30692,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path20.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path20.sep}`; + if (!itemPath.endsWith(path16.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path16.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -36578,9 +30728,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(`.${path20.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path16.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path20.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path16.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}'`); @@ -36664,8 +30814,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path20, level) { - this.path = path20; + constructor(path16, level) { + this.path = path16; this.level = level; } }; @@ -36785,9 +30935,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core15 = __importStar4(require_core()); - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path20 = __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(); @@ -36837,7 +30987,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core15.debug(`Search path '${searchPath}'`); try { - yield __await4(fs20.promises.lstat(searchPath)); + yield __await4(fs17.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -36868,7 +31018,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs20.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path20.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs17.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); @@ -36903,7 +31053,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs20.promises.stat(item.path); + stats = yield fs17.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -36915,10 +31065,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs20.promises.lstat(item.path); + stats = yield fs17.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs20.promises.realpath(item.path); + const realPath = yield fs17.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -38136,7 +32286,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 }); @@ -38252,11 +32402,11 @@ var require_cacheUtils = __commonJS({ var glob2 = __importStar4(require_glob()); var io7 = __importStar4(require_io()); var crypto2 = __importStar4(require("crypto")); - var fs20 = __importStar4(require("fs")); - var path20 = __importStar4(require("path")); + var fs17 = __importStar4(require("fs")); + var path16 = __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* () { @@ -38273,16 +32423,16 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path20.join(baseLocation, "actions", "temp"); + tempDirectory = path16.join(baseLocation, "actions", "temp"); } - const dest = path20.join(tempDirectory, crypto2.randomUUID()); + const dest = path16.join(tempDirectory, crypto2.randomUUID()); yield io7.mkdirP(dest); return dest; }); } exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs20.statSync(filePath).size; + return fs17.statSync(filePath).size; } exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { @@ -38299,7 +32449,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path20.relative(workspace, file).replace(new RegExp(`\\${path20.sep}`, "g"), "/"); + const relativeFile = path16.relative(workspace, file).replace(new RegExp(`\\${path16.sep}`, "g"), "/"); core15.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -38322,7 +32472,7 @@ var require_cacheUtils = __commonJS({ exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { return __awaiter4(this, void 0, void 0, function* () { - return util.promisify(fs20.unlink)(filePath); + return util.promisify(fs17.unlink)(filePath); }); } exports2.unlinkFile = unlinkFile; @@ -38367,7 +32517,7 @@ var require_cacheUtils = __commonJS({ exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { return __awaiter4(this, void 0, void 0, function* () { - if (fs20.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs17.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -38934,7 +33084,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 }); @@ -39096,7 +33246,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; } }); @@ -39873,13 +34023,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 process6 = tslib_1.__importStar(require("node:process")); + var process2 = tslib_1.__importStar(require("node:process")); function getHeaderName() { return "User-Agent"; } async function setPlatformSpecificData(map2) { - if (process6 && process6.versions) { - const versions = process6.versions; + if (process2 && process2.versions) { + const versions = process2.versions; if (versions.bun) { map2.set("Bun", versions.bun); } else if (versions.deno) { @@ -39894,7 +34044,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 }); @@ -39912,7 +34062,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) { @@ -40441,7 +34591,7 @@ var require_retryPolicy = __commonJS({ var helpers_js_1 = require_helpers2(); 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 }) { @@ -40538,7 +34688,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; @@ -40847,7 +34997,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common3 = __commonJS({ +var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -41181,7 +35331,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common3()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -41469,7 +35619,7 @@ var require_node = __commonJS({ debug3.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common3()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -42540,7 +36690,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(); @@ -43057,7 +37207,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; @@ -43079,7 +37229,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; @@ -43104,7 +37254,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; @@ -44856,7 +39006,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 }); @@ -44931,7 +39081,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; @@ -46205,15 +40355,15 @@ var require_urlHelpers = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path20 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path20.startsWith("/")) { - path20 = path20.substring(1); + let path16 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path16.startsWith("/")) { + path16 = path16.substring(1); } - if (isAbsoluteUrl(path20)) { - requestUrl = path20; + if (isAbsoluteUrl(path16)) { + requestUrl = path16; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path20); + requestUrl = appendPath(requestUrl, path16); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -46261,9 +40411,9 @@ var require_urlHelpers = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path20 = pathToAppend.substring(0, searchStart); + const path16 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path20; + newPath = newPath + path16; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -46409,7 +40559,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(); @@ -50140,7 +44290,7 @@ var require_dist7 = __commonJS({ var stream2 = require("stream"); var coreLro = require_dist6(); var events = require("events"); - var fs20 = require("fs"); + var fs17 = require("fs"); var util = require("util"); var buffer = require("buffer"); function _interopNamespaceDefault(e) { @@ -50163,7 +44313,7 @@ var require_dist7 = __commonJS({ } var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs20); + var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs17); var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); var logger = logger$1.createClientLogger("storage-blob"); var BaseRequestPolicy = class { @@ -50412,10 +44562,10 @@ var require_dist7 = __commonJS({ ]; function escapeURLPath(url3) { const urlParsed = new URL(url3); - let path20 = urlParsed.pathname; - path20 = path20 || "/"; - path20 = escape(path20); - urlParsed.pathname = path20; + let path16 = urlParsed.pathname; + path16 = path16 || "/"; + path16 = escape(path16); + urlParsed.pathname = path16; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -50500,9 +44650,9 @@ var require_dist7 = __commonJS({ } function appendToURLPath(url3, name) { const urlParsed = new URL(url3); - let path20 = urlParsed.pathname; - path20 = path20 ? path20.endsWith("/") ? `${path20}${name}` : `${path20}/${name}` : name; - urlParsed.pathname = path20; + let path16 = urlParsed.pathname; + path16 = path16 ? path16.endsWith("/") ? `${path16}${name}` : `${path16}/${name}` : name; + urlParsed.pathname = path16; return urlParsed.toString(); } function setURLParameter(url3, name, value) { @@ -51583,9 +45733,9 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path20 = getURLPath(request.url) || "/"; + const path16 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path20}`; + canonicalizedResourceString += `/${this.factory.accountName}${path16}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -51878,9 +46028,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path20 = getURLPath(request.url) || "/"; + const path16 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path20}`; + canonicalizedResourceString += `/${options.accountName}${path16}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -71182,8 +65332,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 path20 = getURLPath(subRequest.url); - if (!path20 || path20 === "") { + const path16 = getURLPath(subRequest.url); + if (!path16 || path16 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -71243,8 +65393,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; pipeline = newPipeline(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); - const path20 = getURLPath(url3); - if (path20 && path20 !== "/") { + const path16 = getURLPath(url3); + if (path16 && path16 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -73841,7 +67991,7 @@ var require_requestUtils = __commonJS({ exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; var core15 = __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; @@ -74011,11 +68161,11 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var stream2 = __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) { @@ -74122,7 +68272,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter4(this, void 0, void 0, function* () { - const writeStream = fs20.createWriteStream(archivePath); + const writeStream = fs17.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); @@ -74148,7 +68298,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { var _a; return __awaiter4(this, void 0, void 0, function* () { - const archiveDescriptor = yield fs20.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs17.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -74265,7 +68415,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs20.openSync(archivePath, "w"); + const fd = fs17.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -74283,12 +68433,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)) { - fs20.writeFileSync(fd, result); + fs17.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs20.closeSync(fd); + fs17.closeSync(fd); } } }); @@ -74587,7 +68737,7 @@ var require_cacheHttpClient = __commonJS({ var core15 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var url_1 = require("url"); var utils = __importStar4(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -74725,7 +68875,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 = fs20.openSync(archivePath, "r"); + const fd = fs17.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -74739,7 +68889,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs20.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs17.createReadStream(archivePath, { fd, start, end, @@ -74750,7 +68900,7 @@ Other caches with similar key:`); } }))); } finally { - fs20.closeSync(fd); + fs17.closeSync(fd); } return; }); @@ -79994,9 +74144,9 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io7 = __importStar4(require_io()); var fs_1 = require("fs"); - var path20 = __importStar4(require("path")); + var path16 = __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* () { @@ -80040,13 +74190,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(`\\${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); + 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(`\\${path20.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path20.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(`\\${path20.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) { @@ -80092,7 +74242,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path20.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -80101,7 +74251,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path20.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -80116,7 +74266,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path20.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -80125,7 +74275,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path20.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -80165,7 +74315,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)(path20.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); }); @@ -80235,7 +74385,7 @@ var require_cache3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; var core15 = __importStar4(require_core()); - var path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); @@ -80332,7 +74482,7 @@ var require_cache3 = __commonJS({ core15.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path20.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core15.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core15.isDebug()) { @@ -80401,7 +74551,7 @@ var require_cache3 = __commonJS({ core15.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path20.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path16.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); @@ -80464,7 +74614,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 = path20.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path16.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core15.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -80528,7 +74678,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 = path20.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path16.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core15.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -80666,7 +74816,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os5 = require("os"); var cp = require("child_process"); - var fs20 = require("fs"); + var fs17 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter4(this, void 0, void 0, function* () { const platFilter = os5.platform(); @@ -80730,10 +74880,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs20.existsSync(lsbReleaseFile)) { - contents = fs20.readFileSync(lsbReleaseFile).toString(); - } else if (fs20.existsSync(osReleaseFile)) { - contents = fs20.readFileSync(osReleaseFile).toString(); + if (fs17.existsSync(lsbReleaseFile)) { + contents = fs17.readFileSync(lsbReleaseFile).toString(); + } else if (fs17.existsSync(osReleaseFile)) { + contents = fs17.readFileSync(osReleaseFile).toString(); } return contents; } @@ -80910,10 +75060,10 @@ var require_tool_cache = __commonJS({ var core15 = __importStar4(require_core()); var io7 = __importStar4(require_io()); var crypto2 = __importStar4(require("crypto")); - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); var os5 = __importStar4(require("os")); - var path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var httpm = __importStar4(require_lib()); var semver8 = __importStar4(require_semver2()); var stream2 = __importStar4(require("stream")); @@ -80934,8 +75084,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 || path20.join(_getTempDirectory(), crypto2.randomUUID()); - yield io7.mkdirP(path20.dirname(dest)); + dest = dest || path16.join(_getTempDirectory(), crypto2.randomUUID()); + yield io7.mkdirP(path16.dirname(dest)); core15.debug(`Downloading ${url2}`); core15.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -80957,7 +75107,7 @@ var require_tool_cache = __commonJS({ exports2.downloadTool = downloadTool2; function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - if (fs20.existsSync(dest)) { + if (fs17.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { @@ -80981,7 +75131,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs20.createWriteStream(dest)); + yield pipeline(readStream, fs17.createWriteStream(dest)); core15.debug("download complete"); succeeded = true; return dest; @@ -81022,7 +75172,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path20.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}'`; @@ -81193,12 +75343,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os5.arch(); core15.debug(`Caching tool ${tool} ${version} ${arch2}`); core15.debug(`source dir: ${sourceDir}`); - if (!fs20.statSync(sourceDir).isDirectory()) { + if (!fs17.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs20.readdirSync(sourceDir)) { - const s = path20.join(sourceDir, itemName); + for (const itemName of fs17.readdirSync(sourceDir)) { + const s = path16.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -81212,11 +75362,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os5.arch(); core15.debug(`Caching tool ${tool} ${version} ${arch2}`); core15.debug(`source file: ${sourceFile}`); - if (!fs20.statSync(sourceFile).isFile()) { + if (!fs17.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path20.join(destFolder, targetFile); + const destPath = path16.join(destFolder, targetFile); core15.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -81240,9 +75390,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; - const cachePath = path20.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path16.join(_getCacheDirectory(), toolName, versionSpec, arch2); core15.debug(`checking cache: ${cachePath}`); - if (fs20.existsSync(cachePath) && fs20.existsSync(`${cachePath}.complete`)) { + if (fs17.existsSync(cachePath) && fs17.existsSync(`${cachePath}.complete`)) { core15.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -81255,13 +75405,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os5.arch(); - const toolPath = path20.join(_getCacheDirectory(), toolName); - if (fs20.existsSync(toolPath)) { - const children = fs20.readdirSync(toolPath); + const toolPath = path16.join(_getCacheDirectory(), toolName); + if (fs17.existsSync(toolPath)) { + const children = fs17.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path20.join(toolPath, child, arch2 || ""); - if (fs20.existsSync(fullPath) && fs20.existsSync(`${fullPath}.complete`)) { + const fullPath = path16.join(toolPath, child, arch2 || ""); + if (fs17.existsSync(fullPath) && fs17.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -81315,7 +75465,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter4(this, void 0, void 0, function* () { if (!dest) { - dest = path20.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path16.join(_getTempDirectory(), crypto2.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -81323,7 +75473,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { - const folderPath = path20.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path16.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core15.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -81333,9 +75483,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path20.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path16.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs20.writeFileSync(markerPath, ""); + fs17.writeFileSync(markerPath, ""); core15.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -81512,7 +75662,7 @@ var require_follow_redirects = __commonJS({ "ERR_STREAM_WRITE_AFTER_END", "write after end" ); - var destroy = Writable.prototype.destroy || noop2; + var destroy = Writable.prototype.destroy || noop; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); @@ -81841,7 +75991,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop2() { + function noop() { } function parseUrl(input) { var parsed; @@ -81917,7 +76067,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.removeListener(event, eventHandlers[event]); } - request.on("error", noop2); + request.on("error", noop); request.destroy(error2); } function isSubdomain(subdomain, domain) { @@ -82048,7 +76198,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 path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -82056,7 +76206,7 @@ var require_internal_path_helper2 = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path20.dirname(p); + let result = path16.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -82094,7 +76244,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 += path20.sep; + root += path16.sep; } return root + itemPath; } @@ -82132,10 +76282,10 @@ var require_internal_path_helper2 = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path20.sep)) { + if (!p.endsWith(path16.sep)) { return p; } - if (p === path20.sep) { + if (p === path16.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -82286,7 +76436,7 @@ var require_internal_path2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -82301,12 +76451,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(path20.sep); + this.segments = itemPath.split(path16.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path20.basename(remaining); + const basename = path16.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -82324,7 +76474,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(path20.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -82335,12 +76485,12 @@ var require_internal_path2 = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path20.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 += path20.sep; + result += path16.sep; } result += this.segments[i]; } @@ -82388,7 +76538,7 @@ var require_internal_pattern2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os5 = __importStar4(require("os")); - var path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -82417,7 +76567,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(path20.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 === "")); @@ -82441,8 +76591,8 @@ var require_internal_pattern2 = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path20.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path20.sep}`; + if (!itemPath.endsWith(path16.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path16.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -82477,9 +76627,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(`.${path20.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path16.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path20.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path16.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}'`); @@ -82563,8 +76713,8 @@ var require_internal_search_state2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path20, level) { - this.path = path20; + constructor(path16, level) { + this.path = path16; this.level = level; } }; @@ -82688,9 +76838,9 @@ var require_internal_globber2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core15 = __importStar4(require_core()); - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); - var path20 = __importStar4(require("path")); + var path16 = __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(); @@ -82742,7 +76892,7 @@ var require_internal_globber2 = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core15.debug(`Search path '${searchPath}'`); try { - yield __await4(fs20.promises.lstat(searchPath)); + yield __await4(fs17.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -82766,7 +76916,7 @@ var require_internal_globber2 = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path20.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path16.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -82776,7 +76926,7 @@ var require_internal_globber2 = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs20.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path20.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs17.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); @@ -82811,7 +76961,7 @@ var require_internal_globber2 = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs20.promises.stat(item.path); + stats = yield fs17.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -82823,10 +76973,10 @@ var require_internal_globber2 = __commonJS({ throw err; } } else { - stats = yield fs20.promises.lstat(item.path); + stats = yield fs17.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs20.promises.realpath(item.path); + const realPath = yield fs17.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -82925,10 +77075,10 @@ var require_internal_hash_files = __commonJS({ exports2.hashFiles = void 0; var crypto2 = __importStar4(require("crypto")); var core15 = __importStar4(require_core()); - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); - var path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); function hashFiles2(globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; var _d; @@ -82944,17 +77094,17 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path20.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path16.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } - if (fs20.statSync(file).isDirectory()) { + if (fs17.statSync(file).isDirectory()) { writeDelegate(`Skip directory '${file}'.`); continue; } const hash2 = crypto2.createHash("sha256"); const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs20.createReadStream(file), hash2); + yield pipeline(fs17.createReadStream(file), hash2); result.write(hash2.digest()); count++; if (!hasMatch) { @@ -85941,23 +80091,23 @@ __export(analyze_action_exports, { runPromise: () => runPromise }); module.exports = __toCommonJS(analyze_action_exports); -var fs19 = __toESM(require("fs")); +var fs16 = __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 fs5 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var fs2 = __toESM(require("fs")); +var path2 = __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 fs4 = __toESM(require("fs")); +var fs = __toESM(require("fs")); var os = __toESM(require("os")); -var path5 = __toESM(require("path")); +var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -86097,764 +80247,33 @@ function checkDiskSpace(directoryPath, dependencies = { return checkUnix(directoryPath); } -// 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_path7 = require("node:path"); +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 fs20 = options.fs || await import("node:fs/promises"); + 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 fs20.lstat(itemPath, { bigint: true }) : await fs20.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + 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 fs20.readdir(itemPath) : await fs20.readdir(itemPath).catch((error2) => errors.push(error2)); + 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_path7.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) ) ); } @@ -89549,13 +82968,13 @@ function getTotalMemoryBytes(logger) { return limit; } function getCgroupMemoryLimitBytes(limitFile, logger) { - if (!fs4.existsSync(limitFile)) { + if (!fs.existsSync(limitFile)) { logger.debug( `While resolving RAM, did not find a cgroup memory limit at ${limitFile}.` ); return void 0; } - const limit = Number(fs4.readFileSync(limitFile, "utf8")); + const limit = Number(fs.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.` @@ -89635,13 +83054,13 @@ function getThreadsFlagValue(userInput, logger) { return numThreads; } function getCgroupCpuCountFromCpuMax(cpuMaxFile, logger) { - if (!fs4.existsSync(cpuMaxFile)) { + if (!fs.existsSync(cpuMaxFile)) { logger.debug( `While resolving threads, did not find a cgroup CPU file at ${cpuMaxFile}.` ); return void 0; } - const cpuMaxString = fs4.readFileSync(cpuMaxFile, "utf-8"); + const cpuMaxString = fs.readFileSync(cpuMaxFile, "utf-8"); const cpuMaxStringSplit = cpuMaxString.split(" "); if (cpuMaxStringSplit.length !== 2) { logger.debug( @@ -89661,14 +83080,14 @@ function getCgroupCpuCountFromCpuMax(cpuMaxFile, logger) { return cpuCount; } function getCgroupCpuCountFromCpus(cpusFile, logger) { - if (!fs4.existsSync(cpusFile)) { + if (!fs.existsSync(cpusFile)) { logger.debug( `While resolving threads, did not find a cgroup CPUs file at ${cpusFile}.` ); return void 0; } let cpuCount = 0; - const cpusString = fs4.readFileSync(cpusFile, "utf-8").trim(); + const cpusString = fs.readFileSync(cpusFile, "utf-8").trim(); if (cpusString.length === 0) { return void 0; } @@ -89690,10 +83109,10 @@ function getThreadsFlag(userInput, logger) { return `--threads=${getThreadsFlagValue(userInput, logger)}`; } function getCodeQLDatabasePath(config, language) { - return path5.resolve(config.dbLocation, language); + return path.resolve(config.dbLocation, language); } function getGeneratedSuitePath(config, language) { - return path5.resolve( + return path.resolve( config.dbLocation, language, "temp", @@ -89796,9 +83215,9 @@ async function codeQlVersionAtLeast(codeql, requiredVersion) { } async function bundleDb(config, language, codeql, dbName) { const databasePath = getCodeQLDatabasePath(config, language); - const databaseBundlePath = path5.resolve(config.dbLocation, `${dbName}.zip`); - if (fs4.existsSync(databaseBundlePath)) { - await deleteAsync(databaseBundlePath, { force: true }); + const databaseBundlePath = path.resolve(config.dbLocation, `${dbName}.zip`); + if (fs.existsSync(databaseBundlePath)) { + await fs.promises.rm(databaseBundlePath, { force: true }); } await codeql.databaseBundle(databasePath, databaseBundlePath, dbName); return databaseBundlePath; @@ -89842,15 +83261,15 @@ async function tryGetFolderBytes(cacheDir, logger, quiet = false) { } var hadTimeout = false; async function waitForResultWithTimeLimit(timeoutMs, promise, onTimeout) { - let finished2 = false; + let finished = false; const mainTask = async () => { const result = await promise; - finished2 = true; + finished = true; return result; }; const timeoutTask = async () => { await delay(timeoutMs, { allowProcessExit: true }); - if (!finished2) { + if (!finished) { hadTimeout = true; onTimeout(); } @@ -89965,16 +83384,10 @@ async function checkSipEnablement(logger) { async function cleanUpGlob(glob2, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await deleteAsync(glob2, { force: true }); - if (deletedPaths.length === 0) { - logger.warning( - `Failed to clean up ${name}: no files found matching ${glob2}.` - ); - } else if (deletedPaths.length === 1) { - logger.debug(`Cleaned up ${name}.`); - } else { - logger.debug(`Cleaned up ${name} (${deletedPaths.length} files).`); - } + await fs.promises.rm(glob2, { + force: true, + recursive: true + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } @@ -90024,17 +83437,17 @@ function getWorkflowEventName() { } function isRunningLocalAction() { const relativeScriptPath = getRelativeScriptPath(); - return relativeScriptPath.startsWith("..") || path6.isAbsolute(relativeScriptPath); + return relativeScriptPath.startsWith("..") || path2.isAbsolute(relativeScriptPath); } function getRelativeScriptPath() { const runnerTemp = getRequiredEnvParam("RUNNER_TEMP"); - const actionsDirectory = path6.join(path6.dirname(runnerTemp), "_actions"); - return path6.relative(actionsDirectory, __filename); + const actionsDirectory = path2.join(path2.dirname(runnerTemp), "_actions"); + return path2.relative(actionsDirectory, __filename); } function getWorkflowEvent() { const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH"); try { - return JSON.parse(fs5.readFileSync(eventJsonFile, "utf-8")); + return JSON.parse(fs2.readFileSync(eventJsonFile, "utf-8")); } catch (e) { throw new Error( `Unable to read workflow event JSON from ${eventJsonFile}: ${e}` @@ -90246,8 +83659,8 @@ function getAnalysisConfig(kind) { var SarifScanOrder = [CodeQuality, CodeScanning]; // src/analyze.ts -var fs15 = __toESM(require("fs")); -var path16 = __toESM(require("path")); +var fs12 = __toESM(require("fs")); +var path12 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); var io5 = __toESM(require_io()); @@ -90434,8 +83847,8 @@ function wrapApiConfigurationError(e) { } // src/codeql.ts -var fs14 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var fs11 = __toESM(require("fs")); +var path10 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -90680,8 +84093,8 @@ function wrapCliConfigurationError(cliError) { } // src/config-utils.ts -var fs9 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var fs6 = __toESM(require("fs")); +var path6 = __toESM(require("path")); // src/caching-utils.ts var core6 = __toESM(require_core()); @@ -90706,12 +84119,12 @@ var PACK_IDENTIFIER_PATTERN = (function() { })(); // src/diff-informed-analysis-utils.ts -var fs8 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var fs5 = __toESM(require("fs")); +var path5 = __toESM(require("path")); // src/feature-flags.ts -var fs7 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var fs4 = __toESM(require("fs")); +var path4 = __toESM(require("path")); var semver4 = __toESM(require_semver2()); // src/defaults.json @@ -90720,8 +84133,8 @@ var cliVersion = "2.23.3"; // src/overlay-database-utils.ts var crypto = __toESM(require("crypto")); -var fs6 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var fs3 = __toESM(require("fs")); +var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts @@ -90847,8 +84260,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path20 = decodeGitFilePath(match[2]); - fileOidMap[path20] = oid; + const path16 = decodeGitFilePath(match[2]); + fileOidMap[path16] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -90954,12 +84367,12 @@ async function writeBaseDatabaseOidsFile(config, sourceRoot) { const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOidsJson = JSON.stringify(gitFileOids); const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - await fs6.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); + await fs3.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); } async function readBaseDatabaseOidsFile(config, logger) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); try { - const contents = await fs6.promises.readFile( + const contents = await fs3.promises.readFile( baseDatabaseOidsFilePath, "utf-8" ); @@ -90972,7 +84385,7 @@ async function readBaseDatabaseOidsFile(config, logger) { } } function getBaseDatabaseOidsFilePath(config) { - return path7.join(config.dbLocation, "base-database-oids.json"); + return path3.join(config.dbLocation, "base-database-oids.json"); } async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); @@ -90982,14 +84395,14 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path7.join( + const overlayChangesFile = path3.join( getTemporaryDirectory(), "overlay-changes.json" ); logger.debug( `Writing overlay changed files to ${overlayChangesFile}: ${changedFilesJson}` ); - await fs6.promises.writeFile(overlayChangesFile, changedFilesJson); + await fs3.promises.writeFile(overlayChangesFile, changedFilesJson); return overlayChangesFile; } function computeChangedFiles(baseFileOids, overlayFileOids) { @@ -91011,7 +84424,7 @@ var CACHE_PREFIX = "codeql-overlay-base-database"; var MAX_CACHE_OPERATION_MS = 6e5; function checkOverlayBaseDatabase(config, logger, warningPrefix) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - if (!fs6.existsSync(baseDatabaseOidsFilePath)) { + if (!fs3.existsSync(baseDatabaseOidsFilePath)) { logger.warning( `${warningPrefix}: ${baseDatabaseOidsFilePath} does not exist` ); @@ -91334,7 +84747,7 @@ var Features = class { this.gitHubFeatureFlags = new GitHubFeatureFlags( gitHubVersion, repositoryNwo, - path8.join(tempDir, FEATURE_FLAGS_FILE_NAME), + path4.join(tempDir, FEATURE_FLAGS_FILE_NAME), logger ); } @@ -91513,12 +84926,12 @@ var GitHubFeatureFlags = class { } async readLocalFlags() { try { - if (fs7.existsSync(this.featureFlagsFile)) { + if (fs4.existsSync(this.featureFlagsFile)) { this.logger.debug( `Loading feature flags from ${this.featureFlagsFile}` ); return JSON.parse( - fs7.readFileSync(this.featureFlagsFile, "utf8") + fs4.readFileSync(this.featureFlagsFile, "utf8") ); } } catch (e) { @@ -91531,7 +84944,7 @@ var GitHubFeatureFlags = class { async writeLocalFlags(flags) { try { this.logger.debug(`Writing feature flags to ${this.featureFlagsFile}`); - fs7.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); + fs4.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); } catch (e) { this.logger.warning( `Error writing cached feature flags file ${this.featureFlagsFile}: ${e}.` @@ -91611,12 +85024,12 @@ async function getDiffInformedAnalysisBranches(codeql, features, logger) { return branches; } function getDiffRangesJsonFilePath() { - return path9.join(getTemporaryDirectory(), "pr-diff-range.json"); + return path5.join(getTemporaryDirectory(), "pr-diff-range.json"); } function writeDiffRangesJsonFile(logger, ranges) { const jsonContents = JSON.stringify(ranges, null, 2); const jsonFilePath = getDiffRangesJsonFilePath(); - fs8.writeFileSync(jsonFilePath, jsonContents); + fs5.writeFileSync(jsonFilePath, jsonContents); logger.debug( `Wrote pr-diff-range JSON file to ${jsonFilePath}: ${jsonContents}` @@ -91624,11 +85037,11 @@ ${jsonContents}` } function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); - if (!fs8.existsSync(jsonFilePath)) { + if (!fs5.existsSync(jsonFilePath)) { logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`); return void 0; } - const jsonContents = fs8.readFileSync(jsonFilePath, "utf8"); + const jsonContents = fs5.readFileSync(jsonFilePath, "utf8"); logger.debug( `Read pr-diff-range JSON file from ${jsonFilePath}: ${jsonContents}` @@ -91691,7 +85104,7 @@ Error Response: ${JSON.stringify(error2.response, null, 2)}` } } function getDiffRanges(fileDiff, logger) { - const filename = path9.join(getRequiredInput("checkout_path"), fileDiff.filename).replaceAll(path9.sep, "/"); + const filename = path5.join(getRequiredInput("checkout_path"), fileDiff.filename).replaceAll(path5.sep, "/"); if (fileDiff.patch === void 0) { if (fileDiff.changes === 0) { return []; @@ -91895,14 +85308,14 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ }; function getPathToParsedConfigFile(tempDir) { - return path10.join(tempDir, "config"); + return path6.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); - if (!fs9.existsSync(configFile)) { + if (!fs6.existsSync(configFile)) { return void 0; } - const configString = fs9.readFileSync(configFile, "utf8"); + const configString = fs6.readFileSync(configFile, "utf8"); logger.debug("Loaded config:"); logger.debug(configString); const config = JSON.parse(configString); @@ -91950,8 +85363,8 @@ function getPrimaryAnalysisConfig(config) { } // src/setup-codeql.ts -var fs12 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var fs9 = __toESM(require("fs")); +var path8 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver7 = __toESM(require_semver2()); @@ -92012,7 +85425,7 @@ var v4_default = v4; // src/tar.ts var import_child_process = require("child_process"); -var fs10 = __toESM(require("fs")); +var fs7 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -92085,7 +85498,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs10.mkdirSync(dest, { recursive: true }); + fs7.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -92169,9 +85582,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs11 = __toESM(require("fs")); +var fs8 = __toESM(require("fs")); var os2 = __toESM(require("os")); -var path11 = __toESM(require("path")); +var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -92276,7 +85689,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs11.mkdirSync(dest, { recursive: true }); + fs8.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -92304,7 +85717,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path11.join( + return path7.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver6.clean(version) || version, @@ -92313,7 +85726,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs11.writeFileSync(markerFilePath, ""); + fs8.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url2) { @@ -92448,7 +85861,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs12.existsSync(path12.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs9.existsSync(path8.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -92821,7 +86234,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path12.join(tempDir, v4_default()); + return path8.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -92869,8 +86282,8 @@ function isReservedToolsValue(tools) { } // src/tracer-config.ts -var fs13 = __toESM(require("fs")); -var path13 = __toESM(require("path")); +var fs10 = __toESM(require("fs")); +var path9 = __toESM(require("path")); async function shouldEnableIndirectTracing(codeql, config) { if (config.buildMode === "none" /* None */) { return false; @@ -92885,18 +86298,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 = path13.resolve( + const envVariablesFile = path9.resolve( config.dbLocation, "temp/tracingEnvironment/end-tracing.json" ); - if (!fs13.existsSync(envVariablesFile)) { + if (!fs10.existsSync(envVariablesFile)) { throw new Error( `Environment file for ending tracing not found: ${envVariablesFile}` ); } try { const endTracingEnvVariables = JSON.parse( - fs13.readFileSync(envVariablesFile, "utf8") + fs10.readFileSync(envVariablesFile, "utf8") ); for (const [key, value] of Object.entries(endTracingEnvVariables)) { if (value !== null) { @@ -92942,7 +86355,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path14.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path10.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -93004,12 +86417,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path14.join( + const tracingConfigPath = path10.join( extractorPath, "tools", "tracing-config.lua" ); - return fs14.existsSync(tracingConfigPath); + return fs11.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -93080,7 +86493,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path14.join( + const autobuildCmd = path10.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -93464,7 +86877,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs14.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs11.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -93487,7 +86900,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path14.resolve(config.tempDir, "user-config.yaml"); + return path10.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -93775,7 +87188,7 @@ function dbIsFinalized(config, language, logger) { const dbPath = getCodeQLDatabasePath(config, language); try { const dbInfo = load( - fs15.readFileSync(path16.resolve(dbPath, "codeql-database.yml"), "utf8") + fs12.readFileSync(path12.resolve(dbPath, "codeql-database.yml"), "utf8") ); return !("inProgress" in dbInfo); } catch { @@ -93841,10 +87254,10 @@ function writeDiffRangeDataExtensionPack(logger, ranges) { if (ranges.length === 0) { ranges = [{ path: "", startLine: 0, endLine: 0 }]; } - const diffRangeDir = path16.join(getTemporaryDirectory(), "pr-diff-range"); - fs15.mkdirSync(diffRangeDir, { recursive: true }); - fs15.writeFileSync( - path16.join(diffRangeDir, "qlpack.yml"), + const diffRangeDir = path12.join(getTemporaryDirectory(), "pr-diff-range"); + fs12.mkdirSync(diffRangeDir, { recursive: true }); + fs12.writeFileSync( + path12.join(diffRangeDir, "qlpack.yml"), ` name: codeql-action/pr-diff-range version: 0.0.0 @@ -93876,8 +87289,8 @@ extensions: data = ' - ["", 0, 0]\n'; } const extensionContents = header + data; - const extensionFilePath = path16.join(diffRangeDir, "pr-diff-range.yml"); - fs15.writeFileSync(extensionFilePath, extensionContents); + const extensionFilePath = path12.join(diffRangeDir, "pr-diff-range.yml"); + fs12.writeFileSync(extensionFilePath, extensionContents); logger.debug( `Wrote pr-diff-range extension pack to ${extensionFilePath}: ${extensionContents}` @@ -93997,7 +87410,7 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, if (analysis.kind === "code-quality" /* CodeQuality */) { category = analysis.fixCategory(logger, automationDetailsId); } - const sarifFile = path16.join( + const sarifFile = path12.join( sarifFolder, addSarifExtension(analysis, language) ); @@ -94027,7 +87440,7 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, } function getPerQueryAlertCounts(sarifPath) { const sarifObject = JSON.parse( - fs15.readFileSync(sarifPath, "utf8") + fs12.readFileSync(sarifPath, "utf8") ); const perQueryAlertCounts = {}; for (const sarifRun of sarifObject.runs) { @@ -94045,13 +87458,13 @@ async function runQueries(sarifFolder, memoryFlag, addSnippetsFlag, threadsFlag, } async function runFinalize(outputDir, threadsFlag, memoryFlag, codeql, config, logger) { try { - await deleteAsync(outputDir, { force: true }); + await fs12.promises.rm(outputDir, { force: true, recursive: true }); } catch (error2) { if (error2?.code !== "ENOENT") { throw error2; } } - await fs15.promises.mkdir(outputDir, { recursive: true }); + await fs12.promises.mkdir(outputDir, { recursive: true }); const timings = await finalizeDatabaseCreation( codeql, config, @@ -94094,7 +87507,7 @@ async function warnIfGoInstalledAfterInit(config, logger) { } // src/database-upload.ts -var fs16 = __toESM(require("fs")); +var fs13 = __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."); @@ -94131,8 +87544,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 = fs16.statSync(bundledDb).size; - const bundledDbReadStream = fs16.createReadStream(bundledDb); + const bundledDbSize = fs13.statSync(bundledDb).size; + const bundledDbReadStream = fs13.createReadStream(bundledDb); const commitOid = await getCommitOid( getRequiredInput("checkout_path") ); @@ -94346,15 +87759,15 @@ async function sendStatusReport(statusReport) { } // src/upload-lib.ts -var fs18 = __toESM(require("fs")); -var path18 = __toESM(require("path")); +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 jsonschema2 = __toESM(require_lib2()); // src/fingerprints.ts -var fs17 = __toESM(require("fs")); +var fs14 = __toESM(require("fs")); var import_path3 = __toESM(require("path")); // node_modules/long/index.js @@ -95342,7 +88755,7 @@ async function hash(callback, filepath) { } updateHash(current); }; - const readStream = fs17.createReadStream(filepath, "utf8"); + const readStream = fs14.createReadStream(filepath, "utf8"); for await (const data of readStream) { for (let i = 0; i < data.length; ++i) { processCharacter(data.charCodeAt(i)); @@ -95417,11 +88830,11 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { if (!import_path3.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } - if (!fs17.existsSync(uri)) { + if (!fs14.existsSync(uri)) { logger.debug(`Unable to compute fingerprint for non-existent file: ${uri}`); return void 0; } - if (fs17.statSync(uri).isDirectory()) { + if (fs14.statSync(uri).isDirectory()) { logger.debug(`Unable to compute fingerprint for directory: ${uri}`); return void 0; } @@ -95519,7 +88932,7 @@ function combineSarifFiles(sarifFiles, logger) { for (const sarifFile of sarifFiles) { logger.debug(`Loading SARIF file: ${sarifFile}`); const sarifObject = JSON.parse( - fs18.readFileSync(sarifFile, "utf8") + fs15.readFileSync(sarifFile, "utf8") ); if (combinedSarif.version === null) { combinedSarif.version = sarifObject.version; @@ -95591,7 +89004,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(fs18.readFileSync(sarifFile, "utf8")); + return JSON.parse(fs15.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"; @@ -95644,14 +89057,14 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - 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"); + 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"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); - return JSON.parse(fs18.readFileSync(outputFile, "utf8")); + return JSON.parse(fs15.readFileSync(outputFile, "utf8")); } function populateRunAutomationDetails(sarif, category, analysis_key, environment) { const automationID = getAutomationID2(category, analysis_key, environment); @@ -95680,7 +89093,7 @@ function getAutomationID2(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, analysis) { logger.info("Uploading results"); if (shouldSkipSarifUpload()) { - const payloadSaveFile = path18.join( + const payloadSaveFile = path14.join( getTemporaryDirectory(), `payload-${analysis.kind}.json` ); @@ -95688,7 +89101,7 @@ async function uploadPayload(payload, repositoryNwo, logger, analysis) { `SARIF upload disabled by an environment variable. Saving to ${payloadSaveFile}` ); logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`); - fs18.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); + fs15.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); return "dummy-sarif-id"; } const client = getApiClient(); @@ -95722,12 +89135,12 @@ async function uploadPayload(payload, repositoryNwo, logger, analysis) { function findSarifFilesInDir(sarifPath, isSarif) { const sarifFiles = []; const walkSarifFiles = (dir) => { - const entries = fs18.readdirSync(dir, { withFileTypes: true }); + const entries = fs15.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path18.resolve(dir, entry.name)); + sarifFiles.push(path14.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path18.resolve(dir, entry.name)); + walkSarifFiles(path14.resolve(dir, entry.name)); } } }; @@ -95735,11 +89148,11 @@ function findSarifFilesInDir(sarifPath, isSarif) { return sarifFiles; } function getSarifFilePaths(sarifPath, isSarif) { - if (!fs18.existsSync(sarifPath)) { + if (!fs15.existsSync(sarifPath)) { throw new ConfigurationError(`Path does not exist: ${sarifPath}`); } let sarifFiles; - if (fs18.lstatSync(sarifPath).isDirectory()) { + if (fs15.lstatSync(sarifPath).isDirectory()) { sarifFiles = findSarifFilesInDir(sarifPath, isSarif); if (sarifFiles.length === 0) { throw new ConfigurationError( @@ -95752,7 +89165,7 @@ function getSarifFilePaths(sarifPath, isSarif) { return sarifFiles; } async function getGroupedSarifFilePaths(logger, sarifPath) { - const stats = fs18.statSync(sarifPath, { throwIfNoEntry: false }); + const stats = fs15.statSync(sarifPath, { throwIfNoEntry: false }); if (stats === void 0) { throw new ConfigurationError(`Path does not exist: ${sarifPath}`); } @@ -95760,7 +89173,7 @@ async function getGroupedSarifFilePaths(logger, sarifPath) { if (stats.isDirectory()) { let unassignedSarifFiles = findSarifFilesInDir( sarifPath, - (name) => path18.extname(name) === ".sarif" + (name) => path14.extname(name) === ".sarif" ); logger.debug( `Found the following .sarif files in ${sarifPath}: ${unassignedSarifFiles.join(", ")}` @@ -95817,7 +89230,7 @@ function countResultsInSarif(sarif) { } function readSarifFile(sarifFilePath) { try { - return JSON.parse(fs18.readFileSync(sarifFilePath, "utf8")); + return JSON.parse(fs15.readFileSync(sarifFilePath, "utf8")); } catch (e) { throw new InvalidSarifUploadError( `Invalid SARIF. JSON syntax error: ${getErrorMessage(e)}` @@ -95886,7 +89299,7 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo payloadObj.base_sha = mergeBaseCommitOid; } else if (process.env.GITHUB_EVENT_PATH) { const githubEvent = JSON.parse( - fs18.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8") + fs15.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; @@ -96018,19 +89431,19 @@ async function uploadPostProcessedFiles(logger, checkoutPath, uploadTarget, post }; } function dumpSarifFile(sarifPayload, outputDir, logger, uploadTarget) { - if (!fs18.existsSync(outputDir)) { - fs18.mkdirSync(outputDir, { recursive: true }); - } else if (!fs18.lstatSync(outputDir).isDirectory()) { + if (!fs15.existsSync(outputDir)) { + fs15.mkdirSync(outputDir, { recursive: true }); + } else if (!fs15.lstatSync(outputDir).isDirectory()) { throw new ConfigurationError( `The path that processed SARIF files should be written to exists, but is not a directory: ${outputDir}` ); } - const outputFile = path18.resolve( + const outputFile = path14.resolve( outputDir, `upload${uploadTarget.sarifExtension}` ); logger.info(`Writing processed SARIF file to ${outputFile}`); - fs18.writeFileSync(outputFile, sarifPayload); + fs15.writeFileSync(outputFile, sarifPayload); } var STATUS_CHECK_FREQUENCY_MILLISECONDS = 5 * 1e3; var STATUS_CHECK_TIMEOUT_MILLISECONDS = 2 * 60 * 1e3; @@ -96173,7 +89586,7 @@ function filterAlertsByDiffRange(logger, sarif) { if (!locationUri || locationStartLine === void 0) { return false; } - const locationPath = path18.join(checkoutPath, locationUri).replaceAll(path18.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) ); @@ -96265,7 +89678,7 @@ function doesGoExtractionOutputExist(config) { "go" /* go */ ); const trapDirectory = import_path4.default.join(golangDbDirectory, "trap", "go" /* go */); - return fs19.existsSync(trapDirectory) && fs19.readdirSync(trapDirectory).some( + return fs16.existsSync(trapDirectory) && fs16.readdirSync(trapDirectory).some( (fileName) => [ ".trap", ".trap.gz", @@ -96593,52 +90006,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/autobuild-action.js b/lib/autobuild-action.js index 2a925939e7..9fa1117bad 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -26500,7 +26500,6 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.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/lib/init-action-post.js b/lib/init-action-post.js index 0ed7b0dd62..23fdb2c60b 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 fs20 = __importStar4(require("fs")); + var fs17 = __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 (!fs20.existsSync(filePath)) { + if (!fs17.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs20.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + fs17.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 path19 = 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 (path19 && !path19.startsWith("/")) { - path19 = `/${path19}`; + if (path15 && !path15.startsWith("/")) { + path15 = `/${path15}`; } - url2 = new URL(origin + path19); + 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(path19) { - if (typeof path19 !== "string") { + module2.exports = function basename(path15) { + if (typeof path15 !== "string") { return ""; } - for (var i = path19.length - 1; i >= 0; --i) { - switch (path19.charCodeAt(i)) { + for (var i = path15.length - 1; i >= 0; --i) { + switch (path15.charCodeAt(i)) { case 47: // '/' case 92: - path19 = path19.slice(i + 1); - return path19 === ".." || path19 === "." ? "" : path19; + path15 = path15.slice(i + 1); + return path15 === ".." || path15 === "." ? "" : path15; } } - return path19 === ".." || path19 === "." ? "" : path19; + return path15 === ".." || path15 === "." ? "" : path15; }; } }); @@ -2673,8 +2673,8 @@ var require_multipart = __commonJS({ } } function checkFinished() { - if (nends === 0 && finished2 && !boy._done) { - finished2 = false; + if (nends === 0 && finished && !boy._done) { + finished = false; self2.end(); } } @@ -2693,7 +2693,7 @@ var require_multipart = __commonJS({ let nends = 0; let curFile; let curField; - let finished2 = false; + let finished = 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() { - finished2 = true; + finished = true; checkFinished(); }); } @@ -5663,7 +5663,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path19, + path: path15, method, body, headers, @@ -5677,11 +5677,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path19 !== "string") { + if (typeof path15 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path19[0] !== "/" && !(path19.startsWith("http://") || path19.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(path19) !== 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(path19, query) : path19; + 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 path19 = 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 = path19; + 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: path19, 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} ${path19} 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: path19, 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] = path19; + 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 finished2 = false; + let finished = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { - if (finished2) { + if (finished) { return; } try { @@ -8325,7 +8325,7 @@ upgrade: ${upgrade}\r } }; const onDrain = function() { - if (finished2) { + if (finished) { return; } if (body.resume) { @@ -8333,17 +8333,17 @@ upgrade: ${upgrade}\r } }; const onAbort = function() { - if (finished2) { + if (finished) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); }; const onFinished = function(err) { - if (finished2) { + if (finished) { return; } - finished2 = true; + finished = 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 noop2 = () => { + var noop = () => { }; 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(); - }) : noop2; + }) : noop; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { @@ -9347,7 +9347,7 @@ var require_readable = __commonJS({ } else { resolve8(null); } - }).on("error", noop2).on("data", function(chunk) { + }).on("error", noop).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: finished2, PassThrough } = require("stream"); + var { finished, 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"); } - finished2(res, { readable: false }, (err) => { + finished(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(path19) { - if (typeof path19 !== "string") { - return path19; + function safeUrl(path15) { + if (typeof path15 !== "string") { + return path15; } - const pathSegments = path19.split("?"); + const pathSegments = path15.split("?"); if (pathSegments.length !== 2) { - return path19; + return path15; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path19, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path19); + 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: path19 }) => matchValue(safeUrl(path19), 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: path19, method, body, headers, query } = opts; + const { path: path15, method, body, headers, query } = opts; return { - path: path19, + 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: 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]); } @@ -10909,10 +10909,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path19, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path15, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path19, + Path: path15, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -15532,8 +15532,8 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path19) { - for (const char of path19) { + 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 path19 = opts.path; + let path15 = opts.path; if (!opts.path.startsWith("/")) { - path19 = `/${path19}`; + path15 = `/${path15}`; } - url2 = new URL(util.parseOrigin(url2).origin + path19); + 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 path19 = __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, path19.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 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; + 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; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs20.constants.O_RDONLY; + exports2.READONLY = fs17.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 isDirectory2(fsPath, useStat = false) { + function isDirectory(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 = isDirectory2; + exports2.isDirectory = isDirectory; 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 = path19.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 = path19.dirname(filePath); - const upperName = path19.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 = path19.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 path19 = __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 ? path19.join(dest, path19.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 (path19.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 = path19.join(dest, path19.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(path19.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(path19.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(path19.sep)) { + if (tool.includes(path15.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path19.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(path19.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 os3 = __importStar4(require("os")); var events = __importStar4(require("events")); var child = __importStar4(require("child_process")); - var path19 = __importStar4(require("path")); + var path15 = __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 = path19.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 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 path19 = __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}${path19.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path15.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 path19 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path19} 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; @@ -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(once2); + module2.exports = wrappy(once); module2.exports.strict = wrappy(onceStrict); - once2.proto = once2(function() { + once.proto = once(function() { Object.defineProperty(Function.prototype, "once", { value: function() { - return once2(this); + return once(this); }, configurable: true }); @@ -20545,7 +20545,7 @@ var require_once = __commonJS({ configurable: true }); }); - function once2(fn) { + function once(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 noop2 = () => { + var noop = () => { }; 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: noop2, - info: noop2, + debug: noop, + info: noop, warn: consoleWarn, error: consoleError }, @@ -24525,5857 +24525,8 @@ var require_github = __commonJS({ } }); -// 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 os3 = require("os"); - 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; - 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 path19.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 isGlob2(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 isGlob2 = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash2 = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str2, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash2) < 0) { - str2 = str2.replace(backslash, slash2); - } - if (enclosure.test(str2)) { - str2 += slash2; - } - str2 += "a"; - do { - str2 = pathPosixDirname(str2); - } while (isGlob2(str2) || globby2.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(compare3); - 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 compare3(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 = (toNumber2) => { - return (value) => toNumber2 === 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, toNumber2) => { - if (maxLength > 0) { - let dash = input[0] === "-" ? "-" : ""; - if (dash) input = input.slice(1); - input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); - } - if (toNumber2 === 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 toNumber2 = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber2); - 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, toNumber2)); - } - 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 path19 = 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: path19.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 path19 = 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 || path19.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 isGlob2 = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished2 = 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; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA2) { - isBrace = token.isBrace = true; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished2 = 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 (finished2 === 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) { - isGlob2 = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished2 = 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) { - isGlob2 = token.isGlob = true; - finished2 = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob2 = token.isGlob = true; - finished2 = 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; - isGlob2 = token.isGlob = true; - finished2 = 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) { - isGlob2 = 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) { - finished2 = true; - break; - } - } - continue; - } - break; - } - if (isGlob2 === true) { - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob2 = false; - } - let base = str2; - let prefix = ""; - let glob2 = ""; - if (start > 0) { - prefix = str2.slice(0, start); - str2 = str2.slice(start); - lastIndex -= start; - } - if (base && isGlob2 === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob2 = str2.slice(lastIndex); - } else if (isGlob2 === 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: isGlob2, - 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 negate2 = () => { - 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) { - negate2(); - 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 path19 = 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(path19.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 path19 = 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 !isDynamicPattern2(pattern, options); - } - exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern2(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 = isDynamicPattern2; - 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 isNegativePattern2(pattern) ? pattern.slice(1) : pattern; - } - exports2.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern2(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports2.isNegativePattern = isNegativePattern2; - function isPositivePattern(pattern) { - return !isNegativePattern2(pattern); - } - exports2.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern2); - } - 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 = path19.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 relative2 = []; - for (const pattern of patterns) { - if (isAbsolute2(pattern)) { - absolute.push(pattern); - } else { - relative2.push(pattern); - } - } - return [absolute, relative2]; - } - exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; - function isAbsolute2(pattern) { - return path19.isAbsolute(pattern); - } - exports2.isAbsolute = isAbsolute2; - } -}); - -// 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) { - "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((stream2) => { - stream2.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((stream2) => stream2.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 fs20 = require_fs(); - exports2.fs = fs20; - var path19 = require_path(); - exports2.path = path19; - var pattern = require_pattern(); - exports2.pattern = pattern; - var stream2 = require_stream(); - exports2.stream = stream2; - 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(path19, settings, callback) { - settings.fs.lstat(path19, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path19, (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(path19, settings) { - const lstat = settings.fs.lstatSync(path19); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path19); - 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 fs20 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs20.lstat, - stat: fs20.stat, - lstatSync: fs20.lstatSync, - statSync: fs20.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 fs20 = require_fs2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs20.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(path19, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path19, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path19, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.stat = stat; - function statSync3(path19, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path19, settings); - } - exports2.statSync = statSync3; - 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 fs20 = require_fs3(); - exports2.fs = fs20; - } -}); - -// 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 path19 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path19, settings.fsStatSettings, (error2, stats) => { - if (error2 !== null) { - done(error2); - return; - } - const entry = { - name, - path: path19, - 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 fs20 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - 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) { - 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 path19 = require("path"); - var fsStat = require_out(); - var fs20 = require_fs4(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - 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({ - 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(path19, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path19, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path19, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.scandir = scandir; - function scandirSync(path19, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path19, 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(context3, worker, concurrency) { - if (typeof context3 === "function") { - concurrency = worker; - worker = context3; - context3 = null; - } - var cache = reusify(Task); - var queueHead = null; - var queueTail = null; - var _running = 0; - var self2 = { - push, - drain: noop2, - saturated: noop2, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop2, - 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 = context3; - current.release = release3; - current.value = value; - current.callback = done || noop2; - if (_running === self2.concurrency || self2.paused) { - if (queueTail) { - queueTail.next = current; - queueTail = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context3, current.value, current.worked); - } - } - function unshift(value, done) { - var current = cache.get(); - current.context = context3; - current.release = release3; - current.value = value; - current.callback = done || noop2; - if (_running === self2.concurrency || self2.paused) { - if (queueHead) { - current.next = queueHead; - queueHead = current; - } else { - queueHead = current; - queueTail = current; - self2.saturated(); - } - } else { - _running++; - worker.call(context3, 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(context3, 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 = noop2; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self2.drain(); - self2.drain = noop2; - } - } - function noop2() { - } - function Task() { - this.value = null; - this.callback = noop2; - this.next = null; - this.release = noop2; - this.context = null; - var self2 = this; - this.worked = function worked(err, result) { - var callback = self2.callback; - self2.value = null; - self2.callback = noop2; - 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 path19 = 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, path19.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 path19 = 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 path19.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 stream2 = new stream_1.PassThrough({ objectMode: true }); - stream2._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream2.push(entry); - } - if (index === filepaths.length - 1) { - stream2.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream2.write(i); - } - return stream2; - } - _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((resolve8, reject) => { - this._stat(filepath, this._fsStatSettings, (error2, stats) => { - return error2 === null ? resolve8(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((resolve8, reject) => { - this._walkAsync(root, options, (error2, entries) => { - if (error2 === null) { - resolve8(entries); - } else { - reject(error2); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream2 = this._readerStream.static(patterns, options); - return new Promise((resolve8, reject) => { - stream2.once("error", reject); - stream2.on("data", (entry) => entries.push(entry)); - stream2.once("end", () => resolve8(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, isDirectory2) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory2) { - if (patternsRe.length === 0) { - return false; - } - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory2) { - 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 path19 = 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 path19.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 fs20 = require("fs"); - var os3 = require("os"); - var CPU_COUNT = Math.max(os3.cpus().length, 1); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs20.lstat, - lstatSync: fs20.lstatSync, - stat: fs20.stat, - statSync: fs20.statSync, - readdir: fs20.readdir, - readdirSync: fs20.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) { - assertPatternsInput2(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 = stream2; - FastGlob2.async = FastGlob2; - function sync(source, options) { - assertPatternsInput2(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream2(source, options) { - assertPatternsInput2(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream2; - function generateTasks2(source, options) { - assertPatternsInput2(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks2; - function isDynamicPattern2(source, options) { - assertPatternsInput2(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern2; - function escapePath(source) { - assertPatternsInput2(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - function convertPathToPattern2(source) { - assertPatternsInput2(source); - return utils.path.convertPathToPattern(source); - } - FastGlob2.convertPathToPattern = convertPathToPattern2; - let posix; - (function(posix2) { - function escapePath2(source) { - assertPatternsInput2(source); - return utils.path.escapePosixPath(source); - } - posix2.escapePath = escapePath2; - function convertPathToPattern3(source) { - assertPatternsInput2(source); - return utils.path.convertPosixPathToPattern(source); - } - posix2.convertPathToPattern = convertPathToPattern3; - })(posix = FastGlob2.posix || (FastGlob2.posix = {})); - let win32; - (function(win322) { - function escapePath2(source) { - assertPatternsInput2(source); - return utils.path.escapeWindowsPath(source); - } - win322.escapePath = escapePath2; - function convertPathToPattern3(source) { - assertPatternsInput2(source); - return utils.path.convertWindowsPathToPattern(source); - } - win322.convertPathToPattern = convertPathToPattern3; - })(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 assertPatternsInput2(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/globby/node_modules/ignore/index.js -var require_ignore = __commonJS({ - "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 = "\\"; - 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 = /^\.{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 }); - return 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) - // (a \ ) -> (a ) - /((?:\\\\)*?)(\\?\s+)$/, - (_2, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY) - ], - // Replace (\ ) with ' ' - // (\ ) -> ' ' - // (\\ ) -> '\\ ' - // (\\\ ) -> '\\ ' - [ - /(\\+?)\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. - // > 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}(?=$|\\/$)` - ] - ]; - 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}(?=$|\\/$)`; - } - }; - 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).filter(Boolean); - var IgnoreRule = class { - constructor(pattern, mark, body, ignoreCase, negative, prefix) { - this.pattern = pattern; - this.mark = mark; - this.negative = negative; - 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, - mark - }, ignoreCase) => { - let negative = false; - let body = pattern; - if (body.indexOf("!") === 0) { - negative = true; - body = body.substr(1); - } - body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regexPrefix = makeRegexPrefix(body); - return new IgnoreRule( - pattern, - mark, - body, - ignoreCase, - negative, - regexPrefix - ); - }; - var RuleManager = class { - constructor(ignoreCase) { - this._ignoreCase = ignoreCase; - this._rules = []; - } - _add(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules._rules); - this._added = true; - return; - } - if (isString(pattern)) { - pattern = { - pattern - }; - } - if (checkPattern(pattern.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._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; - } - // legacy - addPattern(pattern) { - return this.add(pattern); - } - // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { - const path19 = originalPath && checkPath.convert(originalPath); - checkPath( - path19, - originalPath, - this._strictPathCheck ? throwError2 : RETURN_FALSE - ); - return this._t(path19, cache, checkUnignored, slices); - } - 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 = path19.split(SLASH).filter(Boolean); - } - slices.pop(); - if (!slices.length) { - return cache[path19] = this._rules.test(path19, checkUnignored, MODE_IGNORE); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path19] = parent.ignored ? parent : this._rules.test(path19, checkUnignored, MODE_IGNORE); - } - ignores(path19) { - return this._test(path19, this._ignoreCache, false).ignored; - } - createFilter() { - return (path19) => !this.ignores(path19); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path19) { - return this._test(path19, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - 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 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); - } -}); - // 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"; @@ -30424,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 = []; @@ -30553,7 +24704,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(); @@ -30828,7 +24979,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(); @@ -30853,7 +25004,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; @@ -30866,7 +25017,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; @@ -30903,7 +25054,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); @@ -30977,7 +25128,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; @@ -31165,7 +25316,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) { @@ -31401,7 +25552,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) => { @@ -32214,10 +26365,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(); @@ -32349,7 +26500,6 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -32570,7 +26720,7 @@ var require_light = __commonJS({ } } async trigger(name, ...args) { - var e, promises3; + var e, promises5; try { if (name !== "debug") { this.trigger("debug", `Event triggered: ${name}`, args); @@ -32581,7 +26731,7 @@ var require_light = __commonJS({ this._events[name] = this._events[name].filter(function(listener) { return listener.status !== "none"; }); - promises3 = this._events[name].map(async (listener) => { + promises5 = this._events[name].map(async (listener) => { var e2, returned; if (listener.status === "none") { return; @@ -32604,7 +26754,7 @@ var require_light = __commonJS({ return null; } }); - return (await Promise.all(promises3)).find(function(x) { + return (await Promise.all(promises5)).find(function(x) { return x != null; }); } catch (error2) { @@ -33505,18 +27655,18 @@ var require_light = __commonJS({ var done, waitForExecuting; options = parser$5.load(options, this.stopDefaults); waitForExecuting = (at) => { - var finished2; - finished2 = () => { + var finished; + finished = () => { var counts; counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; return new this.Promise((resolve8, reject) => { - if (finished2()) { + if (finished()) { return resolve8(); } else { return this.on("done", () => { - if (finished2()) { + if (finished()) { this.removeAllListeners("done"); return resolve8(); } @@ -33943,7 +28093,7 @@ var require_console_log_level = __commonJS({ "use strict"; var util = require("util"); var levels = ["trace", "debug", "info", "warn", "error", "fatal"]; - var noop2 = function() { + var noop = function() { }; module2.exports = function(opts) { opts = opts || {}; @@ -33953,7 +28103,7 @@ var require_console_log_level = __commonJS({ return levels.indexOf(level) >= levels.indexOf(opts.level); }; levels.forEach(function(level) { - logger[level] = shouldLog(level) ? log : noop2; + logger[level] = shouldLog(level) ? log : noop; function log() { var prefix = opts.prefix; var normalizedLevel; @@ -33991,14 +28141,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, path19, name, argument) { - if (Array.isArray(path19)) { - this.path = path19; - this.property = path19.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 (path19 !== void 0) { - this.property = path19; + } else if (path15 !== void 0) { + this.property = path15; } if (message) { this.message = message; @@ -34089,16 +28239,16 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path19, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path15, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path19)) { - this.path = path19; - this.propertyPath = path19.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 = path19; + this.propertyPath = path15; } this.base = base; this.schemas = schemas; @@ -34107,10 +28257,10 @@ var require_helpers = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path19 = 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, path19, 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; } @@ -34975,7 +29125,7 @@ var require_attribute = __commonJS({ }); // node_modules/jsonschema/lib/scan.js -var require_scan2 = __commonJS({ +var require_scan = __commonJS({ "node_modules/jsonschema/lib/scan.js"(exports2, module2) { "use strict"; var urilib = require("url"); @@ -35049,7 +29199,7 @@ var require_validator = __commonJS({ var urilib = require("url"); var attribute = require_attribute(); var helpers = require_helpers(); - var scanSchema = require_scan2().scan; + var scanSchema = require_scan().scan; var ValidatorResult = helpers.ValidatorResult; var ValidatorResultError = helpers.ValidatorResultError; var SchemaError = helpers.SchemaError; @@ -35274,8 +29424,8 @@ var require_lib2 = __commonJS({ module2.exports.ValidatorResultError = require_helpers().ValidatorResultError; module2.exports.ValidationError = require_helpers().ValidationError; module2.exports.SchemaError = require_helpers().SchemaError; - module2.exports.SchemaScanResult = require_scan2().SchemaScanResult; - module2.exports.scan = require_scan2().scan; + module2.exports.SchemaScanResult = require_scan().SchemaScanResult; + module2.exports.scan = require_scan().scan; module2.exports.validate = function(instance, schema2, options) { var v = new Validator3(); return v.validate(instance, schema2, options); @@ -35371,7 +29521,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 path19 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -35379,7 +29529,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path19.dirname(p); + let result = path15.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -35417,7 +29567,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 += path19.sep; + root += path15.sep; } return root + itemPath; } @@ -35455,10 +29605,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path19.sep)) { + if (!p.endsWith(path15.sep)) { return p; } - if (p === path19.sep) { + if (p === path15.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -35791,7 +29941,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path19 = (function() { + var path15 = (function() { try { return require("path"); } catch (e) { @@ -35799,7 +29949,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path19.sep; + minimatch.sep = path15.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { @@ -35888,8 +30038,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path19.sep !== "/") { - pattern = pattern.split(path19.sep).join("/"); + if (!options.allowWindowsEscape && path15.sep !== "/") { + pattern = pattern.split(path15.sep).join("/"); } this.options = options; this.set = []; @@ -36258,8 +30408,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path19.sep !== "/") { - f = f.split(path19.sep).join("/"); + if (path15.sep !== "/") { + f = f.split(path15.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -36391,7 +30541,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path19 = __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"; @@ -36406,12 +30556,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(path19.sep); + this.segments = itemPath.split(path15.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path19.basename(remaining); + const basename = path15.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -36429,7 +30579,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(path19.sep), `Parameter 'itemPath' contains unexpected path separators`); + assert_1.default(!segment.includes(path15.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -36440,12 +30590,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path19.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 += path19.sep; + result += path15.sep; } result += this.segments[i]; } @@ -36489,7 +30639,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os3 = __importStar4(require("os")); - var path19 = __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(); @@ -36518,7 +30668,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(path19.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 === "")); @@ -36542,8 +30692,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path19.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path19.sep}`; + if (!itemPath.endsWith(path15.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path15.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -36578,9 +30728,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(`.${path19.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path15.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path19.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path15.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}'`); @@ -36664,8 +30814,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path19, level) { - this.path = path19; + constructor(path15, level) { + this.path = path15; this.level = level; } }; @@ -36785,9 +30935,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core18 = __importStar4(require_core()); - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path19 = __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(); @@ -36837,7 +30987,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core18.debug(`Search path '${searchPath}'`); try { - yield __await4(fs20.promises.lstat(searchPath)); + yield __await4(fs17.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -36868,7 +31018,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs20.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path19.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs17.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); @@ -36903,7 +31053,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs20.promises.stat(item.path); + stats = yield fs17.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -36915,10 +31065,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs20.promises.lstat(item.path); + stats = yield fs17.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs20.promises.realpath(item.path); + const realPath = yield fs17.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -38136,7 +32286,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 }); @@ -38252,11 +32402,11 @@ var require_cacheUtils = __commonJS({ var glob2 = __importStar4(require_glob()); var io7 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs20 = __importStar4(require("fs")); - var path19 = __importStar4(require("path")); + var fs17 = __importStar4(require("fs")); + var path15 = __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* () { @@ -38273,16 +32423,16 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path19.join(baseLocation, "actions", "temp"); + tempDirectory = path15.join(baseLocation, "actions", "temp"); } - const dest = path19.join(tempDirectory, crypto.randomUUID()); + const dest = path15.join(tempDirectory, crypto.randomUUID()); yield io7.mkdirP(dest); return dest; }); } exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs20.statSync(filePath).size; + return fs17.statSync(filePath).size; } exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { @@ -38299,7 +32449,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path19.relative(workspace, file).replace(new RegExp(`\\${path19.sep}`, "g"), "/"); + const relativeFile = path15.relative(workspace, file).replace(new RegExp(`\\${path15.sep}`, "g"), "/"); core18.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -38322,7 +32472,7 @@ var require_cacheUtils = __commonJS({ exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { return __awaiter4(this, void 0, void 0, function* () { - return util.promisify(fs20.unlink)(filePath); + return util.promisify(fs17.unlink)(filePath); }); } exports2.unlinkFile = unlinkFile; @@ -38367,7 +32517,7 @@ var require_cacheUtils = __commonJS({ exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { return __awaiter4(this, void 0, void 0, function* () { - if (fs20.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs17.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -38934,7 +33084,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 }); @@ -39096,7 +33246,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; } }); @@ -39873,13 +34023,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 process6 = tslib_1.__importStar(require("node:process")); + var process2 = tslib_1.__importStar(require("node:process")); function getHeaderName() { return "User-Agent"; } async function setPlatformSpecificData(map2) { - if (process6 && process6.versions) { - const versions = process6.versions; + if (process2 && process2.versions) { + const versions = process2.versions; if (versions.bun) { map2.set("Bun", versions.bun); } else if (versions.deno) { @@ -39894,7 +34044,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 }); @@ -39912,7 +34062,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) { @@ -40441,7 +34591,7 @@ var require_retryPolicy = __commonJS({ var helpers_js_1 = require_helpers2(); 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 }) { @@ -40538,7 +34688,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; @@ -40847,7 +34997,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common3 = __commonJS({ +var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -41181,7 +35331,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common3()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -41469,7 +35619,7 @@ var require_node = __commonJS({ debug3.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common3()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -42540,7 +36690,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(); @@ -43057,7 +37207,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; @@ -43079,7 +37229,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; @@ -43104,7 +37254,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; @@ -44856,7 +39006,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 }); @@ -44931,7 +39081,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; @@ -46205,15 +40355,15 @@ var require_urlHelpers = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path19 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path19.startsWith("/")) { - path19 = path19.substring(1); + let path15 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path15.startsWith("/")) { + path15 = path15.substring(1); } - if (isAbsoluteUrl(path19)) { - requestUrl = path19; + if (isAbsoluteUrl(path15)) { + requestUrl = path15; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path19); + requestUrl = appendPath(requestUrl, path15); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -46261,9 +40411,9 @@ var require_urlHelpers = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path19 = pathToAppend.substring(0, searchStart); + const path15 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path19; + newPath = newPath + path15; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -46409,7 +40559,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(); @@ -50140,7 +44290,7 @@ var require_dist7 = __commonJS({ var stream2 = require("stream"); var coreLro = require_dist6(); var events = require("events"); - var fs20 = require("fs"); + var fs17 = require("fs"); var util = require("util"); var buffer = require("buffer"); function _interopNamespaceDefault(e) { @@ -50163,7 +44313,7 @@ var require_dist7 = __commonJS({ } var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs20); + var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs17); var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); var logger = logger$1.createClientLogger("storage-blob"); var BaseRequestPolicy = class { @@ -50412,10 +44562,10 @@ var require_dist7 = __commonJS({ ]; function escapeURLPath(url3) { const urlParsed = new URL(url3); - let path19 = urlParsed.pathname; - path19 = path19 || "/"; - path19 = escape(path19); - urlParsed.pathname = path19; + let path15 = urlParsed.pathname; + path15 = path15 || "/"; + path15 = escape(path15); + urlParsed.pathname = path15; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -50500,9 +44650,9 @@ var require_dist7 = __commonJS({ } function appendToURLPath(url3, name) { const urlParsed = new URL(url3); - let path19 = urlParsed.pathname; - path19 = path19 ? path19.endsWith("/") ? `${path19}${name}` : `${path19}/${name}` : name; - urlParsed.pathname = path19; + let path15 = urlParsed.pathname; + path15 = path15 ? path15.endsWith("/") ? `${path15}${name}` : `${path15}/${name}` : name; + urlParsed.pathname = path15; return urlParsed.toString(); } function setURLParameter(url3, name, value) { @@ -51583,9 +45733,9 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path19 = getURLPath(request.url) || "/"; + const path15 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path19}`; + canonicalizedResourceString += `/${this.factory.accountName}${path15}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -51878,9 +46028,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path19 = getURLPath(request.url) || "/"; + const path15 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path19}`; + canonicalizedResourceString += `/${options.accountName}${path15}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -71182,8 +65332,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 path19 = getURLPath(subRequest.url); - if (!path19 || path19 === "") { + const path15 = getURLPath(subRequest.url); + if (!path15 || path15 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -71243,8 +65393,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; pipeline = newPipeline(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); - const path19 = getURLPath(url3); - if (path19 && path19 !== "/") { + const path15 = getURLPath(url3); + if (path15 && path15 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -73841,7 +67991,7 @@ var require_requestUtils = __commonJS({ exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; var core18 = __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; @@ -74011,11 +68161,11 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var stream2 = __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) { @@ -74122,7 +68272,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter4(this, void 0, void 0, function* () { - const writeStream = fs20.createWriteStream(archivePath); + const writeStream = fs17.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); @@ -74148,7 +68298,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { var _a; return __awaiter4(this, void 0, void 0, function* () { - const archiveDescriptor = yield fs20.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs17.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -74265,7 +68415,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs20.openSync(archivePath, "w"); + const fd = fs17.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -74283,12 +68433,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)) { - fs20.writeFileSync(fd, result); + fs17.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs20.closeSync(fd); + fs17.closeSync(fd); } } }); @@ -74587,7 +68737,7 @@ var require_cacheHttpClient = __commonJS({ var core18 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var url_1 = require("url"); var utils = __importStar4(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -74725,7 +68875,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 = fs20.openSync(archivePath, "r"); + const fd = fs17.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -74739,7 +68889,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs20.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs17.createReadStream(archivePath, { fd, start, end, @@ -74750,7 +68900,7 @@ Other caches with similar key:`); } }))); } finally { - fs20.closeSync(fd); + fs17.closeSync(fd); } return; }); @@ -79994,9 +74144,9 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io7 = __importStar4(require_io()); var fs_1 = require("fs"); - var path19 = __importStar4(require("path")); + var path15 = __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* () { @@ -80040,13 +74190,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(`\\${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); + 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(`\\${path19.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path19.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(`\\${path19.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) { @@ -80092,7 +74242,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -80101,7 +74251,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path19.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path15.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -80116,7 +74266,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -80125,7 +74275,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path19.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path15.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -80165,7 +74315,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)(path19.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); }); @@ -80235,7 +74385,7 @@ var require_cache3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; var core18 = __importStar4(require_core()); - var path19 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); @@ -80332,7 +74482,7 @@ var require_cache3 = __commonJS({ core18.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path19.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core18.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core18.isDebug()) { @@ -80401,7 +74551,7 @@ var require_cache3 = __commonJS({ core18.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path19.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path15.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); @@ -80464,7 +74614,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 = path19.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core18.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -80528,7 +74678,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 = path19.join(archiveFolder, utils.getCacheFileName(compressionMethod)); + const archivePath = path15.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core18.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -80666,7 +74816,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os3 = require("os"); var cp = require("child_process"); - var fs20 = require("fs"); + var fs17 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter4(this, void 0, void 0, function* () { const platFilter = os3.platform(); @@ -80730,10 +74880,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs20.existsSync(lsbReleaseFile)) { - contents = fs20.readFileSync(lsbReleaseFile).toString(); - } else if (fs20.existsSync(osReleaseFile)) { - contents = fs20.readFileSync(osReleaseFile).toString(); + if (fs17.existsSync(lsbReleaseFile)) { + contents = fs17.readFileSync(lsbReleaseFile).toString(); + } else if (fs17.existsSync(osReleaseFile)) { + contents = fs17.readFileSync(osReleaseFile).toString(); } return contents; } @@ -80910,10 +75060,10 @@ var require_tool_cache = __commonJS({ var core18 = __importStar4(require_core()); var io7 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); var os3 = __importStar4(require("os")); - var path19 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var httpm = __importStar4(require_lib()); var semver8 = __importStar4(require_semver2()); var stream2 = __importStar4(require("stream")); @@ -80934,8 +75084,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 || path19.join(_getTempDirectory(), crypto.randomUUID()); - yield io7.mkdirP(path19.dirname(dest)); + dest = dest || path15.join(_getTempDirectory(), crypto.randomUUID()); + yield io7.mkdirP(path15.dirname(dest)); core18.debug(`Downloading ${url2}`); core18.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -80957,7 +75107,7 @@ var require_tool_cache = __commonJS({ exports2.downloadTool = downloadTool2; function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - if (fs20.existsSync(dest)) { + if (fs17.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { @@ -80981,7 +75131,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs20.createWriteStream(dest)); + yield pipeline(readStream, fs17.createWriteStream(dest)); core18.debug("download complete"); succeeded = true; return dest; @@ -81022,7 +75172,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path19.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}'`; @@ -81193,12 +75343,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os3.arch(); core18.debug(`Caching tool ${tool} ${version} ${arch2}`); core18.debug(`source dir: ${sourceDir}`); - if (!fs20.statSync(sourceDir).isDirectory()) { + if (!fs17.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs20.readdirSync(sourceDir)) { - const s = path19.join(sourceDir, itemName); + for (const itemName of fs17.readdirSync(sourceDir)) { + const s = path15.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -81212,11 +75362,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os3.arch(); core18.debug(`Caching tool ${tool} ${version} ${arch2}`); core18.debug(`source file: ${sourceFile}`); - if (!fs20.statSync(sourceFile).isFile()) { + if (!fs17.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path19.join(destFolder, targetFile); + const destPath = path15.join(destFolder, targetFile); core18.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -81240,9 +75390,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; - const cachePath = path19.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path15.join(_getCacheDirectory(), toolName, versionSpec, arch2); core18.debug(`checking cache: ${cachePath}`); - if (fs20.existsSync(cachePath) && fs20.existsSync(`${cachePath}.complete`)) { + if (fs17.existsSync(cachePath) && fs17.existsSync(`${cachePath}.complete`)) { core18.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -81255,13 +75405,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os3.arch(); - const toolPath = path19.join(_getCacheDirectory(), toolName); - if (fs20.existsSync(toolPath)) { - const children = fs20.readdirSync(toolPath); + const toolPath = path15.join(_getCacheDirectory(), toolName); + if (fs17.existsSync(toolPath)) { + const children = fs17.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path19.join(toolPath, child, arch2 || ""); - if (fs20.existsSync(fullPath) && fs20.existsSync(`${fullPath}.complete`)) { + const fullPath = path15.join(toolPath, child, arch2 || ""); + if (fs17.existsSync(fullPath) && fs17.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -81315,7 +75465,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter4(this, void 0, void 0, function* () { if (!dest) { - dest = path19.join(_getTempDirectory(), crypto.randomUUID()); + dest = path15.join(_getTempDirectory(), crypto.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -81323,7 +75473,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { - const folderPath = path19.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path15.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core18.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -81333,9 +75483,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path19.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path15.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs20.writeFileSync(markerPath, ""); + fs17.writeFileSync(markerPath, ""); core18.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -81512,7 +75662,7 @@ var require_follow_redirects = __commonJS({ "ERR_STREAM_WRITE_AFTER_END", "write after end" ); - var destroy = Writable.prototype.destroy || noop2; + var destroy = Writable.prototype.destroy || noop; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); @@ -81841,7 +75991,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop2() { + function noop() { } function parseUrl(input) { var parsed; @@ -81917,7 +76067,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.removeListener(event, eventHandlers[event]); } - request.on("error", noop2); + request.on("error", noop); request.destroy(error2); } function isSubdomain(subdomain, domain) { @@ -84108,13 +78258,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(path19) { - if (!path19) { + function validateFilePath(path15) { + if (!path15) { throw new Error(`Provided file path input during validation is empty`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - 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} + 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} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -84494,15 +78644,15 @@ var require_upload_zip_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUploadZipSpecification = exports2.validateRootDirectory = void 0; - var fs20 = __importStar4(require("fs")); + var fs17 = __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 (!fs20.existsSync(rootDirectory)) { + if (!fs17.existsSync(rootDirectory)) { throw new Error(`The provided rootDirectory ${rootDirectory} does not exist`); } - if (!fs20.statSync(rootDirectory).isDirectory()) { + if (!fs17.statSync(rootDirectory).isDirectory()) { throw new Error(`The provided rootDirectory ${rootDirectory} is not a valid directory`); } (0, core_1.info)(`Root directory input is valid!`); @@ -84513,7 +78663,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 = fs20.lstatSync(file, { throwIfNoEntry: false }); + const stats = fs17.lstatSync(file, { throwIfNoEntry: false }); if (!stats) { throw new Error(`File ${file} does not exist`); } @@ -84811,7 +78961,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: "/" }; @@ -84979,8 +79129,8 @@ var require_minimatch2 = __commonJS({ return new Minimatch(pattern, options).match(p); }; module2.exports = minimatch; - var path19 = require_path2(); - minimatch.sep = path19.sep; + var path15 = require_path(); + minimatch.sep = path15.sep; var GLOBSTAR = Symbol("globstar **"); minimatch.GLOBSTAR = GLOBSTAR; var expand = require_brace_expansion2(); @@ -85489,8 +79639,8 @@ var require_minimatch2 = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; const options = this.options; - if (path19.sep !== "/") { - f = f.split(path19.sep).join("/"); + if (path15.sep !== "/") { + f = f.split(path15.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -85528,13 +79678,13 @@ var require_minimatch2 = __commonJS({ var require_readdir_glob = __commonJS({ "node_modules/readdir-glob/index.js"(exports2, module2) { module2.exports = readdirGlob; - var fs20 = require("fs"); + var fs17 = require("fs"); var { EventEmitter } = require("events"); var { Minimatch } = require_minimatch2(); var { resolve: resolve8 } = require("path"); function readdir(dir, strict) { return new Promise((resolve9, reject) => { - fs20.readdir(dir, { withFileTypes: true }, (err, files) => { + fs17.readdir(dir, { withFileTypes: true }, (err, files) => { if (err) { switch (err.code) { case "ENOTDIR": @@ -85567,7 +79717,7 @@ var require_readdir_glob = __commonJS({ } function stat(file, followSymlinks) { return new Promise((resolve9, reject) => { - const statFunc = followSymlinks ? fs20.stat : fs20.lstat; + const statFunc = followSymlinks ? fs17.stat : fs17.lstat; statFunc(file, (err, stats) => { if (err) { switch (err.code) { @@ -85588,8 +79738,8 @@ var require_readdir_glob = __commonJS({ }); }); } - async function* exploreWalkAsync(dir, path19, followSymlinks, useStat, shouldSkip, strict) { - let files = await readdir(path19 + dir, strict); + async function* exploreWalkAsync(dir, path15, followSymlinks, useStat, shouldSkip, strict) { + let files = await readdir(path15 + dir, strict); for (const file of files) { let name = file.name; if (name === void 0) { @@ -85598,7 +79748,7 @@ var require_readdir_glob = __commonJS({ } const filename = dir + "/" + name; const relative2 = filename.slice(1); - const absolute = path19 + "/" + relative2; + const absolute = path15 + "/" + relative2; let stats = null; if (useStat || followSymlinks) { stats = await stat(absolute, followSymlinks); @@ -85612,15 +79762,15 @@ var require_readdir_glob = __commonJS({ if (stats.isDirectory()) { if (!shouldSkip(relative2)) { yield { relative: relative2, absolute, stats }; - yield* exploreWalkAsync(filename, path19, followSymlinks, useStat, shouldSkip, false); + yield* exploreWalkAsync(filename, path15, followSymlinks, useStat, shouldSkip, false); } } else { yield { relative: relative2, absolute, stats }; } } } - async function* explore(path19, followSymlinks, useStat, shouldSkip) { - yield* exploreWalkAsync("", path19, followSymlinks, useStat, shouldSkip, true); + async function* explore(path15, followSymlinks, useStat, shouldSkip) { + yield* exploreWalkAsync("", path15, followSymlinks, useStat, shouldSkip, true); } function readOptions(options) { return { @@ -85688,19 +79838,19 @@ var require_readdir_glob = __commonJS({ _shouldSkipDirectory(relative2) { return this.skipMatchers.some((m) => m.match(relative2)); } - _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); + _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); } _next() { if (!this.paused && !this.aborted) { this.iterator.next().then((obj) => { if (!obj.done) { - const isDirectory2 = obj.value.stats.isDirectory(); - if (this._fileMatches(obj.value.relative, isDirectory2)) { + const isDirectory = obj.value.stats.isDirectory(); + if (this._fileMatches(obj.value.relative, isDirectory)) { let relative2 = obj.value.relative; let absolute = obj.value.absolute; - if (this.options.mark && isDirectory2) { + if (this.options.mark && isDirectory) { relative2 += "/"; absolute += "/"; } @@ -85747,7 +79897,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 = {})); @@ -85880,7 +80030,7 @@ var require_async7 = __commonJS({ return value && typeof value.length === "number" && value.length >= 0 && value.length % 1 === 0; } const breakLoop = {}; - function once2(fn) { + function once(fn) { function wrapper(...args) { if (fn === null) return; var callFn = fn; @@ -85987,7 +80137,7 @@ var require_async7 = __commonJS({ } var eachOfLimit$2 = (limit) => { return (obj, iteratee, callback) => { - callback = once2(callback); + callback = once(callback); if (limit <= 0) { throw new RangeError("concurrency limit cannot be less than 1"); } @@ -86045,7 +80195,7 @@ var require_async7 = __commonJS({ } var eachOfLimit$1 = awaitify(eachOfLimit, 4); function eachOfArrayLike(coll, iteratee, callback) { - callback = once2(callback); + callback = once(callback); var index2 = 0, completed = 0, { length } = coll, canceled = false; if (length === 0) { callback(null); @@ -86104,7 +80254,7 @@ var require_async7 = __commonJS({ callback = concurrency; concurrency = null; } - callback = once2(callback || promiseCallback()); + callback = once(callback || promiseCallback()); var numTasks = Object.keys(tasks).length; if (!numTasks) { return callback(null); @@ -86395,10 +80545,10 @@ var require_async7 = __commonJS({ unsaturated: [], empty: [] }; - function on2(event, handler) { + function on(event, handler) { events[event].push(handler); } - function once3(event, handler) { + function once2(event, handler) { const handleAndRemove = (...args) => { off(event, handleAndRemove); handler(...args); @@ -86483,14 +80633,14 @@ var require_async7 = __commonJS({ const eventMethod = (name) => (handler) => { if (!handler) { return new Promise((resolve8, reject2) => { - once3(name, (err, data) => { + once2(name, (err, data) => { if (err) return reject2(err); resolve8(data); }); }); } off(name); - on2(name, handler); + on(name, handler); }; var isProcessing = false; var q = { @@ -86625,7 +80775,7 @@ var require_async7 = __commonJS({ return queue$1(worker, concurrency, payload); } function reduce(coll, memo, iteratee, callback) { - callback = once2(callback); + callback = once(callback); var _iteratee = wrapAsync(iteratee); return eachOfSeries$1(coll, (x, i, iterCb) => { _iteratee(memo, x, (err, v) => { @@ -86905,7 +81055,7 @@ var require_async7 = __commonJS({ } var log = consoleFunc("log"); function mapValuesLimit(obj, limit, iteratee, callback) { - callback = once2(callback); + callback = once(callback); var newObj = {}; var _iteratee = wrapAsync(iteratee); return eachOfLimit$2(limit)(obj, (val2, key, next) => { @@ -87104,7 +81254,7 @@ var require_async7 = __commonJS({ return q; } function race(tasks, callback) { - callback = once2(callback); + callback = once(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++) { @@ -87319,7 +81469,7 @@ var require_async7 = __commonJS({ iteratee = accumulator; accumulator = Array.isArray(coll) ? [] : {}; } - callback = once2(callback || promiseCallback()); + callback = once(callback || promiseCallback()); var _iteratee = wrapAsync(iteratee); eachOf$1(coll, (v, k, cb) => { _iteratee(accumulator, v, k, cb); @@ -87373,7 +81523,7 @@ var require_async7 = __commonJS({ return whilst$1((cb) => _test((err, truth) => cb(err, !truth)), iteratee, callback); } function waterfall(tasks, callback) { - callback = once2(callback); + callback = once(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; @@ -87632,54 +81782,54 @@ var require_polyfills = __commonJS({ } var chdir; module2.exports = patch; - function patch(fs20) { + function patch(fs17) { 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) { + 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); }; - fs20.lchmodSync = function() { + fs17.lchmodSync = function() { }; } - if (fs20.chown && !fs20.lchown) { - fs20.lchown = function(path19, uid, gid, cb) { + if (fs17.chown && !fs17.lchown) { + fs17.lchown = function(path15, uid, gid, cb) { if (cb) process.nextTick(cb); }; - fs20.lchownSync = function() { + fs17.lchownSync = function() { }; } if (platform2 === "win32") { - fs20.rename = typeof fs20.rename !== "function" ? fs20.rename : (function(fs$rename) { + 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() { - fs20.stat(to, function(stater, st) { + fs17.stat(to, function(stater, st) { if (stater && stater.code === "ENOENT") fs$rename(from, to, CB); else @@ -87695,9 +81845,9 @@ var require_polyfills = __commonJS({ } if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); return rename; - })(fs20.rename); + })(fs17.rename); } - fs20.read = typeof fs20.read !== "function" ? fs20.read : (function(fs$read) { + 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") { @@ -87705,22 +81855,22 @@ var require_polyfills = __commonJS({ callback = function(er, _2, __) { if (er && er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; - return fs$read.call(fs20, fd, buffer, offset, length, position, callback); + return fs$read.call(fs17, fd, buffer, offset, length, position, callback); } callback_.apply(this, arguments); }; } - return fs$read.call(fs20, fd, buffer, offset, length, position, callback); + return fs$read.call(fs17, 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) { + })(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(fs20, fd, buffer, offset, length, position); + return fs$readSync.call(fs17, fd, buffer, offset, length, position); } catch (er) { if (er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; @@ -87730,11 +81880,11 @@ var require_polyfills = __commonJS({ } } }; - })(fs20.readSync); - function patchLchmod(fs21) { - fs21.lchmod = function(path19, mode, callback) { - fs21.open( - path19, + })(fs17.readSync); + function patchLchmod(fs18) { + fs18.lchmod = function(path15, mode, callback) { + fs18.open( + path15, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) { @@ -87742,80 +81892,80 @@ var require_polyfills = __commonJS({ if (callback) callback(err); return; } - fs21.fchmod(fd, mode, function(err2) { - fs21.close(fd, function(err22) { + fs18.fchmod(fd, mode, function(err2) { + fs18.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); + fs18.lchmodSync = function(path15, mode) { + var fd = fs18.openSync(path15, constants.O_WRONLY | constants.O_SYMLINK, mode); var threw = true; var ret; try { - ret = fs21.fchmodSync(fd, mode); + ret = fs18.fchmodSync(fd, mode); threw = false; } finally { if (threw) { try { - fs21.closeSync(fd); + fs18.closeSync(fd); } catch (er) { } } else { - fs21.closeSync(fd); + fs18.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) { + 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; } - fs21.futimes(fd, at, mt, function(er2) { - fs21.close(fd, function(er22) { + fs18.futimes(fd, at, mt, function(er2) { + fs18.close(fd, function(er22) { if (cb) cb(er2 || er22); }); }); }); }; - fs21.lutimesSync = function(path19, at, mt) { - var fd = fs21.openSync(path19, constants.O_SYMLINK); + fs18.lutimesSync = function(path15, at, mt) { + var fd = fs18.openSync(path15, constants.O_SYMLINK); var ret; var threw = true; try { - ret = fs21.futimesSync(fd, at, mt); + ret = fs18.futimesSync(fd, at, mt); threw = false; } finally { if (threw) { try { - fs21.closeSync(fd); + fs18.closeSync(fd); } catch (er) { } } else { - fs21.closeSync(fd); + fs18.closeSync(fd); } } return ret; }; - } else if (fs21.futimes) { - fs21.lutimes = function(_a, _b, _c, cb) { + } else if (fs18.futimes) { + fs18.lutimes = function(_a, _b, _c, cb) { if (cb) process.nextTick(cb); }; - fs21.lutimesSync = function() { + fs18.lutimesSync = function() { }; } } function chmodFix(orig) { if (!orig) return orig; return function(target, mode, cb) { - return orig.call(fs20, target, mode, function(er) { + return orig.call(fs17, target, mode, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); @@ -87825,7 +81975,7 @@ var require_polyfills = __commonJS({ if (!orig) return orig; return function(target, mode) { try { - return orig.call(fs20, target, mode); + return orig.call(fs17, target, mode); } catch (er) { if (!chownErOk(er)) throw er; } @@ -87834,7 +81984,7 @@ var require_polyfills = __commonJS({ function chownFix(orig) { if (!orig) return orig; return function(target, uid, gid, cb) { - return orig.call(fs20, target, uid, gid, function(er) { + return orig.call(fs17, target, uid, gid, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); @@ -87844,7 +81994,7 @@ var require_polyfills = __commonJS({ if (!orig) return orig; return function(target, uid, gid) { try { - return orig.call(fs20, target, uid, gid); + return orig.call(fs17, target, uid, gid); } catch (er) { if (!chownErOk(er)) throw er; } @@ -87864,13 +82014,13 @@ var require_polyfills = __commonJS({ } if (cb) cb.apply(this, arguments); } - return options ? orig.call(fs20, target, options, callback) : orig.call(fs20, target, callback); + 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(fs20, target, options) : orig.call(fs20, target); + 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; @@ -87899,16 +82049,16 @@ 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) { + function legacy(fs17) { return { ReadStream, WriteStream }; - function ReadStream(path19, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path19, options); + function ReadStream(path15, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path15, options); Stream.call(this); var self2 = this; - this.path = path19; + this.path = path15; this.fd = null; this.readable = true; this.paused = false; @@ -87942,7 +82092,7 @@ var require_legacy_streams = __commonJS({ }); return; } - fs20.open(this.path, this.flags, this.mode, function(err, fd) { + fs17.open(this.path, this.flags, this.mode, function(err, fd) { if (err) { self2.emit("error", err); self2.readable = false; @@ -87953,10 +82103,10 @@ var require_legacy_streams = __commonJS({ self2._read(); }); } - function WriteStream(path19, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path19, options); + function WriteStream(path15, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path15, options); Stream.call(this); - this.path = path19; + this.path = path15; this.fd = null; this.writable = true; this.flags = "w"; @@ -87981,7 +82131,7 @@ var require_legacy_streams = __commonJS({ this.busy = false; this._queue = []; if (this.fd === null) { - this._open = fs20.open; + this._open = fs17.open; this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); this.flush(); } @@ -88016,7 +82166,7 @@ var require_clone = __commonJS({ // 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 fs17 = require("fs"); var polyfills = require_polyfills(); var legacy = require_legacy_streams(); var clone = require_clone(); @@ -88030,7 +82180,7 @@ var require_graceful_fs = __commonJS({ gracefulQueue = "___graceful-fs.queue"; previousSymbol = "___graceful-fs.previous"; } - function noop2() { + function noop() { } function publishQueue(context3, queue2) { Object.defineProperty(context3, gracefulQueue, { @@ -88039,7 +82189,7 @@ var require_graceful_fs = __commonJS({ } }); } - var debug3 = noop2; + var debug3 = noop; if (util.debuglog) debug3 = util.debuglog("gfs4"); else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) @@ -88048,12 +82198,12 @@ var require_graceful_fs = __commonJS({ m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); console.error(m); }; - if (!fs20[gracefulQueue]) { + if (!fs17[gracefulQueue]) { queue = global[gracefulQueue] || []; - publishQueue(fs20, queue); - fs20.close = (function(fs$close) { + publishQueue(fs17, queue); + fs17.close = (function(fs$close) { function close(fd, cb) { - return fs$close.call(fs20, fd, function(err) { + return fs$close.call(fs17, fd, function(err) { if (!err) { resetQueue(); } @@ -88065,48 +82215,48 @@ var require_graceful_fs = __commonJS({ value: fs$close }); return close; - })(fs20.close); - fs20.closeSync = (function(fs$closeSync) { + })(fs17.close); + fs17.closeSync = (function(fs$closeSync) { function closeSync(fd) { - fs$closeSync.apply(fs20, arguments); + fs$closeSync.apply(fs17, arguments); resetQueue(); } Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync }); return closeSync; - })(fs20.closeSync); + })(fs17.closeSync); if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { process.on("exit", function() { - debug3(fs20[gracefulQueue]); - require("assert").equal(fs20[gracefulQueue].length, 0); + debug3(fs17[gracefulQueue]); + require("assert").equal(fs17[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) { + 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(path19, options, cb); - function go$readFile(path20, options2, cb2, startTime) { - return fs$readFile(path20, options2, function(err) { + 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, [path20, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$readFile, [path16, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -88114,16 +82264,16 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$writeFile = fs21.writeFile; - fs21.writeFile = writeFile; - function writeFile(path19, data, options, cb) { + 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(path19, data, options, cb); - function go$writeFile(path20, data2, options2, cb2, startTime) { - return fs$writeFile(path20, data2, options2, function(err) { + 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, [path20, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$writeFile, [path16, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -88131,17 +82281,17 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$appendFile = fs21.appendFile; + var fs$appendFile = fs18.appendFile; if (fs$appendFile) - fs21.appendFile = appendFile; - function appendFile(path19, data, options, cb) { + fs18.appendFile = appendFile; + function appendFile(path15, 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) { + 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, [path20, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$appendFile, [path16, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -88149,9 +82299,9 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$copyFile = fs21.copyFile; + var fs$copyFile = fs18.copyFile; if (fs$copyFile) - fs21.copyFile = copyFile; + fs18.copyFile = copyFile; function copyFile(src, dest, flags, cb) { if (typeof flags === "function") { cb = flags; @@ -88169,34 +82319,34 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$readdir = fs21.readdir; - fs21.readdir = readdir; + var fs$readdir = fs18.readdir; + fs18.readdir = readdir; var noReaddirOptionVersions = /^v[0-5]\./; - function readdir(path19, options, cb) { + function readdir(path15, 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, + 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(path20, options2, cb2, startTime) { - return fs$readdir(path20, options2, fs$readdirCallback( - path20, + } : function go$readdir2(path16, options2, cb2, startTime) { + return fs$readdir(path16, options2, fs$readdirCallback( + path16, options2, cb2, startTime )); }; - return go$readdir(path19, options, cb); - function fs$readdirCallback(path20, 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, - [path20, options2, cb2], + [path16, options2, cb2], err, startTime || Date.now(), Date.now() @@ -88211,21 +82361,21 @@ var require_graceful_fs = __commonJS({ } } if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs21); + var legStreams = legacy(fs18); ReadStream = legStreams.ReadStream; WriteStream = legStreams.WriteStream; } - var fs$ReadStream = fs21.ReadStream; + var fs$ReadStream = fs18.ReadStream; if (fs$ReadStream) { ReadStream.prototype = Object.create(fs$ReadStream.prototype); ReadStream.prototype.open = ReadStream$open; } - var fs$WriteStream = fs21.WriteStream; + var fs$WriteStream = fs18.WriteStream; if (fs$WriteStream) { WriteStream.prototype = Object.create(fs$WriteStream.prototype); WriteStream.prototype.open = WriteStream$open; } - Object.defineProperty(fs21, "ReadStream", { + Object.defineProperty(fs18, "ReadStream", { get: function() { return ReadStream; }, @@ -88235,7 +82385,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(fs21, "WriteStream", { + Object.defineProperty(fs18, "WriteStream", { get: function() { return WriteStream; }, @@ -88246,7 +82396,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileReadStream = ReadStream; - Object.defineProperty(fs21, "FileReadStream", { + Object.defineProperty(fs18, "FileReadStream", { get: function() { return FileReadStream; }, @@ -88257,7 +82407,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileWriteStream = WriteStream; - Object.defineProperty(fs21, "FileWriteStream", { + Object.defineProperty(fs18, "FileWriteStream", { get: function() { return FileWriteStream; }, @@ -88267,7 +82417,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - function ReadStream(path19, options) { + function ReadStream(path15, options) { if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this; else @@ -88287,7 +82437,7 @@ var require_graceful_fs = __commonJS({ } }); } - function WriteStream(path19, options) { + function WriteStream(path15, options) { if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this; else @@ -88305,22 +82455,22 @@ var require_graceful_fs = __commonJS({ } }); } - function createReadStream2(path19, options) { - return new fs21.ReadStream(path19, options); + function createReadStream2(path15, options) { + return new fs18.ReadStream(path15, options); } - function createWriteStream2(path19, options) { - return new fs21.WriteStream(path19, options); + function createWriteStream2(path15, options) { + return new fs18.WriteStream(path15, options); } - var fs$open = fs21.open; - fs21.open = open; - function open(path19, flags, mode, cb) { + 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(path19, flags, mode, cb); - function go$open(path20, flags2, mode2, cb2, startTime) { - return fs$open(path20, flags2, mode2, function(err, fd) { + 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, [path20, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + enqueue([go$open, [path16, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); else { if (typeof cb2 === "function") cb2.apply(this, arguments); @@ -88328,20 +82478,20 @@ var require_graceful_fs = __commonJS({ }); } } - return fs21; + return fs18; } function enqueue(elem) { debug3("ENQUEUE", elem[0].name, elem[1]); - fs20[gracefulQueue].push(elem); + fs17[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; + 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(); @@ -88349,9 +82499,9 @@ var require_graceful_fs = __commonJS({ function retry3() { clearTimeout(retryTimer); retryTimer = void 0; - if (fs20[gracefulQueue].length === 0) + if (fs17[gracefulQueue].length === 0) return; - var elem = fs20[gracefulQueue].shift(); + var elem = fs17[gracefulQueue].shift(); var fn = elem[0]; var args = elem[1]; var err = elem[2]; @@ -88373,7 +82523,7 @@ var require_graceful_fs = __commonJS({ debug3("RETRY", fn.name, args); fn.apply(null, args.concat([startTime])); } else { - fs20[gracefulQueue].push(elem); + fs17[gracefulQueue].push(elem); } } if (retryTimer === void 0) { @@ -88452,7 +82602,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"); } @@ -88803,7 +82953,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() { }; @@ -89051,19 +83201,19 @@ var require_stream_writable = __commonJS({ onwriteStateUpdate(state); if (er) onwriteError(stream2, state, sync, er, cb); else { - var finished2 = needFinish(state); - if (!finished2 && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + var finished = needFinish(state); + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { clearBuffer(stream2, state); } if (sync) { - asyncWrite(afterWrite, stream2, state, finished2, cb); + asyncWrite(afterWrite, stream2, state, finished, cb); } else { - afterWrite(stream2, state, finished2, cb); + afterWrite(stream2, state, finished, cb); } } } - function afterWrite(stream2, state, finished2, cb) { - if (!finished2) onwriteDrain(stream2, state); + function afterWrite(stream2, state, finished, cb) { + if (!finished) onwriteDrain(stream2, state); state.pendingcb--; cb(); finishMaybe(stream2, state); @@ -89549,7 +83699,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() { }; @@ -90421,22 +84571,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(path19, stripTrailing) { - if (typeof path19 !== "string") { + module2.exports = function(path15, stripTrailing) { + if (typeof path15 !== "string") { throw new TypeError("expected path to be a string"); } - if (path19 === "\\" || path19 === "/") return "/"; - var len = path19.length; - if (len <= 1) return path19; + if (path15 === "\\" || path15 === "/") return "/"; + var len = path15.length; + if (len <= 1) return path15; var prefix = ""; - if (len > 4 && path19[3] === "\\") { - var ch = path19[2]; - if ((ch === "?" || ch === ".") && path19.slice(0, 2) === "\\\\") { - path19 = path19.slice(2); + if (len > 4 && path15[3] === "\\") { + var ch = path15[2]; + if ((ch === "?" || ch === ".") && path15.slice(0, 2) === "\\\\") { + path15 = path15.slice(2); prefix = "//"; } } - var segs = path19.split(/[/\\]+/); + var segs = path15.split(/[/\\]+/); if (stripTrailing !== false && segs[segs.length - 1] === "") { segs.pop(); } @@ -91061,12 +85211,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), isType2 = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType2, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; + 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; 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. - isType2 && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. + isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. isIndex(key, length)))) { result.push(key); } @@ -91975,7 +86125,7 @@ var require_util13 = __commonJS({ var validateFunction = (value, name) => { if (typeof value !== "function") throw new ERR_INVALID_ARG_TYPE(name, "Function", value); }; - var AggregateError2 = class extends Error { + var AggregateError = class extends Error { constructor(errors) { if (!Array.isArray(errors)) { throw new TypeError(`Expected input to be an Array, got ${typeof errors}`); @@ -91991,7 +86141,7 @@ var require_util13 = __commonJS({ } }; module2.exports = { - AggregateError: AggregateError2, + AggregateError, kEmptyObject: Object.freeze({}), once(callback) { let called = false; @@ -92144,7 +86294,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 AggregateError2 = globalThis.AggregateError || CustomAggregateError; + var AggregateError = globalThis.AggregateError || CustomAggregateError; var kIsNodeError = Symbol("kIsNodeError"); var kTypes = [ "string", @@ -92239,7 +86389,7 @@ var require_errors4 = __commonJS({ outerError.errors.push(innerError); return outerError; } - const err = new AggregateError2([outerError, innerError], outerError.message); + const err = new AggregateError([outerError, innerError], outerError.message); err.code = outerError.code; return err; } @@ -92727,7 +86877,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(); @@ -92938,10 +87088,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 process6 = require_process(); + var process2 = require_process(); var { AbortError, codes } = require_errors4(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_STREAM_PREMATURE_CLOSE } = codes; - var { kEmptyObject, once: once2 } = require_util13(); + var { kEmptyObject, once } = require_util13(); var { validateAbortSignal, validateFunction, validateObject, validateBoolean } = require_validators(); var { Promise: Promise2, PromisePrototypeThen, SymbolDispose } = require_primordials(); var { @@ -92959,7 +87109,7 @@ var require_end_of_stream = __commonJS({ isNodeStream, willEmitClose: _willEmitClose, kIsClosedPromise - } = require_utils10(); + } = require_utils6(); var addAbortListener; function isRequest(stream2) { return stream2.setHeader && typeof stream2.abort === "function"; @@ -92978,7 +87128,7 @@ var require_end_of_stream = __commonJS({ } validateFunction(callback, "callback"); validateAbortSignal(options.signal, "options.signal"); - callback = once2(callback); + callback = once(callback); if (isReadableStream(stream2) || isWritableStream(stream2)) { return eosWeb(stream2, options, callback); } @@ -93074,17 +87224,17 @@ var require_end_of_stream = __commonJS({ } stream2.on("close", onclose); if (closed) { - process6.nextTick(onclose); + process2.nextTick(onclose); } else if (wState !== null && wState !== void 0 && wState.errorEmitted || rState !== null && rState !== void 0 && rState.errorEmitted) { if (!willEmitClose) { - process6.nextTick(onclosed); + process2.nextTick(onclosed); } } else if (!readable && (!willEmitClose || isReadable(stream2)) && (writableFinished || isWritable(stream2) === false)) { - process6.nextTick(onclosed); + process2.nextTick(onclosed); } else if (!writable && (!willEmitClose || isWritable(stream2)) && (readableFinished || isReadable(stream2) === false)) { - process6.nextTick(onclosed); + process2.nextTick(onclosed); } else if (rState && stream2.req && stream2.aborted) { - process6.nextTick(onclosed); + process2.nextTick(onclosed); } const cleanup = () => { callback = nop; @@ -93112,12 +87262,12 @@ var require_end_of_stream = __commonJS({ ); }; if (options.signal.aborted) { - process6.nextTick(abort); + process2.nextTick(abort); } else { addAbortListener = addAbortListener || require_util13().addAbortListener; const disposable = addAbortListener(options.signal, abort); const originalCallback = callback; - callback = once2((...args) => { + callback = once((...args) => { disposable[SymbolDispose](); originalCallback.apply(stream2, args); }); @@ -93139,12 +87289,12 @@ var require_end_of_stream = __commonJS({ ); }; if (options.signal.aborted) { - process6.nextTick(abort); + process2.nextTick(abort); } else { addAbortListener = addAbortListener || require_util13().addAbortListener; const disposable = addAbortListener(options.signal, abort); const originalCallback = callback; - callback = once2((...args) => { + callback = once((...args) => { disposable[SymbolDispose](); originalCallback.apply(stream2, args); }); @@ -93152,13 +87302,13 @@ var require_end_of_stream = __commonJS({ } const resolverFn = (...args) => { if (!isAborted) { - process6.nextTick(() => callback.apply(stream2, args)); + process2.nextTick(() => callback.apply(stream2, args)); } }; PromisePrototypeThen(stream2[kIsClosedPromise].promise, resolverFn, resolverFn); return nop; } - function finished2(stream2, opts) { + function finished(stream2, opts) { var _opts; let autoCleanup = false; if (opts === null) { @@ -93182,7 +87332,7 @@ var require_end_of_stream = __commonJS({ }); } module2.exports = eos; - module2.exports.finished = finished2; + module2.exports.finished = finished; } }); @@ -93190,14 +87340,14 @@ var require_end_of_stream = __commonJS({ var require_destroy2 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { "use strict"; - var process6 = require_process(); + var process2 = require_process(); var { aggregateTwoErrors, codes: { ERR_MULTIPLE_CALLBACK }, 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) { @@ -93257,9 +87407,9 @@ var require_destroy2 = __commonJS({ cb(err2); } if (err2) { - process6.nextTick(emitErrorCloseNT, self2, err2); + process2.nextTick(emitErrorCloseNT, self2, err2); } else { - process6.nextTick(emitCloseNT, self2); + process2.nextTick(emitCloseNT, self2); } } try { @@ -93344,7 +87494,7 @@ var require_destroy2 = __commonJS({ r.errored = err; } if (sync) { - process6.nextTick(emitErrorNT, stream2, err); + process2.nextTick(emitErrorNT, stream2, err); } else { emitErrorNT(stream2, err); } @@ -93366,7 +87516,7 @@ var require_destroy2 = __commonJS({ if (stream2.listenerCount(kConstruct) > 1) { return; } - process6.nextTick(constructNT, stream2); + process2.nextTick(constructNT, stream2); } function constructNT(stream2) { let called = false; @@ -93390,15 +87540,15 @@ var require_destroy2 = __commonJS({ } else if (err) { errorOrDestroy(stream2, err, true); } else { - process6.nextTick(emitConstructNT, stream2); + process2.nextTick(emitConstructNT, stream2); } } try { stream2._construct((err) => { - process6.nextTick(onConstruct, err); + process2.nextTick(onConstruct, err); }); } catch (err) { - process6.nextTick(onConstruct, err); + process2.nextTick(onConstruct, err); } } function emitConstructNT(stream2) { @@ -93412,7 +87562,7 @@ var require_destroy2 = __commonJS({ } function emitErrorCloseLegacy(stream2, err) { stream2.emit("error", err); - process6.nextTick(emitCloseLegacy, stream2); + process2.nextTick(emitCloseLegacy, stream2); } function destroyer(stream2, err) { if (!stream2 || isDestroyed(stream2)) { @@ -93433,9 +87583,9 @@ var require_destroy2 = __commonJS({ } else if (typeof stream2.close === "function") { stream2.close(); } else if (err) { - process6.nextTick(emitErrorCloseLegacy, stream2, err); + process2.nextTick(emitErrorCloseLegacy, stream2, err); } else { - process6.nextTick(emitCloseLegacy, stream2); + process2.nextTick(emitCloseLegacy, stream2); } if (!stream2.destroyed) { stream2[kIsDestroyed] = true; @@ -93535,7 +87685,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; @@ -93758,7 +87908,7 @@ var require_state3 = __commonJS({ defaultHighWaterMarkBytes = value; } } - function getHighWaterMark2(state, options, duplexKey, isDuplex) { + function getHighWaterMark(state, options, duplexKey, isDuplex) { const hwm = highWaterMarkFrom(options, isDuplex, duplexKey); if (hwm != null) { if (!NumberIsInteger(hwm) || hwm < 0) { @@ -93770,7 +87920,7 @@ var require_state3 = __commonJS({ return getDefaultHighWaterMark(state.objectMode); } module2.exports = { - getHighWaterMark: getHighWaterMark2, + getHighWaterMark, getDefaultHighWaterMark, setDefaultHighWaterMark }; @@ -93781,7 +87931,7 @@ var require_state3 = __commonJS({ var require_from = __commonJS({ "node_modules/readable-stream/lib/internal/streams/from.js"(exports2, module2) { "use strict"; - var process6 = require_process(); + var process2 = 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; @@ -93823,9 +87973,9 @@ var require_from = __commonJS({ readable._destroy = function(error2, cb) { PromisePrototypeThen( close(error2), - () => process6.nextTick(cb, error2), + () => process2.nextTick(cb, error2), // nextTick is here in case cb throws - (e) => process6.nextTick(cb, e || error2) + (e) => process2.nextTick(cb, e || error2) ); }; async function close(error2) { @@ -93875,7 +88025,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 process6 = require_process(); + var process2 = require_process(); var { ArrayPrototypeIndexOf, NumberIsInteger, @@ -93902,7 +88052,7 @@ var require_readable3 = __commonJS({ }); var BufferList = require_buffer_list(); var destroyImpl = require_destroy2(); - var { getHighWaterMark: getHighWaterMark2, getDefaultHighWaterMark } = require_state3(); + var { getHighWaterMark, getDefaultHighWaterMark } = require_state3(); var { aggregateTwoErrors, codes: { @@ -93996,7 +88146,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 ? getHighWaterMark2(this, options, "readableHighWaterMark", isDuplex) : getDefaultHighWaterMark(false); + this.highWaterMark = options ? getHighWaterMark(this, options, "readableHighWaterMark", isDuplex) : getDefaultHighWaterMark(false); this.buffer = new BufferList(); this.length = 0; this.pipes = []; @@ -94260,7 +88410,7 @@ var require_readable3 = __commonJS({ if (!state.emittedReadable) { debug3("emitReadable", state.flowing); state.emittedReadable = true; - process6.nextTick(emitReadable_, stream2); + process2.nextTick(emitReadable_, stream2); } } function emitReadable_(stream2) { @@ -94276,7 +88426,7 @@ var require_readable3 = __commonJS({ function maybeReadMore(stream2, state) { if (!state.readingMore && state.constructed) { state.readingMore = true; - process6.nextTick(maybeReadMore_, stream2, state); + process2.nextTick(maybeReadMore_, stream2, state); } } function maybeReadMore_(stream2, state) { @@ -94303,9 +88453,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 !== process6.stdout && dest !== process6.stderr; + const doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process2.stdout && dest !== process2.stderr; const endFn = doEnd ? onend : unpipe; - if (state.endEmitted) process6.nextTick(endFn); + if (state.endEmitted) process2.nextTick(endFn); else src.once("end", endFn); dest.on("unpipe", onunpipe); function onunpipe(readable, unpipeInfo) { @@ -94455,7 +88605,7 @@ var require_readable3 = __commonJS({ if (state.length) { emitReadable(this); } else if (!state.reading) { - process6.nextTick(nReadingNextTick, this); + process2.nextTick(nReadingNextTick, this); } } } @@ -94465,7 +88615,7 @@ var require_readable3 = __commonJS({ Readable2.prototype.removeListener = function(ev, fn) { const res = Stream.prototype.removeListener.call(this, ev, fn); if (ev === "readable") { - process6.nextTick(updateReadableListening, this); + process2.nextTick(updateReadableListening, this); } return res; }; @@ -94473,7 +88623,7 @@ var require_readable3 = __commonJS({ Readable2.prototype.removeAllListeners = function(ev) { const res = Stream.prototype.removeAllListeners.apply(this, arguments); if (ev === "readable" || ev === void 0) { - process6.nextTick(updateReadableListening, this); + process2.nextTick(updateReadableListening, this); } return res; }; @@ -94505,7 +88655,7 @@ var require_readable3 = __commonJS({ function resume(stream2, state) { if (!state.resumeScheduled) { state.resumeScheduled = true; - process6.nextTick(resume_, stream2, state); + process2.nextTick(resume_, stream2, state); } } function resume_(stream2, state) { @@ -94782,7 +88932,7 @@ var require_readable3 = __commonJS({ debug3("endReadable", state.endEmitted); if (!state.endEmitted) { state.ended = true; - process6.nextTick(endReadableNT, state, stream2); + process2.nextTick(endReadableNT, state, stream2); } } function endReadableNT(state, stream2) { @@ -94791,7 +88941,7 @@ var require_readable3 = __commonJS({ state.endEmitted = true; stream2.emit("end"); if (stream2.writable && stream2.allowHalfOpen === false) { - process6.nextTick(endWritableNT, stream2); + process2.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' @@ -94840,7 +88990,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 process6 = require_process(); + var process2 = require_process(); var { ArrayPrototypeSlice, Error: Error2, @@ -94859,7 +89009,7 @@ var require_writable = __commonJS({ var { Buffer: Buffer2 } = require("buffer"); var destroyImpl = require_destroy2(); var { addAbortSignal } = require_add_abort_signal(); - var { getHighWaterMark: getHighWaterMark2, getDefaultHighWaterMark } = require_state3(); + var { getHighWaterMark, getDefaultHighWaterMark } = require_state3(); var { ERR_INVALID_ARG_TYPE: ERR_INVALID_ARG_TYPE2, ERR_METHOD_NOT_IMPLEMENTED, @@ -94881,7 +89031,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 ? getHighWaterMark2(this, options, "writableHighWaterMark", isDuplex) : getDefaultHighWaterMark(false); + this.highWaterMark = options ? getHighWaterMark(this, options, "writableHighWaterMark", isDuplex) : getDefaultHighWaterMark(false); this.finalCalled = false; this.needDrain = false; this.ending = false; @@ -94993,7 +89143,7 @@ var require_writable = __commonJS({ err = new ERR_STREAM_DESTROYED("write"); } if (err) { - process6.nextTick(cb, err); + process2.nextTick(cb, err); errorOrDestroy(stream2, err, true); return err; } @@ -95083,7 +89233,7 @@ var require_writable = __commonJS({ stream2._readableState.errored = er; } if (sync) { - process6.nextTick(onwriteError, stream2, state, er, cb); + process2.nextTick(onwriteError, stream2, state, er, cb); } else { onwriteError(stream2, state, er, cb); } @@ -95101,7 +89251,7 @@ var require_writable = __commonJS({ stream: stream2, state }; - process6.nextTick(afterWriteTick, state.afterWriteTickInfo); + process2.nextTick(afterWriteTick, state.afterWriteTickInfo); } } else { afterWrite(stream2, state, 1, cb); @@ -95238,7 +89388,7 @@ var require_writable = __commonJS({ } if (typeof cb === "function") { if (err || state.finished) { - process6.nextTick(cb, err); + process2.nextTick(cb, err); } else { state[kOnFinished].push(cb); } @@ -95267,7 +89417,7 @@ var require_writable = __commonJS({ state.prefinished = true; stream2.emit("prefinish"); state.pendingcb++; - process6.nextTick(finish, stream2, state); + process2.nextTick(finish, stream2, state); } } state.sync = true; @@ -95296,7 +89446,7 @@ var require_writable = __commonJS({ if (state.pendingcb === 0) { if (sync) { state.pendingcb++; - process6.nextTick( + process2.nextTick( (stream3, state2) => { if (needFinish(state2)) { finish(stream3, state2); @@ -95431,7 +89581,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)) { - process6.nextTick(errorBuffer, state); + process2.nextTick(errorBuffer, state); } destroy.call(this, err, cb); return this; @@ -95460,7 +89610,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 process6 = require_process(); + var process2 = require_process(); var bufferModule = require("buffer"); var { isReadable, @@ -95472,7 +89622,7 @@ var require_duplexify = __commonJS({ isDuplexNodeStream, isReadableStream, isWritableStream - } = require_utils10(); + } = require_utils6(); var eos = require_end_of_stream(); var { AbortError, @@ -95573,9 +89723,9 @@ var require_duplexify = __commonJS({ final(async () => { try { await promise; - process6.nextTick(cb, null); + process2.nextTick(cb, null); } catch (err) { - process6.nextTick(cb, err); + process2.nextTick(cb, err); } }); }, @@ -95654,7 +89804,7 @@ var require_duplexify = __commonJS({ const _promise = promise; promise = null; const { chunk, done, cb } = await _promise; - process6.nextTick(cb); + process2.nextTick(cb); if (done) return; if (signal.aborted) throw new AbortError(void 0, { @@ -95929,13 +90079,13 @@ var require_transform = __commonJS({ module2.exports = Transform; var { ERR_METHOD_NOT_IMPLEMENTED } = require_errors4().codes; var Duplex = require_duplex(); - var { getHighWaterMark: getHighWaterMark2 } = require_state3(); + var { getHighWaterMark } = 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 ? getHighWaterMark2(this, options, "readableHighWaterMark", true) : null; + const readableHighWaterMark = options ? getHighWaterMark(this, options, "readableHighWaterMark", true) : null; if (readableHighWaterMark === 0) { options = { ...options, @@ -96045,10 +90195,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 process6 = require_process(); + var process2 = require_process(); var { ArrayIsArray, Promise: Promise2, SymbolAsyncIterator, SymbolDispose } = require_primordials(); var eos = require_end_of_stream(); - var { once: once2 } = require_util13(); + var { once } = require_util13(); var destroyImpl = require_destroy2(); var Duplex = require_duplex(); var { @@ -96072,15 +90222,15 @@ var require_pipeline3 = __commonJS({ isWebStream, isReadableStream, isReadableFinished - } = require_utils10(); + } = require_utils6(); var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; var PassThrough; var Readable2; var addAbortListener; function destroyer(stream2, reading, writing) { - let finished2 = false; + let finished = false; stream2.on("close", () => { - finished2 = true; + finished = true; }); const cleanup = eos( stream2, @@ -96089,13 +90239,13 @@ var require_pipeline3 = __commonJS({ writable: writing }, (err) => { - finished2 = !err; + finished = !err; } ); return { destroy: (err) => { - if (finished2) return; - finished2 = true; + if (finished) return; + finished = true; destroyImpl.destroyer(stream2, err || new ERR_STREAM_DESTROYED("pipe")); }, cleanup @@ -96200,7 +90350,7 @@ var require_pipeline3 = __commonJS({ } } function pipeline(...streams) { - return pipelineImpl(streams, once2(popCallback(streams))); + return pipelineImpl(streams, once(popCallback(streams))); } function pipelineImpl(streams, callback, opts) { if (streams.length === 1 && ArrayIsArray(streams[0])) { @@ -96247,7 +90397,7 @@ var require_pipeline3 = __commonJS({ if (!error2) { lastStreamCleanup.forEach((fn) => fn()); } - process6.nextTick(callback, error2, value); + process2.nextTick(callback, error2, value); } } let ret; @@ -96326,11 +90476,11 @@ var require_pipeline3 = __commonJS({ if (end) { pt.end(); } - process6.nextTick(finish); + process2.nextTick(finish); }, (err) => { pt.destroy(err); - process6.nextTick(finish, err); + process2.nextTick(finish, err); } ); } else if (isIterable(ret, true)) { @@ -96411,7 +90561,7 @@ var require_pipeline3 = __commonJS({ } } if (signal !== null && signal !== void 0 && signal.aborted || outerSignal !== null && outerSignal !== void 0 && outerSignal.aborted) { - process6.nextTick(abort); + process2.nextTick(abort); } return ret; } @@ -96432,7 +90582,7 @@ var require_pipeline3 = __commonJS({ }; var endFn = endFn2; if (isReadableFinished(src)) { - process6.nextTick(endFn2); + process2.nextTick(endFn2); } else { src.once("end", endFn2); } @@ -96485,7 +90635,7 @@ var require_compose = __commonJS({ isTransformStream, isWritableStream, isReadableStream - } = require_utils10(); + } = require_utils6(); var { AbortError, codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } @@ -96675,10 +90825,10 @@ var require_operators = __commonJS({ var { validateAbortSignal, validateInteger, validateObject } = require_validators(); var kWeakHandler = require_primordials().Symbol("kWeak"); var kResistStopPropagation = require_primordials().Symbol("kResistStopPropagation"); - var { finished: finished2 } = require_end_of_stream(); + 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, @@ -96922,7 +91072,7 @@ var require_operators = __commonJS({ }); this.once("error", () => { }); - await finished2(this.destroy(err)); + await finished(this.destroy(err)); throw err; } const ac = new AbortController2(); @@ -97073,10 +91223,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: finished2 } = require_end_of_stream(); - require_stream6(); + var { finished } = require_end_of_stream(); + require_stream2(); function pipeline(...streams) { return new Promise2((resolve8, reject) => { let signal; @@ -97104,14 +91254,14 @@ var require_promises = __commonJS({ }); } module2.exports = { - finished: finished2, + finished, pipeline }; } }); // 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(); @@ -97127,8 +91277,8 @@ var require_stream6 = __commonJS({ var { pipeline } = require_pipeline3(); var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); - var promises3 = require_promises(); - var utils = require_utils10(); + var promises5 = require_promises(); + var utils = require_utils6(); var Stream = module2.exports = require_legacy().Stream; Stream.isDestroyed = utils.isDestroyed; Stream.isDisturbed = utils.isDisturbed; @@ -97205,21 +91355,21 @@ var require_stream6 = __commonJS({ configurable: true, enumerable: true, get() { - return promises3; + return promises5; } }); ObjectDefineProperty(pipeline, customPromisify, { __proto__: null, enumerable: true, get() { - return promises3.pipeline; + return promises5.pipeline; } }); ObjectDefineProperty(eos, customPromisify, { __proto__: null, enumerable: true, get() { - return promises3.finished; + return promises5.finished; } }); Stream.Stream = Stream; @@ -97238,7 +91388,7 @@ var require_ours = __commonJS({ "use strict"; var Stream = require("stream"); if (Stream && process.env.READABLE_STREAM === "disable") { - const promises3 = Stream.promises; + const promises5 = Stream.promises; module2.exports._uint8ArrayToBuffer = Stream._uint8ArrayToBuffer; module2.exports._isUint8Array = Stream._isUint8Array; module2.exports.isDisturbed = Stream.isDisturbed; @@ -97258,13 +91408,13 @@ var require_ours = __commonJS({ configurable: true, enumerable: true, get() { - return promises3; + return promises5; } }); module2.exports.Stream = Stream.Stream; } else { - const CustomStream = require_stream6(); - const promises3 = require_promises(); + const CustomStream = require_stream2(); + const promises5 = require_promises(); const originalDestroy = CustomStream.Readable.destroy; module2.exports = CustomStream.Readable; module2.exports._uint8ArrayToBuffer = CustomStream._uint8ArrayToBuffer; @@ -97287,7 +91437,7 @@ var require_ours = __commonJS({ configurable: true, enumerable: true, get() { - return promises3; + return promises5; } }); module2.exports.Stream = CustomStream.Stream; @@ -97947,9 +92097,9 @@ var require_Set = __commonJS({ // node_modules/lodash/noop.js var require_noop = __commonJS({ "node_modules/lodash/noop.js"(exports2, module2) { - function noop2() { + function noop() { } - module2.exports = noop2; + module2.exports = noop; } }); @@ -97971,10 +92121,10 @@ var require_setToArray = __commonJS({ var require_createSet = __commonJS({ "node_modules/lodash/_createSet.js"(exports2, module2) { var Set2 = require_Set(); - var noop2 = require_noop(); + var noop = require_noop(); var setToArray = require_setToArray(); var INFINITY = 1 / 0; - var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop2 : function(values) { + var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values) { return new Set2(values); }; module2.exports = createSet; @@ -98971,11 +93121,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 path19 = { + var path15 = { win32: { sep: "\\" }, posix: { sep: "/" } }; - exports2.sep = defaultPlatform === "win32" ? path19.win32.sep : path19.posix.sep; + exports2.sep = defaultPlatform === "win32" ? path15.win32.sep : path15.posix.sep; exports2.minimatch.sep = exports2.sep; exports2.GLOBSTAR = Symbol("globstar **"); exports2.minimatch.GLOBSTAR = exports2.GLOBSTAR; @@ -102223,12 +96373,12 @@ var require_commonjs16 = __commonJS({ /** * Get the Path object referenced by the string path, resolved from this Path */ - resolve(path19) { - if (!path19) { + resolve(path15) { + if (!path15) { return this; } - const rootPath = this.getRootString(path19); - const dir = path19.substring(rootPath.length); + const rootPath = this.getRootString(path15); + const dir = path15.substring(rootPath.length); const dirParts = dir.split(this.splitSep); const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts); return result; @@ -102981,8 +97131,8 @@ var require_commonjs16 = __commonJS({ /** * @internal */ - getRootString(path19) { - return node_path_1.win32.parse(path19).root; + getRootString(path15) { + return node_path_1.win32.parse(path15).root; } /** * @internal @@ -103029,8 +97179,8 @@ var require_commonjs16 = __commonJS({ /** * @internal */ - getRootString(path19) { - return path19.startsWith("/") ? "/" : ""; + getRootString(path15) { + return path15.startsWith("/") ? "/" : ""; } /** * @internal @@ -103080,8 +97230,8 @@ var require_commonjs16 = __commonJS({ * * @internal */ - constructor(cwd = process.cwd(), pathImpl, sep5, { nocase, childrenCacheSize = 16 * 1024, fs: fs20 = defaultFS } = {}) { - this.#fs = fsFromOption(fs20); + constructor(cwd = process.cwd(), pathImpl, sep5, { nocase, childrenCacheSize = 16 * 1024, fs: fs17 = defaultFS } = {}) { + this.#fs = fsFromOption(fs17); if (cwd instanceof URL || cwd.startsWith("file://")) { cwd = (0, node_url_1.fileURLToPath)(cwd); } @@ -103120,11 +97270,11 @@ var require_commonjs16 = __commonJS({ /** * Get the depth of a provided path, string, or the cwd */ - depth(path19 = this.cwd) { - if (typeof path19 === "string") { - path19 = this.cwd.resolve(path19); + depth(path15 = this.cwd) { + if (typeof path15 === "string") { + path15 = this.cwd.resolve(path15); } - return path19.depth(); + return path15.depth(); } /** * Return the cache of child entries. Exposed so subclasses can create @@ -103503,7 +97653,7 @@ var require_commonjs16 = __commonJS({ const dirs = /* @__PURE__ */ new Set(); const queue = [entry]; let processing = 0; - const process6 = () => { + const process2 = () => { let paused = false; while (!paused) { const dir = queue.shift(); @@ -103518,14 +97668,14 @@ var require_commonjs16 = __commonJS({ if (er) return results.emit("error", er); if (follow && !didRealpaths) { - const promises3 = []; + const promises5 = []; for (const e of entries) { if (e.isSymbolicLink()) { - promises3.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r)); + promises5.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r)); } } - if (promises3.length) { - Promise.all(promises3).then(() => onReaddir(null, entries, true)); + if (promises5.length) { + Promise.all(promises5).then(() => onReaddir(null, entries, true)); return; } } @@ -103544,9 +97694,9 @@ var require_commonjs16 = __commonJS({ } } if (paused && !results.flowing) { - results.once("drain", process6); + results.once("drain", process2); } else if (!sync) { - process6(); + process2(); } }; let sync = true; @@ -103554,7 +97704,7 @@ var require_commonjs16 = __commonJS({ sync = false; } }; - process6(); + process2(); return results; } streamSync(entry = this.cwd, opts = {}) { @@ -103572,7 +97722,7 @@ var require_commonjs16 = __commonJS({ } const queue = [entry]; let processing = 0; - const process6 = () => { + const process2 = () => { let paused = false; while (!paused) { const dir = queue.shift(); @@ -103606,14 +97756,14 @@ var require_commonjs16 = __commonJS({ } } if (paused && !results.flowing) - results.once("drain", process6); + results.once("drain", process2); }; - process6(); + process2(); return results; } - chdir(path19 = this.cwd) { + chdir(path15 = this.cwd) { const oldCwd = this.cwd; - this.cwd = typeof path19 === "string" ? this.cwd.resolve(path19) : path19; + this.cwd = typeof path15 === "string" ? this.cwd.resolve(path15) : path15; this.cwd[setAsCwd](oldCwd); } }; @@ -103640,8 +97790,8 @@ var require_commonjs16 = __commonJS({ /** * @internal */ - newRoot(fs20) { - return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs20 }); + newRoot(fs17) { + return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs17 }); } /** * Return true if the provided path string is an absolute path @@ -103670,8 +97820,8 @@ var require_commonjs16 = __commonJS({ /** * @internal */ - newRoot(fs20) { - return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs20 }); + newRoot(fs17) { + return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs17 }); } /** * Return true if the provided path string is an absolute path @@ -103694,7 +97844,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 }); @@ -103868,13 +98018,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; @@ -104001,8 +98151,8 @@ var require_processor = __commonJS({ } // match, absolute, ifdir entries() { - return [...this.store.entries()].map(([path19, n]) => [ - path19, + return [...this.store.entries()].map(([path15, n]) => [ + path15, !!(n & 2), !!(n & 1) ]); @@ -104204,7 +98354,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 { @@ -104220,9 +98370,9 @@ var require_walker = __commonJS({ signal; maxDepth; includeChildMatches; - constructor(patterns, path19, opts) { + constructor(patterns, path15, opts) { this.patterns = patterns; - this.path = path19; + this.path = path15; this.opts = opts; this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/"; this.includeChildMatches = opts.includeChildMatches !== false; @@ -104241,11 +98391,11 @@ var require_walker = __commonJS({ }); } } - #ignored(path19) { - return this.seen.has(path19) || !!this.#ignore?.ignored?.(path19); + #ignored(path15) { + return this.seen.has(path15) || !!this.#ignore?.ignored?.(path15); } - #childrenIgnored(path19) { - return !!this.#ignore?.childrenIgnored?.(path19); + #childrenIgnored(path15) { + return !!this.#ignore?.childrenIgnored?.(path15); } // backpressure mechanism pause() { @@ -104461,8 +98611,8 @@ var require_walker = __commonJS({ exports2.GlobUtil = GlobUtil; var GlobWalker = class extends GlobUtil { matches = /* @__PURE__ */ new Set(); - constructor(patterns, path19, opts) { - super(patterns, path19, opts); + constructor(patterns, path15, opts) { + super(patterns, path15, opts); } matchEmit(e) { this.matches.add(e); @@ -104500,8 +98650,8 @@ var require_walker = __commonJS({ exports2.GlobWalker = GlobWalker; var GlobStream = class extends GlobUtil { results; - constructor(patterns, path19, opts) { - super(patterns, path19, opts); + constructor(patterns, path15, opts) { + super(patterns, path15, opts); this.results = new minipass_1.Minipass({ signal: this.signal, objectMode: true @@ -104546,7 +98696,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 { @@ -104800,7 +98950,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; } }); @@ -104856,8 +99006,8 @@ var require_commonjs17 = __commonJS({ // node_modules/archiver-utils/file.js var require_file3 = __commonJS({ "node_modules/archiver-utils/file.js"(exports2, module2) { - var fs20 = require_graceful_fs(); - var path19 = require("path"); + var fs17 = require_graceful_fs(); + var path15 = require("path"); var flatten = require_flatten(); var difference = require_difference(); var union = require_union(); @@ -104882,8 +99032,8 @@ var require_file3 = __commonJS({ return result; }; file.exists = function() { - var filepath = path19.join.apply(path19, arguments); - return fs20.existsSync(filepath); + var filepath = path15.join.apply(path15, arguments); + return fs17.existsSync(filepath); }; file.expand = function(...args) { var options = isPlainObject(args[0]) ? args.shift() : {}; @@ -104896,12 +99046,12 @@ var require_file3 = __commonJS({ }); if (options.filter) { matches = matches.filter(function(filepath) { - filepath = path19.join(options.cwd || "", filepath); + filepath = path15.join(options.cwd || "", filepath); try { if (typeof options.filter === "function") { return options.filter(filepath); } else { - return fs20.statSync(filepath)[options.filter](); + return fs17.statSync(filepath)[options.filter](); } } catch (e) { return false; @@ -104913,7 +99063,7 @@ var require_file3 = __commonJS({ file.expandMapping = function(patterns, destBase, options) { options = Object.assign({ rename: function(destBase2, destPath) { - return path19.join(destBase2 || "", destPath); + return path15.join(destBase2 || "", destPath); } }, options); var files = []; @@ -104921,14 +99071,14 @@ var require_file3 = __commonJS({ file.expand(options, patterns).forEach(function(src) { var destPath = src; if (options.flatten) { - destPath = path19.basename(destPath); + destPath = path15.basename(destPath); } if (options.ext) { destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext); } var dest = options.rename(destBase, destPath, options); if (options.cwd) { - src = path19.join(options.cwd, src); + src = path15.join(options.cwd, src); } dest = dest.replace(pathSeparatorRe, "/"); src = src.replace(pathSeparatorRe, "/"); @@ -105009,8 +99159,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 fs20 = require_graceful_fs(); - var path19 = require("path"); + var fs17 = require_graceful_fs(); + var path15 = require("path"); var isStream = require_is_stream(); var lazystream = require_lazystream(); var normalizePath = require_normalize_path(); @@ -105058,7 +99208,7 @@ var require_archiver_utils = __commonJS({ }; utils.lazyReadStream = function(filepath) { return new lazystream.Readable(function() { - return fs20.createReadStream(filepath); + return fs17.createReadStream(filepath); }); }; utils.normalizeInputSource = function(source) { @@ -105086,7 +99236,7 @@ var require_archiver_utils = __commonJS({ callback = base; base = dirpath; } - fs20.readdir(dirpath, function(err, list) { + fs17.readdir(dirpath, function(err, list) { var i = 0; var file; var filepath; @@ -105098,11 +99248,11 @@ var require_archiver_utils = __commonJS({ if (!file) { return callback(null, results); } - filepath = path19.join(dirpath, file); - fs20.stat(filepath, function(err2, stats) { + filepath = path15.join(dirpath, file); + fs17.stat(filepath, function(err2, stats) { results.push({ path: filepath, - relative: path19.relative(base, filepath).replace(/\\/g, "/"), + relative: path15.relative(base, filepath).replace(/\\/g, "/"), stats }); if (stats && stats.isDirectory()) { @@ -105126,7 +99276,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 = { @@ -105161,13 +99311,13 @@ var require_error3 = __commonJS({ // node_modules/archiver/lib/core.js var require_core2 = __commonJS({ "node_modules/archiver/lib/core.js"(exports2, module2) { - var fs20 = require("fs"); + var fs17 = require("fs"); var glob2 = require_readdir_glob(); - var async = require_async7(); - var path19 = require("path"); + var async = require_async(); + var path15 = 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) { @@ -105225,7 +99375,7 @@ var require_core2 = __commonJS({ data.sourcePath = filepath; task.data = data; this._entriesCount++; - if (data.stats && data.stats instanceof fs20.Stats) { + if (data.stats && data.stats instanceof fs17.Stats) { task = this._updateQueueTaskWithStats(task, data.stats); if (task) { if (data.stats.size) { @@ -105396,7 +99546,7 @@ var require_core2 = __commonJS({ callback(); return; } - fs20.lstat(task.filepath, function(err, stats) { + fs17.lstat(task.filepath, function(err, stats) { if (this._state.aborted) { setImmediate(callback); return; @@ -105439,10 +99589,10 @@ var require_core2 = __commonJS({ task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) { - var linkPath = fs20.readlinkSync(task.filepath); - var dirName = path19.dirname(task.filepath); + var linkPath = fs17.readlinkSync(task.filepath); + var dirName = path15.dirname(task.filepath); task.data.type = "symlink"; - task.data.linkname = path19.relative(dirName, path19.resolve(dirName, linkPath)); + task.data.linkname = path15.relative(dirName, path15.resolve(dirName, linkPath)); task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else { @@ -105895,7 +100045,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, @@ -105979,7 +100129,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)) { @@ -106471,7 +100621,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) { @@ -106588,22 +100738,22 @@ var require_zip_archive_output_stream = __commonJS({ }; ZipArchiveOutputStream.prototype._smartStream = function(ae, callback) { var deflate = ae.getMethod() === constants.METHOD_DEFLATED; - var process6 = deflate ? new DeflateCRC32Stream(this.options.zlib) : new CRC32Stream(); + var process2 = deflate ? new DeflateCRC32Stream(this.options.zlib) : new CRC32Stream(); var error2 = null; function handleStuff() { - var digest = process6.digest().readUInt32BE(0); + var digest = process2.digest().readUInt32BE(0); ae.setCrc(digest); - ae.setSize(process6.size()); - ae.setCompressedSize(process6.size(true)); + ae.setSize(process2.size()); + ae.setCompressedSize(process2.size(true)); this._afterAppend(ae); callback(error2, ae); } - process6.once("end", handleStuff.bind(this)); - process6.once("error", function(err) { + process2.once("end", handleStuff.bind(this)); + process2.once("error", function(err) { error2 = err; }); - process6.pipe(this, { end: false }); - return process6; + process2.pipe(this, { end: false }); + return process2; }; ZipArchiveOutputStream.prototype._writeCentralDirectoryEnd = function() { var records = this._entries.length; @@ -106797,17 +100947,17 @@ var require_zip_stream = __commonJS({ comment: "" }); var isDir = data.type === "directory"; - var isSymlink2 = data.type === "symlink"; + var isSymlink = data.type === "symlink"; if (data.name) { data.name = util.sanitizePath(data.name); - if (!isSymlink2 && data.name.slice(-1) === "/") { + if (!isSymlink && data.name.slice(-1) === "/") { isDir = true; data.type = "directory"; } else if (isDir) { data.name += "/"; } } - if (isDir || isSymlink2) { + if (isDir || isSymlink) { data.store = true; } data.date = util.dateify(data.date); @@ -106902,7 +101052,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); } @@ -106911,7 +101061,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(); } }); @@ -107540,10 +101690,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", noop2); + if (cb) this.stream.on("error", noop); if (isStreamx(pipeTo)) { pipeTo._writableState.pipeline = this.pipeline; - if (cb) pipeTo.on("error", noop2); + if (cb) pipeTo.on("error", noop); pipeTo.on("finish", this.pipeline.finished.bind(this.pipeline)); } else { const onerror = this.pipeline.done.bind(this.pipeline, pipeTo); @@ -108246,7 +102396,7 @@ var require_streamx = __commonJS({ function defaultByteLength(data) { return isTypedArray(data) ? data.byteLength : 1024; } - function noop2() { + function noop() { } function abort() { this.destroy(new Error("Stream aborted.")); @@ -108625,7 +102775,7 @@ var require_extract = __commonJS({ this._stream = null; this._missing = 0; this._longHeader = false; - this._callback = noop2; + this._callback = noop; this._locked = false; this._finished = false; this._pax = null; @@ -108758,7 +102908,7 @@ var require_extract = __commonJS({ } _continueWrite(err) { const cb = this._callback; - this._callback = noop2; + this._callback = noop; cb(err); } _write(data, cb) { @@ -108828,7 +102978,7 @@ var require_extract = __commonJS({ } function onentry(header, stream2, callback) { entryCallback = callback; - stream2.on("error", noop2); + stream2.on("error", noop); if (promiseResolve) { promiseResolve({ value: stream2, done: false }); promiseResolve = promiseReject = null; @@ -108859,7 +103009,7 @@ var require_extract = __commonJS({ module2.exports = function extract2(opts) { return new Extract(opts); }; - function noop2() { + function noop() { } function overflow(size) { size &= 511; @@ -108869,7 +103019,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 @@ -108893,7 +103043,7 @@ var require_pack = __commonJS({ "node_modules/tar-stream/pack.js"(exports2, module2) { var { Readable: Readable2, 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; @@ -108987,7 +103137,7 @@ var require_pack = __commonJS({ var Pack = class extends Readable2 { constructor(opts) { super(opts); - this._drain = noop2; + this._drain = noop; this._finalized = false; this._finalizing = false; this._pending = []; @@ -108999,7 +103149,7 @@ var require_pack = __commonJS({ callback = buffer; buffer = null; } - if (!callback) callback = noop2; + if (!callback) callback = noop; 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; @@ -109074,7 +103224,7 @@ var require_pack = __commonJS({ } _doDrain() { const drain = this._drain; - this._drain = noop2; + this._drain = noop; drain(); } _predestroy() { @@ -109110,7 +103260,7 @@ var require_pack = __commonJS({ } return "file"; } - function noop2() { + function noop() { } function overflow(self2, size) { size &= 511; @@ -109892,8 +104042,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 path19 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path19} 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; @@ -109932,7 +104082,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) { @@ -110457,7 +104607,7 @@ var require_lib4 = __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) { @@ -111035,14 +105185,14 @@ var require_url_state_machine = __commonJS({ return url2.replace(/\u0009|\u000A|\u000D/g, ""); } function shortenPath(url2) { - const path19 = url2.path; - if (path19.length === 0) { + const path15 = url2.path; + if (path15.length === 0) { return; } - if (url2.scheme === "file" && path19.length === 1 && isNormalizedWindowsDriveLetter(path19[0])) { + if (url2.scheme === "file" && path15.length === 1 && isNormalizedWindowsDriveLetter(path15[0])) { return; } - path19.pop(); + path15.pop(); } function includesCredentials(url2) { return url2.username !== "" || url2.password !== ""; @@ -111879,7 +106029,7 @@ var require_URL = __commonJS({ "node_modules/whatwg-url/lib/URL.js"(exports2, module2) { "use strict"; var conversions = require_lib4(); - var utils = require_utils12(); + var utils = require_utils8(); var Impl = require_URL_impl(); var impl = utils.implSymbol; function URL2(url2) { @@ -113261,9 +107411,9 @@ var require_dist_node17 = __commonJS({ return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; } var deprecation = require_dist_node3(); - var once2 = _interopDefault(require_once()); - var logOnceCode = once2((deprecation2) => console.warn(deprecation2)); - var logOnceHeaders = once2((deprecation2) => console.warn(deprecation2)); + var once = _interopDefault(require_once()); + var logOnceCode = once((deprecation2) => console.warn(deprecation2)); + var logOnceHeaders = once((deprecation2) => console.warn(deprecation2)); var RequestError = class extends Error { constructor(message, statusCode, options) { super(message); @@ -114973,7 +109123,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) { @@ -115002,7 +109152,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(); @@ -115057,7 +109207,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); @@ -115213,7 +109363,7 @@ var require_traverse = __commonJS({ })(this.value); }; function walk(root, cb, immutable) { - var path19 = []; + var path15 = []; var parents = []; var alive = true; return (function walker(node_) { @@ -115222,11 +109372,11 @@ var require_traverse = __commonJS({ var state = { node, node_, - path: [].concat(path19), + path: [].concat(path15), parent: parents.slice(-1)[0], - key: path19.slice(-1)[0], - isRoot: path19.length === 0, - level: path19.length, + key: path15.slice(-1)[0], + isRoot: path15.length === 0, + level: path15.length, circular: null, update: function(x) { if (!state.isRoot) { @@ -115281,7 +109431,7 @@ var require_traverse = __commonJS({ parents.push(state); var keys = Object.keys(state.node); keys.forEach(function(key, i2) { - path19.push(key); + path15.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)) { @@ -115290,7 +109440,7 @@ var require_traverse = __commonJS({ child.isLast = i2 == keys.length - 1; child.isFirst = i2 == 0; if (modifiers.post) modifiers.post.call(state, child); - path19.pop(); + path15.pop(); }); parents.pop(); } @@ -116063,8 +110213,8 @@ var require_matcher_stream = __commonJS({ this.push(packet); this.bytesSoFar += matchIndex; } - var finished2 = this.matchFn ? this.matchFn(this.data, this.bytesSoFar) : true; - if (finished2) { + var finished = this.matchFn ? this.matchFn(this.data, this.bytesSoFar) : true; + if (finished) { this.data = new Buffer(""); return; } @@ -116096,7 +110246,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 stream2 = require("stream"); @@ -116129,7 +110279,7 @@ var require_unzip_stream = __commonJS({ var util = require("util"); var zlib3 = require("zlib"); var MatcherStream = require_matcher_stream(); - var Entry = require_entry3(); + var Entry = require_entry(); var states = { STREAM_START: 0, START: 1, @@ -116311,26 +110461,26 @@ var require_unzip_stream = __commonJS({ return requiredLength; case states.CENTRAL_DIRECTORY_FILE_HEADER_SUFFIX: var isUtf8 = (this.parsedEntity.flags & 2048) !== 0; - var path19 = this._decodeString(chunk.slice(0, this.parsedEntity.fileNameLength), isUtf8); + var path15 = 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) { - path19 = extra.parsed.path; + path15 = extra.parsed.path; } this.parsedEntity.extra = extra.parsed; var isUnix = (this.parsedEntity.versionMadeBy & 65280) >> 8 === 3; - var unixAttrs, isSymlink2; + var unixAttrs, isSymlink; if (isUnix) { unixAttrs = this.parsedEntity.externalFileAttributes >>> 16; var fileType = unixAttrs >>> 12; - isSymlink2 = (fileType & 10) === 10; + isSymlink = (fileType & 10) === 10; } if (this.options.debug) { const debugObj = Object.assign({}, this.parsedEntity, { - path: path19, + path: path15, flags: "0x" + this.parsedEntity.flags.toString(16), unixAttrs: unixAttrs && "0" + unixAttrs.toString(8), - isSymlink: isSymlink2, + isSymlink, extraFields: extra.debug }); console.log("decoded CENTRAL_DIRECTORY_FILE_HEADER:", JSON.stringify(debugObj, null, 2)); @@ -116373,10 +110523,10 @@ var require_unzip_stream = __commonJS({ }; UnzipStream.prototype._prepareOutStream = function(vars, entry) { var self2 = this; - var isDirectory2 = vars.uncompressedSize === 0 && /[\/\\]$/.test(entry.path); + var isDirectory = vars.uncompressedSize === 0 && /[\/\\]$/.test(entry.path); entry.path = entry.path.replace(/(?<=^|[/\\]+)[.][.]+(?=[/\\]+|$)/g, "."); - entry.type = isDirectory2 ? "Directory" : "File"; - entry.isDirectory = isDirectory2; + entry.type = isDirectory ? "Directory" : "File"; + entry.isDirectory = isDirectory; var fileSizeKnown = !(vars.flags & 8); if (fileSizeKnown) { entry.size = vars.uncompressedSize; @@ -116764,8 +110914,8 @@ var require_parser_stream = __commonJS({ // node_modules/mkdirp/index.js var require_mkdirp = __commonJS({ "node_modules/mkdirp/index.js"(exports2, module2) { - var path19 = require("path"); - var fs20 = require("fs"); + var path15 = require("path"); + var fs17 = require("fs"); var _0777 = parseInt("0777", 8); module2.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; function mkdirP(p, opts, f, made) { @@ -116776,7 +110926,7 @@ var require_mkdirp = __commonJS({ opts = { mode: opts }; } var mode = opts.mode; - var xfs = opts.fs || fs20; + var xfs = opts.fs || fs17; if (mode === void 0) { mode = _0777; } @@ -116784,7 +110934,7 @@ var require_mkdirp = __commonJS({ var cb = f || /* istanbul ignore next */ function() { }; - p = path19.resolve(p); + p = path15.resolve(p); xfs.mkdir(p, mode, function(er) { if (!er) { made = made || p; @@ -116792,8 +110942,8 @@ var require_mkdirp = __commonJS({ } switch (er.code) { case "ENOENT": - if (path19.dirname(p) === p) return cb(er); - mkdirP(path19.dirname(p), opts, function(er2, made2) { + if (path15.dirname(p) === p) return cb(er); + mkdirP(path15.dirname(p), opts, function(er2, made2) { if (er2) cb(er2, made2); else mkdirP(p, opts, cb, made2); }); @@ -116815,19 +110965,19 @@ var require_mkdirp = __commonJS({ opts = { mode: opts }; } var mode = opts.mode; - var xfs = opts.fs || fs20; + var xfs = opts.fs || fs17; if (mode === void 0) { mode = _0777; } if (!made) made = null; - p = path19.resolve(p); + p = path15.resolve(p); try { xfs.mkdirSync(p, mode); made = made || p; } catch (err0) { switch (err0.code) { case "ENOENT": - made = sync(path19.dirname(p), opts, made); + made = sync(path15.dirname(p), opts, made); sync(p, opts, made); break; // In the case of any other error, just see if there's a dir @@ -116852,8 +111002,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 fs20 = require("fs"); - var path19 = require("path"); + var fs17 = require("fs"); + var path15 = require("path"); var util = require("util"); var mkdirp = require_mkdirp(); var Transform = require("stream").Transform; @@ -116895,11 +111045,11 @@ var require_extract2 = __commonJS({ }; Extract.prototype._processEntry = function(entry) { var self2 = this; - var destPath = path19.join(this.opts.path, entry.path); - var directory = entry.isDirectory ? destPath : path19.dirname(destPath); + var destPath = path15.join(this.opts.path, entry.path); + var directory = entry.isDirectory ? destPath : path15.dirname(destPath); this.unfinishedEntries++; var writeFileFn = function() { - var pipedStream = fs20.createWriteStream(destPath); + var pipedStream = fs17.createWriteStream(destPath); pipedStream.on("close", function() { self2.unfinishedEntries--; self2._notifyAwaiter(); @@ -117023,10 +111173,10 @@ var require_download_artifact = __commonJS({ parsed.search = ""; return parsed.toString(); }; - function exists(path19) { + function exists(path15) { return __awaiter4(this, void 0, void 0, function* () { try { - yield promises_1.default.access(path19); + yield promises_1.default.access(path15); return true; } catch (error2) { if (error2.code === "ENOENT") { @@ -117257,12 +111407,12 @@ var require_dist_node24 = __commonJS({ octokit.log.debug("request", options); const start = Date.now(); const requestOptions = octokit.request.endpoint.parse(options); - const path19 = requestOptions.url.replace(options.baseUrl, ""); + const path15 = requestOptions.url.replace(options.baseUrl, ""); return request(options).then((response) => { - octokit.log.info(`${requestOptions.method} ${path19} - ${response.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path15} - ${response.status} in ${Date.now() - start}ms`); return response; }).catch((error2) => { - octokit.log.info(`${requestOptions.method} ${path19} - ${error2.status} in ${Date.now() - start}ms`); + octokit.log.info(`${requestOptions.method} ${path15} - ${error2.status} in ${Date.now() - start}ms`); throw error2; }); }); @@ -117397,7 +111547,7 @@ var require_get_artifact = __commonJS({ var github_1 = require_github2(); var plugin_retry_1 = require_dist_node25(); var core18 = __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(); @@ -117521,7 +111671,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(); @@ -117627,7 +111777,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(); @@ -117982,13 +112132,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(path19) { - if (!path19) { - throw new Error(`Artifact path: ${path19}, is incorrectly provided`); + function checkArtifactFilePath(path15) { + if (!path15) { + throw new Error(`Artifact path: ${path15}, is incorrectly provided`); } for (const [invalidCharacterKey, errorMessageForCharacter] of invalidArtifactFilePathCharacters) { - if (path19.includes(invalidCharacterKey)) { - throw new Error(`Artifact path is not valid: ${path19}. Contains the following character: ${errorMessageForCharacter} + if (path15.includes(invalidCharacterKey)) { + throw new Error(`Artifact path is not valid: ${path15}. Contains the following character: ${errorMessageForCharacter} Invalid characters include: ${Array.from(invalidArtifactFilePathCharacters.values()).toString()} @@ -118034,25 +112184,25 @@ var require_upload_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getUploadSpecification = void 0; - var fs20 = __importStar4(require("fs")); + var fs17 = __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 (!fs20.existsSync(rootDirectory)) { + if (!fs17.existsSync(rootDirectory)) { throw new Error(`Provided rootDirectory ${rootDirectory} does not exist`); } - if (!fs20.statSync(rootDirectory).isDirectory()) { + if (!fs17.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 (!fs20.existsSync(file)) { + if (!fs17.existsSync(file)) { throw new Error(`File ${file} does not exist`); } - if (!fs20.statSync(file).isDirectory()) { + if (!fs17.statSync(file).isDirectory()) { file = (0, path_1.normalize)(file); file = (0, path_1.resolve)(file); if (!file.startsWith(rootDirectory)) { @@ -118077,11 +112227,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 fs20 = require("fs"); + var fs17 = require("fs"); var os3 = require("os"); - var path19 = require("path"); + var path15 = require("path"); var crypto = require("crypto"); - var _c = { fs: fs20.constants, os: os3.constants }; + var _c = { fs: fs17.constants, os: os3.constants }; var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; var TEMPLATE_PATTERN = /XXXXXX/; var DEFAULT_TRIES = 3; @@ -118093,13 +112243,13 @@ var require_tmp = __commonJS({ var FILE_MODE = 384; var EXIT = "exit"; var _removeObjects = []; - var FN_RMDIR_SYNC = fs20.rmdirSync.bind(fs20); + var FN_RMDIR_SYNC = fs17.rmdirSync.bind(fs17); var _gracefulCleanup = false; function rimraf(dirPath, callback) { - return fs20.rm(dirPath, { recursive: true }, callback); + return fs17.rm(dirPath, { recursive: true }, callback); } function FN_RIMRAF_SYNC(dirPath) { - return fs20.rmSync(dirPath, { recursive: true }); + return fs17.rmSync(dirPath, { recursive: true }); } function tmpName(options, callback) { const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; @@ -118109,7 +112259,7 @@ var require_tmp = __commonJS({ (function _getUniqueName() { try { const name = _generateTmpName(sanitizedOptions); - fs20.stat(name, function(err2) { + fs17.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)); @@ -118129,7 +112279,7 @@ var require_tmp = __commonJS({ do { const name = _generateTmpName(sanitizedOptions); try { - fs20.statSync(name); + fs17.statSync(name); } catch (e) { return name; } @@ -118140,10 +112290,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); - fs20.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) { + fs17.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) { if (err2) return cb(err2); if (opts.discardDescriptor) { - return fs20.close(fd, function _discardCallback(possibleErr) { + return fs17.close(fd, function _discardCallback(possibleErr) { return cb(possibleErr, name, void 0, _prepareTmpFileRemoveCallback(name, -1, opts, false)); }); } else { @@ -118157,9 +112307,9 @@ var require_tmp = __commonJS({ const args = _parseArguments(options), opts = args[0]; const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; const name = tmpNameSync(opts); - let fd = fs20.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); + let fd = fs17.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); if (opts.discardDescriptor) { - fs20.closeSync(fd); + fs17.closeSync(fd); fd = void 0; } return { @@ -118172,7 +112322,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); - fs20.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) { + fs17.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) { if (err2) return cb(err2); cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false)); }); @@ -118181,7 +112331,7 @@ var require_tmp = __commonJS({ function dirSync(options) { const args = _parseArguments(options), opts = args[0]; const name = tmpNameSync(opts); - fs20.mkdirSync(name, opts.mode || DIR_MODE); + fs17.mkdirSync(name, opts.mode || DIR_MODE); return { name, removeCallback: _prepareTmpDirRemoveCallback(name, opts, true) @@ -118195,20 +112345,20 @@ var require_tmp = __commonJS({ next(); }; if (0 <= fdPath[0]) - fs20.close(fdPath[0], function() { - fs20.unlink(fdPath[1], _handler); + fs17.close(fdPath[0], function() { + fs17.unlink(fdPath[1], _handler); }); - else fs20.unlink(fdPath[1], _handler); + else fs17.unlink(fdPath[1], _handler); } function _removeFileSync(fdPath) { let rethrownException = null; try { - if (0 <= fdPath[0]) fs20.closeSync(fdPath[0]); + if (0 <= fdPath[0]) fs17.closeSync(fdPath[0]); } catch (e) { if (!_isEBADF(e) && !_isENOENT(e)) throw e; } finally { try { - fs20.unlinkSync(fdPath[1]); + fs17.unlinkSync(fdPath[1]); } catch (e) { if (!_isENOENT(e)) rethrownException = e; } @@ -118224,7 +112374,7 @@ var require_tmp = __commonJS({ return sync ? removeCallbackSync : removeCallback; } function _prepareTmpDirRemoveCallback(name, opts, sync) { - const removeFunction = opts.unsafeCleanup ? rimraf : fs20.rmdir.bind(fs20); + const removeFunction = opts.unsafeCleanup ? rimraf : fs17.rmdir.bind(fs17); const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC; const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync); const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync); @@ -118286,35 +112436,35 @@ var require_tmp = __commonJS({ return [actualOptions, callback]; } function _resolvePath(name, tmpDir, cb) { - const pathToResolve = path19.isAbsolute(name) ? name : path19.join(tmpDir, name); - fs20.stat(pathToResolve, function(err) { + const pathToResolve = path15.isAbsolute(name) ? name : path15.join(tmpDir, name); + fs17.stat(pathToResolve, function(err) { if (err) { - fs20.realpath(path19.dirname(pathToResolve), function(err2, parentDir) { + fs17.realpath(path15.dirname(pathToResolve), function(err2, parentDir) { if (err2) return cb(err2); - cb(null, path19.join(parentDir, path19.basename(pathToResolve))); + cb(null, path15.join(parentDir, path15.basename(pathToResolve))); }); } else { - fs20.realpath(path19, cb); + fs17.realpath(path15, cb); } }); } function _resolvePathSync(name, tmpDir) { - const pathToResolve = path19.isAbsolute(name) ? name : path19.join(tmpDir, name); + const pathToResolve = path15.isAbsolute(name) ? name : path15.join(tmpDir, name); try { - fs20.statSync(pathToResolve); - return fs20.realpathSync(pathToResolve); + fs17.statSync(pathToResolve); + return fs17.realpathSync(pathToResolve); } catch (_err) { - const parentDir = fs20.realpathSync(path19.dirname(pathToResolve)); - return path19.join(parentDir, path19.basename(pathToResolve)); + const parentDir = fs17.realpathSync(path15.dirname(pathToResolve)); + return path15.join(parentDir, path15.basename(pathToResolve)); } } function _generateTmpName(opts) { const tmpDir = opts.tmpdir; if (!_isUndefined(opts.name)) { - return path19.join(tmpDir, opts.dir, opts.name); + return path15.join(tmpDir, opts.dir, opts.name); } if (!_isUndefined(opts.template)) { - return path19.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); + return path15.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); } const name = [ opts.prefix ? opts.prefix : "tmp", @@ -118324,13 +112474,13 @@ var require_tmp = __commonJS({ _randomChars(12), opts.postfix ? "-" + opts.postfix : "" ].join(""); - return path19.join(tmpDir, opts.dir, name); + return path15.join(tmpDir, opts.dir, name); } function _assertOptionsBase(options) { if (!_isUndefined(options.name)) { const name = options.name; - if (path19.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); - const basename = path19.basename(name); + if (path15.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); + const basename = path15.basename(name); if (basename === ".." || basename === "." || basename !== name) throw new Error(`name option must not contain a path, found "${name}".`); } @@ -118352,7 +112502,7 @@ var require_tmp = __commonJS({ if (_isUndefined(name)) return cb(null); _resolvePath(name, tmpDir, function(err, resolvedPath) { if (err) return cb(err); - const relativePath = path19.relative(tmpDir, resolvedPath); + const relativePath = path15.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`)); } @@ -118362,7 +112512,7 @@ var require_tmp = __commonJS({ function _getRelativePathSync(option, name, tmpDir) { if (_isUndefined(name)) return; const resolvedPath = _resolvePathSync(name, tmpDir); - const relativePath = path19.relative(tmpDir, resolvedPath); + const relativePath = path15.relative(tmpDir, resolvedPath); if (!resolvedPath.startsWith(tmpDir)) { throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`); } @@ -118409,10 +112559,10 @@ var require_tmp = __commonJS({ _gracefulCleanup = true; } function _getTmpDir(options, cb) { - return fs20.realpath(options && options.tmpdir || os3.tmpdir(), cb); + return fs17.realpath(options && options.tmpdir || os3.tmpdir(), cb); } function _getTmpDirSync(options) { - return fs20.realpathSync(options && options.tmpdir || os3.tmpdir()); + return fs17.realpathSync(options && options.tmpdir || os3.tmpdir()); } process.addListener(EXIT, _garbageCollector); Object.defineProperty(module2.exports, "tmpdir", { @@ -118436,42 +112586,42 @@ var require_tmp = __commonJS({ var require_tmp_promise = __commonJS({ "node_modules/tmp-promise/index.js"(exports2, module2) { "use strict"; - var { promisify: promisify3 } = require("util"); + var { promisify: promisify2 } = require("util"); var tmp = require_tmp(); module2.exports.fileSync = tmp.fileSync; - var fileWithOptions = promisify3( + var fileWithOptions = promisify2( (options, cb) => tmp.file( options, - (err, path19, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path19, fd, cleanup: promisify3(cleanup) }) + (err, path15, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path15, fd, cleanup: promisify2(cleanup) }) ) ); module2.exports.file = async (options) => fileWithOptions(options); module2.exports.withFile = async function withFile(fn, options) { - const { path: path19, fd, cleanup } = await module2.exports.file(options); + const { path: path15, fd, cleanup } = await module2.exports.file(options); try { - return await fn({ path: path19, fd }); + return await fn({ path: path15, fd }); } finally { await cleanup(); } }; module2.exports.dirSync = tmp.dirSync; - var dirWithOptions = promisify3( + var dirWithOptions = promisify2( (options, cb) => tmp.dir( options, - (err, path19, cleanup) => err ? cb(err) : cb(void 0, { path: path19, cleanup: promisify3(cleanup) }) + (err, path15, cleanup) => err ? cb(err) : cb(void 0, { path: path15, cleanup: promisify2(cleanup) }) ) ); module2.exports.dir = async (options) => dirWithOptions(options); module2.exports.withDir = async function withDir(fn, options) { - const { path: path19, cleanup } = await module2.exports.dir(options); + const { path: path15, cleanup } = await module2.exports.dir(options); try { - return await fn({ path: path19 }); + return await fn({ path: path15 }); } finally { await cleanup(); } }; module2.exports.tmpNameSync = tmp.tmpNameSync; - module2.exports.tmpName = promisify3(tmp.tmpName); + module2.exports.tmpName = promisify2(tmp.tmpName); module2.exports.tmpdir = tmp.tmpdir; module2.exports.setGracefulCleanup = tmp.setGracefulCleanup; } @@ -118849,7 +112999,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) { @@ -119159,7 +113309,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) { @@ -119266,10 +113416,10 @@ var require_upload_gzip = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.createGZipFileInBuffer = exports2.createGZipFileOnDisk = void 0; - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var zlib3 = __importStar4(require("zlib")); var util_1 = require("util"); - var stat = (0, util_1.promisify)(fs20.stat); + var stat = (0, util_1.promisify)(fs17.stat); var gzipExemptFileExtensions = [ ".gz", ".gzip", @@ -119302,9 +113452,9 @@ var require_upload_gzip = __commonJS({ } } return new Promise((resolve8, reject) => { - const inputStream = fs20.createReadStream(originalFilePath); + const inputStream = fs17.createReadStream(originalFilePath); const gzip = zlib3.createGzip(); - const outputStream = fs20.createWriteStream(tempFilePath); + const outputStream = fs17.createWriteStream(tempFilePath); inputStream.pipe(gzip).pipe(outputStream); outputStream.on("finish", () => __awaiter4(this, void 0, void 0, function* () { const size = (yield stat(tempFilePath)).size; @@ -119322,7 +113472,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 = fs20.createReadStream(originalFilePath); + const inputStream = fs17.createReadStream(originalFilePath); const gzip = zlib3.createGzip(); inputStream.pipe(gzip); const chunks = []; @@ -119414,7 +113564,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 core18 = __importStar4(require_core()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { @@ -119531,11 +113681,11 @@ var require_upload_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.UploadHttpClient = void 0; - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var core18 = __importStar4(require_core()); var tmp = __importStar4(require_tmp_promise()); var stream2 = __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"); @@ -119545,7 +113695,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)(fs20.stat); + var stat = (0, util_1.promisify)(fs17.stat); var UploadHttpClient = class { constructor() { this.uploadHttpManager = new http_manager_1.HttpManager((0, config_variables_1.getUploadFileConcurrency)(), "@actions/artifact-upload"); @@ -119682,7 +113832,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 = () => fs20.createReadStream(parameters.file); + openUploadStream = () => fs17.createReadStream(parameters.file); isGzip = false; uploadFileSize = totalFileSize; } else { @@ -119728,7 +113878,7 @@ var require_upload_http_client = __commonJS({ failedChunkSizes += chunkSize; continue; } - const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, () => fs20.createReadStream(uploadFilePath, { + const result = yield this.uploadChunk(httpClientIndex, parameters.resourceUrl, () => fs17.createReadStream(uploadFilePath, { start: startChunkIndex, end: endChunkIndex, autoClose: false @@ -119923,10 +114073,10 @@ var require_download_http_client = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DownloadHttpClient = void 0; - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var core18 = __importStar4(require_core()); var zlib3 = __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"); @@ -120014,7 +114164,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 = fs20.createWriteStream(downloadPath); + let destinationStream = fs17.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); @@ -120056,7 +114206,7 @@ var require_download_http_client = __commonJS({ } }); yield (0, utils_1.rmFile)(fileDownloadPath); - destinationStream = fs20.createWriteStream(fileDownloadPath); + destinationStream = fs17.createWriteStream(fileDownloadPath); }); while (retryCount <= retryLimit) { let response; @@ -120173,21 +114323,21 @@ var require_download_specification = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.getDownloadSpecification = void 0; - var path19 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); function getDownloadSpecification(artifactName, artifactEntries, downloadPath, includeRootDirectory) { const directories = /* @__PURE__ */ new Set(); const specifications = { - rootDownloadLocation: includeRootDirectory ? path19.join(downloadPath, artifactName) : downloadPath, + rootDownloadLocation: includeRootDirectory ? path15.join(downloadPath, artifactName) : downloadPath, directoryStructure: [], emptyFilesToCreate: [], filesToDownload: [] }; for (const entry of artifactEntries) { if (entry.path.startsWith(`${artifactName}/`) || entry.path.startsWith(`${artifactName}\\`)) { - const normalizedPathEntry = path19.normalize(entry.path); - const filePath = path19.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); + const normalizedPathEntry = path15.normalize(entry.path); + const filePath = path15.join(downloadPath, includeRootDirectory ? normalizedPathEntry : normalizedPathEntry.replace(artifactName, "")); if (entry.itemType === "file") { - directories.add(path19.dirname(filePath)); + directories.add(path15.dirname(filePath)); if (entry.fileLength === 0) { specifications.emptyFilesToCreate.push(filePath); } else { @@ -120269,7 +114419,7 @@ var require_artifact_client = __commonJS({ 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(); + 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(); @@ -120329,7 +114479,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz return uploadResponse; }); } - downloadArtifact(name, path19, options) { + downloadArtifact(name, path15, options) { return __awaiter4(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const artifacts = yield downloadHttpClient.listArtifacts(); @@ -120343,12 +114493,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 (!path19) { - path19 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path15) { + path15 = (0, config_variables_1.getWorkSpaceDirectory)(); } - 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); + 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); if (downloadSpecification.filesToDownload.length === 0) { core18.info(`No downloadable files were found for the artifact: ${artifactToDownload.name}`); } else { @@ -120363,7 +114513,7 @@ Note: The size of downloaded zips can differ significantly from the reported siz }; }); } - downloadAllArtifacts(path19) { + downloadAllArtifacts(path15) { return __awaiter4(this, void 0, void 0, function* () { const downloadHttpClient = new download_http_client_1.DownloadHttpClient(); const response = []; @@ -120372,18 +114522,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 (!path19) { - path19 = (0, config_variables_1.getWorkSpaceDirectory)(); + if (!path15) { + path15 = (0, config_variables_1.getWorkSpaceDirectory)(); } - path19 = (0, path_1.normalize)(path19); - path19 = (0, path_1.resolve)(path19); + path15 = (0, path_1.normalize)(path15); + path15 = (0, path_1.resolve)(path15); 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, path19, true); + const downloadSpecification = (0, download_specification_1.getDownloadSpecification)(currentArtifactToDownload.name, items.value, path15, true); if (downloadSpecification.filesToDownload.length === 0) { core18.info(`No downloadable files were found for any artifact ${currentArtifactToDownload.name}`); } else { @@ -120524,7 +114674,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 path19 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -120532,7 +114682,7 @@ var require_internal_path_helper2 = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path19.dirname(p); + let result = path15.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -120570,7 +114720,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 += path19.sep; + root += path15.sep; } return root + itemPath; } @@ -120608,10 +114758,10 @@ var require_internal_path_helper2 = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path19.sep)) { + if (!p.endsWith(path15.sep)) { return p; } - if (p === path19.sep) { + if (p === path15.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -120762,7 +114912,7 @@ var require_internal_path2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path19 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -120777,12 +114927,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(path19.sep); + this.segments = itemPath.split(path15.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path19.basename(remaining); + const basename = path15.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -120800,7 +114950,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(path19.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path15.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -120811,12 +114961,12 @@ var require_internal_path2 = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path19.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 += path19.sep; + result += path15.sep; } result += this.segments[i]; } @@ -120864,7 +115014,7 @@ var require_internal_pattern2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os3 = __importStar4(require("os")); - var path19 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -120893,7 +115043,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(path19.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 === "")); @@ -120917,8 +115067,8 @@ var require_internal_pattern2 = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path19.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path19.sep}`; + if (!itemPath.endsWith(path15.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path15.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -120953,9 +115103,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(`.${path19.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path15.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path19.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path15.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}'`); @@ -121039,8 +115189,8 @@ var require_internal_search_state2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path19, level) { - this.path = path19; + constructor(path15, level) { + this.path = path15; this.level = level; } }; @@ -121164,9 +115314,9 @@ var require_internal_globber2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core18 = __importStar4(require_core()); - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); - var path19 = __importStar4(require("path")); + var path15 = __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(); @@ -121218,7 +115368,7 @@ var require_internal_globber2 = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core18.debug(`Search path '${searchPath}'`); try { - yield __await4(fs20.promises.lstat(searchPath)); + yield __await4(fs17.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -121242,7 +115392,7 @@ var require_internal_globber2 = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path19.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path15.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -121252,7 +115402,7 @@ var require_internal_globber2 = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs20.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path19.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs17.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); @@ -121287,7 +115437,7 @@ var require_internal_globber2 = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs20.promises.stat(item.path); + stats = yield fs17.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -121299,10 +115449,10 @@ var require_internal_globber2 = __commonJS({ throw err; } } else { - stats = yield fs20.promises.lstat(item.path); + stats = yield fs17.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs20.promises.realpath(item.path); + const realPath = yield fs17.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -121401,10 +115551,10 @@ var require_internal_hash_files = __commonJS({ exports2.hashFiles = void 0; var crypto = __importStar4(require("crypto")); var core18 = __importStar4(require_core()); - var fs20 = __importStar4(require("fs")); + var fs17 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); - var path19 = __importStar4(require("path")); + var path15 = __importStar4(require("path")); function hashFiles2(globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; var _d; @@ -121420,17 +115570,17 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path19.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path15.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } - if (fs20.statSync(file).isDirectory()) { + if (fs17.statSync(file).isDirectory()) { writeDelegate(`Skip directory '${file}'.`); continue; } const hash2 = crypto.createHash("sha256"); const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs20.createReadStream(file), hash2); + yield pipeline(fs17.createReadStream(file), hash2); result.write(hash2.digest()); count++; if (!hasMatch) { @@ -124415,16 +118565,16 @@ var require_sarif_schema_2_1_0 = __commonJS({ var core17 = __toESM(require_core()); // src/actions-util.ts -var fs5 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var fs2 = __toESM(require("fs")); +var path2 = __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 fs4 = __toESM(require("fs")); -var path5 = __toESM(require("path")); +var fs = __toESM(require("fs")); +var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -124564,764 +118714,33 @@ function checkDiskSpace(directoryPath, dependencies = { return checkUnix(directoryPath); } -// 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_path7 = require("node:path"); +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 fs20 = options.fs || await import("node:fs/promises"); + 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 fs20.lstat(itemPath, { bigint: true }) : await fs20.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + 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 fs20.readdir(itemPath) : await fs20.readdir(itemPath).catch((error2) => errors.push(error2)); + 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_path7.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) ) ); } @@ -127971,7 +121390,7 @@ function getToolNames(sarif) { return Object.keys(toolNames); } function getCodeQLDatabasePath(config, language) { - return path5.resolve(config.dbLocation, language); + return path.resolve(config.dbLocation, language); } function parseGitHubUrl(inputUrl) { const originalUrl = inputUrl; @@ -128088,9 +121507,9 @@ async function codeQlVersionAtLeast(codeql, requiredVersion) { } async function bundleDb(config, language, codeql, dbName) { const databasePath = getCodeQLDatabasePath(config, language); - const databaseBundlePath = path5.resolve(config.dbLocation, `${dbName}.zip`); - if (fs4.existsSync(databaseBundlePath)) { - await deleteAsync(databaseBundlePath, { force: true }); + const databaseBundlePath = path.resolve(config.dbLocation, `${dbName}.zip`); + if (fs.existsSync(databaseBundlePath)) { + await fs.promises.rm(databaseBundlePath, { force: true }); } await codeql.databaseBundle(databasePath, databaseBundlePath, dbName); return databaseBundlePath; @@ -128122,7 +121541,7 @@ function getTestingEnvironment() { } function doesDirectoryExist(dirPath) { try { - const stats = fs4.lstatSync(dirPath); + const stats = fs.lstatSync(dirPath); return stats.isDirectory(); } catch { return false; @@ -128132,13 +121551,13 @@ function listFolder(dir) { if (!doesDirectoryExist(dir)) { return []; } - const entries = fs4.readdirSync(dir, { withFileTypes: true }); + const entries = fs.readdirSync(dir, { withFileTypes: true }); let files = []; for (const entry of entries) { if (entry.isFile()) { - files.push(path5.resolve(dir, entry.name)); + files.push(path.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - files = files.concat(listFolder(path5.resolve(dir, entry.name))); + files = files.concat(listFolder(path.resolve(dir, entry.name))); } } return files; @@ -128227,16 +121646,10 @@ async function checkSipEnablement(logger) { async function cleanUpGlob(glob2, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await deleteAsync(glob2, { force: true }); - if (deletedPaths.length === 0) { - logger.warning( - `Failed to clean up ${name}: no files found matching ${glob2}.` - ); - } else if (deletedPaths.length === 1) { - logger.debug(`Cleaned up ${name}.`); - } else { - logger.debug(`Cleaned up ${name} (${deletedPaths.length} files).`); - } + await fs.promises.rm(glob2, { + force: true, + recursive: true + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } @@ -128281,17 +121694,17 @@ function getWorkflowEventName() { } function isRunningLocalAction() { const relativeScriptPath = getRelativeScriptPath(); - return relativeScriptPath.startsWith("..") || path6.isAbsolute(relativeScriptPath); + return relativeScriptPath.startsWith("..") || path2.isAbsolute(relativeScriptPath); } function getRelativeScriptPath() { const runnerTemp = getRequiredEnvParam("RUNNER_TEMP"); - const actionsDirectory = path6.join(path6.dirname(runnerTemp), "_actions"); - return path6.relative(actionsDirectory, __filename); + const actionsDirectory = path2.join(path2.dirname(runnerTemp), "_actions"); + return path2.relative(actionsDirectory, __filename); } function getWorkflowEvent() { const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH"); try { - return JSON.parse(fs5.readFileSync(eventJsonFile, "utf-8")); + return JSON.parse(fs2.readFileSync(eventJsonFile, "utf-8")); } catch (e) { throw new Error( `Unable to read workflow event JSON from ${eventJsonFile}: ${e}` @@ -128301,26 +121714,26 @@ function getWorkflowEvent() { async function printDebugLogs(config) { for (const language of config.languages) { const databaseDirectory = getCodeQLDatabasePath(config, language); - const logsDirectory = path6.join(databaseDirectory, "log"); + const logsDirectory = path2.join(databaseDirectory, "log"); if (!doesDirectoryExist(logsDirectory)) { core4.info(`Directory ${logsDirectory} does not exist.`); continue; } const walkLogFiles = (dir) => { - const entries = fs5.readdirSync(dir, { withFileTypes: true }); + const entries = fs2.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 = path6.resolve(dir, entry.name); + const absolutePath = path2.resolve(dir, entry.name); core4.startGroup( `CodeQL Debug Logs - ${language} - ${entry.name} from file at path ${absolutePath}` ); - process.stdout.write(fs5.readFileSync(absolutePath)); + process.stdout.write(fs2.readFileSync(absolutePath)); core4.endGroup(); } else if (entry.isDirectory()) { - walkLogFiles(path6.resolve(dir, entry.name)); + walkLogFiles(path2.resolve(dir, entry.name)); } } }; @@ -128644,8 +122057,8 @@ function wrapApiConfigurationError(e) { var core6 = __toESM(require_core()); // src/codeql.ts -var fs13 = __toESM(require("fs")); -var path13 = __toESM(require("path")); +var fs10 = __toESM(require("fs")); +var path9 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -128890,8 +122303,8 @@ function wrapCliConfigurationError(cliError) { } // src/config-utils.ts -var fs9 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var fs6 = __toESM(require("fs")); +var path6 = __toESM(require("path")); // src/analyses.ts var AnalysisKind = /* @__PURE__ */ ((AnalysisKind2) => { @@ -128930,12 +122343,12 @@ var PACK_IDENTIFIER_PATTERN = (function() { })(); // src/diff-informed-analysis-utils.ts -var fs8 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var fs5 = __toESM(require("fs")); +var path5 = __toESM(require("path")); // src/feature-flags.ts -var fs7 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var fs4 = __toESM(require("fs")); +var path4 = __toESM(require("path")); var semver4 = __toESM(require_semver2()); // src/defaults.json @@ -128943,8 +122356,8 @@ var bundleVersion = "codeql-bundle-v2.23.3"; var cliVersion = "2.23.3"; // src/overlay-database-utils.ts -var fs6 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var fs3 = __toESM(require("fs")); +var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts @@ -129070,8 +122483,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path19 = decodeGitFilePath(match[2]); - fileOidMap[path19] = oid; + const path15 = decodeGitFilePath(match[2]); + fileOidMap[path15] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -129177,12 +122590,12 @@ async function writeBaseDatabaseOidsFile(config, sourceRoot) { const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOidsJson = JSON.stringify(gitFileOids); const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - await fs6.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); + await fs3.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); } async function readBaseDatabaseOidsFile(config, logger) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); try { - const contents = await fs6.promises.readFile( + const contents = await fs3.promises.readFile( baseDatabaseOidsFilePath, "utf-8" ); @@ -129195,7 +122608,7 @@ async function readBaseDatabaseOidsFile(config, logger) { } } function getBaseDatabaseOidsFilePath(config) { - return path7.join(config.dbLocation, "base-database-oids.json"); + return path3.join(config.dbLocation, "base-database-oids.json"); } async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); @@ -129205,14 +122618,14 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path7.join( + const overlayChangesFile = path3.join( getTemporaryDirectory(), "overlay-changes.json" ); logger.debug( `Writing overlay changed files to ${overlayChangesFile}: ${changedFilesJson}` ); - await fs6.promises.writeFile(overlayChangesFile, changedFilesJson); + await fs3.promises.writeFile(overlayChangesFile, changedFilesJson); return overlayChangesFile; } function computeChangedFiles(baseFileOids, overlayFileOids) { @@ -129440,7 +122853,7 @@ var Features = class { this.gitHubFeatureFlags = new GitHubFeatureFlags( gitHubVersion, repositoryNwo, - path8.join(tempDir, FEATURE_FLAGS_FILE_NAME), + path4.join(tempDir, FEATURE_FLAGS_FILE_NAME), logger ); } @@ -129619,12 +123032,12 @@ var GitHubFeatureFlags = class { } async readLocalFlags() { try { - if (fs7.existsSync(this.featureFlagsFile)) { + if (fs4.existsSync(this.featureFlagsFile)) { this.logger.debug( `Loading feature flags from ${this.featureFlagsFile}` ); return JSON.parse( - fs7.readFileSync(this.featureFlagsFile, "utf8") + fs4.readFileSync(this.featureFlagsFile, "utf8") ); } } catch (e) { @@ -129637,7 +123050,7 @@ var GitHubFeatureFlags = class { async writeLocalFlags(flags) { try { this.logger.debug(`Writing feature flags to ${this.featureFlagsFile}`); - fs7.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); + fs4.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); } catch (e) { this.logger.warning( `Error writing cached feature flags file ${this.featureFlagsFile}: ${e}.` @@ -129701,15 +123114,15 @@ var GitHubFeatureFlags = class { // src/diff-informed-analysis-utils.ts function getDiffRangesJsonFilePath() { - return path9.join(getTemporaryDirectory(), "pr-diff-range.json"); + return path5.join(getTemporaryDirectory(), "pr-diff-range.json"); } function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); - if (!fs8.existsSync(jsonFilePath)) { + if (!fs5.existsSync(jsonFilePath)) { logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`); return void 0; } - const jsonContents = fs8.readFileSync(jsonFilePath, "utf8"); + const jsonContents = fs5.readFileSync(jsonFilePath, "utf8"); logger.debug( `Read pr-diff-range JSON file from ${jsonFilePath}: ${jsonContents}` @@ -129746,14 +123159,14 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ }; function getPathToParsedConfigFile(tempDir) { - return path10.join(tempDir, "config"); + return path6.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); - if (!fs9.existsSync(configFile)) { + if (!fs6.existsSync(configFile)) { return void 0; } - const configString = fs9.readFileSync(configFile, "utf8"); + const configString = fs6.readFileSync(configFile, "utf8"); logger.debug("Loaded config:"); logger.debug(configString); const config = JSON.parse(configString); @@ -129792,8 +123205,8 @@ function isCodeScanningEnabled(config) { } // src/setup-codeql.ts -var fs12 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var fs9 = __toESM(require("fs")); +var path8 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver7 = __toESM(require_semver2()); @@ -129854,7 +123267,7 @@ var v4_default = v4; // src/tar.ts var import_child_process = require("child_process"); -var fs10 = __toESM(require("fs")); +var fs7 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -129927,7 +123340,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs10.mkdirSync(dest, { recursive: true }); + fs7.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -130011,9 +123424,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs11 = __toESM(require("fs")); +var fs8 = __toESM(require("fs")); var os = __toESM(require("os")); -var path11 = __toESM(require("path")); +var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -130118,7 +123531,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs11.mkdirSync(dest, { recursive: true }); + fs8.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -130146,7 +123559,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path11.join( + return path7.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver6.clean(version) || version, @@ -130155,7 +123568,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs11.writeFileSync(markerFilePath, ""); + fs8.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url2) { @@ -130290,7 +123703,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs12.existsSync(path12.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs9.existsSync(path8.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -130663,7 +124076,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path12.join(tempDir, v4_default()); + return path8.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -130751,7 +124164,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path13.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path9.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -130813,12 +124226,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path13.join( + const tracingConfigPath = path9.join( extractorPath, "tools", "tracing-config.lua" ); - return fs13.existsSync(tracingConfigPath); + return fs10.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -130889,7 +124302,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path13.join( + const autobuildCmd = path9.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -131273,7 +124686,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs13.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs10.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -131296,7 +124709,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path13.resolve(config.tempDir, "user-config.yaml"); + return path9.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -131317,16 +124730,16 @@ async function getJobRunUuidSarifOptions(codeql) { } // src/debug-artifacts.ts -var fs15 = __toESM(require("fs")); -var path15 = __toESM(require("path")); +var fs12 = __toESM(require("fs")); +var path11 = __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()); // src/analyze.ts -var fs14 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var fs11 = __toESM(require("fs")); +var path10 = __toESM(require("path")); var io5 = __toESM(require_io()); // src/autobuild.ts @@ -131357,7 +124770,7 @@ function dbIsFinalized(config, language, logger) { const dbPath = getCodeQLDatabasePath(config, language); try { const dbInfo = load( - fs14.readFileSync(path14.resolve(dbPath, "codeql-database.yml"), "utf8") + fs11.readFileSync(path10.resolve(dbPath, "codeql-database.yml"), "utf8") ); return !("inProgress" in dbInfo); } catch { @@ -131375,17 +124788,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 && fs15.existsSync(analyzeActionOutputDir) && fs15.lstatSync(analyzeActionOutputDir).isDirectory()) { - const sarifFile = path15.resolve( + if (analyzeActionOutputDir !== void 0 && fs12.existsSync(analyzeActionOutputDir) && fs12.lstatSync(analyzeActionOutputDir).isDirectory()) { + const sarifFile = path11.resolve( analyzeActionOutputDir, `${language}.sarif` ); - if (fs15.existsSync(sarifFile)) { - const sarifInDbLocation = path15.resolve( + if (fs12.existsSync(sarifFile)) { + const sarifInDbLocation = path11.resolve( config.dbLocation, `${language}.sarif` ); - fs15.copyFileSync(sarifFile, sarifInDbLocation); + fs12.copyFileSync(sarifFile, sarifInDbLocation); return sarifInDbLocation; } } @@ -131436,13 +124849,13 @@ async function tryUploadAllAvailableDebugArtifacts(codeql, config, logger, codeQ } logger.info("Preparing database logs debug artifact..."); const databaseDirectory = getCodeQLDatabasePath(config, language); - const logsDirectory = path15.resolve(databaseDirectory, "log"); + const logsDirectory = path11.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 = path15.resolve( + const multiLanguageTracingLogsDirectory = path11.resolve( config.dbLocation, "log" ); @@ -131516,8 +124929,8 @@ async function uploadDebugArtifacts(logger, toUpload, rootDir, artifactName, ghV try { await artifactUploader.uploadArtifact( sanitizeArtifactName(`${artifactName}${suffix}`), - toUpload.map((file) => path15.normalize(file)), - path15.normalize(rootDir), + toUpload.map((file) => path11.normalize(file)), + path11.normalize(rootDir), { // ensure we don't keep the debug artifacts around for too long since they can be large. retentionDays: 7 @@ -131544,17 +124957,17 @@ async function getArtifactUploaderClient(logger, ghVariant) { } async function createPartialDatabaseBundle(config, language) { const databasePath = getCodeQLDatabasePath(config, language); - const databaseBundlePath = path15.resolve( + const databaseBundlePath = path11.resolve( config.dbLocation, `${config.debugDatabaseName}-${language}-partial.zip` ); core12.info( `${config.debugDatabaseName}-${language} is not finalized. Uploading partial database bundle at ${databaseBundlePath}...` ); - if (fs15.existsSync(databaseBundlePath)) { - await deleteAsync(databaseBundlePath, { force: true }); + if (fs12.existsSync(databaseBundlePath)) { + await fs12.promises.rm(databaseBundlePath, { force: true }); } - const output = fs15.createWriteStream(databaseBundlePath); + const output = fs12.createWriteStream(databaseBundlePath); const zip = (0, import_archiver.default)("zip"); zip.on("error", (err) => { throw err; @@ -131580,7 +124993,7 @@ async function createDatabaseBundleCli(codeql, config, language) { } // src/init-action-post-helper.ts -var fs19 = __toESM(require("fs")); +var fs16 = __toESM(require("fs")); var core16 = __toESM(require_core()); var github2 = __toESM(require_github()); @@ -131787,15 +125200,15 @@ async function sendStatusReport(statusReport) { } // src/upload-lib.ts -var fs17 = __toESM(require("fs")); -var path17 = __toESM(require("path")); +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 jsonschema2 = __toESM(require_lib2()); // src/fingerprints.ts -var fs16 = __toESM(require("fs")); +var fs13 = __toESM(require("fs")); var import_path = __toESM(require("path")); // node_modules/long/index.js @@ -132783,7 +126196,7 @@ async function hash(callback, filepath) { } updateHash(current); }; - const readStream = fs16.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)); @@ -132858,11 +126271,11 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { if (!import_path.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } - if (!fs16.existsSync(uri)) { + if (!fs13.existsSync(uri)) { logger.debug(`Unable to compute fingerprint for non-existent file: ${uri}`); return void 0; } - if (fs16.statSync(uri).isDirectory()) { + if (fs13.statSync(uri).isDirectory()) { logger.debug(`Unable to compute fingerprint for directory: ${uri}`); return void 0; } @@ -132960,7 +126373,7 @@ function combineSarifFiles(sarifFiles, logger) { for (const sarifFile of sarifFiles) { logger.debug(`Loading SARIF file: ${sarifFile}`); const sarifObject = JSON.parse( - fs17.readFileSync(sarifFile, "utf8") + fs14.readFileSync(sarifFile, "utf8") ); if (combinedSarif.version === null) { combinedSarif.version = sarifObject.version; @@ -133032,7 +126445,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(fs17.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"; @@ -133085,14 +126498,14 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - 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"); + 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"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); - return JSON.parse(fs17.readFileSync(outputFile, "utf8")); + return JSON.parse(fs14.readFileSync(outputFile, "utf8")); } function populateRunAutomationDetails(sarif, category, analysis_key, environment) { const automationID = getAutomationID2(category, analysis_key, environment); @@ -133121,7 +126534,7 @@ function getAutomationID2(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, analysis) { logger.info("Uploading results"); if (shouldSkipSarifUpload()) { - const payloadSaveFile = path17.join( + const payloadSaveFile = path13.join( getTemporaryDirectory(), `payload-${analysis.kind}.json` ); @@ -133129,7 +126542,7 @@ async function uploadPayload(payload, repositoryNwo, logger, analysis) { `SARIF upload disabled by an environment variable. Saving to ${payloadSaveFile}` ); logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`); - fs17.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); + fs14.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); return "dummy-sarif-id"; } const client = getApiClient(); @@ -133163,12 +126576,12 @@ async function uploadPayload(payload, repositoryNwo, logger, analysis) { function findSarifFilesInDir(sarifPath, isSarif) { const sarifFiles = []; const walkSarifFiles = (dir) => { - const entries = fs17.readdirSync(dir, { withFileTypes: true }); + const entries = fs14.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path17.resolve(dir, entry.name)); + sarifFiles.push(path13.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path17.resolve(dir, entry.name)); + walkSarifFiles(path13.resolve(dir, entry.name)); } } }; @@ -133176,11 +126589,11 @@ function findSarifFilesInDir(sarifPath, isSarif) { return sarifFiles; } function getSarifFilePaths(sarifPath, isSarif) { - if (!fs17.existsSync(sarifPath)) { + if (!fs14.existsSync(sarifPath)) { throw new ConfigurationError(`Path does not exist: ${sarifPath}`); } let sarifFiles; - if (fs17.lstatSync(sarifPath).isDirectory()) { + if (fs14.lstatSync(sarifPath).isDirectory()) { sarifFiles = findSarifFilesInDir(sarifPath, isSarif); if (sarifFiles.length === 0) { throw new ConfigurationError( @@ -133210,7 +126623,7 @@ function countResultsInSarif(sarif) { } function readSarifFile(sarifFilePath) { try { - return JSON.parse(fs17.readFileSync(sarifFilePath, "utf8")); + return JSON.parse(fs14.readFileSync(sarifFilePath, "utf8")); } catch (e) { throw new InvalidSarifUploadError( `Invalid SARIF. JSON syntax error: ${getErrorMessage(e)}` @@ -133279,7 +126692,7 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo payloadObj.base_sha = mergeBaseCommitOid; } else if (process.env.GITHUB_EVENT_PATH) { const githubEvent = JSON.parse( - fs17.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; @@ -133538,7 +126951,7 @@ function filterAlertsByDiffRange(logger, sarif) { if (!locationUri || locationStartLine === void 0) { return false; } - const locationPath = path17.join(checkoutPath, locationUri).replaceAll(path17.sep, "/"); + const locationPath = path13.join(checkoutPath, locationUri).replaceAll(path13.sep, "/"); return diffRanges.some( (range) => range.path === locationPath && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0) ); @@ -133550,8 +126963,8 @@ function filterAlertsByDiffRange(logger, sarif) { } // src/workflow.ts -var fs18 = __toESM(require("fs")); -var path18 = __toESM(require("path")); +var fs15 = __toESM(require("fs")); +var path14 = __toESM(require("path")); var import_zlib2 = __toESM(require("zlib")); var core15 = __toESM(require_core()); function toCodedErrors(errors) { @@ -133579,15 +126992,15 @@ async function getWorkflow(logger) { ); } const workflowPath = await getWorkflowAbsolutePath(logger); - return load(fs18.readFileSync(workflowPath, "utf-8")); + return load(fs15.readFileSync(workflowPath, "utf-8")); } async function getWorkflowAbsolutePath(logger) { const relativePath = await getWorkflowRelativePath(); - const absolutePath = path18.join( + const absolutePath = path14.join( getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath ); - if (fs18.existsSync(absolutePath)) { + if (fs15.existsSync(absolutePath)) { logger.debug( `Derived the following absolute path for the currently executing workflow: ${absolutePath}.` ); @@ -133805,7 +127218,7 @@ async function run(uploadAllAvailableDebugArtifacts, printDebugLogs2, codeql, co } if (isSelfHostedRunner()) { try { - fs19.rmSync(config.dbLocation, { + fs16.rmSync(config.dbLocation, { recursive: true, force: true, maxRetries: 3 @@ -133979,52 +127392,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/init-action.js b/lib/init-action.js index f82412930e..9a3a5e15d1 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 crypto2 = __importStar4(require("crypto")); - var fs18 = __importStar4(require("fs")); + var fs15 = __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 (!fs18.existsSync(filePath)) { + if (!fs15.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs18.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os5.EOL}`, { + fs15.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 path20 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path16 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path20 && !path20.startsWith("/")) { - path20 = `/${path20}`; + if (path16 && !path16.startsWith("/")) { + path16 = `/${path16}`; } - url = new URL(origin + path20); + url = new URL(origin + path16); } 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(path20) { - if (typeof path20 !== "string") { + module2.exports = function basename(path16) { + if (typeof path16 !== "string") { return ""; } - for (var i = path20.length - 1; i >= 0; --i) { - switch (path20.charCodeAt(i)) { + for (var i = path16.length - 1; i >= 0; --i) { + switch (path16.charCodeAt(i)) { case 47: // '/' case 92: - path20 = path20.slice(i + 1); - return path20 === ".." || path20 === "." ? "" : path20; + path16 = path16.slice(i + 1); + return path16 === ".." || path16 === "." ? "" : path16; } } - return path20 === ".." || path20 === "." ? "" : path20; + return path16 === ".." || path16 === "." ? "" : path16; }; } }); @@ -2673,8 +2673,8 @@ var require_multipart = __commonJS({ } } function checkFinished() { - if (nends === 0 && finished2 && !boy._done) { - finished2 = false; + if (nends === 0 && finished && !boy._done) { + finished = false; self2.end(); } } @@ -2693,7 +2693,7 @@ var require_multipart = __commonJS({ let nends = 0; let curFile; let curField; - let finished2 = false; + let finished = 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() { - finished2 = true; + finished = true; checkFinished(); }); } @@ -5663,7 +5663,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path20, + path: path16, method, body, headers, @@ -5677,11 +5677,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path20 !== "string") { + if (typeof path16 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path20[0] !== "/" && !(path20.startsWith("http://") || path20.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(path20) !== 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(path20, query) : path20; + 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 path20 = 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 = path20; + 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: path20, 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} ${path20} 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: path20, 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] = path20; + 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 finished2 = false; + let finished = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { - if (finished2) { + if (finished) { return; } try { @@ -8325,7 +8325,7 @@ upgrade: ${upgrade}\r } }; const onDrain = function() { - if (finished2) { + if (finished) { return; } if (body.resume) { @@ -8333,17 +8333,17 @@ upgrade: ${upgrade}\r } }; const onAbort = function() { - if (finished2) { + if (finished) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); }; const onFinished = function(err) { - if (finished2) { + if (finished) { return; } - finished2 = true; + finished = 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 noop2 = () => { + var noop = () => { }; 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(); - }) : noop2; + }) : noop; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { @@ -9347,7 +9347,7 @@ var require_readable = __commonJS({ } else { resolve9(null); } - }).on("error", noop2).on("data", function(chunk) { + }).on("error", noop).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: finished2, PassThrough } = require("stream"); + var { finished, 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"); } - finished2(res, { readable: false }, (err) => { + finished(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(path20) { - if (typeof path20 !== "string") { - return path20; + function safeUrl(path16) { + if (typeof path16 !== "string") { + return path16; } - const pathSegments = path20.split("?"); + const pathSegments = path16.split("?"); if (pathSegments.length !== 2) { - return path20; + return path16; } const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); } - function matchKey(mockDispatch2, { path: path20, method, body, headers }) { - const pathMatch = matchValue(mockDispatch2.path, path20); + 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: path20 }) => matchValue(safeUrl(path20), 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: path20, method, body, headers, query } = opts; + const { path: path16, method, body, headers, query } = opts; return { - path: path20, + 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: 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]); } @@ -10909,10 +10909,10 @@ var require_pending_interceptors_formatter = __commonJS({ } format(pendingInterceptors) { const withPrettyHeaders = pendingInterceptors.map( - ({ method, path: path20, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ + ({ method, path: path16, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path20, + Path: path16, "Status code": statusCode, Persistent: persist ? "\u2705" : "\u274C", Invocations: timesInvoked, @@ -15532,8 +15532,8 @@ var require_util6 = __commonJS({ } } } - function validateCookiePath(path20) { - for (const char of path20) { + 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 path20 = opts.path; + let path16 = opts.path; if (!opts.path.startsWith("/")) { - path20 = `/${path20}`; + path16 = `/${path16}`; } - url = new URL(util.parseOrigin(url).origin + path20); + url = new URL(util.parseOrigin(url).origin + path16); } 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 path20 = __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, path20.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 fs18 = __importStar4(require("fs")); - var path20 = __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; + var fs15 = __importStar4(require("fs")); + var path16 = __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; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs18.constants.O_RDONLY; + exports2.READONLY = fs15.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 isDirectory2(fsPath, useStat = false) { + function isDirectory(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 = isDirectory2; + exports2.isDirectory = isDirectory; 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 = path20.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 = path20.dirname(filePath); - const upperName = path20.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 = path20.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 path20 = __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 ? path20.join(dest, path20.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 (path20.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 = path20.join(dest, path20.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(path20.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(path20.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(path20.sep)) { + if (tool.includes(path16.sep)) { return []; } const directories = []; if (process.env.PATH) { - for (const p of process.env.PATH.split(path20.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(path20.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 os5 = __importStar4(require("os")); var events = __importStar4(require("events")); var child = __importStar4(require("child_process")); - var path20 = __importStar4(require("path")); + var path16 = __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 = path20.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 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 path20 = __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}${path20.delimiter}${process.env["PATH"]}`; + process.env["PATH"] = `${inputPath}${path16.delimiter}${process.env["PATH"]}`; } exports2.addPath = addPath2; function getInput2(name, options) { @@ -21765,8 +21765,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 path20 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path20} 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; @@ -22459,12 +22459,12 @@ var require_wrappy = __commonJS({ var require_once = __commonJS({ "node_modules/once/once.js"(exports2, module2) { var wrappy = require_wrappy(); - module2.exports = wrappy(once2); + module2.exports = wrappy(once); module2.exports.strict = wrappy(onceStrict); - once2.proto = once2(function() { + once.proto = once(function() { Object.defineProperty(Function.prototype, "once", { value: function() { - return once2(this); + return once(this); }, configurable: true }); @@ -22475,7 +22475,7 @@ var require_once = __commonJS({ configurable: true }); }); - function once2(fn) { + function once(fn) { var f = function() { if (f.called) return f.value; f.called = true; @@ -23689,7 +23689,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 noop2 = () => { + var noop = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); @@ -23768,8 +23768,8 @@ var require_dist_node11 = __commonJS({ this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults); this.log = Object.assign( { - debug: noop2, - info: noop2, + debug: noop, + info: noop, warn: consoleWarn, error: consoleError }, @@ -26455,5855 +26455,6 @@ var require_github = __commonJS({ } }); -// 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 os5 = require("os"); - 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; - 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 path20.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 isGlob2(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 isGlob2 = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash2 = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str2, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash2) < 0) { - str2 = str2.replace(backslash, slash2); - } - if (enclosure.test(str2)) { - str2 += slash2; - } - str2 += "a"; - do { - str2 = pathPosixDirname(str2); - } while (isGlob2(str2) || globby2.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 cacheKey3 = min + ":" + max + "=" + relax + shorthand + capture + wrap; - if (toRegexRange.cache.hasOwnProperty(cacheKey3)) { - return toRegexRange.cache[cacheKey3].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[cacheKey3] = 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(compare2); - 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 compare2(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_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 path20 = 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: path20.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 path20 = require("path"); - var win32 = process.platform === "win32"; - var { - REGEX_BACKSLASH, - REGEX_REMOVE_BACKSLASH, - REGEX_SPECIAL_CHARS, - REGEX_SPECIAL_CHARS_GLOBAL - } = require_constants8(); - 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 || path20.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 isGlob2 = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished2 = 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; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA2) { - isBrace = token.isBrace = true; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished2 = 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 (finished2 === 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) { - isGlob2 = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished2 = 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) { - isGlob2 = token.isGlob = true; - finished2 = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob2 = token.isGlob = true; - finished2 = 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; - isGlob2 = token.isGlob = true; - finished2 = 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) { - isGlob2 = 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) { - finished2 = true; - break; - } - } - continue; - } - break; - } - if (isGlob2 === true) { - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob2 = false; - } - let base = str2; - let prefix = ""; - let glob2 = ""; - if (start > 0) { - prefix = str2.slice(0, start); - str2 = str2.slice(start); - lastIndex -= start; - } - if (base && isGlob2 === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob2 = str2.slice(lastIndex); - } else if (isGlob2 === 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: isGlob2, - 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 create2 = (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 = create2(match[1]); - if (!source2) return; - return source2 + DOT_LITERAL + match[2]; - } - } - }; - const output = utils.removePrefix(input, state); - let source = create2(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 path20 = require("path"); - var scan = require_scan(); - var parse = require_parse4(); - var utils = require_utils6(); - var constants = require_constants8(); - 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(path20.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 path20 = 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 !isDynamicPattern2(pattern, options); - } - exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern2(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 = isDynamicPattern2; - 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 isNegativePattern2(pattern) ? pattern.slice(1) : pattern; - } - exports2.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern2(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports2.isNegativePattern = isNegativePattern2; - function isPositivePattern(pattern) { - return !isNegativePattern2(pattern); - } - exports2.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern2); - } - 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 = path20.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 relative2 = []; - for (const pattern of patterns) { - if (isAbsolute3(pattern)) { - absolute.push(pattern); - } else { - relative2.push(pattern); - } - } - return [absolute, relative2]; - } - exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; - function isAbsolute3(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) { - "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((stream2) => { - stream2.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((stream2) => stream2.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 fs18 = require_fs(); - exports2.fs = fs18; - var path20 = require_path(); - exports2.path = path20; - var pattern = require_pattern(); - exports2.pattern = pattern; - var stream2 = require_stream(); - exports2.stream = stream2; - 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(path20, settings, callback) { - settings.fs.lstat(path20, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path20, (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(path20, settings) { - const lstat = settings.fs.lstatSync(path20); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path20); - 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 fs18 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs18.lstat, - stat: fs18.stat, - lstatSync: fs18.lstatSync, - statSync: fs18.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 fs18 = require_fs2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs18.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(path20, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path20, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path20, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.stat = stat; - function statSync2(path20, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path20, settings); - } - exports2.statSync = statSync2; - 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 fs18 = require_fs3(); - exports2.fs = fs18; - } -}); - -// 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 path20 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path20, settings.fsStatSettings, (error2, stats) => { - if (error2 !== null) { - done(error2); - return; - } - const entry = { - name, - path: path20, - 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 fs18 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - 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) { - 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 path20 = require("path"); - var fsStat = require_out(); - var fs18 = require_fs4(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - this.fs = fs18.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({ - 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(path20, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path20, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path20, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.scandir = scandir; - function scandirSync(path20, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path20, 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: noop2, - saturated: noop2, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop2, - 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 || noop2; - 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 || noop2; - 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 = noop2; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self2.drain(); - self2.drain = noop2; - } - } - function noop2() { - } - function Task() { - this.value = null; - this.callback = noop2; - this.next = null; - this.release = noop2; - this.context = null; - var self2 = this; - this.worked = function worked(err, result) { - var callback = self2.callback; - self2.value = null; - self2.callback = noop2; - 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 path20 = 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, path20.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 path20 = 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 path20.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 stream2 = new stream_1.PassThrough({ objectMode: true }); - stream2._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream2.push(entry); - } - if (index === filepaths.length - 1) { - stream2.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream2.write(i); - } - return stream2; - } - _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((resolve9, reject) => { - this._stat(filepath, this._fsStatSettings, (error2, stats) => { - return error2 === null ? resolve9(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((resolve9, reject) => { - this._walkAsync(root, options, (error2, entries) => { - if (error2 === null) { - resolve9(entries); - } else { - reject(error2); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream2 = this._readerStream.static(patterns, options); - return new Promise((resolve9, reject) => { - stream2.once("error", reject); - stream2.on("data", (entry) => entries.push(entry)); - stream2.once("end", () => resolve9(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, isDirectory2) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory2) { - if (patternsRe.length === 0) { - return false; - } - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory2) { - 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 path20 = 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 path20.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 fs18 = require("fs"); - var os5 = require("os"); - var CPU_COUNT = Math.max(os5.cpus().length, 1); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs18.lstat, - lstatSync: fs18.lstatSync, - stat: fs18.stat, - statSync: fs18.statSync, - readdir: fs18.readdir, - readdirSync: fs18.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) { - assertPatternsInput2(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 = stream2; - FastGlob2.async = FastGlob2; - function sync(source, options) { - assertPatternsInput2(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream2(source, options) { - assertPatternsInput2(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream2; - function generateTasks2(source, options) { - assertPatternsInput2(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks2; - function isDynamicPattern2(source, options) { - assertPatternsInput2(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern2; - function escapePath(source) { - assertPatternsInput2(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - function convertPathToPattern2(source) { - assertPatternsInput2(source); - return utils.path.convertPathToPattern(source); - } - FastGlob2.convertPathToPattern = convertPathToPattern2; - let posix; - (function(posix2) { - function escapePath2(source) { - assertPatternsInput2(source); - return utils.path.escapePosixPath(source); - } - posix2.escapePath = escapePath2; - function convertPathToPattern3(source) { - assertPatternsInput2(source); - return utils.path.convertPosixPathToPattern(source); - } - posix2.convertPathToPattern = convertPathToPattern3; - })(posix = FastGlob2.posix || (FastGlob2.posix = {})); - let win32; - (function(win322) { - function escapePath2(source) { - assertPatternsInput2(source); - return utils.path.escapeWindowsPath(source); - } - win322.escapePath = escapePath2; - function convertPathToPattern3(source) { - assertPatternsInput2(source); - return utils.path.convertWindowsPathToPattern(source); - } - win322.convertPathToPattern = convertPathToPattern3; - })(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 assertPatternsInput2(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/globby/node_modules/ignore/index.js -var require_ignore = __commonJS({ - "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 = "\\"; - 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 = /^\.{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 }); - return 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) - // (a \ ) -> (a ) - /((?:\\\\)*?)(\\?\s+)$/, - (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY) - ], - // Replace (\ ) with ' ' - // (\ ) -> ' ' - // (\\ ) -> '\\ ' - // (\\\ ) -> '\\ ' - [ - /(\\+?)\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. - // > 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}(?=$|\\/$)` - ] - ]; - 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}(?=$|\\/$)`; - } - }; - 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).filter(Boolean); - var IgnoreRule = class { - constructor(pattern, mark, body, ignoreCase, negative, prefix) { - this.pattern = pattern; - this.mark = mark; - this.negative = negative; - 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, - mark - }, ignoreCase) => { - let negative = false; - let body = pattern; - if (body.indexOf("!") === 0) { - negative = true; - body = body.substr(1); - } - body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regexPrefix = makeRegexPrefix(body); - return new IgnoreRule( - pattern, - mark, - body, - ignoreCase, - negative, - regexPrefix - ); - }; - var RuleManager = class { - constructor(ignoreCase) { - this._ignoreCase = ignoreCase; - this._rules = []; - } - _add(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules._rules); - this._added = true; - return; - } - if (isString(pattern)) { - pattern = { - pattern - }; - } - if (checkPattern(pattern.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._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; - } - // legacy - addPattern(pattern) { - return this.add(pattern); - } - // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { - const path20 = originalPath && checkPath.convert(originalPath); - checkPath( - path20, - originalPath, - this._strictPathCheck ? throwError2 : RETURN_FALSE - ); - return this._t(path20, cache, checkUnignored, slices); - } - 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 = path20.split(SLASH).filter(Boolean); - } - slices.pop(); - if (!slices.length) { - return cache[path20] = this._rules.test(path20, checkUnignored, MODE_IGNORE); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path20] = parent.ignored ? parent : this._rules.test(path20, checkUnignored, MODE_IGNORE); - } - ignores(path20) { - return this._test(path20, this._ignoreCache, false).ignored; - } - createFilter() { - return (path20) => !this.ignores(path20); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path20) { - return this._test(path20, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - 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 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); - } -}); - // package.json var require_package = __commonJS({ "package.json"(exports2, module2) { @@ -32349,7 +26500,6 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -32570,7 +26720,7 @@ var require_light = __commonJS({ } } async trigger(name, ...args) { - var e, promises2; + var e, promises3; try { if (name !== "debug") { this.trigger("debug", `Event triggered: ${name}`, args); @@ -32581,7 +26731,7 @@ var require_light = __commonJS({ this._events[name] = this._events[name].filter(function(listener) { return listener.status !== "none"; }); - promises2 = this._events[name].map(async (listener) => { + promises3 = this._events[name].map(async (listener) => { var e2, returned; if (listener.status === "none") { return; @@ -32604,7 +26754,7 @@ var require_light = __commonJS({ return null; } }); - return (await Promise.all(promises2)).find(function(x) { + return (await Promise.all(promises3)).find(function(x) { return x != null; }); } catch (error2) { @@ -33505,18 +27655,18 @@ var require_light = __commonJS({ var done, waitForExecuting; options = parser$5.load(options, this.stopDefaults); waitForExecuting = (at) => { - var finished2; - finished2 = () => { + var finished; + finished = () => { var counts; counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; return new this.Promise((resolve9, reject) => { - if (finished2()) { + if (finished()) { return resolve9(); } else { return this.on("done", () => { - if (finished2()) { + if (finished()) { this.removeAllListeners("done"); return resolve9(); } @@ -33943,7 +28093,7 @@ var require_console_log_level = __commonJS({ "use strict"; var util = require("util"); var levels = ["trace", "debug", "info", "warn", "error", "fatal"]; - var noop2 = function() { + var noop = function() { }; module2.exports = function(opts) { opts = opts || {}; @@ -33953,7 +28103,7 @@ var require_console_log_level = __commonJS({ return levels.indexOf(level) >= levels.indexOf(opts.level); }; levels.forEach(function(level) { - logger[level] = shouldLog(level) ? log : noop2; + logger[level] = shouldLog(level) ? log : noop; function log() { var prefix = opts.prefix; var normalizedLevel; @@ -33991,14 +28141,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, path20, name, argument) { - if (Array.isArray(path20)) { - this.path = path20; - this.property = path20.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 (path20 !== void 0) { - this.property = path20; + } else if (path16 !== void 0) { + this.property = path16; } if (message) { this.message = message; @@ -34089,16 +28239,16 @@ var require_helpers = __commonJS({ name: { value: "SchemaError", enumerable: false } } ); - var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path20, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path16, base, schemas) { this.schema = schema2; this.options = options; - if (Array.isArray(path20)) { - this.path = path20; - this.propertyPath = path20.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 = path20; + this.propertyPath = path16; } this.base = base; this.schemas = schemas; @@ -34107,10 +28257,10 @@ var require_helpers = __commonJS({ return uri.resolve(this.base, target); }; SchemaContext.prototype.makeChild = function makeChild(schema2, propertyName) { - var path20 = 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, path20, 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; } @@ -34975,7 +29125,7 @@ var require_attribute = __commonJS({ }); // node_modules/jsonschema/lib/scan.js -var require_scan2 = __commonJS({ +var require_scan = __commonJS({ "node_modules/jsonschema/lib/scan.js"(exports2, module2) { "use strict"; var urilib = require("url"); @@ -35049,7 +29199,7 @@ var require_validator = __commonJS({ var urilib = require("url"); var attribute = require_attribute(); var helpers = require_helpers(); - var scanSchema = require_scan2().scan; + var scanSchema = require_scan().scan; var ValidatorResult = helpers.ValidatorResult; var ValidatorResultError = helpers.ValidatorResultError; var SchemaError = helpers.SchemaError; @@ -35274,8 +29424,8 @@ var require_lib2 = __commonJS({ module2.exports.ValidatorResultError = require_helpers().ValidatorResultError; module2.exports.ValidationError = require_helpers().ValidationError; module2.exports.SchemaError = require_helpers().SchemaError; - module2.exports.SchemaScanResult = require_scan2().SchemaScanResult; - module2.exports.scan = require_scan2().scan; + module2.exports.SchemaScanResult = require_scan().SchemaScanResult; + module2.exports.scan = require_scan().scan; module2.exports.validate = function(instance, schema2, options) { var v = new Validator2(); return v.validate(instance, schema2, options); @@ -35522,7 +29672,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 path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -35530,7 +29680,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path20.dirname(p); + let result = path16.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -35568,7 +29718,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 += path20.sep; + root += path16.sep; } return root + itemPath; } @@ -35606,10 +29756,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path20.sep)) { + if (!p.endsWith(path16.sep)) { return p; } - if (p === path20.sep) { + if (p === path16.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -35942,7 +30092,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path20 = (function() { + var path16 = (function() { try { return require("path"); } catch (e) { @@ -35950,7 +30100,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path20.sep; + minimatch.sep = path16.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { @@ -36039,8 +30189,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path20.sep !== "/") { - pattern = pattern.split(path20.sep).join("/"); + if (!options.allowWindowsEscape && path16.sep !== "/") { + pattern = pattern.split(path16.sep).join("/"); } this.options = options; this.set = []; @@ -36409,8 +30559,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path20.sep !== "/") { - f = f.split(path20.sep).join("/"); + if (path16.sep !== "/") { + f = f.split(path16.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -36542,7 +30692,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path20 = __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"; @@ -36557,12 +30707,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(path20.sep); + this.segments = itemPath.split(path16.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path20.basename(remaining); + const basename = path16.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -36580,7 +30730,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(path20.sep), `Parameter 'itemPath' contains unexpected path separators`); + assert_1.default(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -36591,12 +30741,12 @@ var require_internal_path = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path20.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 += path20.sep; + result += path16.sep; } result += this.segments[i]; } @@ -36640,7 +30790,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os5 = __importStar4(require("os")); - var path20 = __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(); @@ -36669,7 +30819,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(path20.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 === "")); @@ -36693,8 +30843,8 @@ var require_internal_pattern = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path20.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path20.sep}`; + if (!itemPath.endsWith(path16.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path16.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -36729,9 +30879,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(`.${path20.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path16.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path20.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path16.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}'`); @@ -36815,8 +30965,8 @@ var require_internal_search_state = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path20, level) { - this.path = path20; + constructor(path16, level) { + this.path = path16; this.level = level; } }; @@ -36936,9 +31086,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core14 = __importStar4(require_core()); - var fs18 = __importStar4(require("fs")); + var fs15 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path20 = __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(); @@ -36988,7 +31138,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await4(fs18.promises.lstat(searchPath)); + yield __await4(fs15.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -37019,7 +31169,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs18.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path20.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs15.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); @@ -37054,7 +31204,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs18.promises.stat(item.path); + stats = yield fs15.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -37066,10 +31216,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs18.promises.lstat(item.path); + stats = yield fs15.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs18.promises.realpath(item.path); + const realPath = yield fs15.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -38287,7 +32437,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 }); @@ -38403,11 +32553,11 @@ var require_cacheUtils = __commonJS({ var glob2 = __importStar4(require_glob()); var io7 = __importStar4(require_io()); var crypto2 = __importStar4(require("crypto")); - var fs18 = __importStar4(require("fs")); - var path20 = __importStar4(require("path")); + var fs15 = __importStar4(require("fs")); + var path16 = __importStar4(require("path")); var semver9 = __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* () { @@ -38424,16 +32574,16 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path20.join(baseLocation, "actions", "temp"); + tempDirectory = path16.join(baseLocation, "actions", "temp"); } - const dest = path20.join(tempDirectory, crypto2.randomUUID()); + const dest = path16.join(tempDirectory, crypto2.randomUUID()); yield io7.mkdirP(dest); return dest; }); } exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs18.statSync(filePath).size; + return fs15.statSync(filePath).size; } exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { @@ -38450,7 +32600,7 @@ var require_cacheUtils = __commonJS({ _c = _g.value; _e = false; const file = _c; - const relativeFile = path20.relative(workspace, file).replace(new RegExp(`\\${path20.sep}`, "g"), "/"); + const relativeFile = path16.relative(workspace, file).replace(new RegExp(`\\${path16.sep}`, "g"), "/"); core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -38473,7 +32623,7 @@ var require_cacheUtils = __commonJS({ exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { return __awaiter4(this, void 0, void 0, function* () { - return util.promisify(fs18.unlink)(filePath); + return util.promisify(fs15.unlink)(filePath); }); } exports2.unlinkFile = unlinkFile; @@ -38518,7 +32668,7 @@ var require_cacheUtils = __commonJS({ exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { return __awaiter4(this, void 0, void 0, function* () { - if (fs18.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs15.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -39085,7 +33235,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 }); @@ -39247,7 +33397,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; } }); @@ -40024,13 +34174,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 process6 = tslib_1.__importStar(require("node:process")); + var process2 = tslib_1.__importStar(require("node:process")); function getHeaderName() { return "User-Agent"; } async function setPlatformSpecificData(map2) { - if (process6 && process6.versions) { - const versions = process6.versions; + if (process2 && process2.versions) { + const versions = process2.versions; if (versions.bun) { map2.set("Bun", versions.bun); } else if (versions.deno) { @@ -40045,7 +34195,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 }); @@ -40063,7 +34213,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) { @@ -40592,7 +34742,7 @@ var require_retryPolicy = __commonJS({ var helpers_js_1 = require_helpers2(); 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 }) { @@ -40689,7 +34839,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; @@ -40998,7 +35148,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common3 = __commonJS({ +var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -41332,7 +35482,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common3()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -41620,7 +35770,7 @@ var require_node = __commonJS({ debug3.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common3()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -42691,7 +36841,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(); @@ -43208,7 +37358,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; @@ -43230,7 +37380,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; @@ -43255,7 +37405,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; @@ -45007,7 +39157,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 }); @@ -45082,7 +39232,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; @@ -46356,15 +40506,15 @@ var require_urlHelpers = __commonJS({ let isAbsolutePath = false; let requestUrl = replaceAll(baseUri, urlReplacements); if (operationSpec.path) { - let path20 = replaceAll(operationSpec.path, urlReplacements); - if (operationSpec.path === "/{nextLink}" && path20.startsWith("/")) { - path20 = path20.substring(1); + let path16 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path16.startsWith("/")) { + path16 = path16.substring(1); } - if (isAbsoluteUrl(path20)) { - requestUrl = path20; + if (isAbsoluteUrl(path16)) { + requestUrl = path16; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path20); + requestUrl = appendPath(requestUrl, path16); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -46412,9 +40562,9 @@ var require_urlHelpers = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path20 = pathToAppend.substring(0, searchStart); + const path16 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path20; + newPath = newPath + path16; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -46560,7 +40710,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(); @@ -50291,7 +44441,7 @@ var require_dist7 = __commonJS({ var stream2 = require("stream"); var coreLro = require_dist6(); var events = require("events"); - var fs18 = require("fs"); + var fs15 = require("fs"); var util = require("util"); var buffer = require("buffer"); function _interopNamespaceDefault(e) { @@ -50314,7 +44464,7 @@ var require_dist7 = __commonJS({ } var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs18); + var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs15); var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); var logger = logger$1.createClientLogger("storage-blob"); var BaseRequestPolicy = class { @@ -50563,10 +44713,10 @@ var require_dist7 = __commonJS({ ]; function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path20 = urlParsed.pathname; - path20 = path20 || "/"; - path20 = escape(path20); - urlParsed.pathname = path20; + let path16 = urlParsed.pathname; + path16 = path16 || "/"; + path16 = escape(path16); + urlParsed.pathname = path16; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -50651,9 +44801,9 @@ var require_dist7 = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path20 = urlParsed.pathname; - path20 = path20 ? path20.endsWith("/") ? `${path20}${name}` : `${path20}/${name}` : name; - urlParsed.pathname = path20; + let path16 = urlParsed.pathname; + path16 = path16 ? path16.endsWith("/") ? `${path16}${name}` : `${path16}/${name}` : name; + urlParsed.pathname = path16; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -51734,9 +45884,9 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path20 = getURLPath(request.url) || "/"; + const path16 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path20}`; + canonicalizedResourceString += `/${this.factory.accountName}${path16}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -52029,9 +46179,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path20 = getURLPath(request.url) || "/"; + const path16 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path20}`; + canonicalizedResourceString += `/${options.accountName}${path16}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -71333,8 +65483,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 path20 = getURLPath(subRequest.url); - if (!path20 || path20 === "") { + const path16 = getURLPath(subRequest.url); + if (!path16 || path16 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -71394,8 +65544,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; pipeline = newPipeline(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path20 = getURLPath(url2); - if (path20 && path20 !== "/") { + const path16 = getURLPath(url2); + if (path16 && path16 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -73992,7 +68142,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; @@ -74162,11 +68312,11 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); - var fs18 = __importStar4(require("fs")); + var fs15 = __importStar4(require("fs")); var stream2 = __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) { @@ -74273,7 +68423,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter4(this, void 0, void 0, function* () { - const writeStream = fs18.createWriteStream(archivePath); + const writeStream = fs15.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); @@ -74299,7 +68449,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { var _a; return __awaiter4(this, void 0, void 0, function* () { - const archiveDescriptor = yield fs18.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs15.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -74416,7 +68566,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs18.openSync(archivePath, "w"); + const fd = fs15.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -74434,12 +68584,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)) { - fs18.writeFileSync(fd, result); + fs15.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs18.closeSync(fd); + fs15.closeSync(fd); } } }); @@ -74738,7 +68888,7 @@ var require_cacheHttpClient = __commonJS({ var core14 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs18 = __importStar4(require("fs")); + var fs15 = __importStar4(require("fs")); var url_1 = require("url"); var utils = __importStar4(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -74876,7 +69026,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 = fs18.openSync(archivePath, "r"); + const fd = fs15.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -74890,7 +69040,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs18.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs15.createReadStream(archivePath, { fd, start, end, @@ -74901,7 +69051,7 @@ Other caches with similar key:`); } }))); } finally { - fs18.closeSync(fd); + fs15.closeSync(fd); } return; }); @@ -80145,9 +74295,9 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io7 = __importStar4(require_io()); var fs_1 = require("fs"); - var path20 = __importStar4(require("path")); + var path16 = __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* () { @@ -80191,13 +74341,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(`\\${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); + 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(`\\${path20.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path20.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(`\\${path20.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) { @@ -80243,7 +74393,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --long=30 --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path20.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -80252,7 +74402,7 @@ var require_tar = __commonJS({ return BSD_TAR_ZSTD ? [ "zstd -d --force -o", constants_1.TarFilename, - archivePath.replace(new RegExp(`\\${path20.sep}`, "g"), "/") + archivePath.replace(new RegExp(`\\${path16.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -80267,7 +74417,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.Zstd: return BSD_TAR_ZSTD ? [ "zstd -T0 --long=30 --force -o", - cacheFileName.replace(new RegExp(`\\${path20.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -80276,7 +74426,7 @@ var require_tar = __commonJS({ case constants_1.CompressionMethod.ZstdWithoutLong: return BSD_TAR_ZSTD ? [ "zstd -T0 --force -o", - cacheFileName.replace(new RegExp(`\\${path20.sep}`, "g"), "/"), + cacheFileName.replace(new RegExp(`\\${path16.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -80316,7 +74466,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)(path20.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); }); @@ -80386,7 +74536,7 @@ var require_cache3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; var core14 = __importStar4(require_core()); - var path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); @@ -80483,7 +74633,7 @@ var require_cache3 = __commonJS({ core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path20.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()) { @@ -80552,7 +74702,7 @@ var require_cache3 = __commonJS({ core14.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path20.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); @@ -80615,7 +74765,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 = path20.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); @@ -80679,7 +74829,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 = path20.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); @@ -80859,7 +75009,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 path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -80867,7 +75017,7 @@ var require_internal_path_helper2 = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path20.dirname(p); + let result = path16.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -80905,7 +75055,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 += path20.sep; + root += path16.sep; } return root + itemPath; } @@ -80943,10 +75093,10 @@ var require_internal_path_helper2 = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path20.sep)) { + if (!p.endsWith(path16.sep)) { return p; } - if (p === path20.sep) { + if (p === path16.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -81097,7 +75247,7 @@ var require_internal_path2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -81112,12 +75262,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(path20.sep); + this.segments = itemPath.split(path16.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path20.basename(remaining); + const basename = path16.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -81135,7 +75285,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(path20.sep), `Parameter 'itemPath' contains unexpected path separators`); + (0, assert_1.default)(!segment.includes(path16.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -81146,12 +75296,12 @@ var require_internal_path2 = __commonJS({ */ toString() { let result = this.segments[0]; - let skipSlash = result.endsWith(path20.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 += path20.sep; + result += path16.sep; } result += this.segments[i]; } @@ -81199,7 +75349,7 @@ var require_internal_pattern2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os5 = __importStar4(require("os")); - var path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper2()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -81228,7 +75378,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(path20.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 === "")); @@ -81252,8 +75402,8 @@ var require_internal_pattern2 = __commonJS({ match(itemPath) { if (this.segments[this.segments.length - 1] === "**") { itemPath = pathHelper.normalizeSeparators(itemPath); - if (!itemPath.endsWith(path20.sep) && this.isImplicitPattern === false) { - itemPath = `${itemPath}${path20.sep}`; + if (!itemPath.endsWith(path16.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path16.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -81288,9 +75438,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(`.${path20.sep}`)) { + if (pattern === "." || pattern.startsWith(`.${path16.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path20.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path16.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}'`); @@ -81374,8 +75524,8 @@ var require_internal_search_state2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SearchState = void 0; var SearchState = class { - constructor(path20, level) { - this.path = path20; + constructor(path16, level) { + this.path = path16; this.level = level; } }; @@ -81499,9 +75649,9 @@ var require_internal_globber2 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core14 = __importStar4(require_core()); - var fs18 = __importStar4(require("fs")); + var fs15 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper2()); - var path20 = __importStar4(require("path")); + var path16 = __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(); @@ -81553,7 +75703,7 @@ var require_internal_globber2 = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core14.debug(`Search path '${searchPath}'`); try { - yield __await4(fs18.promises.lstat(searchPath)); + yield __await4(fs15.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -81577,7 +75727,7 @@ var require_internal_globber2 = __commonJS({ if (!stats) { continue; } - if (options.excludeHiddenFiles && path20.basename(item.path).match(/^\./)) { + if (options.excludeHiddenFiles && path16.basename(item.path).match(/^\./)) { continue; } if (stats.isDirectory()) { @@ -81587,7 +75737,7 @@ var require_internal_globber2 = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs18.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path20.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs15.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); @@ -81622,7 +75772,7 @@ var require_internal_globber2 = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs18.promises.stat(item.path); + stats = yield fs15.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -81634,10 +75784,10 @@ var require_internal_globber2 = __commonJS({ throw err; } } else { - stats = yield fs18.promises.lstat(item.path); + stats = yield fs15.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs18.promises.realpath(item.path); + const realPath = yield fs15.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -81736,10 +75886,10 @@ var require_internal_hash_files = __commonJS({ exports2.hashFiles = void 0; var crypto2 = __importStar4(require("crypto")); var core14 = __importStar4(require_core()); - var fs18 = __importStar4(require("fs")); + var fs15 = __importStar4(require("fs")); var stream2 = __importStar4(require("stream")); var util = __importStar4(require("util")); - var path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); function hashFiles2(globber, currentWorkspace, verbose = false) { var _a, e_1, _b, _c; var _d; @@ -81755,17 +75905,17 @@ var require_internal_hash_files = __commonJS({ _e = false; const file = _c; writeDelegate(file); - if (!file.startsWith(`${githubWorkspace}${path20.sep}`)) { + if (!file.startsWith(`${githubWorkspace}${path16.sep}`)) { writeDelegate(`Ignore '${file}' since it is not under GITHUB_WORKSPACE.`); continue; } - if (fs18.statSync(file).isDirectory()) { + if (fs15.statSync(file).isDirectory()) { writeDelegate(`Skip directory '${file}'.`); continue; } const hash = crypto2.createHash("sha256"); const pipeline = util.promisify(stream2.pipeline); - yield pipeline(fs18.createReadStream(file), hash); + yield pipeline(fs15.createReadStream(file), hash); result.write(hash.digest()); count++; if (!hasMatch) { @@ -81914,7 +76064,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os5 = require("os"); var cp = require("child_process"); - var fs18 = require("fs"); + var fs15 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter4(this, void 0, void 0, function* () { const platFilter = os5.platform(); @@ -81978,10 +76128,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs18.existsSync(lsbReleaseFile)) { - contents = fs18.readFileSync(lsbReleaseFile).toString(); - } else if (fs18.existsSync(osReleaseFile)) { - contents = fs18.readFileSync(osReleaseFile).toString(); + if (fs15.existsSync(lsbReleaseFile)) { + contents = fs15.readFileSync(lsbReleaseFile).toString(); + } else if (fs15.existsSync(osReleaseFile)) { + contents = fs15.readFileSync(osReleaseFile).toString(); } return contents; } @@ -82158,10 +76308,10 @@ var require_tool_cache = __commonJS({ var core14 = __importStar4(require_core()); var io7 = __importStar4(require_io()); var crypto2 = __importStar4(require("crypto")); - var fs18 = __importStar4(require("fs")); + var fs15 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); var os5 = __importStar4(require("os")); - var path20 = __importStar4(require("path")); + var path16 = __importStar4(require("path")); var httpm = __importStar4(require_lib()); var semver9 = __importStar4(require_semver2()); var stream2 = __importStar4(require("stream")); @@ -82182,8 +76332,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 || path20.join(_getTempDirectory(), crypto2.randomUUID()); - yield io7.mkdirP(path20.dirname(dest)); + dest = dest || path16.join(_getTempDirectory(), crypto2.randomUUID()); + yield io7.mkdirP(path16.dirname(dest)); core14.debug(`Downloading ${url}`); core14.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -82205,7 +76355,7 @@ var require_tool_cache = __commonJS({ exports2.downloadTool = downloadTool2; function downloadToolAttempt(url, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - if (fs18.existsSync(dest)) { + if (fs15.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { @@ -82229,7 +76379,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs18.createWriteStream(dest)); + yield pipeline(readStream, fs15.createWriteStream(dest)); core14.debug("download complete"); succeeded = true; return dest; @@ -82270,7 +76420,7 @@ var require_tool_cache = __commonJS({ process.chdir(originalCwd); } } else { - const escapedScript = path20.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}'`; @@ -82441,12 +76591,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os5.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); core14.debug(`source dir: ${sourceDir}`); - if (!fs18.statSync(sourceDir).isDirectory()) { + if (!fs15.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs18.readdirSync(sourceDir)) { - const s = path20.join(sourceDir, itemName); + for (const itemName of fs15.readdirSync(sourceDir)) { + const s = path16.join(sourceDir, itemName); yield io7.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -82460,11 +76610,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os5.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); core14.debug(`source file: ${sourceFile}`); - if (!fs18.statSync(sourceFile).isFile()) { + if (!fs15.statSync(sourceFile).isFile()) { throw new Error("sourceFile is not a file"); } const destFolder = yield _createToolPath(tool, version, arch2); - const destPath = path20.join(destFolder, targetFile); + const destPath = path16.join(destFolder, targetFile); core14.debug(`destination file ${destPath}`); yield io7.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -82488,9 +76638,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver9.clean(versionSpec) || ""; - const cachePath = path20.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path16.join(_getCacheDirectory(), toolName, versionSpec, arch2); core14.debug(`checking cache: ${cachePath}`); - if (fs18.existsSync(cachePath) && fs18.existsSync(`${cachePath}.complete`)) { + if (fs15.existsSync(cachePath) && fs15.existsSync(`${cachePath}.complete`)) { core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -82503,13 +76653,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os5.arch(); - const toolPath = path20.join(_getCacheDirectory(), toolName); - if (fs18.existsSync(toolPath)) { - const children = fs18.readdirSync(toolPath); + const toolPath = path16.join(_getCacheDirectory(), toolName); + if (fs15.existsSync(toolPath)) { + const children = fs15.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path20.join(toolPath, child, arch2 || ""); - if (fs18.existsSync(fullPath) && fs18.existsSync(`${fullPath}.complete`)) { + const fullPath = path16.join(toolPath, child, arch2 || ""); + if (fs15.existsSync(fullPath) && fs15.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -82563,7 +76713,7 @@ var require_tool_cache = __commonJS({ function _createExtractFolder(dest) { return __awaiter4(this, void 0, void 0, function* () { if (!dest) { - dest = path20.join(_getTempDirectory(), crypto2.randomUUID()); + dest = path16.join(_getTempDirectory(), crypto2.randomUUID()); } yield io7.mkdirP(dest); return dest; @@ -82571,7 +76721,7 @@ var require_tool_cache = __commonJS({ } function _createToolPath(tool, version, arch2) { return __awaiter4(this, void 0, void 0, function* () { - const folderPath = path20.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path16.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io7.rmRF(folderPath); @@ -82581,9 +76731,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path20.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); + const folderPath = path16.join(_getCacheDirectory(), tool, semver9.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs18.writeFileSync(markerPath, ""); + fs15.writeFileSync(markerPath, ""); core14.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -82760,7 +76910,7 @@ var require_follow_redirects = __commonJS({ "ERR_STREAM_WRITE_AFTER_END", "write after end" ); - var destroy = Writable.prototype.destroy || noop2; + var destroy = Writable.prototype.destroy || noop; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); @@ -83089,7 +77239,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop2() { + function noop() { } function parseUrl(input) { var parsed; @@ -83165,7 +77315,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.removeListener(event, eventHandlers[event]); } - request.on("error", noop2); + request.on("error", noop); request.destroy(error2); } function isSubdomain(subdomain, domain) { @@ -83191,8 +77341,8 @@ var require_follow_redirects = __commonJS({ }); // src/init-action.ts -var fs17 = __toESM(require("fs")); -var path19 = __toESM(require("path")); +var fs14 = __toESM(require("fs")); +var path15 = __toESM(require("path")); var core13 = __toESM(require_core()); var io6 = __toESM(require_io()); var semver8 = __toESM(require_semver2()); @@ -83252,17 +77402,17 @@ function v4(options, buf, offset) { var v4_default = v4; // src/actions-util.ts -var fs5 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var fs2 = __toESM(require("fs")); +var path2 = __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 fs4 = __toESM(require("fs")); +var fs = __toESM(require("fs")); var os = __toESM(require("os")); -var path5 = __toESM(require("path")); +var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -83402,764 +77552,33 @@ function checkDiskSpace(directoryPath, dependencies = { return checkUnix(directoryPath); } -// 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 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_path7 = require("node:path"); +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 fs18 = options.fs || await import("node:fs/promises"); + 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 fs18.lstat(itemPath, { bigint: true }) : await fs18.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + 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 fs18.readdir(itemPath) : await fs18.readdir(itemPath).catch((error2) => errors.push(error2)); + 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_path7.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) ) ); } @@ -86852,13 +80271,13 @@ function getTotalMemoryBytes(logger) { return limit; } function getCgroupMemoryLimitBytes(limitFile, logger) { - if (!fs4.existsSync(limitFile)) { + if (!fs.existsSync(limitFile)) { logger.debug( `While resolving RAM, did not find a cgroup memory limit at ${limitFile}.` ); return void 0; } - const limit = Number(fs4.readFileSync(limitFile, "utf8")); + const limit = Number(fs.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.` @@ -86928,13 +80347,13 @@ function getThreadsFlagValue(userInput, logger) { return numThreads; } function getCgroupCpuCountFromCpuMax(cpuMaxFile, logger) { - if (!fs4.existsSync(cpuMaxFile)) { + if (!fs.existsSync(cpuMaxFile)) { logger.debug( `While resolving threads, did not find a cgroup CPU file at ${cpuMaxFile}.` ); return void 0; } - const cpuMaxString = fs4.readFileSync(cpuMaxFile, "utf-8"); + const cpuMaxString = fs.readFileSync(cpuMaxFile, "utf-8"); const cpuMaxStringSplit = cpuMaxString.split(" "); if (cpuMaxStringSplit.length !== 2) { logger.debug( @@ -86954,14 +80373,14 @@ function getCgroupCpuCountFromCpuMax(cpuMaxFile, logger) { return cpuCount; } function getCgroupCpuCountFromCpus(cpusFile, logger) { - if (!fs4.existsSync(cpusFile)) { + if (!fs.existsSync(cpusFile)) { logger.debug( `While resolving threads, did not find a cgroup CPUs file at ${cpusFile}.` ); return void 0; } let cpuCount = 0; - const cpusString = fs4.readFileSync(cpusFile, "utf-8").trim(); + const cpusString = fs.readFileSync(cpusFile, "utf-8").trim(); if (cpusString.length === 0) { return void 0; } @@ -86980,10 +80399,10 @@ function getCgroupCpuCountFromCpus(cpusFile, logger) { return cpuCount; } function getCodeQLDatabasePath(config, language) { - return path5.resolve(config.dbLocation, language); + return path.resolve(config.dbLocation, language); } function getGeneratedSuitePath(config, language) { - return path5.resolve( + return path.resolve( config.dbLocation, language, "temp", @@ -87146,15 +80565,15 @@ async function tryGetFolderBytes(cacheDir, logger, quiet = false) { } var hadTimeout = false; async function waitForResultWithTimeLimit(timeoutMs, promise, onTimeout) { - let finished2 = false; + let finished = false; const mainTask = async () => { const result = await promise; - finished2 = true; + finished = true; return result; }; const timeoutTask = async () => { await delay(timeoutMs, { allowProcessExit: true }); - if (!finished2) { + if (!finished) { hadTimeout = true; onTimeout(); } @@ -87286,16 +80705,10 @@ async function checkSipEnablement(logger) { async function cleanUpGlob(glob2, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await deleteAsync(glob2, { force: true }); - if (deletedPaths.length === 0) { - logger.warning( - `Failed to clean up ${name}: no files found matching ${glob2}.` - ); - } else if (deletedPaths.length === 1) { - logger.debug(`Cleaned up ${name}.`); - } else { - logger.debug(`Cleaned up ${name} (${deletedPaths.length} files).`); - } + await fs.promises.rm(glob2, { + force: true, + recursive: true + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } @@ -87343,17 +80756,17 @@ function getWorkflowEventName() { } function isRunningLocalAction() { const relativeScriptPath = getRelativeScriptPath(); - return relativeScriptPath.startsWith("..") || path6.isAbsolute(relativeScriptPath); + return relativeScriptPath.startsWith("..") || path2.isAbsolute(relativeScriptPath); } function getRelativeScriptPath() { const runnerTemp = getRequiredEnvParam("RUNNER_TEMP"); - const actionsDirectory = path6.join(path6.dirname(runnerTemp), "_actions"); - return path6.relative(actionsDirectory, __filename); + const actionsDirectory = path2.join(path2.dirname(runnerTemp), "_actions"); + return path2.relative(actionsDirectory, __filename); } function getWorkflowEvent() { const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH"); try { - return JSON.parse(fs5.readFileSync(eventJsonFile, "utf-8")); + return JSON.parse(fs2.readFileSync(eventJsonFile, "utf-8")); } catch (e) { throw new Error( `Unable to read workflow event JSON from ${eventJsonFile}: ${e}` @@ -87780,12 +81193,12 @@ function getDependencyCachingEnabled() { } // src/config-utils.ts -var fs9 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var fs6 = __toESM(require("fs")); +var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); // src/config/db-config.ts -var path7 = __toESM(require("path")); +var path3 = __toESM(require("path")); var jsonschema = __toESM(require_lib2()); var semver2 = __toESM(require_semver2()); @@ -87928,11 +81341,11 @@ function parsePacksSpecification(packStr) { throw new ConfigurationError(getPacksStrInvalid(packStr)); } } - if (packPath && (path7.isAbsolute(packPath) || // Permit using "/" instead of "\" on Windows + if (packPath && (path3.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. - path7.normalize(packPath).split(path7.sep).join("/") !== packPath.split(path7.sep).join("/"))) { + path3.normalize(packPath).split(path3.sep).join("/") !== packPath.split(path3.sep).join("/"))) { throw new ConfigurationError(getPacksStrInvalid(packStr)); } if (!packPath && pathStart) { @@ -88128,8 +81541,8 @@ function parseUserConfig(logger, pathInput, contents, validateConfig) { } // src/feature-flags.ts -var fs7 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var fs4 = __toESM(require("fs")); +var path5 = __toESM(require("path")); var semver4 = __toESM(require_semver2()); // src/defaults.json @@ -88138,8 +81551,8 @@ var cliVersion = "2.23.3"; // src/overlay-database-utils.ts var crypto = __toESM(require("crypto")); -var fs6 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var fs3 = __toESM(require("fs")); +var path4 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts @@ -88243,8 +81656,8 @@ var getFileOidsUnderPath = async function(basePath) { const match = line.match(regex); if (match) { const oid = match[1]; - const path20 = decodeGitFilePath(match[2]); - fileOidMap[path20] = oid; + const path16 = decodeGitFilePath(match[2]); + fileOidMap[path16] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -88350,12 +81763,12 @@ async function writeBaseDatabaseOidsFile(config, sourceRoot) { const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOidsJson = JSON.stringify(gitFileOids); const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - await fs6.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); + await fs3.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); } async function readBaseDatabaseOidsFile(config, logger) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); try { - const contents = await fs6.promises.readFile( + const contents = await fs3.promises.readFile( baseDatabaseOidsFilePath, "utf-8" ); @@ -88368,7 +81781,7 @@ async function readBaseDatabaseOidsFile(config, logger) { } } function getBaseDatabaseOidsFilePath(config) { - return path8.join(config.dbLocation, "base-database-oids.json"); + return path4.join(config.dbLocation, "base-database-oids.json"); } async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); @@ -88378,14 +81791,14 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path8.join( + const overlayChangesFile = path4.join( getTemporaryDirectory(), "overlay-changes.json" ); logger.debug( `Writing overlay changed files to ${overlayChangesFile}: ${changedFilesJson}` ); - await fs6.promises.writeFile(overlayChangesFile, changedFilesJson); + await fs3.promises.writeFile(overlayChangesFile, changedFilesJson); return overlayChangesFile; } function computeChangedFiles(baseFileOids, overlayFileOids) { @@ -88407,7 +81820,7 @@ var CACHE_PREFIX = "codeql-overlay-base-database"; var MAX_CACHE_OPERATION_MS = 6e5; function checkOverlayBaseDatabase(config, logger, warningPrefix) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - if (!fs6.existsSync(baseDatabaseOidsFilePath)) { + if (!fs3.existsSync(baseDatabaseOidsFilePath)) { logger.warning( `${warningPrefix}: ${baseDatabaseOidsFilePath} does not exist` ); @@ -88742,7 +82155,7 @@ var Features = class { this.gitHubFeatureFlags = new GitHubFeatureFlags( gitHubVersion, repositoryNwo, - path9.join(tempDir, FEATURE_FLAGS_FILE_NAME), + path5.join(tempDir, FEATURE_FLAGS_FILE_NAME), logger ); } @@ -88921,12 +82334,12 @@ var GitHubFeatureFlags = class { } async readLocalFlags() { try { - if (fs7.existsSync(this.featureFlagsFile)) { + if (fs4.existsSync(this.featureFlagsFile)) { this.logger.debug( `Loading feature flags from ${this.featureFlagsFile}` ); return JSON.parse( - fs7.readFileSync(this.featureFlagsFile, "utf8") + fs4.readFileSync(this.featureFlagsFile, "utf8") ); } } catch (e) { @@ -88939,7 +82352,7 @@ var GitHubFeatureFlags = class { async writeLocalFlags(flags) { try { this.logger.debug(`Writing feature flags to ${this.featureFlagsFile}`); - fs7.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); + fs4.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); } catch (e) { this.logger.warning( `Error writing cached feature flags file ${this.featureFlagsFile}: ${e}.` @@ -89038,8 +82451,8 @@ var KnownLanguage = /* @__PURE__ */ ((KnownLanguage2) => { })(KnownLanguage || {}); // src/trap-caching.ts -var fs8 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var fs5 = __toESM(require("fs")); +var path6 = __toESM(require("path")); var actionsCache2 = __toESM(require_cache3()); var CACHE_VERSION2 = 1; var CODEQL_TRAP_CACHE_PREFIX = "codeql-trap"; @@ -89055,13 +82468,13 @@ async function downloadTrapCaches(codeql, languages, logger) { `Found ${languagesSupportingCaching.length} languages that support TRAP caching` ); if (languagesSupportingCaching.length === 0) return result; - const cachesDir = path10.join( + const cachesDir = path6.join( getTemporaryDirectory(), "trapCaches" ); for (const language of languagesSupportingCaching) { - const cacheDir = path10.join(cachesDir, language); - fs8.mkdirSync(cacheDir, { recursive: true }); + const cacheDir = path6.join(cachesDir, language); + fs5.mkdirSync(cacheDir, { recursive: true }); result[language] = cacheDir; } if (await isAnalyzingDefaultBranch()) { @@ -89073,7 +82486,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(fs8.readFileSync(path10.resolve(eventPath), "utf-8")); + const event = JSON.parse(fs5.readFileSync(path6.resolve(eventPath), "utf-8")); baseSha = event.pull_request?.base?.sha || baseSha; } for (const language of languages) { @@ -89175,9 +82588,9 @@ async function getSupportedLanguageMap(codeql, features, logger) { } var baseWorkflowsPath = ".github/workflows"; function hasActionsWorkflows(sourceRoot) { - const workflowsPath = path11.resolve(sourceRoot, baseWorkflowsPath); - const stats = fs9.lstatSync(workflowsPath, { throwIfNoEntry: false }); - return stats !== void 0 && stats.isDirectory() && fs9.readdirSync(workflowsPath).length > 0; + const workflowsPath = path7.resolve(sourceRoot, baseWorkflowsPath); + const stats = fs6.lstatSync(workflowsPath, { throwIfNoEntry: false }); + return stats !== void 0 && stats.isDirectory() && fs6.readdirSync(workflowsPath).length > 0; } async function getRawLanguagesInRepo(repository, sourceRoot, logger) { logger.debug( @@ -89342,8 +82755,8 @@ async function downloadCacheWithTime(trapCachingEnabled, codeQL, languages, logg async function loadUserConfig(logger, configFile, workspacePath, apiDetails, tempDir, validateConfig) { if (isLocal(configFile)) { if (configFile !== userConfigFromActionPath(tempDir)) { - configFile = path11.resolve(workspacePath, configFile); - if (!(configFile + path11.sep).startsWith(workspacePath + path11.sep)) { + configFile = path7.resolve(workspacePath, configFile); + if (!(configFile + path7.sep).startsWith(workspacePath + path7.sep)) { throw new ConfigurationError( getConfigFileOutsideWorkspaceErrorMessage(configFile) ); @@ -89477,10 +82890,10 @@ async function getOverlayDatabaseMode(codeql, repository, features, languages, s }; } function dbLocationOrDefault(dbLocation, tempDir) { - return dbLocation || path11.resolve(tempDir, "codeql_databases"); + return dbLocation || path7.resolve(tempDir, "codeql_databases"); } function userConfigFromActionPath(tempDir) { - return path11.resolve(tempDir, "user-config-from-action.yml"); + return path7.resolve(tempDir, "user-config-from-action.yml"); } function hasQueryCustomisation(userConfig) { return isDefined(userConfig["disable-default-queries"]) || isDefined(userConfig.queries) || isDefined(userConfig["query-filters"]); @@ -89494,7 +82907,7 @@ async function initConfig(features, inputs) { ); } inputs.configFile = userConfigFromActionPath(tempDir); - fs9.writeFileSync(inputs.configFile, inputs.configInput); + fs6.writeFileSync(inputs.configFile, inputs.configInput); logger.debug(`Using config from action input: ${inputs.configFile}`); } let userConfig = {}; @@ -89572,7 +82985,7 @@ function isLocal(configPath) { return configPath.indexOf("@") === -1; } function getLocalConfig(logger, configFile, validateConfig) { - if (!fs9.existsSync(configFile)) { + if (!fs6.existsSync(configFile)) { throw new ConfigurationError( getConfigFileDoesNotExistErrorMessage(configFile) ); @@ -89580,7 +82993,7 @@ function getLocalConfig(logger, configFile, validateConfig) { return parseUserConfig( logger, configFile, - fs9.readFileSync(configFile, "utf-8"), + fs6.readFileSync(configFile, "utf-8"), validateConfig ); } @@ -89620,13 +83033,13 @@ async function getRemoteConfig(logger, configFile, apiDetails, validateConfig) { ); } function getPathToParsedConfigFile(tempDir) { - return path11.join(tempDir, "config"); + return path7.join(tempDir, "config"); } async function saveConfig(config, logger) { const configString = JSON.stringify(config); const configFile = getPathToParsedConfigFile(config.tempDir); - fs9.mkdirSync(path11.dirname(configFile), { recursive: true }); - fs9.writeFileSync(configFile, configString, "utf8"); + fs6.mkdirSync(path7.dirname(configFile), { recursive: true }); + fs6.writeFileSync(configFile, configString, "utf8"); logger.debug("Saved config:"); logger.debug(configString); } @@ -89636,9 +83049,9 @@ async function generateRegistries(registriesInput, tempDir, logger) { let qlconfigFile; if (registries) { const qlconfig = createRegistriesBlock(registries); - qlconfigFile = path11.join(tempDir, "qlconfig.yml"); + qlconfigFile = path7.join(tempDir, "qlconfig.yml"); const qlconfigContents = dump(qlconfig); - fs9.writeFileSync(qlconfigFile, qlconfigContents, "utf8"); + fs6.writeFileSync(qlconfigFile, qlconfigContents, "utf8"); logger.debug("Generated qlconfig.yml:"); logger.debug(qlconfigContents); registriesAuthTokens = registries.map((registry) => `${registry.url}=${registry.token}`).join(","); @@ -89916,14 +83329,14 @@ function flushDiagnostics(config) { } // src/init.ts -var fs15 = __toESM(require("fs")); -var path17 = __toESM(require("path")); +var fs12 = __toESM(require("fs")); +var path13 = __toESM(require("path")); var toolrunner4 = __toESM(require_toolrunner()); var io5 = __toESM(require_io()); // src/codeql.ts -var fs14 = __toESM(require("fs")); -var path16 = __toESM(require("path")); +var fs11 = __toESM(require("fs")); +var path12 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -90168,15 +83581,15 @@ function wrapCliConfigurationError(cliError) { } // src/setup-codeql.ts -var fs12 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var fs9 = __toESM(require("fs")); +var path10 = __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 fs10 = __toESM(require("fs")); +var fs7 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -90249,7 +83662,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs10.mkdirSync(dest, { recursive: true }); + fs7.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -90333,9 +83746,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs11 = __toESM(require("fs")); +var fs8 = __toESM(require("fs")); var os3 = __toESM(require("os")); -var path13 = __toESM(require("path")); +var path9 = __toESM(require("path")); var import_perf_hooks2 = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -90440,7 +83853,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs11.mkdirSync(dest, { recursive: true }); + fs8.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -90468,7 +83881,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path13.join( + return path9.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver6.clean(version) || version, @@ -90477,7 +83890,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs11.writeFileSync(markerFilePath, ""); + fs8.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url) { @@ -90612,7 +84025,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs12.existsSync(path14.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs9.existsSync(path10.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -90985,7 +84398,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path14.join(tempDir, v4_default()); + return path10.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -91033,8 +84446,8 @@ function isReservedToolsValue(tools) { } // src/tracer-config.ts -var fs13 = __toESM(require("fs")); -var path15 = __toESM(require("path")); +var fs10 = __toESM(require("fs")); +var path11 = __toESM(require("path")); async function shouldEnableIndirectTracing(codeql, config) { if (config.buildMode === "none" /* None */) { return false; @@ -91046,8 +84459,8 @@ async function shouldEnableIndirectTracing(codeql, config) { } async function getTracerConfigForCluster(config) { const tracingEnvVariables = JSON.parse( - fs13.readFileSync( - path15.resolve( + fs10.readFileSync( + path11.resolve( config.dbLocation, "temp/tracingEnvironment/start-tracing.json" ), @@ -91095,7 +84508,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path16.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") { @@ -91151,12 +84564,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path16.join( + const tracingConfigPath = path12.join( extractorPath, "tools", "tracing-config.lua" ); - return fs14.existsSync(tracingConfigPath); + return fs11.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -91227,7 +84640,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path16.join( + const autobuildCmd = path12.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -91611,7 +85024,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs14.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs11.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -91634,7 +85047,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path16.resolve(config.tempDir, "user-config.yaml"); + return path12.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -91689,7 +85102,7 @@ async function initConfig2(features, inputs) { }); } async function runDatabaseInitCluster(databaseInitEnvironment, codeql, config, sourceRoot, processName, qlconfigFile, logger) { - fs15.mkdirSync(config.dbLocation, { recursive: true }); + fs12.mkdirSync(config.dbLocation, { recursive: true }); await wrapEnvironment( databaseInitEnvironment, async () => await codeql.databaseInitCluster( @@ -91724,25 +85137,25 @@ async function checkPacksForOverlayCompatibility(codeql, config, logger) { } function checkPackForOverlayCompatibility(packDir, codeQlOverlayVersion, logger) { try { - let qlpackPath = path17.join(packDir, "qlpack.yml"); - if (!fs15.existsSync(qlpackPath)) { - qlpackPath = path17.join(packDir, "codeql-pack.yml"); + let qlpackPath = path13.join(packDir, "qlpack.yml"); + if (!fs12.existsSync(qlpackPath)) { + qlpackPath = path13.join(packDir, "codeql-pack.yml"); } const qlpackContents = load( - fs15.readFileSync(qlpackPath, "utf8") + fs12.readFileSync(qlpackPath, "utf8") ); if (!qlpackContents.buildMetadata) { return true; } - const packInfoPath = path17.join(packDir, ".packinfo"); - if (!fs15.existsSync(packInfoPath)) { + const packInfoPath = path13.join(packDir, ".packinfo"); + if (!fs12.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( - fs15.readFileSync(packInfoPath, "utf8") + fs12.readFileSync(packInfoPath, "utf8") ); const packOverlayVersion = packInfoFileContents.overlayVersion; if (typeof packOverlayVersion !== "number") { @@ -91767,7 +85180,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 = path17.resolve( + const script = path13.resolve( __dirname, "../python-setup", "check_python12.ps1" @@ -91777,8 +85190,8 @@ async function checkInstallPython311(languages, codeql) { ]).exec(); } } -function cleanupDatabaseClusterDirectory(config, logger, options = {}, rmSync2 = fs15.rmSync) { - if (fs15.existsSync(config.dbLocation) && (fs15.statSync(config.dbLocation).isFile() || fs15.readdirSync(config.dbLocation).length > 0)) { +function cleanupDatabaseClusterDirectory(config, logger, options = {}, rmSync2 = fs12.rmSync) { + if (fs12.existsSync(config.dbLocation) && (fs12.statSync(config.dbLocation).isFile() || fs12.readdirSync(config.dbLocation).length > 0)) { if (!options.disableExistingDirectoryWarning) { logger.warning( `The database cluster directory ${config.dbLocation} must be empty. Attempting to clean it up.` @@ -92038,8 +85451,8 @@ async function createInitWithConfigStatusReport(config, initStatusReport, config } // src/workflow.ts -var fs16 = __toESM(require("fs")); -var path18 = __toESM(require("path")); +var fs13 = __toESM(require("fs")); +var path14 = __toESM(require("path")); var import_zlib = __toESM(require("zlib")); var core12 = __toESM(require_core()); function toCodedErrors(errors) { @@ -92190,15 +85603,15 @@ async function getWorkflow(logger) { ); } const workflowPath = await getWorkflowAbsolutePath(logger); - return load(fs16.readFileSync(workflowPath, "utf-8")); + return load(fs13.readFileSync(workflowPath, "utf-8")); } async function getWorkflowAbsolutePath(logger) { const relativePath = await getWorkflowRelativePath(); - const absolutePath = path18.join( + const absolutePath = path14.join( getRequiredEnvParam("GITHUB_WORKSPACE"), relativePath ); - if (fs16.existsSync(absolutePath)) { + if (fs13.existsSync(absolutePath)) { logger.debug( `Derived the following absolute path for the currently executing workflow: ${absolutePath}.` ); @@ -92328,7 +85741,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 = path19.resolve( + const sourceRoot = path15.resolve( getRequiredEnvParam("GITHUB_WORKSPACE"), getOptionalInput("source-root") || "" ); @@ -92496,21 +85909,21 @@ async function run() { )) { try { logger.debug(`Applying static binary workaround for Go`); - const tempBinPath = path19.resolve( + const tempBinPath = path15.resolve( getTemporaryDirectory(), "codeql-action-go-tracing", "bin" ); - fs17.mkdirSync(tempBinPath, { recursive: true }); + fs14.mkdirSync(tempBinPath, { recursive: true }); core13.addPath(tempBinPath); - const goWrapperPath = path19.resolve(tempBinPath, "go"); - fs17.writeFileSync( + const goWrapperPath = path15.resolve(tempBinPath, "go"); + fs14.writeFileSync( goWrapperPath, `#!/bin/bash exec ${goBinaryPath} "$@"` ); - fs17.chmodSync(goWrapperPath, "755"); + fs14.chmodSync(goWrapperPath, "755"); core13.exportVariable("CODEQL_ACTION_GO_BINARY" /* GO_BINARY_LOCATION */, goWrapperPath); } catch (e) { logger.warning( @@ -92749,52 +86162,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/resolve-environment-action.js b/lib/resolve-environment-action.js index 884f16ced5..679cc1d153 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -26500,7 +26500,6 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.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/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index 37e3f6121a..83046fe048 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-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 fs11 = __importStar4(require("fs")); + var fs9 = __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 (!fs11.existsSync(filePath)) { + if (!fs9.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs11.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + fs9.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.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 path12 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; + let path8 = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; if (origin.endsWith("/")) { origin = origin.substring(0, origin.length - 1); } - if (path12 && !path12.startsWith("/")) { - path12 = `/${path12}`; + if (path8 && !path8.startsWith("/")) { + path8 = `/${path8}`; } - url = new URL(origin + path12); + url = new URL(origin + path8); } 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(path12) { - if (typeof path12 !== "string") { + module2.exports = function basename(path8) { + if (typeof path8 !== "string") { return ""; } - for (var i = path12.length - 1; i >= 0; --i) { - switch (path12.charCodeAt(i)) { + for (var i = path8.length - 1; i >= 0; --i) { + switch (path8.charCodeAt(i)) { case 47: // '/' case 92: - path12 = path12.slice(i + 1); - return path12 === ".." || path12 === "." ? "" : path12; + path8 = path8.slice(i + 1); + return path8 === ".." || path8 === "." ? "" : path8; } } - return path12 === ".." || path12 === "." ? "" : path12; + return path8 === ".." || path8 === "." ? "" : path8; }; } }); @@ -2673,8 +2673,8 @@ var require_multipart = __commonJS({ } } function checkFinished() { - if (nends === 0 && finished2 && !boy._done) { - finished2 = false; + if (nends === 0 && finished && !boy._done) { + finished = false; self2.end(); } } @@ -2693,7 +2693,7 @@ var require_multipart = __commonJS({ let nends = 0; let curFile; let curField; - let finished2 = false; + let finished = 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() { - finished2 = true; + finished = true; checkFinished(); }); } @@ -5663,7 +5663,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path12, + path: path8, method, body, headers, @@ -5677,11 +5677,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path12 !== "string") { + if (typeof path8 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path12[0] !== "/" && !(path12.startsWith("http://") || path12.startsWith("https://")) && method !== "CONNECT") { + } else if (path8[0] !== "/" && !(path8.startsWith("http://") || path8.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(path8) !== 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(path8, query) : path8; 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 path8 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path12; + this.opts.path = path8; 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: path8, 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} ${path8} 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: path8, 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] = path8; 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 finished2 = false; + let finished = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { - if (finished2) { + if (finished) { return; } try { @@ -8325,7 +8325,7 @@ upgrade: ${upgrade}\r } }; const onDrain = function() { - if (finished2) { + if (finished) { return; } if (body.resume) { @@ -8333,17 +8333,17 @@ upgrade: ${upgrade}\r } }; const onAbort = function() { - if (finished2) { + if (finished) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); }; const onFinished = function(err) { - if (finished2) { + if (finished) { return; } - finished2 = true; + finished = 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 noop2 = () => { + var noop = () => { }; module2.exports = class BodyReadable extends Readable2 { constructor({ @@ -9339,7 +9339,7 @@ var require_readable = __commonJS({ return new Promise((resolve4, reject) => { const signalListenerCleanup = signal ? util.addAbortListener(signal, () => { this.destroy(); - }) : noop2; + }) : noop; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { @@ -9347,7 +9347,7 @@ var require_readable = __commonJS({ } else { resolve4(null); } - }).on("error", noop2).on("data", function(chunk) { + }).on("error", noop).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: finished2, PassThrough } = require("stream"); + var { finished, 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"); } - finished2(res, { readable: false }, (err) => { + finished(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(path8) { + if (typeof path8 !== "string") { + return path8; } - const pathSegments = path12.split("?"); + const pathSegments = path8.split("?"); if (pathSegments.length !== 2) { - return path12; + return path8; } 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: path8, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path8); 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: path8 }) => matchValue(safeUrl(path8), 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: path8, method, body, headers, query } = opts; return { - path: path12, + path: path8, 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: 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]); } @@ -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: path8, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path12, + Path: path8, "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(path8) { + for (const char of path8) { 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 path8 = opts.path; if (!opts.path.startsWith("/")) { - path12 = `/${path12}`; + path8 = `/${path8}`; } - url = new URL(util.parseOrigin(url).origin + path12); + url = new URL(util.parseOrigin(url).origin + path8); } 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 path12 = __importStar4(require("path")); + var path8 = __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, path8.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 path12 = __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 fs9 = __importStar4(require("fs")); + var path8 = __importStar4(require("path")); + _a = fs9.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 = fs9.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 isDirectory2(fsPath, useStat = false) { + function isDirectory(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 = isDirectory2; + exports2.isDirectory = isDirectory; 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 = path8.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 = path8.dirname(filePath); + const upperName = path8.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path12.join(directory, actualName); + filePath = path8.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 path8 = __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 ? path8.join(dest, path8.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 (path8.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 = path8.join(dest, path8.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -18731,7 +18731,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path12.dirname(dest)); + yield mkdirP(path8.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(path8.delimiter)) { if (extension) { extensions.push(extension); } @@ -18807,12 +18807,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path12.sep)) { + if (tool.includes(path8.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(path8.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(path8.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 path8 = __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 = path8.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } this.toolPath = yield io6.which(this.toolPath, true); return new Promise((resolve4, 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 path8 = __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}${path8.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 path8 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path8} 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(once2); + module2.exports = wrappy(once); module2.exports.strict = wrappy(onceStrict); - once2.proto = once2(function() { + once.proto = once(function() { Object.defineProperty(Function.prototype, "once", { value: function() { - return once2(this); + return once(this); }, configurable: true }); @@ -20545,7 +20545,7 @@ var require_once = __commonJS({ configurable: true }); }); - function once2(fn) { + function once(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 noop2 = () => { + var noop = () => { }; 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: noop2, - info: noop2, + debug: noop, + info: noop, warn: consoleWarn, error: consoleError }, @@ -24525,5857 +24525,8 @@ var require_github = __commonJS({ } }); -// 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 os3 = require("os"); - var path12 = require("path"); - var IS_WINDOWS_PLATFORM = os3.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 path12.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 isGlob2(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 isGlob2 = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash2 = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str2, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash2) < 0) { - str2 = str2.replace(backslash, slash2); - } - if (enclosure.test(str2)) { - str2 += slash2; - } - str2 += "a"; - do { - str2 = pathPosixDirname(str2); - } while (isGlob2(str2) || globby2.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(compare2); - 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 compare2(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 path12 = 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: path12.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 path12 = 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 || path12.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 isGlob2 = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished2 = 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; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA2) { - isBrace = token.isBrace = true; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished2 = 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 (finished2 === 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) { - isGlob2 = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished2 = 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) { - isGlob2 = token.isGlob = true; - finished2 = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob2 = token.isGlob = true; - finished2 = 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; - isGlob2 = token.isGlob = true; - finished2 = 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) { - isGlob2 = 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) { - finished2 = true; - break; - } - } - continue; - } - break; - } - if (isGlob2 === true) { - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob2 = false; - } - let base = str2; - let prefix = ""; - let glob = ""; - if (start > 0) { - prefix = str2.slice(0, start); - str2 = str2.slice(start); - lastIndex -= start; - } - if (base && isGlob2 === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob = str2.slice(lastIndex); - } else if (isGlob2 === 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: isGlob2, - 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 path12 = 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(path12.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 path12 = 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 !isDynamicPattern2(pattern, options); - } - exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern2(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 = isDynamicPattern2; - 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 isNegativePattern2(pattern) ? pattern.slice(1) : pattern; - } - exports2.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern2(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports2.isNegativePattern = isNegativePattern2; - function isPositivePattern(pattern) { - return !isNegativePattern2(pattern); - } - exports2.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern2); - } - 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 = path12.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 relative2 = []; - for (const pattern of patterns) { - if (isAbsolute2(pattern)) { - absolute.push(pattern); - } else { - relative2.push(pattern); - } - } - return [absolute, relative2]; - } - exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; - function isAbsolute2(pattern) { - return path12.isAbsolute(pattern); - } - exports2.isAbsolute = isAbsolute2; - } -}); - -// 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) { - "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((stream2) => { - stream2.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((stream2) => stream2.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 fs11 = require_fs(); - exports2.fs = fs11; - var path12 = require_path(); - exports2.path = path12; - var pattern = require_pattern(); - exports2.pattern = pattern; - var stream2 = require_stream(); - exports2.stream = stream2; - 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(path12, settings, callback) { - settings.fs.lstat(path12, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path12, (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(path12, settings) { - const lstat = settings.fs.lstatSync(path12); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path12); - 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 fs11 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs11.lstat, - stat: fs11.stat, - lstatSync: fs11.lstatSync, - statSync: fs11.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 fs11 = 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.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(path12, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path12, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path12, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.stat = stat; - function statSync(path12, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path12, 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 fs11 = require_fs3(); - exports2.fs = fs11; - } -}); - -// 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 path12 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path12, settings.fsStatSettings, (error2, stats) => { - if (error2 !== null) { - done(error2); - return; - } - const entry = { - name, - path: path12, - 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 fs11 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs11.lstat, - stat: fs11.stat, - lstatSync: fs11.lstatSync, - statSync: fs11.statSync, - readdir: fs11.readdir, - readdirSync: fs11.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 path12 = require("path"); - var fsStat = require_out(); - var fs11 = 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, path12.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(path12, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path12, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path12, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.scandir = scandir; - function scandirSync(path12, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path12, 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: noop2, - saturated: noop2, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop2, - 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 || noop2; - 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 || noop2; - 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 = noop2; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self2.drain(); - self2.drain = noop2; - } - } - function noop2() { - } - function Task() { - this.value = null; - this.callback = noop2; - this.next = null; - this.release = noop2; - this.context = null; - var self2 = this; - this.worked = function worked(err, result) { - var callback = self2.callback; - self2.value = null; - self2.callback = noop2; - 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 path12 = 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, path12.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 path12 = 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 path12.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 stream2 = new stream_1.PassThrough({ objectMode: true }); - stream2._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream2.push(entry); - } - if (index === filepaths.length - 1) { - stream2.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream2.write(i); - } - return stream2; - } - _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 stream2 = this._readerStream.static(patterns, options); - return new Promise((resolve4, reject) => { - stream2.once("error", reject); - stream2.on("data", (entry) => entries.push(entry)); - stream2.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, isDirectory2) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory2) { - if (patternsRe.length === 0) { - return false; - } - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory2) { - 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 path12 = 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 path12.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 fs11 = require("fs"); - var os3 = require("os"); - var CPU_COUNT = Math.max(os3.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 - }; - 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) { - assertPatternsInput2(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 = stream2; - FastGlob2.async = FastGlob2; - function sync(source, options) { - assertPatternsInput2(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream2(source, options) { - assertPatternsInput2(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream2; - function generateTasks2(source, options) { - assertPatternsInput2(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks2; - function isDynamicPattern2(source, options) { - assertPatternsInput2(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern2; - function escapePath(source) { - assertPatternsInput2(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - function convertPathToPattern2(source) { - assertPatternsInput2(source); - return utils.path.convertPathToPattern(source); - } - FastGlob2.convertPathToPattern = convertPathToPattern2; - let posix; - (function(posix2) { - function escapePath2(source) { - assertPatternsInput2(source); - return utils.path.escapePosixPath(source); - } - posix2.escapePath = escapePath2; - function convertPathToPattern3(source) { - assertPatternsInput2(source); - return utils.path.convertPosixPathToPattern(source); - } - posix2.convertPathToPattern = convertPathToPattern3; - })(posix = FastGlob2.posix || (FastGlob2.posix = {})); - let win32; - (function(win322) { - function escapePath2(source) { - assertPatternsInput2(source); - return utils.path.escapeWindowsPath(source); - } - win322.escapePath = escapePath2; - function convertPathToPattern3(source) { - assertPatternsInput2(source); - return utils.path.convertWindowsPathToPattern(source); - } - win322.convertPathToPattern = convertPathToPattern3; - })(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 assertPatternsInput2(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/globby/node_modules/ignore/index.js -var require_ignore = __commonJS({ - "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 = "\\"; - 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 = /^\.{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 }); - return 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) - // (a \ ) -> (a ) - /((?:\\\\)*?)(\\?\s+)$/, - (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY) - ], - // Replace (\ ) with ' ' - // (\ ) -> ' ' - // (\\ ) -> '\\ ' - // (\\\ ) -> '\\ ' - [ - /(\\+?)\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. - // > 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}(?=$|\\/$)` - ] - ]; - 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}(?=$|\\/$)`; - } - }; - 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).filter(Boolean); - var IgnoreRule = class { - constructor(pattern, mark, body, ignoreCase, negative, prefix) { - this.pattern = pattern; - this.mark = mark; - this.negative = negative; - 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, - mark - }, ignoreCase) => { - let negative = false; - let body = pattern; - if (body.indexOf("!") === 0) { - negative = true; - body = body.substr(1); - } - body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regexPrefix = makeRegexPrefix(body); - return new IgnoreRule( - pattern, - mark, - body, - ignoreCase, - negative, - regexPrefix - ); - }; - var RuleManager = class { - constructor(ignoreCase) { - this._ignoreCase = ignoreCase; - this._rules = []; - } - _add(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules._rules); - this._added = true; - return; - } - if (isString(pattern)) { - pattern = { - pattern - }; - } - if (checkPattern(pattern.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._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(path12, 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(path12); - 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 = (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 = 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; - } - // legacy - addPattern(pattern) { - return this.add(pattern); - } - // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { - const path12 = originalPath && checkPath.convert(originalPath); - checkPath( - path12, - originalPath, - this._strictPathCheck ? throwError2 : RETURN_FALSE - ); - return this._t(path12, cache, checkUnignored, slices); - } - checkIgnore(path12) { - if (!REGEX_TEST_TRAILING_SLASH.test(path12)) { - return this.test(path12); - } - const slices = path12.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(path12, false, MODE_CHECK_IGNORE); - } - _t(path12, cache, checkUnignored, slices) { - if (path12 in cache) { - return cache[path12]; - } - if (!slices) { - slices = path12.split(SLASH).filter(Boolean); - } - slices.pop(); - if (!slices.length) { - return cache[path12] = this._rules.test(path12, checkUnignored, MODE_IGNORE); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path12] = parent.ignored ? parent : this._rules.test(path12, checkUnignored, MODE_IGNORE); - } - ignores(path12) { - return this._test(path12, this._ignoreCache, false).ignored; - } - createFilter() { - return (path12) => !this.ignores(path12); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path12) { - return this._test(path12, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - var isPathValid = (path12) => checkPath(path12 && checkPath.convert(path12), path12, RETURN_FALSE); - var setupWindows = () => { - const makePosix = (str2) => /^\\\\\?\\/.test(str2) || /["<>|\u0000-\u001F]+/u.test(str2) ? str2 : str2.replace(/\\/g, "/"); - checkPath.convert = makePosix; - const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i; - checkPath.isNotRelative = (path12) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path12) || isNotRelative(path12); - }; - 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); - } -}); - // 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"; @@ -30424,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 = []; @@ -30553,7 +24704,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(); @@ -30828,7 +24979,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(); @@ -30853,7 +25004,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; @@ -30866,7 +25017,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; @@ -30903,7 +25054,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); @@ -30977,7 +25128,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; @@ -31165,7 +25316,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) { @@ -31401,7 +25552,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) => { @@ -32214,10 +26365,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(); @@ -32349,7 +26500,6 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -32570,7 +26720,7 @@ var require_light = __commonJS({ } } async trigger(name, ...args) { - var e, promises2; + var e, promises3; try { if (name !== "debug") { this.trigger("debug", `Event triggered: ${name}`, args); @@ -32581,7 +26731,7 @@ var require_light = __commonJS({ this._events[name] = this._events[name].filter(function(listener) { return listener.status !== "none"; }); - promises2 = this._events[name].map(async (listener) => { + promises3 = this._events[name].map(async (listener) => { var e2, returned; if (listener.status === "none") { return; @@ -32604,7 +26754,7 @@ var require_light = __commonJS({ return null; } }); - return (await Promise.all(promises2)).find(function(x) { + return (await Promise.all(promises3)).find(function(x) { return x != null; }); } catch (error2) { @@ -33505,18 +27655,18 @@ var require_light = __commonJS({ var done, waitForExecuting; options = parser$5.load(options, this.stopDefaults); waitForExecuting = (at) => { - var finished2; - finished2 = () => { + var finished; + finished = () => { var counts; counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; return new this.Promise((resolve4, reject) => { - if (finished2()) { + if (finished()) { return resolve4(); } else { return this.on("done", () => { - if (finished2()) { + if (finished()) { this.removeAllListeners("done"); return resolve4(); } @@ -33943,7 +28093,7 @@ var require_console_log_level = __commonJS({ "use strict"; var util = require("util"); var levels = ["trace", "debug", "info", "warn", "error", "fatal"]; - var noop2 = function() { + var noop = function() { }; module2.exports = function(opts) { opts = opts || {}; @@ -33953,7 +28103,7 @@ var require_console_log_level = __commonJS({ return levels.indexOf(level) >= levels.indexOf(opts.level); }; levels.forEach(function(level) { - logger[level] = shouldLog(level) ? log : noop2; + logger[level] = shouldLog(level) ? log : noop; function log() { var prefix = opts.prefix; var normalizedLevel; @@ -34074,7 +28224,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 path8 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname2(p) { @@ -34082,7 +28232,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path12.dirname(p); + let result = path8.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -34120,7 +28270,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 += path8.sep; } return root + itemPath; } @@ -34158,10 +28308,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path12.sep)) { + if (!p.endsWith(path8.sep)) { return p; } - if (p === path12.sep) { + if (p === path8.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -34494,7 +28644,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path12 = (function() { + var path8 = (function() { try { return require("path"); } catch (e) { @@ -34502,7 +28652,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path12.sep; + minimatch.sep = path8.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { @@ -34591,8 +28741,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path12.sep !== "/") { - pattern = pattern.split(path12.sep).join("/"); + if (!options.allowWindowsEscape && path8.sep !== "/") { + pattern = pattern.split(path8.sep).join("/"); } this.options = options; this.set = []; @@ -34961,8 +29111,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path12.sep !== "/") { - f = f.split(path12.sep).join("/"); + if (path8.sep !== "/") { + f = f.split(path8.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -35094,7 +29244,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path12 = __importStar4(require("path")); + var path8 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -35109,12 +29259,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(path8.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path12.basename(remaining); + const basename = path8.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -35132,7 +29282,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(path8.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -35143,12 +29293,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(path8.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 += path8.sep; } result += this.segments[i]; } @@ -35192,7 +29342,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 path8 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -35221,7 +29371,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(path8.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -35245,8 +29395,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(path8.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path8.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -35281,9 +29431,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(`.${path8.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path12.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path8.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}'`); @@ -35367,8 +29517,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(path8, level) { + this.path = path8; this.level = level; } }; @@ -35488,9 +29638,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core13 = __importStar4(require_core()); - var fs11 = __importStar4(require("fs")); + var fs9 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path12 = __importStar4(require("path")); + var path8 = __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(); @@ -35540,7 +29690,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core13.debug(`Search path '${searchPath}'`); try { - yield __await4(fs11.promises.lstat(searchPath)); + yield __await4(fs9.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -35571,7 +29721,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(path12.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs9.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path8.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await4(item.path); @@ -35606,7 +29756,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs11.promises.stat(item.path); + stats = yield fs9.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -35618,10 +29768,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs11.promises.lstat(item.path); + stats = yield fs9.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs11.promises.realpath(item.path); + const realPath = yield fs9.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -36839,7 +30989,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 }); @@ -36955,11 +31105,11 @@ var require_cacheUtils = __commonJS({ var glob = __importStar4(require_glob()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs11 = __importStar4(require("fs")); - var path12 = __importStar4(require("path")); + var fs9 = __importStar4(require("fs")); + var path8 = __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* () { @@ -36976,16 +31126,16 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path12.join(baseLocation, "actions", "temp"); + tempDirectory = path8.join(baseLocation, "actions", "temp"); } - const dest = path12.join(tempDirectory, crypto.randomUUID()); + const dest = path8.join(tempDirectory, crypto.randomUUID()); yield io6.mkdirP(dest); return dest; }); } exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs11.statSync(filePath).size; + return fs9.statSync(filePath).size; } exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { @@ -37002,7 +31152,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 = path8.relative(workspace, file).replace(new RegExp(`\\${path8.sep}`, "g"), "/"); core13.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -37025,7 +31175,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(fs9.unlink)(filePath); }); } exports2.unlinkFile = unlinkFile; @@ -37070,7 +31220,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 (fs9.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -37637,7 +31787,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 }); @@ -37799,7 +31949,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; } }); @@ -38576,13 +32726,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 process6 = tslib_1.__importStar(require("node:process")); + var process2 = tslib_1.__importStar(require("node:process")); function getHeaderName() { return "User-Agent"; } async function setPlatformSpecificData(map2) { - if (process6 && process6.versions) { - const versions = process6.versions; + if (process2 && process2.versions) { + const versions = process2.versions; if (versions.bun) { map2.set("Bun", versions.bun); } else if (versions.deno) { @@ -38597,7 +32747,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 }); @@ -38615,7 +32765,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) { @@ -39144,7 +33294,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 }) { @@ -39241,7 +33391,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; @@ -39550,7 +33700,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common3 = __commonJS({ +var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -39884,7 +34034,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common3()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -40172,7 +34322,7 @@ var require_node = __commonJS({ debug3.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common3()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -41243,7 +35393,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(); @@ -41760,7 +35910,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; @@ -41782,7 +35932,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; @@ -41807,7 +35957,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; @@ -43559,7 +37709,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 }); @@ -43634,7 +37784,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; @@ -44908,15 +39058,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 path8 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path8.startsWith("/")) { + path8 = path8.substring(1); } - if (isAbsoluteUrl(path12)) { - requestUrl = path12; + if (isAbsoluteUrl(path8)) { + requestUrl = path8; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path12); + requestUrl = appendPath(requestUrl, path8); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -44964,9 +39114,9 @@ var require_urlHelpers = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path12 = pathToAppend.substring(0, searchStart); + const path8 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path12; + newPath = newPath + path8; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -45112,7 +39262,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(); @@ -48843,7 +42993,7 @@ var require_dist7 = __commonJS({ var stream2 = require("stream"); var coreLro = require_dist6(); var events = require("events"); - var fs11 = require("fs"); + var fs9 = require("fs"); var util = require("util"); var buffer = require("buffer"); function _interopNamespaceDefault(e) { @@ -48866,7 +43016,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(fs9); var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); var logger = logger$1.createClientLogger("storage-blob"); var BaseRequestPolicy = class { @@ -49115,10 +43265,10 @@ var require_dist7 = __commonJS({ ]; function escapeURLPath(url2) { const urlParsed = new URL(url2); - let path12 = urlParsed.pathname; - path12 = path12 || "/"; - path12 = escape(path12); - urlParsed.pathname = path12; + let path8 = urlParsed.pathname; + path8 = path8 || "/"; + path8 = escape(path8); + urlParsed.pathname = path8; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -49203,9 +43353,9 @@ var require_dist7 = __commonJS({ } function appendToURLPath(url2, name) { const urlParsed = new URL(url2); - let path12 = urlParsed.pathname; - path12 = path12 ? path12.endsWith("/") ? `${path12}${name}` : `${path12}/${name}` : name; - urlParsed.pathname = path12; + let path8 = urlParsed.pathname; + path8 = path8 ? path8.endsWith("/") ? `${path8}${name}` : `${path8}/${name}` : name; + urlParsed.pathname = path8; return urlParsed.toString(); } function setURLParameter(url2, name, value) { @@ -50286,9 +44436,9 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path12 = getURLPath(request.url) || "/"; + const path8 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path12}`; + canonicalizedResourceString += `/${this.factory.accountName}${path8}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -50581,9 +44731,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path12 = getURLPath(request.url) || "/"; + const path8 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path12}`; + canonicalizedResourceString += `/${options.accountName}${path8}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -69885,8 +64035,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 path8 = getURLPath(subRequest.url); + if (!path8 || path8 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -69946,8 +64096,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; pipeline = newPipeline(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient(url2, getCoreClientOptions(pipeline)); - const path12 = getURLPath(url2); - if (path12 && path12 !== "/") { + const path8 = getURLPath(url2); + if (path8 && path8 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -72544,7 +66694,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; @@ -72714,11 +66864,11 @@ 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 fs9 = __importStar4(require("fs")); var stream2 = __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) { @@ -72825,7 +66975,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 = fs9.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); @@ -72851,7 +67001,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 fs9.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -72968,7 +67118,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 = fs9.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -72986,12 +67136,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); + fs9.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs11.closeSync(fd); + fs9.closeSync(fd); } } }); @@ -73290,7 +67440,7 @@ var require_cacheHttpClient = __commonJS({ var core13 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs11 = __importStar4(require("fs")); + var fs9 = __importStar4(require("fs")); var url_1 = require("url"); var utils = __importStar4(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -73428,7 +67578,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 = fs9.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -73442,7 +67592,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, () => fs9.createReadStream(archivePath, { fd, start, end, @@ -73453,7 +67603,7 @@ Other caches with similar key:`); } }))); } finally { - fs11.closeSync(fd); + fs9.closeSync(fd); } return; }); @@ -78697,9 +72847,9 @@ 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 path8 = __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* () { @@ -78743,13 +72893,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(`\\${path8.sep}`, "g"), "/"), "--exclude", BSD_TAR_ZSTD ? tarFile : cacheFileName.replace(new RegExp(`\\${path8.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path8.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(`\\${path8.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path8.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(`\\${path8.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -78795,7 +72945,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(`\\${path8.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -78804,7 +72954,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(`\\${path8.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -78819,7 +72969,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(`\\${path8.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -78828,7 +72978,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(`\\${path8.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -78868,7 +73018,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)(path8.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -78938,7 +73088,7 @@ var require_cache3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; var core13 = __importStar4(require_core()); - var path12 = __importStar4(require("path")); + var path8 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); @@ -79035,7 +73185,7 @@ var require_cache3 = __commonJS({ core13.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path8.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core13.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core13.isDebug()) { @@ -79104,7 +73254,7 @@ var require_cache3 = __commonJS({ core13.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path8.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core13.debug(`Archive path: ${archivePath}`); core13.debug(`Starting download of archive to: ${archivePath}`); yield cacheHttpClient.downloadCache(response.signedDownloadUrl, archivePath, options); @@ -79167,7 +73317,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 = path8.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core13.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -79231,7 +73381,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 = path8.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core13.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -79310,14 +73460,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, path8, name, argument) { + if (Array.isArray(path8)) { + this.path = path8; + this.property = path8.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path12 !== void 0) { - this.property = path12; + } else if (path8 !== void 0) { + this.property = path8; } if (message) { this.message = message; @@ -79408,16 +73558,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, path8, 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(path8)) { + this.path = path8; + this.propertyPath = path8.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path12; + this.propertyPath = path8; } this.base = base; this.schemas = schemas; @@ -79426,10 +73576,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 path8 = 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, path8, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -80294,7 +74444,7 @@ var require_attribute = __commonJS({ }); // node_modules/jsonschema/lib/scan.js -var require_scan2 = __commonJS({ +var require_scan = __commonJS({ "node_modules/jsonschema/lib/scan.js"(exports2, module2) { "use strict"; var urilib = require("url"); @@ -80368,7 +74518,7 @@ var require_validator2 = __commonJS({ var urilib = require("url"); var attribute = require_attribute(); var helpers = require_helpers3(); - var scanSchema = require_scan2().scan; + var scanSchema = require_scan().scan; var ValidatorResult = helpers.ValidatorResult; var ValidatorResultError = helpers.ValidatorResultError; var SchemaError = helpers.SchemaError; @@ -80593,8 +74743,8 @@ var require_lib2 = __commonJS({ module2.exports.ValidatorResultError = require_helpers3().ValidatorResultError; module2.exports.ValidationError = require_helpers3().ValidationError; module2.exports.SchemaError = require_helpers3().SchemaError; - module2.exports.SchemaScanResult = require_scan2().SchemaScanResult; - module2.exports.scan = require_scan2().scan; + module2.exports.SchemaScanResult = require_scan().SchemaScanResult; + module2.exports.scan = require_scan().scan; module2.exports.validate = function(instance, schema2, options) { var v = new Validator2(); return v.validate(instance, schema2, options); @@ -80666,7 +74816,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os3 = require("os"); var cp = require("child_process"); - var fs11 = require("fs"); + var fs9 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter4(this, void 0, void 0, function* () { const platFilter = os3.platform(); @@ -80730,10 +74880,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 (fs9.existsSync(lsbReleaseFile)) { + contents = fs9.readFileSync(lsbReleaseFile).toString(); + } else if (fs9.existsSync(osReleaseFile)) { + contents = fs9.readFileSync(osReleaseFile).toString(); } return contents; } @@ -80910,10 +75060,10 @@ var require_tool_cache = __commonJS({ var core13 = __importStar4(require_core()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs11 = __importStar4(require("fs")); + var fs9 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); var os3 = __importStar4(require("os")); - var path12 = __importStar4(require("path")); + var path8 = __importStar4(require("path")); var httpm = __importStar4(require_lib()); var semver8 = __importStar4(require_semver2()); var stream2 = __importStar4(require("stream")); @@ -80934,8 +75084,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 || path12.join(_getTempDirectory(), crypto.randomUUID()); - yield io6.mkdirP(path12.dirname(dest)); + dest = dest || path8.join(_getTempDirectory(), crypto.randomUUID()); + yield io6.mkdirP(path8.dirname(dest)); core13.debug(`Downloading ${url}`); core13.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -80957,7 +75107,7 @@ var require_tool_cache = __commonJS({ exports2.downloadTool = downloadTool2; function downloadToolAttempt(url, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - if (fs11.existsSync(dest)) { + if (fs9.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { @@ -80981,7 +75131,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs11.createWriteStream(dest)); + yield pipeline(readStream, fs9.createWriteStream(dest)); core13.debug("download complete"); succeeded = true; return dest; @@ -81022,7 +75172,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 = path8.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}'`; @@ -81193,12 +75343,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os3.arch(); core13.debug(`Caching tool ${tool} ${version} ${arch2}`); core13.debug(`source dir: ${sourceDir}`); - if (!fs11.statSync(sourceDir).isDirectory()) { + if (!fs9.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 = path12.join(sourceDir, itemName); + for (const itemName of fs9.readdirSync(sourceDir)) { + const s = path8.join(sourceDir, itemName); yield io6.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -81212,11 +75362,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os3.arch(); core13.debug(`Caching tool ${tool} ${version} ${arch2}`); core13.debug(`source file: ${sourceFile}`); - if (!fs11.statSync(sourceFile).isFile()) { + if (!fs9.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 = path8.join(destFolder, targetFile); core13.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -81240,9 +75390,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; - const cachePath = path12.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path8.join(_getCacheDirectory(), toolName, versionSpec, arch2); core13.debug(`checking cache: ${cachePath}`); - if (fs11.existsSync(cachePath) && fs11.existsSync(`${cachePath}.complete`)) { + if (fs9.existsSync(cachePath) && fs9.existsSync(`${cachePath}.complete`)) { core13.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -81255,13 +75405,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os3.arch(); - const toolPath = path12.join(_getCacheDirectory(), toolName); - if (fs11.existsSync(toolPath)) { - const children = fs11.readdirSync(toolPath); + const toolPath = path8.join(_getCacheDirectory(), toolName); + if (fs9.existsSync(toolPath)) { + const children = fs9.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path12.join(toolPath, child, arch2 || ""); - if (fs11.existsSync(fullPath) && fs11.existsSync(`${fullPath}.complete`)) { + const fullPath = path8.join(toolPath, child, arch2 || ""); + if (fs9.existsSync(fullPath) && fs9.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -81315,7 +75465,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 = path8.join(_getTempDirectory(), crypto.randomUUID()); } yield io6.mkdirP(dest); return dest; @@ -81323,7 +75473,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 = path8.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core13.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); @@ -81333,9 +75483,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path12.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path8.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs11.writeFileSync(markerPath, ""); + fs9.writeFileSync(markerPath, ""); core13.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -81512,7 +75662,7 @@ var require_follow_redirects = __commonJS({ "ERR_STREAM_WRITE_AFTER_END", "write after end" ); - var destroy = Writable.prototype.destroy || noop2; + var destroy = Writable.prototype.destroy || noop; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); @@ -81841,7 +75991,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop2() { + function noop() { } function parseUrl(input) { var parsed; @@ -81917,7 +76067,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.removeListener(event, eventHandlers[event]); } - request.on("error", noop2); + request.on("error", noop); request.destroy(error2); } function isSubdomain(subdomain, domain) { @@ -82000,15 +76150,16 @@ function v4(options, buf, offset) { var v4_default = v4; // src/actions-util.ts -var fs4 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var fs2 = __toESM(require("fs")); +var path2 = __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 path5 = __toESM(require("path")); +var fs = __toESM(require("fs")); +var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -82148,764 +76299,33 @@ function checkDiskSpace(directoryPath, dependencies = { return checkUnix(directoryPath); } -// 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(path12) { - const isExtendedLengthPath = path12.startsWith("\\\\?\\"); - if (isExtendedLengthPath) { - return path12; - } - return path12.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 path12 = isNegativePattern(filePath) ? filePath.slice(1) : filePath; - return import_node_path3.default.isAbsolute(path12) ? path12 : import_node_path3.default.join(cwd, path12); -}; -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 resolve4 = (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) { - resolve4(result); - return; - } - const pureResult = []; - for (const [index2, value] of result.entries()) { - if (skippedIndexesMap.get(index2) === pMapSkip) { - continue; - } - pureResult.push(value); - } - resolve4(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_path7 = require("node:path"); +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 fs11 = options.fs || await import("node:fs/promises"); + const fs9 = 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 fs9.lstat(itemPath, { bigint: true }) : await fs9.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 fs9.readdir(itemPath) : await fs9.readdir(itemPath).catch((error2) => errors.push(error2)); if (typeof directoryItems !== "object") return; await Promise.all( directoryItems.map( - (directoryItem) => processItem((0, import_node_path7.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) ) ); } @@ -85544,7 +78964,7 @@ function getExtraOptionsEnvParam() { } } function getCodeQLDatabasePath(config, language) { - return path5.resolve(config.dbLocation, language); + return path.resolve(config.dbLocation, language); } function parseGitHubUrl(inputUrl) { const originalUrl = inputUrl; @@ -85782,16 +79202,10 @@ async function checkSipEnablement(logger) { async function cleanUpGlob(glob, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await deleteAsync(glob, { force: true }); - if (deletedPaths.length === 0) { - logger.warning( - `Failed to clean up ${name}: no files found matching ${glob}.` - ); - } else if (deletedPaths.length === 1) { - logger.debug(`Cleaned up ${name}.`); - } else { - logger.debug(`Cleaned up ${name} (${deletedPaths.length} files).`); - } + await fs.promises.rm(glob, { + force: true, + recursive: true + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } @@ -85836,17 +79250,17 @@ function getWorkflowEventName() { } function isRunningLocalAction() { const relativeScriptPath = getRelativeScriptPath(); - return relativeScriptPath.startsWith("..") || path6.isAbsolute(relativeScriptPath); + return relativeScriptPath.startsWith("..") || path2.isAbsolute(relativeScriptPath); } function getRelativeScriptPath() { const runnerTemp = getRequiredEnvParam("RUNNER_TEMP"); - const actionsDirectory = path6.join(path6.dirname(runnerTemp), "_actions"); - return path6.relative(actionsDirectory, __filename); + const actionsDirectory = path2.join(path2.dirname(runnerTemp), "_actions"); + return path2.relative(actionsDirectory, __filename); } function getWorkflowEvent() { const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH"); try { - return JSON.parse(fs4.readFileSync(eventJsonFile, "utf-8")); + return JSON.parse(fs2.readFileSync(eventJsonFile, "utf-8")); } catch (e) { throw new Error( `Unable to read workflow event JSON from ${eventJsonFile}: ${e}` @@ -86087,8 +79501,8 @@ function wrapApiConfigurationError(e) { } // src/feature-flags.ts -var fs6 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var fs4 = __toESM(require("fs")); +var path4 = __toESM(require("path")); var semver3 = __toESM(require_semver2()); // src/defaults.json @@ -86096,8 +79510,8 @@ var bundleVersion = "codeql-bundle-v2.23.3"; var cliVersion = "2.23.3"; // src/overlay-database-utils.ts -var fs5 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var fs3 = __toESM(require("fs")); +var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts @@ -86189,8 +79603,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 path8 = decodeGitFilePath(match[2]); + fileOidMap[path8] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -86288,12 +79702,12 @@ async function writeBaseDatabaseOidsFile(config, sourceRoot) { const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOidsJson = JSON.stringify(gitFileOids); const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - await fs5.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); + await fs3.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); } async function readBaseDatabaseOidsFile(config, logger) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); try { - const contents = await fs5.promises.readFile( + const contents = await fs3.promises.readFile( baseDatabaseOidsFilePath, "utf-8" ); @@ -86306,7 +79720,7 @@ async function readBaseDatabaseOidsFile(config, logger) { } } function getBaseDatabaseOidsFilePath(config) { - return path7.join(config.dbLocation, "base-database-oids.json"); + return path3.join(config.dbLocation, "base-database-oids.json"); } async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); @@ -86316,14 +79730,14 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path7.join( + const overlayChangesFile = path3.join( getTemporaryDirectory(), "overlay-changes.json" ); logger.debug( `Writing overlay changed files to ${overlayChangesFile}: ${changedFilesJson}` ); - await fs5.promises.writeFile(overlayChangesFile, changedFilesJson); + await fs3.promises.writeFile(overlayChangesFile, changedFilesJson); return overlayChangesFile; } function computeChangedFiles(baseFileOids, overlayFileOids) { @@ -86547,7 +79961,7 @@ var Features = class { this.gitHubFeatureFlags = new GitHubFeatureFlags( gitHubVersion, repositoryNwo, - path8.join(tempDir, FEATURE_FLAGS_FILE_NAME), + path4.join(tempDir, FEATURE_FLAGS_FILE_NAME), logger ); } @@ -86726,12 +80140,12 @@ var GitHubFeatureFlags = class { } async readLocalFlags() { try { - if (fs6.existsSync(this.featureFlagsFile)) { + if (fs4.existsSync(this.featureFlagsFile)) { this.logger.debug( `Loading feature flags from ${this.featureFlagsFile}` ); return JSON.parse( - fs6.readFileSync(this.featureFlagsFile, "utf8") + fs4.readFileSync(this.featureFlagsFile, "utf8") ); } } catch (e) { @@ -86744,7 +80158,7 @@ var GitHubFeatureFlags = class { async writeLocalFlags(flags) { try { this.logger.debug(`Writing feature flags to ${this.featureFlagsFile}`); - fs6.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); + fs4.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); } catch (e) { this.logger.warning( `Error writing cached feature flags file ${this.featureFlagsFile}: ${e}.` @@ -86811,8 +80225,8 @@ var toolrunner4 = __toESM(require_toolrunner()); var io5 = __toESM(require_io()); // src/codeql.ts -var fs10 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var fs8 = __toESM(require("fs")); +var path7 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -87125,15 +80539,15 @@ function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) { } // src/setup-codeql.ts -var fs9 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var fs7 = __toESM(require("fs")); +var path6 = __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 fs5 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -87206,7 +80620,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs7.mkdirSync(dest, { recursive: true }); + fs5.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -87290,9 +80704,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs8 = __toESM(require("fs")); +var fs6 = __toESM(require("fs")); var os = __toESM(require("os")); -var path9 = __toESM(require("path")); +var path5 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -87397,7 +80811,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs8.mkdirSync(dest, { recursive: true }); + fs6.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -87425,7 +80839,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path9.join( + return path5.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver6.clean(version) || version, @@ -87434,7 +80848,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs8.writeFileSync(markerFilePath, ""); + fs6.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url) { @@ -87569,7 +80983,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(path10.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs7.existsSync(path6.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -87942,7 +81356,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path10.join(tempDir, v4_default()); + return path6.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -88030,7 +81444,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path11.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path7.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -88086,12 +81500,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path11.join( + const tracingConfigPath = path7.join( extractorPath, "tools", "tracing-config.lua" ); - return fs10.existsSync(tracingConfigPath); + return fs8.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -88162,7 +81576,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path11.join( + const autobuildCmd = path7.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -88546,7 +81960,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs10.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs8.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -88569,7 +81983,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path11.resolve(config.tempDir, "user-config.yaml"); + return path7.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -88935,52 +82349,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 09a1fbd126..4319d05469 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -26500,7 +26500,6 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.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/lib/start-proxy-action.js b/lib/start-proxy-action.js index 82011798bc..f5104296a1 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -45036,7 +45036,6 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.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/lib/upload-lib.js b/lib/upload-lib.js index b5f901089d..857527793c 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 fs14 = __importStar4(require("fs")); + var fs12 = __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 (!fs14.existsSync(filePath)) { + if (!fs12.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs14.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os2.EOL}`, { + fs12.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 path15 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path11 = 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 (path11 && !path11.startsWith("/")) { + path11 = `/${path11}`; } - url2 = new URL(origin + path15); + url2 = new URL(origin + path11); } 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(path11) { + if (typeof path11 !== "string") { return ""; } - for (var i = path15.length - 1; i >= 0; --i) { - switch (path15.charCodeAt(i)) { + for (var i = path11.length - 1; i >= 0; --i) { + switch (path11.charCodeAt(i)) { case 47: // '/' case 92: - path15 = path15.slice(i + 1); - return path15 === ".." || path15 === "." ? "" : path15; + path11 = path11.slice(i + 1); + return path11 === ".." || path11 === "." ? "" : path11; } } - return path15 === ".." || path15 === "." ? "" : path15; + return path11 === ".." || path11 === "." ? "" : path11; }; } }); @@ -2673,8 +2673,8 @@ var require_multipart = __commonJS({ } } function checkFinished() { - if (nends === 0 && finished2 && !boy._done) { - finished2 = false; + if (nends === 0 && finished && !boy._done) { + finished = false; self2.end(); } } @@ -2693,7 +2693,7 @@ var require_multipart = __commonJS({ let nends = 0; let curFile; let curField; - let finished2 = false; + let finished = 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() { - finished2 = true; + finished = true; checkFinished(); }); } @@ -5663,7 +5663,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path15, + path: path11, method, body, headers, @@ -5677,11 +5677,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path15 !== "string") { + if (typeof path11 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path15[0] !== "/" && !(path15.startsWith("http://") || path15.startsWith("https://")) && method !== "CONNECT") { + } else if (path11[0] !== "/" && !(path11.startsWith("http://") || path11.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(path11) !== 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(path11, query) : path11; 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 path11 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path15; + this.opts.path = path11; 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: path11, 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} ${path11} 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: path11, 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] = path11; 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 finished2 = false; + let finished = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { - if (finished2) { + if (finished) { return; } try { @@ -8325,7 +8325,7 @@ upgrade: ${upgrade}\r } }; const onDrain = function() { - if (finished2) { + if (finished) { return; } if (body.resume) { @@ -8333,17 +8333,17 @@ upgrade: ${upgrade}\r } }; const onAbort = function() { - if (finished2) { + if (finished) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); }; const onFinished = function(err) { - if (finished2) { + if (finished) { return; } - finished2 = true; + finished = 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 noop2 = () => { + var noop = () => { }; 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(); - }) : noop2; + }) : noop; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { @@ -9347,7 +9347,7 @@ var require_readable = __commonJS({ } else { resolve6(null); } - }).on("error", noop2).on("data", function(chunk) { + }).on("error", noop).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: finished2, PassThrough } = require("stream"); + var { finished, 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"); } - finished2(res, { readable: false }, (err) => { + finished(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(path11) { + if (typeof path11 !== "string") { + return path11; } - const pathSegments = path15.split("?"); + const pathSegments = path11.split("?"); if (pathSegments.length !== 2) { - return path15; + return path11; } 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: path11, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path11); 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: path11 }) => matchValue(safeUrl(path11), 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: path11, method, body, headers, query } = opts; return { - path: path15, + path: path11, 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 } = 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 promisify(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 } = 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 promisify(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: path11, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path15, + Path: path11, "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(path11) { + for (const char of path11) { 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 path11 = opts.path; if (!opts.path.startsWith("/")) { - path15 = `/${path15}`; + path11 = `/${path11}`; } - url2 = new URL(util.parseOrigin(url2).origin + path15); + url2 = new URL(util.parseOrigin(url2).origin + path11); } 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 path11 = __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, path11.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 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; + var fs12 = __importStar4(require("fs")); + var path11 = __importStar4(require("path")); + _a = fs12.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 = fs14.constants.O_RDONLY; + exports2.READONLY = fs12.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 isDirectory2(fsPath, useStat = false) { + function isDirectory(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 = isDirectory2; + exports2.isDirectory = isDirectory; 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 = path11.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 = path11.dirname(filePath); + const upperName = path11.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path15.join(directory, actualName); + filePath = path11.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 path11 = __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 ? path11.join(dest, path11.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 (path11.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 = path11.join(dest, path11.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -18731,7 +18731,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path15.dirname(dest)); + yield mkdirP(path11.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(path11.delimiter)) { if (extension) { extensions.push(extension); } @@ -18807,12 +18807,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path15.sep)) { + if (tool.includes(path11.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(path11.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(path11.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 path15 = __importStar4(require("path")); + var path11 = __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 = path15.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path11.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 path15 = __importStar4(require("path")); + var path11 = __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}${path11.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, 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, path11, name, argument) { + if (Array.isArray(path11)) { + this.path = path11; + this.property = path11.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path15 !== void 0) { - this.property = path15; + } else if (path11 !== void 0) { + this.property = path11; } 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, path15, base, schemas) { + var SchemaContext = exports2.SchemaContext = function SchemaContext2(schema2, options, path11, 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(path11)) { + this.path = path11; + this.propertyPath = path11.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path15; + this.propertyPath = path11; } 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 path15 = propertyName === void 0 ? this.path : this.path.concat([propertyName]); + var path11 = 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, path11, 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 path15 = process.env.GITHUB_EVENT_PATH; - process.stdout.write(`GITHUB_EVENT_PATH ${path15} does not exist${os_1.EOL}`); + const path11 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path11} 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(once2); + module2.exports = wrappy(once); module2.exports.strict = wrappy(onceStrict); - once2.proto = once2(function() { + once.proto = once(function() { Object.defineProperty(Function.prototype, "once", { value: function() { - return once2(this); + return once(this); }, configurable: true }); @@ -21842,7 +21842,7 @@ var require_once = __commonJS({ configurable: true }); }); - function once2(fn) { + function once(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 noop2 = () => { + var noop = () => { }; 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: noop2, - info: noop2, + debug: noop, + info: noop, warn: consoleWarn, error: consoleError }, @@ -25822,5857 +25822,8 @@ var require_github = __commonJS({ } }); -// 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 path15 = 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 path15.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 isGlob2(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 isGlob2 = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash2 = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str2, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash2) < 0) { - str2 = str2.replace(backslash, slash2); - } - if (enclosure.test(str2)) { - str2 += slash2; - } - str2 += "a"; - do { - str2 = pathPosixDirname(str2); - } while (isGlob2(str2) || globby2.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(compare3); - 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 compare3(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 = (toNumber2) => { - return (value) => toNumber2 === 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, toNumber2) => { - if (maxLength > 0) { - let dash = input[0] === "-" ? "-" : ""; - if (dash) input = input.slice(1); - input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); - } - if (toNumber2 === 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 toNumber2 = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber2); - 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, toNumber2)); - } - 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 path15 = 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: path15.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 path15 = 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 || path15.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_scan2 = __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 isGlob2 = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished2 = 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; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA2) { - isBrace = token.isBrace = true; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished2 = 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 (finished2 === 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) { - isGlob2 = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished2 = 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) { - isGlob2 = token.isGlob = true; - finished2 = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob2 = token.isGlob = true; - finished2 = 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; - isGlob2 = token.isGlob = true; - finished2 = 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) { - isGlob2 = 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) { - finished2 = true; - break; - } - } - continue; - } - break; - } - if (isGlob2 === true) { - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob2 = false; - } - let base = str2; - let prefix = ""; - let glob = ""; - if (start > 0) { - prefix = str2.slice(0, start); - str2 = str2.slice(start); - lastIndex -= start; - } - if (base && isGlob2 === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob = str2.slice(lastIndex); - } else if (isGlob2 === 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: isGlob2, - 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 negate2 = () => { - 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) { - negate2(); - 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 path15 = require("path"); - var scan = require_scan2(); - 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(path15.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 path15 = 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 !isDynamicPattern2(pattern, options); - } - exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern2(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 = isDynamicPattern2; - 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 isNegativePattern2(pattern) ? pattern.slice(1) : pattern; - } - exports2.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern2(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports2.isNegativePattern = isNegativePattern2; - function isPositivePattern(pattern) { - return !isNegativePattern2(pattern); - } - exports2.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern2); - } - 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 = path15.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 relative2 = []; - for (const pattern of patterns) { - if (isAbsolute2(pattern)) { - absolute.push(pattern); - } else { - relative2.push(pattern); - } - } - return [absolute, relative2]; - } - exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; - function isAbsolute2(pattern) { - return path15.isAbsolute(pattern); - } - exports2.isAbsolute = isAbsolute2; - } -}); - -// 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) { - "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((stream2) => { - stream2.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((stream2) => stream2.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 fs14 = require_fs(); - exports2.fs = fs14; - var path15 = require_path(); - exports2.path = path15; - var pattern = require_pattern(); - exports2.pattern = pattern; - var stream2 = require_stream(); - exports2.stream = stream2; - 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(path15, settings, callback) { - settings.fs.lstat(path15, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path15, (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(path15, settings) { - const lstat = settings.fs.lstatSync(path15); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path15); - 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 fs14 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs14.lstat, - stat: fs14.stat, - lstatSync: fs14.lstatSync, - statSync: fs14.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 fs14 = require_fs2(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true); - this.fs = fs14.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(path15, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path15, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path15, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.stat = stat; - function statSync3(path15, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path15, settings); - } - exports2.statSync = statSync3; - 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 fs14 = require_fs3(); - exports2.fs = fs14; - } -}); - -// 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 path15 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path15, settings.fsStatSettings, (error2, stats) => { - if (error2 !== null) { - done(error2); - return; - } - const entry = { - name, - path: path15, - 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 fs14 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - 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) { - 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 path15 = require("path"); - var fsStat = require_out(); - var fs14 = require_fs4(); - var Settings = class { - constructor(_options = {}) { - this._options = _options; - this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false); - 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({ - 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(path15, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path15, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path15, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.scandir = scandir; - function scandirSync(path15, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path15, 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: noop2, - saturated: noop2, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop2, - 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 || noop2; - 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 || noop2; - 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 = noop2; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self2.drain(); - self2.drain = noop2; - } - } - function noop2() { - } - function Task() { - this.value = null; - this.callback = noop2; - this.next = null; - this.release = noop2; - this.context = null; - var self2 = this; - this.worked = function worked(err, result) { - var callback = self2.callback; - self2.value = null; - self2.callback = noop2; - 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 path15 = 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, path15.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 path15 = 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 path15.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 stream2 = new stream_1.PassThrough({ objectMode: true }); - stream2._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream2.push(entry); - } - if (index === filepaths.length - 1) { - stream2.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream2.write(i); - } - return stream2; - } - _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((resolve6, reject) => { - this._stat(filepath, this._fsStatSettings, (error2, stats) => { - return error2 === null ? resolve6(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((resolve6, reject) => { - this._walkAsync(root, options, (error2, entries) => { - if (error2 === null) { - resolve6(entries); - } else { - reject(error2); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream2 = this._readerStream.static(patterns, options); - return new Promise((resolve6, reject) => { - stream2.once("error", reject); - stream2.on("data", (entry) => entries.push(entry)); - stream2.once("end", () => resolve6(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, isDirectory2) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory2) { - if (patternsRe.length === 0) { - return false; - } - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory2) { - 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 path15 = 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 path15.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 fs14 = require("fs"); - var os2 = require("os"); - var CPU_COUNT = Math.max(os2.cpus().length, 1); - exports2.DEFAULT_FILE_SYSTEM_ADAPTER = { - lstat: fs14.lstat, - lstatSync: fs14.lstatSync, - stat: fs14.stat, - statSync: fs14.statSync, - readdir: fs14.readdir, - readdirSync: fs14.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) { - assertPatternsInput2(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 = stream2; - FastGlob2.async = FastGlob2; - function sync(source, options) { - assertPatternsInput2(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream2(source, options) { - assertPatternsInput2(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream2; - function generateTasks2(source, options) { - assertPatternsInput2(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks2; - function isDynamicPattern2(source, options) { - assertPatternsInput2(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern2; - function escapePath(source) { - assertPatternsInput2(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - function convertPathToPattern2(source) { - assertPatternsInput2(source); - return utils.path.convertPathToPattern(source); - } - FastGlob2.convertPathToPattern = convertPathToPattern2; - let posix; - (function(posix2) { - function escapePath2(source) { - assertPatternsInput2(source); - return utils.path.escapePosixPath(source); - } - posix2.escapePath = escapePath2; - function convertPathToPattern3(source) { - assertPatternsInput2(source); - return utils.path.convertPosixPathToPattern(source); - } - posix2.convertPathToPattern = convertPathToPattern3; - })(posix = FastGlob2.posix || (FastGlob2.posix = {})); - let win32; - (function(win322) { - function escapePath2(source) { - assertPatternsInput2(source); - return utils.path.escapeWindowsPath(source); - } - win322.escapePath = escapePath2; - function convertPathToPattern3(source) { - assertPatternsInput2(source); - return utils.path.convertWindowsPathToPattern(source); - } - win322.convertPathToPattern = convertPathToPattern3; - })(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 assertPatternsInput2(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/globby/node_modules/ignore/index.js -var require_ignore = __commonJS({ - "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 = "\\"; - 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 = /^\.{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 }); - return 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) - // (a \ ) -> (a ) - /((?:\\\\)*?)(\\?\s+)$/, - (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY) - ], - // Replace (\ ) with ' ' - // (\ ) -> ' ' - // (\\ ) -> '\\ ' - // (\\\ ) -> '\\ ' - [ - /(\\+?)\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. - // > 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}(?=$|\\/$)` - ] - ]; - 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}(?=$|\\/$)`; - } - }; - 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).filter(Boolean); - var IgnoreRule = class { - constructor(pattern, mark, body, ignoreCase, negative, prefix) { - this.pattern = pattern; - this.mark = mark; - this.negative = negative; - 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, - mark - }, ignoreCase) => { - let negative = false; - let body = pattern; - if (body.indexOf("!") === 0) { - negative = true; - body = body.substr(1); - } - body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regexPrefix = makeRegexPrefix(body); - return new IgnoreRule( - pattern, - mark, - body, - ignoreCase, - negative, - regexPrefix - ); - }; - var RuleManager = class { - constructor(ignoreCase) { - this._ignoreCase = ignoreCase; - this._rules = []; - } - _add(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules._rules); - this._added = true; - return; - } - if (isString(pattern)) { - pattern = { - pattern - }; - } - if (checkPattern(pattern.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._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; - } - // legacy - addPattern(pattern) { - return this.add(pattern); - } - // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { - const path15 = originalPath && checkPath.convert(originalPath); - checkPath( - path15, - originalPath, - this._strictPathCheck ? throwError2 : RETURN_FALSE - ); - return this._t(path15, cache, checkUnignored, slices); - } - 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 = path15.split(SLASH).filter(Boolean); - } - slices.pop(); - if (!slices.length) { - return cache[path15] = this._rules.test(path15, checkUnignored, MODE_IGNORE); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path15] = parent.ignored ? parent : this._rules.test(path15, checkUnignored, MODE_IGNORE); - } - ignores(path15) { - return this._test(path15, this._ignoreCache, false).ignored; - } - createFilter() { - return (path15) => !this.ignores(path15); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path15) { - return this._test(path15, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - 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 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); - } -}); - // 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"; @@ -31721,7 +25872,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 = []; @@ -31850,7 +26001,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(); @@ -32125,7 +26276,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(); @@ -32150,7 +26301,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; @@ -32163,7 +26314,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; @@ -32200,7 +26351,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); @@ -32274,7 +26425,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; @@ -32462,7 +26613,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) { @@ -32698,7 +26849,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) => { @@ -33511,10 +27662,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(); @@ -33646,7 +27797,6 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -33867,7 +28017,7 @@ var require_light = __commonJS({ } } async trigger(name, ...args) { - var e, promises2; + var e, promises3; try { if (name !== "debug") { this.trigger("debug", `Event triggered: ${name}`, args); @@ -33878,7 +28028,7 @@ var require_light = __commonJS({ this._events[name] = this._events[name].filter(function(listener) { return listener.status !== "none"; }); - promises2 = this._events[name].map(async (listener) => { + promises3 = this._events[name].map(async (listener) => { var e2, returned; if (listener.status === "none") { return; @@ -33901,7 +28051,7 @@ var require_light = __commonJS({ return null; } }); - return (await Promise.all(promises2)).find(function(x) { + return (await Promise.all(promises3)).find(function(x) { return x != null; }); } catch (error2) { @@ -34802,18 +28952,18 @@ var require_light = __commonJS({ var done, waitForExecuting; options = parser$5.load(options, this.stopDefaults); waitForExecuting = (at) => { - var finished2; - finished2 = () => { + var finished; + finished = () => { var counts; counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; return new this.Promise((resolve6, reject) => { - if (finished2()) { + if (finished()) { return resolve6(); } else { return this.on("done", () => { - if (finished2()) { + if (finished()) { this.removeAllListeners("done"); return resolve6(); } @@ -35240,7 +29390,7 @@ var require_console_log_level = __commonJS({ "use strict"; var util = require("util"); var levels = ["trace", "debug", "info", "warn", "error", "fatal"]; - var noop2 = function() { + var noop = function() { }; module2.exports = function(opts) { opts = opts || {}; @@ -35250,7 +29400,7 @@ var require_console_log_level = __commonJS({ return levels.indexOf(level) >= levels.indexOf(opts.level); }; levels.forEach(function(level) { - logger[level] = shouldLog(level) ? log : noop2; + logger[level] = shouldLog(level) ? log : noop; function log() { var prefix = opts.prefix; var normalizedLevel; @@ -35371,7 +29521,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 path11 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -35379,7 +29529,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path15.dirname(p); + let result = path11.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -35417,7 +29567,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 += path11.sep; } return root + itemPath; } @@ -35455,10 +29605,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path15.sep)) { + if (!p.endsWith(path11.sep)) { return p; } - if (p === path15.sep) { + if (p === path11.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -35791,7 +29941,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path15 = (function() { + var path11 = (function() { try { return require("path"); } catch (e) { @@ -35799,7 +29949,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path15.sep; + minimatch.sep = path11.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { @@ -35888,8 +30038,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path15.sep !== "/") { - pattern = pattern.split(path15.sep).join("/"); + if (!options.allowWindowsEscape && path11.sep !== "/") { + pattern = pattern.split(path11.sep).join("/"); } this.options = options; this.set = []; @@ -36258,8 +30408,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path15.sep !== "/") { - f = f.split(path15.sep).join("/"); + if (path11.sep !== "/") { + f = f.split(path11.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -36391,7 +30541,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path15 = __importStar4(require("path")); + var path11 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -36406,12 +30556,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(path11.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path15.basename(remaining); + const basename = path11.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -36429,7 +30579,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(path11.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -36440,12 +30590,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(path11.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 += path11.sep; } result += this.segments[i]; } @@ -36489,7 +30639,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os2 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); + var path11 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -36518,7 +30668,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(path11.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -36542,8 +30692,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(path11.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path11.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -36578,9 +30728,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(`.${path11.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path15.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path11.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}'`); @@ -36664,8 +30814,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(path11, level) { + this.path = path11; this.level = level; } }; @@ -36785,9 +30935,9 @@ var require_internal_globber = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.DefaultGlobber = void 0; var core12 = __importStar4(require_core()); - var fs14 = __importStar4(require("fs")); + var fs12 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path15 = __importStar4(require("path")); + var path11 = __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(); @@ -36837,7 +30987,7 @@ var require_internal_globber = __commonJS({ for (const searchPath of patternHelper.getSearchPaths(patterns)) { core12.debug(`Search path '${searchPath}'`); try { - yield __await4(fs14.promises.lstat(searchPath)); + yield __await4(fs12.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -36868,7 +31018,7 @@ var require_internal_globber = __commonJS({ continue; } const childLevel = item.level + 1; - const childItems = (yield __await4(fs14.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path15.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs12.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path11.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await4(item.path); @@ -36903,7 +31053,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs14.promises.stat(item.path); + stats = yield fs12.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -36915,10 +31065,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs14.promises.lstat(item.path); + stats = yield fs12.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs14.promises.realpath(item.path); + const realPath = yield fs12.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -38136,7 +32286,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 }); @@ -38252,11 +32402,11 @@ var require_cacheUtils = __commonJS({ var glob = __importStar4(require_glob()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs14 = __importStar4(require("fs")); - var path15 = __importStar4(require("path")); + var fs12 = __importStar4(require("fs")); + var path11 = __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* () { @@ -38273,16 +32423,16 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path15.join(baseLocation, "actions", "temp"); + tempDirectory = path11.join(baseLocation, "actions", "temp"); } - const dest = path15.join(tempDirectory, crypto.randomUUID()); + const dest = path11.join(tempDirectory, crypto.randomUUID()); yield io6.mkdirP(dest); return dest; }); } exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs14.statSync(filePath).size; + return fs12.statSync(filePath).size; } exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { @@ -38299,7 +32449,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 = path11.relative(workspace, file).replace(new RegExp(`\\${path11.sep}`, "g"), "/"); core12.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -38322,7 +32472,7 @@ var require_cacheUtils = __commonJS({ exports2.resolvePaths = resolvePaths; function unlinkFile(filePath) { return __awaiter4(this, void 0, void 0, function* () { - return util.promisify(fs14.unlink)(filePath); + return util.promisify(fs12.unlink)(filePath); }); } exports2.unlinkFile = unlinkFile; @@ -38367,7 +32517,7 @@ var require_cacheUtils = __commonJS({ exports2.getCacheFileName = getCacheFileName; function getGnuTarPathOnWindows() { return __awaiter4(this, void 0, void 0, function* () { - if (fs14.existsSync(constants_1.GnuTarPathOnWindows)) { + if (fs12.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -38934,7 +33084,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 }); @@ -39096,7 +33246,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; } }); @@ -39873,13 +34023,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 process6 = tslib_1.__importStar(require("node:process")); + var process2 = tslib_1.__importStar(require("node:process")); function getHeaderName() { return "User-Agent"; } async function setPlatformSpecificData(map2) { - if (process6 && process6.versions) { - const versions = process6.versions; + if (process2 && process2.versions) { + const versions = process2.versions; if (versions.bun) { map2.set("Bun", versions.bun); } else if (versions.deno) { @@ -39894,7 +34044,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 }); @@ -39912,7 +34062,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) { @@ -40441,7 +34591,7 @@ var require_retryPolicy = __commonJS({ var helpers_js_1 = require_helpers2(); 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 }) { @@ -40538,7 +34688,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; @@ -40847,7 +34997,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common3 = __commonJS({ +var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -41181,7 +35331,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common3()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -41469,7 +35619,7 @@ var require_node = __commonJS({ debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common3()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -42540,7 +36690,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(); @@ -43057,7 +37207,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; @@ -43079,7 +37229,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; @@ -43104,7 +37254,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; @@ -44856,7 +39006,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 }); @@ -44931,7 +39081,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; @@ -46205,15 +40355,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 path11 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path11.startsWith("/")) { + path11 = path11.substring(1); } - if (isAbsoluteUrl(path15)) { - requestUrl = path15; + if (isAbsoluteUrl(path11)) { + requestUrl = path11; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path15); + requestUrl = appendPath(requestUrl, path11); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -46261,9 +40411,9 @@ var require_urlHelpers = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path15 = pathToAppend.substring(0, searchStart); + const path11 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path15; + newPath = newPath + path11; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -46409,7 +40559,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(); @@ -50140,7 +44290,7 @@ var require_dist7 = __commonJS({ var stream2 = require("stream"); var coreLro = require_dist6(); var events = require("events"); - var fs14 = require("fs"); + var fs12 = require("fs"); var util = require("util"); var buffer = require("buffer"); function _interopNamespaceDefault(e) { @@ -50163,7 +44313,7 @@ var require_dist7 = __commonJS({ } var coreHttpCompat__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreHttpCompat); var coreClient__namespace = /* @__PURE__ */ _interopNamespaceDefault(coreClient); - var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs14); + var fs__namespace = /* @__PURE__ */ _interopNamespaceDefault(fs12); var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); var logger = logger$1.createClientLogger("storage-blob"); var BaseRequestPolicy = class { @@ -50412,10 +44562,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 path11 = urlParsed.pathname; + path11 = path11 || "/"; + path11 = escape(path11); + urlParsed.pathname = path11; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -50500,9 +44650,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 path11 = urlParsed.pathname; + path11 = path11 ? path11.endsWith("/") ? `${path11}${name}` : `${path11}/${name}` : name; + urlParsed.pathname = path11; return urlParsed.toString(); } function setURLParameter(url3, name, value) { @@ -51583,9 +45733,9 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path15 = getURLPath(request.url) || "/"; + const path11 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path15}`; + canonicalizedResourceString += `/${this.factory.accountName}${path11}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -51878,9 +46028,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path15 = getURLPath(request.url) || "/"; + const path11 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path15}`; + canonicalizedResourceString += `/${options.accountName}${path11}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -71182,8 +65332,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 path11 = getURLPath(subRequest.url); + if (!path11 || path11 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -71243,8 +65393,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; pipeline = newPipeline(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); - const path15 = getURLPath(url3); - if (path15 && path15 !== "/") { + const path11 = getURLPath(url3); + if (path11 && path11 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -73841,7 +67991,7 @@ var require_requestUtils = __commonJS({ exports2.retryHttpClientResponse = exports2.retryTypedResponse = exports2.retry = exports2.isRetryableStatusCode = exports2.isServerErrorStatusCode = exports2.isSuccessStatusCode = void 0; var core12 = __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; @@ -74011,11 +68161,11 @@ var require_downloadUtils = __commonJS({ var http_client_1 = require_lib(); var storage_blob_1 = require_dist7(); var buffer = __importStar4(require("buffer")); - var fs14 = __importStar4(require("fs")); + var fs12 = __importStar4(require("fs")); var stream2 = __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) { @@ -74122,7 +68272,7 @@ var require_downloadUtils = __commonJS({ exports2.DownloadProgress = DownloadProgress; function downloadCacheHttpClient(archiveLocation, archivePath) { return __awaiter4(this, void 0, void 0, function* () { - const writeStream = fs14.createWriteStream(archivePath); + const writeStream = fs12.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); @@ -74148,7 +68298,7 @@ var require_downloadUtils = __commonJS({ function downloadCacheHttpClientConcurrent(archiveLocation, archivePath, options) { var _a; return __awaiter4(this, void 0, void 0, function* () { - const archiveDescriptor = yield fs14.promises.open(archivePath, "w"); + const archiveDescriptor = yield fs12.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -74265,7 +68415,7 @@ var require_downloadUtils = __commonJS({ } else { const maxSegmentSize = Math.min(134217728, buffer.constants.MAX_LENGTH); const downloadProgress = new DownloadProgress(contentLength); - const fd = fs14.openSync(archivePath, "w"); + const fd = fs12.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -74283,12 +68433,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)) { - fs14.writeFileSync(fd, result); + fs12.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs14.closeSync(fd); + fs12.closeSync(fd); } } }); @@ -74587,7 +68737,7 @@ var require_cacheHttpClient = __commonJS({ var core12 = __importStar4(require_core()); var http_client_1 = require_lib(); var auth_1 = require_auth(); - var fs14 = __importStar4(require("fs")); + var fs12 = __importStar4(require("fs")); var url_1 = require("url"); var utils = __importStar4(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -74725,7 +68875,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 = fs14.openSync(archivePath, "r"); + const fd = fs12.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -74739,7 +68889,7 @@ Other caches with similar key:`); const start = offset; const end = offset + chunkSize - 1; offset += maxChunkSize; - yield uploadChunk(httpClient, resourceUrl, () => fs14.createReadStream(archivePath, { + yield uploadChunk(httpClient, resourceUrl, () => fs12.createReadStream(archivePath, { fd, start, end, @@ -74750,7 +68900,7 @@ Other caches with similar key:`); } }))); } finally { - fs14.closeSync(fd); + fs12.closeSync(fd); } return; }); @@ -79994,9 +74144,9 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io6 = __importStar4(require_io()); var fs_1 = require("fs"); - var path15 = __importStar4(require("path")); + var path11 = __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* () { @@ -80040,13 +74190,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(`\\${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); 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(`\\${path11.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path11.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(`\\${path11.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -80092,7 +74242,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(`\\${path11.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -80101,7 +74251,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(`\\${path11.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -80116,7 +74266,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(`\\${path11.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -80125,7 +74275,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(`\\${path11.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -80165,7 +74315,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)(path11.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -80235,7 +74385,7 @@ var require_cache3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; var core12 = __importStar4(require_core()); - var path15 = __importStar4(require("path")); + var path11 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); @@ -80332,7 +74482,7 @@ var require_cache3 = __commonJS({ core12.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path11.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core12.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core12.isDebug()) { @@ -80401,7 +74551,7 @@ var require_cache3 = __commonJS({ core12.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path15.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path11.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); @@ -80464,7 +74614,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 = path11.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core12.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -80528,7 +74678,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 = path11.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core12.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -80666,7 +74816,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os2 = require("os"); var cp = require("child_process"); - var fs14 = require("fs"); + var fs12 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter4(this, void 0, void 0, function* () { const platFilter = os2.platform(); @@ -80730,10 +74880,10 @@ var require_manifest = __commonJS({ const lsbReleaseFile = "/etc/lsb-release"; const osReleaseFile = "/etc/os-release"; let contents = ""; - if (fs14.existsSync(lsbReleaseFile)) { - contents = fs14.readFileSync(lsbReleaseFile).toString(); - } else if (fs14.existsSync(osReleaseFile)) { - contents = fs14.readFileSync(osReleaseFile).toString(); + if (fs12.existsSync(lsbReleaseFile)) { + contents = fs12.readFileSync(lsbReleaseFile).toString(); + } else if (fs12.existsSync(osReleaseFile)) { + contents = fs12.readFileSync(osReleaseFile).toString(); } return contents; } @@ -80910,10 +75060,10 @@ var require_tool_cache = __commonJS({ var core12 = __importStar4(require_core()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs14 = __importStar4(require("fs")); + var fs12 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); var os2 = __importStar4(require("os")); - var path15 = __importStar4(require("path")); + var path11 = __importStar4(require("path")); var httpm = __importStar4(require_lib()); var semver8 = __importStar4(require_semver2()); var stream2 = __importStar4(require("stream")); @@ -80934,8 +75084,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 io6.mkdirP(path15.dirname(dest)); + dest = dest || path11.join(_getTempDirectory(), crypto.randomUUID()); + yield io6.mkdirP(path11.dirname(dest)); core12.debug(`Downloading ${url2}`); core12.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -80957,7 +75107,7 @@ var require_tool_cache = __commonJS({ exports2.downloadTool = downloadTool2; function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - if (fs14.existsSync(dest)) { + if (fs12.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { @@ -80981,7 +75131,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs14.createWriteStream(dest)); + yield pipeline(readStream, fs12.createWriteStream(dest)); core12.debug("download complete"); succeeded = true; return dest; @@ -81022,7 +75172,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 = path11.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}'`; @@ -81193,12 +75343,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os2.arch(); core12.debug(`Caching tool ${tool} ${version} ${arch2}`); core12.debug(`source dir: ${sourceDir}`); - if (!fs14.statSync(sourceDir).isDirectory()) { + if (!fs12.statSync(sourceDir).isDirectory()) { throw new Error("sourceDir is not a directory"); } const destPath = yield _createToolPath(tool, version, arch2); - for (const itemName of fs14.readdirSync(sourceDir)) { - const s = path15.join(sourceDir, itemName); + for (const itemName of fs12.readdirSync(sourceDir)) { + const s = path11.join(sourceDir, itemName); yield io6.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -81212,11 +75362,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os2.arch(); core12.debug(`Caching tool ${tool} ${version} ${arch2}`); core12.debug(`source file: ${sourceFile}`); - if (!fs14.statSync(sourceFile).isFile()) { + if (!fs12.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 = path11.join(destFolder, targetFile); core12.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -81240,9 +75390,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; - const cachePath = path15.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path11.join(_getCacheDirectory(), toolName, versionSpec, arch2); core12.debug(`checking cache: ${cachePath}`); - if (fs14.existsSync(cachePath) && fs14.existsSync(`${cachePath}.complete`)) { + if (fs12.existsSync(cachePath) && fs12.existsSync(`${cachePath}.complete`)) { core12.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -81255,13 +75405,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os2.arch(); - const toolPath = path15.join(_getCacheDirectory(), toolName); - if (fs14.existsSync(toolPath)) { - const children = fs14.readdirSync(toolPath); + const toolPath = path11.join(_getCacheDirectory(), toolName); + if (fs12.existsSync(toolPath)) { + const children = fs12.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path15.join(toolPath, child, arch2 || ""); - if (fs14.existsSync(fullPath) && fs14.existsSync(`${fullPath}.complete`)) { + const fullPath = path11.join(toolPath, child, arch2 || ""); + if (fs12.existsSync(fullPath) && fs12.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -81315,7 +75465,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 = path11.join(_getTempDirectory(), crypto.randomUUID()); } yield io6.mkdirP(dest); return dest; @@ -81323,7 +75473,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 = path11.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core12.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); @@ -81333,9 +75483,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path15.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path11.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs14.writeFileSync(markerPath, ""); + fs12.writeFileSync(markerPath, ""); core12.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -81512,7 +75662,7 @@ var require_follow_redirects = __commonJS({ "ERR_STREAM_WRITE_AFTER_END", "write after end" ); - var destroy = Writable.prototype.destroy || noop2; + var destroy = Writable.prototype.destroy || noop; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); @@ -81841,7 +75991,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop2() { + function noop() { } function parseUrl(input) { var parsed; @@ -81917,7 +76067,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.removeListener(event, eventHandlers[event]); } - request.on("error", noop2); + request.on("error", noop); request.destroy(error2); } function isSubdomain(subdomain, domain) { @@ -84862,785 +79012,55 @@ __export(upload_lib_exports, { writePostProcessedFiles: () => writePostProcessedFiles }); module.exports = __toCommonJS(upload_lib_exports); -var fs13 = __toESM(require("fs")); -var path14 = __toESM(require("path")); +var fs11 = __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 jsonschema2 = __toESM(require_lib2()); // src/actions-util.ts -var fs4 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var fs2 = __toESM(require("fs")); +var path2 = __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 path5 = __toESM(require("path")); +var fs = __toESM(require("fs")); +var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); -// 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_path6 = require("node:path"); +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 fs14 = options.fs || await import("node:fs/promises"); + const fs12 = 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 fs14.lstat(itemPath, { bigint: true }) : await fs14.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + const stats = returnType.strict ? await fs12.lstat(itemPath, { bigint: true }) : await fs12.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 fs14.readdir(itemPath) : await fs14.readdir(itemPath).catch((error2) => errors.push(error2)); + const directoryItems = returnType.strict ? await fs12.readdir(itemPath) : await fs12.readdir(itemPath).catch((error2) => errors.push(error2)); if (typeof directoryItems !== "object") return; await Promise.all( directoryItems.map( - (directoryItem) => processItem((0, import_node_path6.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path.join)(itemPath, directoryItem)) ) ); } @@ -88284,7 +81704,7 @@ function getToolNames(sarif) { return Object.keys(toolNames); } function getCodeQLDatabasePath(config, language) { - return path5.resolve(config.dbLocation, language); + return path.resolve(config.dbLocation, language); } function parseGitHubUrl(inputUrl) { const originalUrl = inputUrl; @@ -88424,16 +81844,10 @@ function cloneObject(obj) { async function cleanUpGlob(glob, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await deleteAsync(glob, { force: true }); - if (deletedPaths.length === 0) { - logger.warning( - `Failed to clean up ${name}: no files found matching ${glob}.` - ); - } else if (deletedPaths.length === 1) { - logger.debug(`Cleaned up ${name}.`); - } else { - logger.debug(`Cleaned up ${name} (${deletedPaths.length} files).`); - } + await fs.promises.rm(glob, { + force: true, + recursive: true + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } @@ -88478,17 +81892,17 @@ function getWorkflowEventName() { } function isRunningLocalAction() { const relativeScriptPath = getRelativeScriptPath(); - return relativeScriptPath.startsWith("..") || path6.isAbsolute(relativeScriptPath); + return relativeScriptPath.startsWith("..") || path2.isAbsolute(relativeScriptPath); } function getRelativeScriptPath() { const runnerTemp = getRequiredEnvParam("RUNNER_TEMP"); - const actionsDirectory = path6.join(path6.dirname(runnerTemp), "_actions"); - return path6.relative(actionsDirectory, __filename); + const actionsDirectory = path2.join(path2.dirname(runnerTemp), "_actions"); + return path2.relative(actionsDirectory, __filename); } function getWorkflowEvent() { const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH"); try { - return JSON.parse(fs4.readFileSync(eventJsonFile, "utf-8")); + return JSON.parse(fs2.readFileSync(eventJsonFile, "utf-8")); } catch (e) { throw new Error( `Unable to read workflow event JSON from ${eventJsonFile}: ${e}` @@ -88794,8 +82208,8 @@ function wrapApiConfigurationError(e) { } // src/codeql.ts -var fs11 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var fs9 = __toESM(require("fs")); +var path8 = __toESM(require("path")); var core10 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -89040,8 +82454,8 @@ function wrapCliConfigurationError(cliError) { } // src/config-utils.ts -var fs7 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var fs5 = __toESM(require("fs")); +var path5 = __toESM(require("path")); // src/caching-utils.ts var core6 = __toESM(require_core()); @@ -89057,8 +82471,8 @@ var PACK_IDENTIFIER_PATTERN = (function() { })(); // src/diff-informed-analysis-utils.ts -var fs6 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var fs4 = __toESM(require("fs")); +var path4 = __toESM(require("path")); // src/feature-flags.ts var semver4 = __toESM(require_semver2()); @@ -89068,8 +82482,8 @@ var bundleVersion = "codeql-bundle-v2.23.3"; var cliVersion = "2.23.3"; // src/overlay-database-utils.ts -var fs5 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var fs3 = __toESM(require("fs")); +var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts @@ -89195,8 +82609,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 path11 = decodeGitFilePath(match[2]); + fileOidMap[path11] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -89291,12 +82705,12 @@ async function writeBaseDatabaseOidsFile(config, sourceRoot) { const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOidsJson = JSON.stringify(gitFileOids); const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - await fs5.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); + await fs3.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); } async function readBaseDatabaseOidsFile(config, logger) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); try { - const contents = await fs5.promises.readFile( + const contents = await fs3.promises.readFile( baseDatabaseOidsFilePath, "utf-8" ); @@ -89309,7 +82723,7 @@ async function readBaseDatabaseOidsFile(config, logger) { } } function getBaseDatabaseOidsFilePath(config) { - return path7.join(config.dbLocation, "base-database-oids.json"); + return path3.join(config.dbLocation, "base-database-oids.json"); } async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); @@ -89319,14 +82733,14 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path7.join( + const overlayChangesFile = path3.join( getTemporaryDirectory(), "overlay-changes.json" ); logger.debug( `Writing overlay changed files to ${overlayChangesFile}: ${changedFilesJson}` ); - await fs5.promises.writeFile(overlayChangesFile, changedFilesJson); + await fs3.promises.writeFile(overlayChangesFile, changedFilesJson); return overlayChangesFile; } function computeChangedFiles(baseFileOids, overlayFileOids) { @@ -89544,15 +82958,15 @@ var featureConfig = { // src/diff-informed-analysis-utils.ts function getDiffRangesJsonFilePath() { - return path8.join(getTemporaryDirectory(), "pr-diff-range.json"); + return path4.join(getTemporaryDirectory(), "pr-diff-range.json"); } function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); - if (!fs6.existsSync(jsonFilePath)) { + if (!fs4.existsSync(jsonFilePath)) { logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`); return void 0; } - const jsonContents = fs6.readFileSync(jsonFilePath, "utf8"); + const jsonContents = fs4.readFileSync(jsonFilePath, "utf8"); logger.debug( `Read pr-diff-range JSON file from ${jsonFilePath}: ${jsonContents}` @@ -89589,14 +83003,14 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ }; function getPathToParsedConfigFile(tempDir) { - return path9.join(tempDir, "config"); + return path5.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); - if (!fs7.existsSync(configFile)) { + if (!fs5.existsSync(configFile)) { return void 0; } - const configString = fs7.readFileSync(configFile, "utf8"); + const configString = fs5.readFileSync(configFile, "utf8"); logger.debug("Loaded config:"); logger.debug(configString); const config = JSON.parse(configString); @@ -89632,8 +83046,8 @@ function appendExtraQueryExclusions(extraQueryExclusions, cliConfig) { } // src/setup-codeql.ts -var fs10 = __toESM(require("fs")); -var path11 = __toESM(require("path")); +var fs8 = __toESM(require("fs")); +var path7 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver7 = __toESM(require_semver2()); @@ -89694,7 +83108,7 @@ var v4_default = v4; // src/tar.ts var import_child_process = require("child_process"); -var fs8 = __toESM(require("fs")); +var fs6 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -89767,7 +83181,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs8.mkdirSync(dest, { recursive: true }); + fs6.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -89851,9 +83265,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs9 = __toESM(require("fs")); +var fs7 = __toESM(require("fs")); var os = __toESM(require("os")); -var path10 = __toESM(require("path")); +var path6 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core9 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -89958,7 +83372,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs9.mkdirSync(dest, { recursive: true }); + fs7.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -89986,7 +83400,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path10.join( + return path6.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver6.clean(version) || version, @@ -89995,7 +83409,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs9.writeFileSync(markerFilePath, ""); + fs7.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url2) { @@ -90130,7 +83544,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs10.existsSync(path11.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs8.existsSync(path7.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -90503,7 +83917,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path11.join(tempDir, v4_default()); + return path7.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -90591,7 +84005,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path12.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path8.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -90653,12 +84067,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path12.join( + const tracingConfigPath = path8.join( extractorPath, "tools", "tracing-config.lua" ); - return fs11.existsSync(tracingConfigPath); + return fs9.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -90729,7 +84143,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path12.join( + const autobuildCmd = path8.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -91113,7 +84527,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs11.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs9.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -91136,7 +84550,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path12.resolve(config.tempDir, "user-config.yaml"); + return path8.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -91157,7 +84571,7 @@ async function getJobRunUuidSarifOptions(codeql) { } // src/fingerprints.ts -var fs12 = __toESM(require("fs")); +var fs10 = __toESM(require("fs")); var import_path = __toESM(require("path")); // node_modules/long/index.js @@ -92145,7 +85559,7 @@ async function hash(callback, filepath) { } updateHash(current); }; - const readStream = fs12.createReadStream(filepath, "utf8"); + const readStream = fs10.createReadStream(filepath, "utf8"); for await (const data of readStream) { for (let i = 0; i < data.length; ++i) { processCharacter(data.charCodeAt(i)); @@ -92220,11 +85634,11 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { if (!import_path.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } - if (!fs12.existsSync(uri)) { + if (!fs10.existsSync(uri)) { logger.debug(`Unable to compute fingerprint for non-existent file: ${uri}`); return void 0; } - if (fs12.statSync(uri).isDirectory()) { + if (fs10.statSync(uri).isDirectory()) { logger.debug(`Unable to compute fingerprint for directory: ${uri}`); return void 0; } @@ -92322,7 +85736,7 @@ function combineSarifFiles(sarifFiles, logger) { for (const sarifFile of sarifFiles) { logger.debug(`Loading SARIF file: ${sarifFile}`); const sarifObject = JSON.parse( - fs13.readFileSync(sarifFile, "utf8") + fs11.readFileSync(sarifFile, "utf8") ); if (combinedSarif.version === null) { combinedSarif.version = sarifObject.version; @@ -92394,7 +85808,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(fs13.readFileSync(sarifFile, "utf8")); + return JSON.parse(fs11.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"; @@ -92447,14 +85861,14 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - 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"); + const baseTempDir = path10.resolve(tempDir, "combined-sarif"); + fs11.mkdirSync(baseTempDir, { recursive: true }); + const outputDirectory = fs11.mkdtempSync(path10.resolve(baseTempDir, "output-")); + const outputFile = path10.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); - return JSON.parse(fs13.readFileSync(outputFile, "utf8")); + return JSON.parse(fs11.readFileSync(outputFile, "utf8")); } function populateRunAutomationDetails(sarif, category, analysis_key, environment) { const automationID = getAutomationID2(category, analysis_key, environment); @@ -92483,7 +85897,7 @@ function getAutomationID2(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, analysis) { logger.info("Uploading results"); if (shouldSkipSarifUpload()) { - const payloadSaveFile = path14.join( + const payloadSaveFile = path10.join( getTemporaryDirectory(), `payload-${analysis.kind}.json` ); @@ -92491,7 +85905,7 @@ async function uploadPayload(payload, repositoryNwo, logger, analysis) { `SARIF upload disabled by an environment variable. Saving to ${payloadSaveFile}` ); logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`); - fs13.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); + fs11.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); return "dummy-sarif-id"; } const client = getApiClient(); @@ -92525,12 +85939,12 @@ async function uploadPayload(payload, repositoryNwo, logger, analysis) { function findSarifFilesInDir(sarifPath, isSarif) { const sarifFiles = []; const walkSarifFiles = (dir) => { - const entries = fs13.readdirSync(dir, { withFileTypes: true }); + const entries = fs11.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path14.resolve(dir, entry.name)); + sarifFiles.push(path10.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path14.resolve(dir, entry.name)); + walkSarifFiles(path10.resolve(dir, entry.name)); } } }; @@ -92538,11 +85952,11 @@ function findSarifFilesInDir(sarifPath, isSarif) { return sarifFiles; } function getSarifFilePaths(sarifPath, isSarif) { - if (!fs13.existsSync(sarifPath)) { + if (!fs11.existsSync(sarifPath)) { throw new ConfigurationError(`Path does not exist: ${sarifPath}`); } let sarifFiles; - if (fs13.lstatSync(sarifPath).isDirectory()) { + if (fs11.lstatSync(sarifPath).isDirectory()) { sarifFiles = findSarifFilesInDir(sarifPath, isSarif); if (sarifFiles.length === 0) { throw new ConfigurationError( @@ -92555,7 +85969,7 @@ function getSarifFilePaths(sarifPath, isSarif) { return sarifFiles; } async function getGroupedSarifFilePaths(logger, sarifPath) { - const stats = fs13.statSync(sarifPath, { throwIfNoEntry: false }); + const stats = fs11.statSync(sarifPath, { throwIfNoEntry: false }); if (stats === void 0) { throw new ConfigurationError(`Path does not exist: ${sarifPath}`); } @@ -92563,7 +85977,7 @@ async function getGroupedSarifFilePaths(logger, sarifPath) { if (stats.isDirectory()) { let unassignedSarifFiles = findSarifFilesInDir( sarifPath, - (name) => path14.extname(name) === ".sarif" + (name) => path10.extname(name) === ".sarif" ); logger.debug( `Found the following .sarif files in ${sarifPath}: ${unassignedSarifFiles.join(", ")}` @@ -92620,7 +86034,7 @@ function countResultsInSarif(sarif) { } function readSarifFile(sarifFilePath) { try { - return JSON.parse(fs13.readFileSync(sarifFilePath, "utf8")); + return JSON.parse(fs11.readFileSync(sarifFilePath, "utf8")); } catch (e) { throw new InvalidSarifUploadError( `Invalid SARIF. JSON syntax error: ${getErrorMessage(e)}` @@ -92689,7 +86103,7 @@ function buildPayload(commitOid, ref, analysisKey, analysisName, zippedSarif, wo payloadObj.base_sha = mergeBaseCommitOid; } else if (process.env.GITHUB_EVENT_PATH) { const githubEvent = JSON.parse( - fs13.readFileSync(process.env.GITHUB_EVENT_PATH, "utf8") + fs11.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; @@ -92821,19 +86235,19 @@ async function uploadPostProcessedFiles(logger, checkoutPath, uploadTarget, post }; } function dumpSarifFile(sarifPayload, outputDir, logger, uploadTarget) { - if (!fs13.existsSync(outputDir)) { - fs13.mkdirSync(outputDir, { recursive: true }); - } else if (!fs13.lstatSync(outputDir).isDirectory()) { + if (!fs11.existsSync(outputDir)) { + fs11.mkdirSync(outputDir, { recursive: true }); + } else if (!fs11.lstatSync(outputDir).isDirectory()) { throw new ConfigurationError( `The path that processed SARIF files should be written to exists, but is not a directory: ${outputDir}` ); } - const outputFile = path14.resolve( + const outputFile = path10.resolve( outputDir, `upload${uploadTarget.sarifExtension}` ); logger.info(`Writing processed SARIF file to ${outputFile}`); - fs13.writeFileSync(outputFile, sarifPayload); + fs11.writeFileSync(outputFile, sarifPayload); } var STATUS_CHECK_FREQUENCY_MILLISECONDS = 5 * 1e3; var STATUS_CHECK_TIMEOUT_MILLISECONDS = 2 * 60 * 1e3; @@ -92976,7 +86390,7 @@ function filterAlertsByDiffRange(logger, sarif) { if (!locationUri || locationStartLine === void 0) { return false; } - const locationPath = path14.join(checkoutPath, locationUri).replaceAll(path14.sep, "/"); + const locationPath = path10.join(checkoutPath, locationUri).replaceAll(path10.sep, "/"); return diffRanges.some( (range) => range.path === locationPath && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0) ); @@ -93016,52 +86430,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-sarif-action-post.js b/lib/upload-sarif-action-post.js index 8c978d4e58..4cab10467f 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -26500,7 +26500,6 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -26721,7 +26720,7 @@ var require_light = __commonJS({ } } async trigger(name, ...args) { - var e, promises; + var e, promises2; try { if (name !== "debug") { this.trigger("debug", `Event triggered: ${name}`, args); @@ -26732,7 +26731,7 @@ var require_light = __commonJS({ this._events[name] = this._events[name].filter(function(listener) { return listener.status !== "none"; }); - promises = this._events[name].map(async (listener) => { + promises2 = this._events[name].map(async (listener) => { var e2, returned; if (listener.status === "none") { return; @@ -26755,7 +26754,7 @@ var require_light = __commonJS({ return null; } }); - return (await Promise.all(promises)).find(function(x) { + return (await Promise.all(promises2)).find(function(x) { return x != null; }); } catch (error2) { @@ -82725,7 +82724,7 @@ var require_stream2 = __commonJS({ var { pipeline } = require_pipeline3(); var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); - var promises = require_promises(); + var promises2 = require_promises(); var utils = require_utils6(); var Stream = module2.exports = require_legacy().Stream; Stream.isDestroyed = utils.isDestroyed; @@ -82803,21 +82802,21 @@ var require_stream2 = __commonJS({ configurable: true, enumerable: true, get() { - return promises; + return promises2; } }); ObjectDefineProperty(pipeline, customPromisify, { __proto__: null, enumerable: true, get() { - return promises.pipeline; + return promises2.pipeline; } }); ObjectDefineProperty(eos, customPromisify, { __proto__: null, enumerable: true, get() { - return promises.finished; + return promises2.finished; } }); Stream.Stream = Stream; @@ -82836,7 +82835,7 @@ var require_ours = __commonJS({ "use strict"; var Stream = require("stream"); if (Stream && process.env.READABLE_STREAM === "disable") { - const promises = Stream.promises; + const promises2 = Stream.promises; module2.exports._uint8ArrayToBuffer = Stream._uint8ArrayToBuffer; module2.exports._isUint8Array = Stream._isUint8Array; module2.exports.isDisturbed = Stream.isDisturbed; @@ -82856,13 +82855,13 @@ var require_ours = __commonJS({ configurable: true, enumerable: true, get() { - return promises; + return promises2; } }); module2.exports.Stream = Stream.Stream; } else { const CustomStream = require_stream2(); - const promises = require_promises(); + const promises2 = require_promises(); const originalDestroy = CustomStream.Readable.destroy; module2.exports = CustomStream.Readable; module2.exports._uint8ArrayToBuffer = CustomStream._uint8ArrayToBuffer; @@ -82885,7 +82884,7 @@ var require_ours = __commonJS({ configurable: true, enumerable: true, get() { - return promises; + return promises2; } }); module2.exports.Stream = CustomStream.Stream; @@ -89116,14 +89115,14 @@ var require_commonjs16 = __commonJS({ if (er) return results.emit("error", er); if (follow && !didRealpaths) { - const promises = []; + const promises2 = []; for (const e of entries) { if (e.isSymbolicLink()) { - promises.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r)); + promises2.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r)); } } - if (promises.length) { - Promise.all(promises).then(() => onReaddir(null, entries, true)); + if (promises2.length) { + Promise.all(promises2).then(() => onReaddir(null, entries, true)); return; } } diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index d49ad89b29..313f8b1702 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 fs15 = __importStar4(require("fs")); + var fs13 = __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 (!fs15.existsSync(filePath)) { + if (!fs13.existsSync(filePath)) { throw new Error(`Missing file at path: ${filePath}`); } - fs15.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os3.EOL}`, { + fs13.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 path16 = url2.path != null ? url2.path : `${url2.pathname || ""}${url2.search || ""}`; + let path12 = 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 (path12 && !path12.startsWith("/")) { + path12 = `/${path12}`; } - url2 = new URL(origin + path16); + url2 = new URL(origin + path12); } 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(path12) { + if (typeof path12 !== "string") { return ""; } - for (var i = path16.length - 1; i >= 0; --i) { - switch (path16.charCodeAt(i)) { + for (var i = path12.length - 1; i >= 0; --i) { + switch (path12.charCodeAt(i)) { case 47: // '/' case 92: - path16 = path16.slice(i + 1); - return path16 === ".." || path16 === "." ? "" : path16; + path12 = path12.slice(i + 1); + return path12 === ".." || path12 === "." ? "" : path12; } } - return path16 === ".." || path16 === "." ? "" : path16; + return path12 === ".." || path12 === "." ? "" : path12; }; } }); @@ -2673,8 +2673,8 @@ var require_multipart = __commonJS({ } } function checkFinished() { - if (nends === 0 && finished2 && !boy._done) { - finished2 = false; + if (nends === 0 && finished && !boy._done) { + finished = false; self2.end(); } } @@ -2693,7 +2693,7 @@ var require_multipart = __commonJS({ let nends = 0; let curFile; let curField; - let finished2 = false; + let finished = 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() { - finished2 = true; + finished = true; checkFinished(); }); } @@ -5663,7 +5663,7 @@ var require_request = __commonJS({ } var Request = class _Request { constructor(origin, { - path: path16, + path: path12, method, body, headers, @@ -5677,11 +5677,11 @@ var require_request = __commonJS({ throwOnError, expectContinue }, handler) { - if (typeof path16 !== "string") { + if (typeof path12 !== "string") { throw new InvalidArgumentError("path must be a string"); - } else if (path16[0] !== "/" && !(path16.startsWith("http://") || path16.startsWith("https://")) && method !== "CONNECT") { + } else if (path12[0] !== "/" && !(path12.startsWith("http://") || path12.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(path12) !== 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(path12, query) : path12; 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 path12 = search ? `${pathname}${search}` : pathname; this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); - this.opts.path = path16; + this.opts.path = path12; 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: path12, 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} ${path12} 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: path12, 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] = path12; 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 finished2 = false; + let finished = false; const writer = new AsyncWriter({ socket, request, contentLength, client, expectsPayload, header }); const onData = function(chunk) { - if (finished2) { + if (finished) { return; } try { @@ -8325,7 +8325,7 @@ upgrade: ${upgrade}\r } }; const onDrain = function() { - if (finished2) { + if (finished) { return; } if (body.resume) { @@ -8333,17 +8333,17 @@ upgrade: ${upgrade}\r } }; const onAbort = function() { - if (finished2) { + if (finished) { return; } const err = new RequestAbortedError(); queueMicrotask(() => onFinished(err)); }; const onFinished = function(err) { - if (finished2) { + if (finished) { return; } - finished2 = true; + finished = 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 noop2 = () => { + var noop = () => { }; 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(); - }) : noop2; + }) : noop; this.on("close", function() { signalListenerCleanup(); if (signal && signal.aborted) { @@ -9347,7 +9347,7 @@ var require_readable = __commonJS({ } else { resolve6(null); } - }).on("error", noop2).on("data", function(chunk) { + }).on("error", noop).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: finished2, PassThrough } = require("stream"); + var { finished, 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"); } - finished2(res, { readable: false }, (err) => { + finished(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(path12) { + if (typeof path12 !== "string") { + return path12; } - const pathSegments = path16.split("?"); + const pathSegments = path12.split("?"); if (pathSegments.length !== 2) { - return path16; + return path12; } 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: path12, method, body, headers }) { + const pathMatch = matchValue(mockDispatch2.path, path12); 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: path12 }) => matchValue(safeUrl(path12), 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: path12, method, body, headers, query } = opts; return { - path: path16, + path: path12, 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: 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]); } @@ -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: path12, data: { statusCode }, persist, times, timesInvoked, origin }) => ({ Method: method, Origin: origin, - Path: path16, + Path: path12, "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(path12) { + for (const char of path12) { 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 path12 = opts.path; if (!opts.path.startsWith("/")) { - path16 = `/${path16}`; + path12 = `/${path12}`; } - url2 = new URL(util.parseOrigin(url2).origin + path16); + url2 = new URL(util.parseOrigin(url2).origin + path12); } 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 path12 = __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, path12.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 path16 = __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 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; exports2.IS_WINDOWS = process.platform === "win32"; exports2.UV_FS_O_EXLOCK = 268435456; - exports2.READONLY = fs15.constants.O_RDONLY; + exports2.READONLY = fs13.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 isDirectory2(fsPath, useStat = false) { + function isDirectory(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 = isDirectory2; + exports2.isDirectory = isDirectory; 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 = path12.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 = path12.dirname(filePath); + const upperName = path12.basename(filePath).toUpperCase(); for (const actualName of yield exports2.readdir(directory)) { if (upperName === actualName.toUpperCase()) { - filePath = path16.join(directory, actualName); + filePath = path12.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 path12 = __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 ? path12.join(dest, path12.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 (path12.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 = path12.join(dest, path12.basename(source)); destExists = yield ioUtil.exists(dest); } if (destExists) { @@ -18731,7 +18731,7 @@ var require_io = __commonJS({ } } } - yield mkdirP(path16.dirname(dest)); + yield mkdirP(path12.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(path12.delimiter)) { if (extension) { extensions.push(extension); } @@ -18807,12 +18807,12 @@ var require_io = __commonJS({ } return []; } - if (tool.includes(path16.sep)) { + if (tool.includes(path12.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(path12.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(path12.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 path16 = __importStar4(require("path")); + var path12 = __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 = path16.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); + this.toolPath = path12.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 path16 = __importStar4(require("path")); + var path12 = __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}${path12.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 path12 = process.env.GITHUB_EVENT_PATH; + process.stdout.write(`GITHUB_EVENT_PATH ${path12} 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(once2); + module2.exports = wrappy(once); module2.exports.strict = wrappy(onceStrict); - once2.proto = once2(function() { + once.proto = once(function() { Object.defineProperty(Function.prototype, "once", { value: function() { - return once2(this); + return once(this); }, configurable: true }); @@ -20545,7 +20545,7 @@ var require_once = __commonJS({ configurable: true }); }); - function once2(fn) { + function once(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 noop2 = () => { + var noop = () => { }; 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: noop2, - info: noop2, + debug: noop, + info: noop, warn: consoleWarn, error: consoleError }, @@ -24525,5857 +24525,8 @@ var require_github = __commonJS({ } }); -// 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 os3 = require("os"); - 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; - 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 path16.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 isGlob2(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 isGlob2 = require_is_glob(); - var pathPosixDirname = require("path").posix.dirname; - var isWin32 = require("os").platform() === "win32"; - var slash2 = "/"; - var backslash = /\\/g; - var enclosure = /[\{\[].*[\}\]]$/; - var globby2 = /(^|[^\\])([\{\[]|\([^\)]+$)/; - var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g; - module2.exports = function globParent(str2, opts) { - var options = Object.assign({ flipBackslashes: true }, opts); - if (options.flipBackslashes && isWin32 && str2.indexOf(slash2) < 0) { - str2 = str2.replace(backslash, slash2); - } - if (enclosure.test(str2)) { - str2 += slash2; - } - str2 += "a"; - do { - str2 = pathPosixDirname(str2); - } while (isGlob2(str2) || globby2.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(compare3); - 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 compare3(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 = (toNumber2) => { - return (value) => toNumber2 === 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, toNumber2) => { - if (maxLength > 0) { - let dash = input[0] === "-" ? "-" : ""; - if (dash) input = input.slice(1); - input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0"); - } - if (toNumber2 === 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 toNumber2 = padded === false && stringify(start, end, options) === false; - let format = options.transform || transform(toNumber2); - 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, toNumber2)); - } - 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 path16 = 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: path16.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 path16 = 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 || path16.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 isGlob2 = false; - let isExtglob = false; - let isGlobstar = false; - let braceEscaped = false; - let backslashes = false; - let negated = false; - let negatedExtglob = false; - let finished2 = 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; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (braceEscaped !== true && code === CHAR_COMMA2) { - isBrace = token.isBrace = true; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_RIGHT_CURLY_BRACE) { - braces--; - if (braces === 0) { - braceEscaped = false; - isBrace = token.isBrace = true; - finished2 = 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 (finished2 === 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) { - isGlob2 = token.isGlob = true; - isExtglob = token.isExtglob = true; - finished2 = 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) { - isGlob2 = token.isGlob = true; - finished2 = true; - break; - } - } - continue; - } - break; - } - } - if (code === CHAR_ASTERISK2) { - if (prev === CHAR_ASTERISK2) isGlobstar = token.isGlobstar = true; - isGlob2 = token.isGlob = true; - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - if (code === CHAR_QUESTION_MARK) { - isGlob2 = token.isGlob = true; - finished2 = 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; - isGlob2 = token.isGlob = true; - finished2 = 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) { - isGlob2 = 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) { - finished2 = true; - break; - } - } - continue; - } - break; - } - if (isGlob2 === true) { - finished2 = true; - if (scanToEnd === true) { - continue; - } - break; - } - } - if (opts.noext === true) { - isExtglob = false; - isGlob2 = false; - } - let base = str2; - let prefix = ""; - let glob = ""; - if (start > 0) { - prefix = str2.slice(0, start); - str2 = str2.slice(start); - lastIndex -= start; - } - if (base && isGlob2 === true && lastIndex > 0) { - base = str2.slice(0, lastIndex); - glob = str2.slice(lastIndex); - } else if (isGlob2 === 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: isGlob2, - 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 negate2 = () => { - 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) { - negate2(); - 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 path16 = 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(path16.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 path16 = 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 !isDynamicPattern2(pattern, options); - } - exports2.isStaticPattern = isStaticPattern; - function isDynamicPattern2(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 = isDynamicPattern2; - 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 isNegativePattern2(pattern) ? pattern.slice(1) : pattern; - } - exports2.convertToPositivePattern = convertToPositivePattern; - function convertToNegativePattern(pattern) { - return "!" + pattern; - } - exports2.convertToNegativePattern = convertToNegativePattern; - function isNegativePattern2(pattern) { - return pattern.startsWith("!") && pattern[1] !== "("; - } - exports2.isNegativePattern = isNegativePattern2; - function isPositivePattern(pattern) { - return !isNegativePattern2(pattern); - } - exports2.isPositivePattern = isPositivePattern; - function getNegativePatterns(patterns) { - return patterns.filter(isNegativePattern2); - } - 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 = path16.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 relative2 = []; - for (const pattern of patterns) { - if (isAbsolute2(pattern)) { - absolute.push(pattern); - } else { - relative2.push(pattern); - } - } - return [absolute, relative2]; - } - exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative; - function isAbsolute2(pattern) { - return path16.isAbsolute(pattern); - } - exports2.isAbsolute = isAbsolute2; - } -}); - -// 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) { - "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((stream2) => { - stream2.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((stream2) => stream2.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 fs15 = require_fs(); - exports2.fs = fs15; - var path16 = require_path(); - exports2.path = path16; - var pattern = require_pattern(); - exports2.pattern = pattern; - var stream2 = require_stream(); - exports2.stream = stream2; - 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(path16, settings, callback) { - settings.fs.lstat(path16, (lstatError, lstat) => { - if (lstatError !== null) { - callFailureCallback(callback, lstatError); - return; - } - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - callSuccessCallback(callback, lstat); - return; - } - settings.fs.stat(path16, (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(path16, settings) { - const lstat = settings.fs.lstatSync(path16); - if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) { - return lstat; - } - try { - const stat = settings.fs.statSync(path16); - 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 fs15 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs15.lstat, - stat: fs15.stat, - lstatSync: fs15.lstatSync, - statSync: fs15.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 fs15 = 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.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(path16, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path16, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path16, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.stat = stat; - function statSync3(path16, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path16, settings); - } - exports2.statSync = statSync3; - 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 fs15 = require_fs3(); - exports2.fs = fs15; - } -}); - -// 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 path16 = common2.joinPathSegments(directory, name, settings.pathSegmentSeparator); - return (done) => { - fsStat.stat(path16, settings.fsStatSettings, (error2, stats) => { - if (error2 !== null) { - done(error2); - return; - } - const entry = { - name, - path: path16, - 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 fs15 = require("fs"); - exports2.FILE_SYSTEM_ADAPTER = { - lstat: fs15.lstat, - stat: fs15.stat, - lstatSync: fs15.lstatSync, - statSync: fs15.statSync, - readdir: fs15.readdir, - readdirSync: fs15.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 path16 = require("path"); - var fsStat = require_out(); - var fs15 = 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, path16.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(path16, optionsOrSettingsOrCallback, callback) { - if (typeof optionsOrSettingsOrCallback === "function") { - async.read(path16, getSettings(), optionsOrSettingsOrCallback); - return; - } - async.read(path16, getSettings(optionsOrSettingsOrCallback), callback); - } - exports2.scandir = scandir; - function scandirSync(path16, optionsOrSettings) { - const settings = getSettings(optionsOrSettings); - return sync.read(path16, 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: noop2, - saturated: noop2, - pause, - paused: false, - concurrency, - running, - resume, - idle, - length, - getQueue, - unshift, - empty: noop2, - 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 || noop2; - 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 || noop2; - 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 = noop2; - } - function killAndDrain() { - queueHead = null; - queueTail = null; - self2.drain(); - self2.drain = noop2; - } - } - function noop2() { - } - function Task() { - this.value = null; - this.callback = noop2; - this.next = null; - this.release = noop2; - this.context = null; - var self2 = this; - this.worked = function worked(err, result) { - var callback = self2.callback; - self2.value = null; - self2.callback = noop2; - 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 path16 = 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, path16.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 path16 = 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 path16.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 stream2 = new stream_1.PassThrough({ objectMode: true }); - stream2._write = (index, _enc, done) => { - return this._getEntry(filepaths[index], patterns[index], options).then((entry) => { - if (entry !== null && options.entryFilter(entry)) { - stream2.push(entry); - } - if (index === filepaths.length - 1) { - stream2.end(); - } - done(); - }).catch(done); - }; - for (let i = 0; i < filepaths.length; i++) { - stream2.write(i); - } - return stream2; - } - _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((resolve6, reject) => { - this._stat(filepath, this._fsStatSettings, (error2, stats) => { - return error2 === null ? resolve6(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((resolve6, reject) => { - this._walkAsync(root, options, (error2, entries) => { - if (error2 === null) { - resolve6(entries); - } else { - reject(error2); - } - }); - }); - } - async static(patterns, options) { - const entries = []; - const stream2 = this._readerStream.static(patterns, options); - return new Promise((resolve6, reject) => { - stream2.once("error", reject); - stream2.on("data", (entry) => entries.push(entry)); - stream2.once("end", () => resolve6(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, isDirectory2) { - const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory2); - if (!isMatched) { - return false; - } - const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory2); - if (isMatchedByRelativeNegative) { - return false; - } - const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory2); - if (isMatchedByAbsoluteNegative) { - return false; - } - return true; - } - _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory2) { - if (patternsRe.length === 0) { - return false; - } - const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath); - return this._isMatchToPatterns(fullpath, patternsRe, isDirectory2); - } - _isMatchToPatterns(filepath, patternsRe, isDirectory2) { - if (patternsRe.length === 0) { - return false; - } - const isMatched = utils.pattern.matchAny(filepath, patternsRe); - if (!isMatched && isDirectory2) { - 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 path16 = 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 path16.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 fs15 = require("fs"); - var os3 = require("os"); - var CPU_COUNT = Math.max(os3.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 - }; - 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) { - assertPatternsInput2(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 = stream2; - FastGlob2.async = FastGlob2; - function sync(source, options) { - assertPatternsInput2(source); - const works = getWorks(source, sync_1.default, options); - return utils.array.flatten(works); - } - FastGlob2.sync = sync; - function stream2(source, options) { - assertPatternsInput2(source); - const works = getWorks(source, stream_1.default, options); - return utils.stream.merge(works); - } - FastGlob2.stream = stream2; - function generateTasks2(source, options) { - assertPatternsInput2(source); - const patterns = [].concat(source); - const settings = new settings_1.default(options); - return taskManager.generate(patterns, settings); - } - FastGlob2.generateTasks = generateTasks2; - function isDynamicPattern2(source, options) { - assertPatternsInput2(source); - const settings = new settings_1.default(options); - return utils.pattern.isDynamicPattern(source, settings); - } - FastGlob2.isDynamicPattern = isDynamicPattern2; - function escapePath(source) { - assertPatternsInput2(source); - return utils.path.escape(source); - } - FastGlob2.escapePath = escapePath; - function convertPathToPattern2(source) { - assertPatternsInput2(source); - return utils.path.convertPathToPattern(source); - } - FastGlob2.convertPathToPattern = convertPathToPattern2; - let posix; - (function(posix2) { - function escapePath2(source) { - assertPatternsInput2(source); - return utils.path.escapePosixPath(source); - } - posix2.escapePath = escapePath2; - function convertPathToPattern3(source) { - assertPatternsInput2(source); - return utils.path.convertPosixPathToPattern(source); - } - posix2.convertPathToPattern = convertPathToPattern3; - })(posix = FastGlob2.posix || (FastGlob2.posix = {})); - let win32; - (function(win322) { - function escapePath2(source) { - assertPatternsInput2(source); - return utils.path.escapeWindowsPath(source); - } - win322.escapePath = escapePath2; - function convertPathToPattern3(source) { - assertPatternsInput2(source); - return utils.path.convertWindowsPathToPattern(source); - } - win322.convertPathToPattern = convertPathToPattern3; - })(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 assertPatternsInput2(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/globby/node_modules/ignore/index.js -var require_ignore = __commonJS({ - "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 = "\\"; - 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 = /^\.{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 }); - return 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) - // (a \ ) -> (a ) - /((?:\\\\)*?)(\\?\s+)$/, - (_, m1, m2) => m1 + (m2.indexOf("\\") === 0 ? SPACE : EMPTY) - ], - // Replace (\ ) with ' ' - // (\ ) -> ' ' - // (\\ ) -> '\\ ' - // (\\\ ) -> '\\ ' - [ - /(\\+?)\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. - // > 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}(?=$|\\/$)` - ] - ]; - 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}(?=$|\\/$)`; - } - }; - 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).filter(Boolean); - var IgnoreRule = class { - constructor(pattern, mark, body, ignoreCase, negative, prefix) { - this.pattern = pattern; - this.mark = mark; - this.negative = negative; - 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, - mark - }, ignoreCase) => { - let negative = false; - let body = pattern; - if (body.indexOf("!") === 0) { - negative = true; - body = body.substr(1); - } - body = body.replace(REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION, "!").replace(REGEX_REPLACE_LEADING_EXCAPED_HASH, "#"); - const regexPrefix = makeRegexPrefix(body); - return new IgnoreRule( - pattern, - mark, - body, - ignoreCase, - negative, - regexPrefix - ); - }; - var RuleManager = class { - constructor(ignoreCase) { - this._ignoreCase = ignoreCase; - this._rules = []; - } - _add(pattern) { - if (pattern && pattern[KEY_IGNORE]) { - this._rules = this._rules.concat(pattern._rules._rules); - this._added = true; - return; - } - if (isString(pattern)) { - pattern = { - pattern - }; - } - if (checkPattern(pattern.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._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; - } - // legacy - addPattern(pattern) { - return this.add(pattern); - } - // @returns {TestResult} - _test(originalPath, cache, checkUnignored, slices) { - const path16 = originalPath && checkPath.convert(originalPath); - checkPath( - path16, - originalPath, - this._strictPathCheck ? throwError2 : RETURN_FALSE - ); - return this._t(path16, cache, checkUnignored, slices); - } - 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 = path16.split(SLASH).filter(Boolean); - } - slices.pop(); - if (!slices.length) { - return cache[path16] = this._rules.test(path16, checkUnignored, MODE_IGNORE); - } - const parent = this._t( - slices.join(SLASH) + SLASH, - cache, - checkUnignored, - slices - ); - return cache[path16] = parent.ignored ? parent : this._rules.test(path16, checkUnignored, MODE_IGNORE); - } - ignores(path16) { - return this._test(path16, this._ignoreCache, false).ignored; - } - createFilter() { - return (path16) => !this.ignores(path16); - } - filter(paths) { - return makeArray(paths).filter(this.createFilter()); - } - // @returns {TestResult} - test(path16) { - return this._test(path16, this._testCache, true); - } - }; - var factory = (options) => new Ignore(options); - 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 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); - } -}); - // 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"; @@ -30424,7 +24575,7 @@ var require_re = __commonJS({ MAX_SAFE_COMPONENT_LENGTH, MAX_SAFE_BUILD_LENGTH, MAX_LENGTH - } = require_constants9(); + } = require_constants6(); var debug4 = require_debug(); exports2 = module2.exports = {}; var re = exports2.re = []; @@ -30553,7 +24704,7 @@ var require_semver = __commonJS({ "node_modules/semver/classes/semver.js"(exports2, module2) { "use strict"; var debug4 = 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(); @@ -30828,7 +24979,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(); @@ -30853,7 +25004,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; @@ -30866,7 +25017,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; @@ -30903,7 +25054,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); @@ -30977,7 +25128,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; @@ -31165,7 +25316,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) { @@ -31401,7 +25552,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) => { @@ -32214,10 +26365,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(); @@ -32349,7 +26500,6 @@ var require_package = __commonJS({ archiver: "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - del: "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -32570,7 +26720,7 @@ var require_light = __commonJS({ } } async trigger(name, ...args) { - var e, promises2; + var e, promises3; try { if (name !== "debug") { this.trigger("debug", `Event triggered: ${name}`, args); @@ -32581,7 +26731,7 @@ var require_light = __commonJS({ this._events[name] = this._events[name].filter(function(listener) { return listener.status !== "none"; }); - promises2 = this._events[name].map(async (listener) => { + promises3 = this._events[name].map(async (listener) => { var e2, returned; if (listener.status === "none") { return; @@ -32604,7 +26754,7 @@ var require_light = __commonJS({ return null; } }); - return (await Promise.all(promises2)).find(function(x) { + return (await Promise.all(promises3)).find(function(x) { return x != null; }); } catch (error2) { @@ -33505,18 +27655,18 @@ var require_light = __commonJS({ var done, waitForExecuting; options = parser$5.load(options, this.stopDefaults); waitForExecuting = (at) => { - var finished2; - finished2 = () => { + var finished; + finished = () => { var counts; counts = this._states.counts; return counts[0] + counts[1] + counts[2] + counts[3] === at; }; return new this.Promise((resolve6, reject) => { - if (finished2()) { + if (finished()) { return resolve6(); } else { return this.on("done", () => { - if (finished2()) { + if (finished()) { this.removeAllListeners("done"); return resolve6(); } @@ -33943,7 +28093,7 @@ var require_console_log_level = __commonJS({ "use strict"; var util = require("util"); var levels = ["trace", "debug", "info", "warn", "error", "fatal"]; - var noop2 = function() { + var noop = function() { }; module2.exports = function(opts) { opts = opts || {}; @@ -33953,7 +28103,7 @@ var require_console_log_level = __commonJS({ return levels.indexOf(level) >= levels.indexOf(opts.level); }; levels.forEach(function(level) { - logger[level] = shouldLog(level) ? log : noop2; + logger[level] = shouldLog(level) ? log : noop; function log() { var prefix = opts.prefix; var normalizedLevel; @@ -34074,7 +28224,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 path12 = __importStar4(require("path")); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; function dirname3(p) { @@ -34082,7 +28232,7 @@ var require_internal_path_helper = __commonJS({ if (IS_WINDOWS && /^\\\\[^\\]+(\\[^\\]+)?$/.test(p)) { return p; } - let result = path16.dirname(p); + let result = path12.dirname(p); if (IS_WINDOWS && /^\\\\[^\\]+\\[^\\]+\\$/.test(result)) { result = safeTrimTrailingSeparator(result); } @@ -34120,7 +28270,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 += path12.sep; } return root + itemPath; } @@ -34158,10 +28308,10 @@ var require_internal_path_helper = __commonJS({ return ""; } p = normalizeSeparators(p); - if (!p.endsWith(path16.sep)) { + if (!p.endsWith(path12.sep)) { return p; } - if (p === path16.sep) { + if (p === path12.sep) { return p; } if (IS_WINDOWS && /^[A-Z]:\\$/i.test(p)) { @@ -34494,7 +28644,7 @@ var require_minimatch = __commonJS({ "node_modules/minimatch/minimatch.js"(exports2, module2) { module2.exports = minimatch; minimatch.Minimatch = Minimatch; - var path16 = (function() { + var path12 = (function() { try { return require("path"); } catch (e) { @@ -34502,7 +28652,7 @@ var require_minimatch = __commonJS({ })() || { sep: "/" }; - minimatch.sep = path16.sep; + minimatch.sep = path12.sep; var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; var expand = require_brace_expansion(); var plTypes = { @@ -34591,8 +28741,8 @@ var require_minimatch = __commonJS({ assertValidPattern(pattern); if (!options) options = {}; pattern = pattern.trim(); - if (!options.allowWindowsEscape && path16.sep !== "/") { - pattern = pattern.split(path16.sep).join("/"); + if (!options.allowWindowsEscape && path12.sep !== "/") { + pattern = pattern.split(path12.sep).join("/"); } this.options = options; this.set = []; @@ -34961,8 +29111,8 @@ var require_minimatch = __commonJS({ if (this.empty) return f === ""; if (f === "/" && partial) return true; var options = this.options; - if (path16.sep !== "/") { - f = f.split(path16.sep).join("/"); + if (path12.sep !== "/") { + f = f.split(path12.sep).join("/"); } f = f.split(slashSplit); this.debug(this.pattern, "split", f); @@ -35094,7 +29244,7 @@ var require_internal_path = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Path = void 0; - var path16 = __importStar4(require("path")); + var path12 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var IS_WINDOWS = process.platform === "win32"; @@ -35109,12 +29259,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(path12.sep); } else { let remaining = itemPath; let dir = pathHelper.dirname(remaining); while (dir !== remaining) { - const basename = path16.basename(remaining); + const basename = path12.basename(remaining); this.segments.unshift(basename); remaining = dir; dir = pathHelper.dirname(remaining); @@ -35132,7 +29282,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(path12.sep), `Parameter 'itemPath' contains unexpected path separators`); this.segments.push(segment); } } @@ -35143,12 +29293,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(path12.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 += path12.sep; } result += this.segments[i]; } @@ -35192,7 +29342,7 @@ var require_internal_pattern = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Pattern = void 0; var os3 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); + var path12 = __importStar4(require("path")); var pathHelper = __importStar4(require_internal_path_helper()); var assert_1 = __importDefault4(require("assert")); var minimatch_1 = require_minimatch(); @@ -35221,7 +29371,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(path16.sep); + this.trailingSeparator = pathHelper.normalizeSeparators(pattern).endsWith(path12.sep); pattern = pathHelper.safeTrimTrailingSeparator(pattern); let foundGlob = false; const searchSegments = this.segments.map((x) => _Pattern.getLiteral(x)).filter((x) => !foundGlob && !(foundGlob = x === "")); @@ -35245,8 +29395,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(path12.sep) && this.isImplicitPattern === false) { + itemPath = `${itemPath}${path12.sep}`; } } else { itemPath = pathHelper.safeTrimTrailingSeparator(itemPath); @@ -35281,9 +29431,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(`.${path12.sep}`)) { pattern = _Pattern.globEscape(process.cwd()) + pattern.substr(1); - } else if (pattern === "~" || pattern.startsWith(`~${path16.sep}`)) { + } else if (pattern === "~" || pattern.startsWith(`~${path12.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}'`); @@ -35367,8 +29517,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(path12, level) { + this.path = path12; this.level = level; } }; @@ -35488,9 +29638,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 fs13 = __importStar4(require("fs")); var globOptionsHelper = __importStar4(require_internal_glob_options_helper()); - var path16 = __importStar4(require("path")); + var path12 = __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(); @@ -35540,7 +29690,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(fs13.promises.lstat(searchPath)); } catch (err) { if (err.code === "ENOENT") { continue; @@ -35571,7 +29721,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(path16.join(item.path, x), childLevel)); + const childItems = (yield __await4(fs13.promises.readdir(item.path))).map((x) => new internal_search_state_1.SearchState(path12.join(item.path, x), childLevel)); stack.push(...childItems.reverse()); } else if (match & internal_match_kind_1.MatchKind.File) { yield yield __await4(item.path); @@ -35606,7 +29756,7 @@ var require_internal_globber = __commonJS({ let stats; if (options.followSymbolicLinks) { try { - stats = yield fs15.promises.stat(item.path); + stats = yield fs13.promises.stat(item.path); } catch (err) { if (err.code === "ENOENT") { if (options.omitBrokenSymbolicLinks) { @@ -35618,10 +29768,10 @@ var require_internal_globber = __commonJS({ throw err; } } else { - stats = yield fs15.promises.lstat(item.path); + stats = yield fs13.promises.lstat(item.path); } if (stats.isDirectory() && options.followSymbolicLinks) { - const realPath = yield fs15.promises.realpath(item.path); + const realPath = yield fs13.promises.realpath(item.path); while (traversalChain.length >= item.level) { traversalChain.pop(); } @@ -36839,7 +30989,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 }); @@ -36955,11 +31105,11 @@ var require_cacheUtils = __commonJS({ var glob = __importStar4(require_glob()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs15 = __importStar4(require("fs")); - var path16 = __importStar4(require("path")); + var fs13 = __importStar4(require("fs")); + var path12 = __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* () { @@ -36976,16 +31126,16 @@ var require_cacheUtils = __commonJS({ baseLocation = "/home"; } } - tempDirectory = path16.join(baseLocation, "actions", "temp"); + tempDirectory = path12.join(baseLocation, "actions", "temp"); } - const dest = path16.join(tempDirectory, crypto.randomUUID()); + const dest = path12.join(tempDirectory, crypto.randomUUID()); yield io6.mkdirP(dest); return dest; }); } exports2.createTempDirectory = createTempDirectory; function getArchiveFileSizeInBytes(filePath) { - return fs15.statSync(filePath).size; + return fs13.statSync(filePath).size; } exports2.getArchiveFileSizeInBytes = getArchiveFileSizeInBytes; function resolvePaths(patterns) { @@ -37002,7 +31152,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 = path12.relative(workspace, file).replace(new RegExp(`\\${path12.sep}`, "g"), "/"); core14.debug(`Matched: ${relativeFile}`); if (relativeFile === "") { paths.push("."); @@ -37025,7 +31175,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(fs13.unlink)(filePath); }); } exports2.unlinkFile = unlinkFile; @@ -37070,7 +31220,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 (fs13.existsSync(constants_1.GnuTarPathOnWindows)) { return constants_1.GnuTarPathOnWindows; } const versionOutput = yield getVersion("tar"); @@ -37637,7 +31787,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 }); @@ -37799,7 +31949,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; } }); @@ -38576,13 +32726,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 process6 = tslib_1.__importStar(require("node:process")); + var process2 = tslib_1.__importStar(require("node:process")); function getHeaderName() { return "User-Agent"; } async function setPlatformSpecificData(map2) { - if (process6 && process6.versions) { - const versions = process6.versions; + if (process2 && process2.versions) { + const versions = process2.versions; if (versions.bun) { map2.set("Bun", versions.bun); } else if (versions.deno) { @@ -38597,7 +32747,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 }); @@ -38615,7 +32765,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) { @@ -39144,7 +33294,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 }) { @@ -39241,7 +33391,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; @@ -39550,7 +33700,7 @@ var require_ms = __commonJS({ }); // node_modules/debug/src/common.js -var require_common3 = __commonJS({ +var require_common = __commonJS({ "node_modules/debug/src/common.js"(exports2, module2) { function setup(env) { createDebug.debug = createDebug; @@ -39884,7 +34034,7 @@ var require_browser = __commonJS({ } catch (error2) { } } - module2.exports = require_common3()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.j = function(v) { try { @@ -40172,7 +34322,7 @@ var require_node = __commonJS({ debug4.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } - module2.exports = require_common3()(exports2); + module2.exports = require_common()(exports2); var { formatters } = module2.exports; formatters.o = function(v) { this.inspectOpts.colors = this.useColors; @@ -41243,7 +35393,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(); @@ -41760,7 +35910,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; @@ -41782,7 +35932,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; @@ -41807,7 +35957,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; @@ -43559,7 +37709,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 }); @@ -43634,7 +37784,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; @@ -44908,15 +39058,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 path12 = replaceAll(operationSpec.path, urlReplacements); + if (operationSpec.path === "/{nextLink}" && path12.startsWith("/")) { + path12 = path12.substring(1); } - if (isAbsoluteUrl(path16)) { - requestUrl = path16; + if (isAbsoluteUrl(path12)) { + requestUrl = path12; isAbsolutePath = true; } else { - requestUrl = appendPath(requestUrl, path16); + requestUrl = appendPath(requestUrl, path12); } } const { queryParams, sequenceParams } = calculateQueryParameters(operationSpec, operationArguments, fallbackObject); @@ -44964,9 +39114,9 @@ var require_urlHelpers = __commonJS({ } const searchStart = pathToAppend.indexOf("?"); if (searchStart !== -1) { - const path16 = pathToAppend.substring(0, searchStart); + const path12 = pathToAppend.substring(0, searchStart); const search = pathToAppend.substring(searchStart + 1); - newPath = newPath + path16; + newPath = newPath + path12; if (search) { parsedUrl.search = parsedUrl.search ? `${parsedUrl.search}&${search}` : search; } @@ -45112,7 +39262,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(); @@ -48843,7 +42993,7 @@ var require_dist7 = __commonJS({ var stream2 = require("stream"); var coreLro = require_dist6(); var events = require("events"); - var fs15 = require("fs"); + var fs13 = require("fs"); var util = require("util"); var buffer = require("buffer"); function _interopNamespaceDefault(e) { @@ -48866,7 +43016,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(fs13); var util__namespace = /* @__PURE__ */ _interopNamespaceDefault(util); var logger = logger$1.createClientLogger("storage-blob"); var BaseRequestPolicy = class { @@ -49115,10 +43265,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 path12 = urlParsed.pathname; + path12 = path12 || "/"; + path12 = escape(path12); + urlParsed.pathname = path12; return urlParsed.toString(); } function getProxyUriFromDevConnString(connectionString) { @@ -49203,9 +43353,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 path12 = urlParsed.pathname; + path12 = path12 ? path12.endsWith("/") ? `${path12}${name}` : `${path12}/${name}` : name; + urlParsed.pathname = path12; return urlParsed.toString(); } function setURLParameter(url3, name, value) { @@ -50286,9 +44436,9 @@ var require_dist7 = __commonJS({ * @param request - */ getCanonicalizedResourceString(request) { - const path16 = getURLPath(request.url) || "/"; + const path12 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${this.factory.accountName}${path16}`; + canonicalizedResourceString += `/${this.factory.accountName}${path12}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -50581,9 +44731,9 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; return canonicalizedHeadersStringToSign; } function getCanonicalizedResourceString(request) { - const path16 = getURLPath(request.url) || "/"; + const path12 = getURLPath(request.url) || "/"; let canonicalizedResourceString = ""; - canonicalizedResourceString += `/${options.accountName}${path16}`; + canonicalizedResourceString += `/${options.accountName}${path12}`; const queries = getURLQueries(request.url); const lowercaseQueries = {}; if (queries) { @@ -69885,8 +64035,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 path12 = getURLPath(subRequest.url); + if (!path12 || path12 === "") { throw new RangeError(`Invalid url for sub request: '${subRequest.url}'`); } } @@ -69946,8 +64096,8 @@ ${key}:${decodeURIComponent(lowercaseQueries[key])}`; pipeline = newPipeline(credentialOrPipeline, options); } const storageClientContext = new StorageContextClient(url3, getCoreClientOptions(pipeline)); - const path16 = getURLPath(url3); - if (path16 && path16 !== "/") { + const path12 = getURLPath(url3); + if (path12 && path12 !== "/") { this.serviceOrContainerContext = storageClientContext.container; } else { this.serviceOrContainerContext = storageClientContext.service; @@ -72544,7 +66694,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; @@ -72714,11 +66864,11 @@ 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 fs13 = __importStar4(require("fs")); var stream2 = __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) { @@ -72825,7 +66975,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 = fs13.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); @@ -72851,7 +67001,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 fs13.promises.open(archivePath, "w"); const httpClient = new http_client_1.HttpClient("actions/cache", void 0, { socketTimeout: options.timeoutInMs, keepAlive: true @@ -72968,7 +67118,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 = fs13.openSync(archivePath, "w"); try { downloadProgress.startDisplayTimer(); const controller = new abort_controller_1.AbortController(); @@ -72986,12 +67136,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); + fs13.writeFileSync(fd, result); } } } finally { downloadProgress.stopDisplayTimer(); - fs15.closeSync(fd); + fs13.closeSync(fd); } } }); @@ -73290,7 +67440,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 fs13 = __importStar4(require("fs")); var url_1 = require("url"); var utils = __importStar4(require_cacheUtils()); var uploadUtils_1 = require_uploadUtils(); @@ -73428,7 +67578,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 = fs13.openSync(archivePath, "r"); const uploadOptions = (0, options_1.getUploadOptions)(options); const concurrency = utils.assertDefined("uploadConcurrency", uploadOptions.uploadConcurrency); const maxChunkSize = utils.assertDefined("uploadChunkSize", uploadOptions.uploadChunkSize); @@ -73442,7 +67592,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, () => fs13.createReadStream(archivePath, { fd, start, end, @@ -73453,7 +67603,7 @@ Other caches with similar key:`); } }))); } finally { - fs15.closeSync(fd); + fs13.closeSync(fd); } return; }); @@ -78697,9 +72847,9 @@ var require_tar = __commonJS({ var exec_1 = require_exec(); var io6 = __importStar4(require_io()); var fs_1 = require("fs"); - var path16 = __importStar4(require("path")); + var path12 = __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* () { @@ -78743,13 +72893,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(`\\${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); 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(`\\${path12.sep}`, "g"), "/"), "-P", "-C", workingDirectory.replace(new RegExp(`\\${path12.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(`\\${path12.sep}`, "g"), "/"), "-P"); break; } if (tarPath.type === constants_1.ArchiveToolType.GNU) { @@ -78795,7 +72945,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(`\\${path12.sep}`, "g"), "/") ] : [ "--use-compress-program", IS_WINDOWS ? '"zstd -d --long=30"' : "unzstd --long=30" @@ -78804,7 +72954,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(`\\${path12.sep}`, "g"), "/") ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -d"' : "unzstd"]; default: return ["-z"]; @@ -78819,7 +72969,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(`\\${path12.sep}`, "g"), "/"), constants_1.TarFilename ] : [ "--use-compress-program", @@ -78828,7 +72978,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(`\\${path12.sep}`, "g"), "/"), constants_1.TarFilename ] : ["--use-compress-program", IS_WINDOWS ? '"zstd -T0"' : "zstdmt"]; default: @@ -78868,7 +73018,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)(path12.join(archiveFolder, constants_1.ManifestFilename), sourceDirectories.join("\n")); const commands = yield getCommands(compressionMethod, "create"); yield execCommands(commands, archiveFolder); }); @@ -78938,7 +73088,7 @@ var require_cache3 = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.saveCache = exports2.restoreCache = exports2.isFeatureAvailable = exports2.FinalizeCacheError = exports2.ReserveCacheError = exports2.ValidationError = void 0; var core14 = __importStar4(require_core()); - var path16 = __importStar4(require("path")); + var path12 = __importStar4(require("path")); var utils = __importStar4(require_cacheUtils()); var cacheHttpClient = __importStar4(require_cacheHttpClient()); var cacheTwirpClient = __importStar4(require_cacheTwirpClient()); @@ -79035,7 +73185,7 @@ var require_cache3 = __commonJS({ core14.info("Lookup only - skipping download"); return cacheEntry.cacheKey; } - archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path12.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); yield cacheHttpClient.downloadCache(cacheEntry.archiveLocation, archivePath, options); if (core14.isDebug()) { @@ -79104,7 +73254,7 @@ var require_cache3 = __commonJS({ core14.info("Lookup only - skipping download"); return response.matchedKey; } - archivePath = path16.join(yield utils.createTempDirectory(), utils.getCacheFileName(compressionMethod)); + archivePath = path12.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); @@ -79167,7 +73317,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 = path12.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -79231,7 +73381,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 = path12.join(archiveFolder, utils.getCacheFileName(compressionMethod)); core14.debug(`Archive Path: ${archivePath}`); try { yield (0, tar_1.createTar)(archiveFolder, cachePaths, compressionMethod); @@ -79310,14 +73460,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, path12, name, argument) { + if (Array.isArray(path12)) { + this.path = path12; + this.property = path12.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); - } else if (path16 !== void 0) { - this.property = path16; + } else if (path12 !== void 0) { + this.property = path12; } if (message) { this.message = message; @@ -79408,16 +73558,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, path12, 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(path12)) { + this.path = path12; + this.propertyPath = path12.reduce(function(sum, item) { return sum + makeSuffix(item); }, "instance"); } else { - this.propertyPath = path16; + this.propertyPath = path12; } this.base = base; this.schemas = schemas; @@ -79426,10 +73576,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 path12 = 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, path12, base, Object.create(this.schemas)); if (id && !ctx.schemas[base]) { ctx.schemas[base] = schema2; } @@ -80294,7 +74444,7 @@ var require_attribute = __commonJS({ }); // node_modules/jsonschema/lib/scan.js -var require_scan2 = __commonJS({ +var require_scan = __commonJS({ "node_modules/jsonschema/lib/scan.js"(exports2, module2) { "use strict"; var urilib = require("url"); @@ -80368,7 +74518,7 @@ var require_validator2 = __commonJS({ var urilib = require("url"); var attribute = require_attribute(); var helpers = require_helpers3(); - var scanSchema = require_scan2().scan; + var scanSchema = require_scan().scan; var ValidatorResult = helpers.ValidatorResult; var ValidatorResultError = helpers.ValidatorResultError; var SchemaError = helpers.SchemaError; @@ -80593,8 +74743,8 @@ var require_lib2 = __commonJS({ module2.exports.ValidatorResultError = require_helpers3().ValidatorResultError; module2.exports.ValidationError = require_helpers3().ValidationError; module2.exports.SchemaError = require_helpers3().SchemaError; - module2.exports.SchemaScanResult = require_scan2().SchemaScanResult; - module2.exports.scan = require_scan2().scan; + module2.exports.SchemaScanResult = require_scan().SchemaScanResult; + module2.exports.scan = require_scan().scan; module2.exports.validate = function(instance, schema2, options) { var v = new Validator3(); return v.validate(instance, schema2, options); @@ -80666,7 +74816,7 @@ var require_manifest = __commonJS({ var core_1 = require_core(); var os3 = require("os"); var cp = require("child_process"); - var fs15 = require("fs"); + var fs13 = require("fs"); function _findMatch(versionSpec, stable, candidates, archFilter) { return __awaiter4(this, void 0, void 0, function* () { const platFilter = os3.platform(); @@ -80730,10 +74880,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 (fs13.existsSync(lsbReleaseFile)) { + contents = fs13.readFileSync(lsbReleaseFile).toString(); + } else if (fs13.existsSync(osReleaseFile)) { + contents = fs13.readFileSync(osReleaseFile).toString(); } return contents; } @@ -80910,10 +75060,10 @@ var require_tool_cache = __commonJS({ var core14 = __importStar4(require_core()); var io6 = __importStar4(require_io()); var crypto = __importStar4(require("crypto")); - var fs15 = __importStar4(require("fs")); + var fs13 = __importStar4(require("fs")); var mm = __importStar4(require_manifest()); var os3 = __importStar4(require("os")); - var path16 = __importStar4(require("path")); + var path12 = __importStar4(require("path")); var httpm = __importStar4(require_lib()); var semver8 = __importStar4(require_semver2()); var stream2 = __importStar4(require("stream")); @@ -80934,8 +75084,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 io6.mkdirP(path16.dirname(dest)); + dest = dest || path12.join(_getTempDirectory(), crypto.randomUUID()); + yield io6.mkdirP(path12.dirname(dest)); core14.debug(`Downloading ${url2}`); core14.debug(`Destination ${dest}`); const maxAttempts = 3; @@ -80957,7 +75107,7 @@ var require_tool_cache = __commonJS({ exports2.downloadTool = downloadTool2; function downloadToolAttempt(url2, dest, auth, headers) { return __awaiter4(this, void 0, void 0, function* () { - if (fs15.existsSync(dest)) { + if (fs13.existsSync(dest)) { throw new Error(`Destination file path ${dest} already exists`); } const http = new httpm.HttpClient(userAgent, [], { @@ -80981,7 +75131,7 @@ var require_tool_cache = __commonJS({ const readStream = responseMessageFactory(); let succeeded = false; try { - yield pipeline(readStream, fs15.createWriteStream(dest)); + yield pipeline(readStream, fs13.createWriteStream(dest)); core14.debug("download complete"); succeeded = true; return dest; @@ -81022,7 +75172,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 = path12.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}'`; @@ -81193,12 +75343,12 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os3.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); core14.debug(`source dir: ${sourceDir}`); - if (!fs15.statSync(sourceDir).isDirectory()) { + if (!fs13.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 = path16.join(sourceDir, itemName); + for (const itemName of fs13.readdirSync(sourceDir)) { + const s = path12.join(sourceDir, itemName); yield io6.cp(s, destPath, { recursive: true }); } _completeToolPath(tool, version, arch2); @@ -81212,11 +75362,11 @@ var require_tool_cache = __commonJS({ arch2 = arch2 || os3.arch(); core14.debug(`Caching tool ${tool} ${version} ${arch2}`); core14.debug(`source file: ${sourceFile}`); - if (!fs15.statSync(sourceFile).isFile()) { + if (!fs13.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 = path12.join(destFolder, targetFile); core14.debug(`destination file ${destPath}`); yield io6.cp(sourceFile, destPath); _completeToolPath(tool, version, arch2); @@ -81240,9 +75390,9 @@ var require_tool_cache = __commonJS({ let toolPath = ""; if (versionSpec) { versionSpec = semver8.clean(versionSpec) || ""; - const cachePath = path16.join(_getCacheDirectory(), toolName, versionSpec, arch2); + const cachePath = path12.join(_getCacheDirectory(), toolName, versionSpec, arch2); core14.debug(`checking cache: ${cachePath}`); - if (fs15.existsSync(cachePath) && fs15.existsSync(`${cachePath}.complete`)) { + if (fs13.existsSync(cachePath) && fs13.existsSync(`${cachePath}.complete`)) { core14.debug(`Found tool in cache ${toolName} ${versionSpec} ${arch2}`); toolPath = cachePath; } else { @@ -81255,13 +75405,13 @@ var require_tool_cache = __commonJS({ function findAllVersions2(toolName, arch2) { const versions = []; arch2 = arch2 || os3.arch(); - const toolPath = path16.join(_getCacheDirectory(), toolName); - if (fs15.existsSync(toolPath)) { - const children = fs15.readdirSync(toolPath); + const toolPath = path12.join(_getCacheDirectory(), toolName); + if (fs13.existsSync(toolPath)) { + const children = fs13.readdirSync(toolPath); for (const child of children) { if (isExplicitVersion(child)) { - const fullPath = path16.join(toolPath, child, arch2 || ""); - if (fs15.existsSync(fullPath) && fs15.existsSync(`${fullPath}.complete`)) { + const fullPath = path12.join(toolPath, child, arch2 || ""); + if (fs13.existsSync(fullPath) && fs13.existsSync(`${fullPath}.complete`)) { versions.push(child); } } @@ -81315,7 +75465,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 = path12.join(_getTempDirectory(), crypto.randomUUID()); } yield io6.mkdirP(dest); return dest; @@ -81323,7 +75473,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 = path12.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); core14.debug(`destination ${folderPath}`); const markerPath = `${folderPath}.complete`; yield io6.rmRF(folderPath); @@ -81333,9 +75483,9 @@ var require_tool_cache = __commonJS({ }); } function _completeToolPath(tool, version, arch2) { - const folderPath = path16.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); + const folderPath = path12.join(_getCacheDirectory(), tool, semver8.clean(version) || version, arch2 || ""); const markerPath = `${folderPath}.complete`; - fs15.writeFileSync(markerPath, ""); + fs13.writeFileSync(markerPath, ""); core14.debug("finished caching tool"); } function isExplicitVersion(versionSpec) { @@ -81512,7 +75662,7 @@ var require_follow_redirects = __commonJS({ "ERR_STREAM_WRITE_AFTER_END", "write after end" ); - var destroy = Writable.prototype.destroy || noop2; + var destroy = Writable.prototype.destroy || noop; function RedirectableRequest(options, responseCallback) { Writable.call(this); this._sanitizeOptions(options); @@ -81841,7 +75991,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop2() { + function noop() { } function parseUrl(input) { var parsed; @@ -81917,7 +76067,7 @@ var require_follow_redirects = __commonJS({ for (var event of events) { request.removeListener(event, eventHandlers[event]); } - request.on("error", noop2); + request.on("error", noop); request.destroy(error2); } function isSubdomain(subdomain, domain) { @@ -84842,15 +78992,16 @@ var require_sarif_schema_2_1_0 = __commonJS({ var core13 = __toESM(require_core()); // src/actions-util.ts -var fs4 = __toESM(require("fs")); -var path6 = __toESM(require("path")); +var fs2 = __toESM(require("fs")); +var path2 = __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 path5 = __toESM(require("path")); +var fs = __toESM(require("fs")); +var path = __toESM(require("path")); var core3 = __toESM(require_core()); var exec = __toESM(require_exec()); var io = __toESM(require_io()); @@ -84990,764 +79141,33 @@ function checkDiskSpace(directoryPath, dependencies = { return checkUnix(directoryPath); } -// 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_path7 = require("node:path"); +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"); + 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 fs15.lstat(itemPath, { bigint: true }) : await fs15.lstat(itemPath, { bigint: true }).catch((error2) => errors.push(error2)); + 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 fs15.readdir(itemPath) : await fs15.readdir(itemPath).catch((error2) => errors.push(error2)); + 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_path7.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path2.join)(itemPath, directoryItem)) ) ); } @@ -88391,7 +81811,7 @@ function getToolNames(sarif) { return Object.keys(toolNames); } function getCodeQLDatabasePath(config, language) { - return path5.resolve(config.dbLocation, language); + return path.resolve(config.dbLocation, language); } function parseGitHubUrl(inputUrl) { const originalUrl = inputUrl; @@ -88610,16 +82030,10 @@ async function checkSipEnablement(logger) { async function cleanUpGlob(glob, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await deleteAsync(glob, { force: true }); - if (deletedPaths.length === 0) { - logger.warning( - `Failed to clean up ${name}: no files found matching ${glob}.` - ); - } else if (deletedPaths.length === 1) { - logger.debug(`Cleaned up ${name}.`); - } else { - logger.debug(`Cleaned up ${name} (${deletedPaths.length} files).`); - } + await fs.promises.rm(glob, { + force: true, + recursive: true + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } @@ -88669,17 +82083,17 @@ function getWorkflowEventName() { } function isRunningLocalAction() { const relativeScriptPath = getRelativeScriptPath(); - return relativeScriptPath.startsWith("..") || path6.isAbsolute(relativeScriptPath); + return relativeScriptPath.startsWith("..") || path2.isAbsolute(relativeScriptPath); } function getRelativeScriptPath() { const runnerTemp = getRequiredEnvParam("RUNNER_TEMP"); - const actionsDirectory = path6.join(path6.dirname(runnerTemp), "_actions"); - return path6.relative(actionsDirectory, __filename); + const actionsDirectory = path2.join(path2.dirname(runnerTemp), "_actions"); + return path2.relative(actionsDirectory, __filename); } function getWorkflowEvent() { const eventJsonFile = getRequiredEnvParam("GITHUB_EVENT_PATH"); try { - return JSON.parse(fs4.readFileSync(eventJsonFile, "utf-8")); + return JSON.parse(fs2.readFileSync(eventJsonFile, "utf-8")); } catch (e) { throw new Error( `Unable to read workflow event JSON from ${eventJsonFile}: ${e}` @@ -89003,8 +82417,8 @@ function wrapApiConfigurationError(e) { } // src/feature-flags.ts -var fs6 = __toESM(require("fs")); -var path8 = __toESM(require("path")); +var fs4 = __toESM(require("fs")); +var path4 = __toESM(require("path")); var semver3 = __toESM(require_semver2()); // src/defaults.json @@ -89012,8 +82426,8 @@ var bundleVersion = "codeql-bundle-v2.23.3"; var cliVersion = "2.23.3"; // src/overlay-database-utils.ts -var fs5 = __toESM(require("fs")); -var path7 = __toESM(require("path")); +var fs3 = __toESM(require("fs")); +var path3 = __toESM(require("path")); var actionsCache = __toESM(require_cache3()); // src/git-utils.ts @@ -89139,8 +82553,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 path12 = decodeGitFilePath(match[2]); + fileOidMap[path12] = oid; } else { throw new Error(`Unexpected "git ls-files" output: ${line}`); } @@ -89238,12 +82652,12 @@ async function writeBaseDatabaseOidsFile(config, sourceRoot) { const gitFileOids = await getFileOidsUnderPath(sourceRoot); const gitFileOidsJson = JSON.stringify(gitFileOids); const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); - await fs5.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); + await fs3.promises.writeFile(baseDatabaseOidsFilePath, gitFileOidsJson); } async function readBaseDatabaseOidsFile(config, logger) { const baseDatabaseOidsFilePath = getBaseDatabaseOidsFilePath(config); try { - const contents = await fs5.promises.readFile( + const contents = await fs3.promises.readFile( baseDatabaseOidsFilePath, "utf-8" ); @@ -89256,7 +82670,7 @@ async function readBaseDatabaseOidsFile(config, logger) { } } function getBaseDatabaseOidsFilePath(config) { - return path7.join(config.dbLocation, "base-database-oids.json"); + return path3.join(config.dbLocation, "base-database-oids.json"); } async function writeOverlayChangesFile(config, sourceRoot, logger) { const baseFileOids = await readBaseDatabaseOidsFile(config, logger); @@ -89266,14 +82680,14 @@ async function writeOverlayChangesFile(config, sourceRoot, logger) { `Found ${changedFiles.length} changed file(s) under ${sourceRoot}.` ); const changedFilesJson = JSON.stringify({ changes: changedFiles }); - const overlayChangesFile = path7.join( + const overlayChangesFile = path3.join( getTemporaryDirectory(), "overlay-changes.json" ); logger.debug( `Writing overlay changed files to ${overlayChangesFile}: ${changedFilesJson}` ); - await fs5.promises.writeFile(overlayChangesFile, changedFilesJson); + await fs3.promises.writeFile(overlayChangesFile, changedFilesJson); return overlayChangesFile; } function computeChangedFiles(baseFileOids, overlayFileOids) { @@ -89497,7 +82911,7 @@ var Features = class { this.gitHubFeatureFlags = new GitHubFeatureFlags( gitHubVersion, repositoryNwo, - path8.join(tempDir, FEATURE_FLAGS_FILE_NAME), + path4.join(tempDir, FEATURE_FLAGS_FILE_NAME), logger ); } @@ -89676,12 +83090,12 @@ var GitHubFeatureFlags = class { } async readLocalFlags() { try { - if (fs6.existsSync(this.featureFlagsFile)) { + if (fs4.existsSync(this.featureFlagsFile)) { this.logger.debug( `Loading feature flags from ${this.featureFlagsFile}` ); return JSON.parse( - fs6.readFileSync(this.featureFlagsFile, "utf8") + fs4.readFileSync(this.featureFlagsFile, "utf8") ); } } catch (e) { @@ -89694,7 +83108,7 @@ var GitHubFeatureFlags = class { async writeLocalFlags(flags) { try { this.logger.debug(`Writing feature flags to ${this.featureFlagsFile}`); - fs6.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); + fs4.writeFileSync(this.featureFlagsFile, JSON.stringify(flags)); } catch (e) { this.logger.warning( `Error writing cached feature flags file ${this.featureFlagsFile}: ${e}.` @@ -89761,8 +83175,8 @@ var os = __toESM(require("os")); var core9 = __toESM(require_core()); // src/config-utils.ts -var fs8 = __toESM(require("fs")); -var path10 = __toESM(require("path")); +var fs6 = __toESM(require("fs")); +var path6 = __toESM(require("path")); // src/caching-utils.ts var core8 = __toESM(require_core()); @@ -89778,18 +83192,18 @@ var PACK_IDENTIFIER_PATTERN = (function() { })(); // src/diff-informed-analysis-utils.ts -var fs7 = __toESM(require("fs")); -var path9 = __toESM(require("path")); +var fs5 = __toESM(require("fs")); +var path5 = __toESM(require("path")); function getDiffRangesJsonFilePath() { - return path9.join(getTemporaryDirectory(), "pr-diff-range.json"); + return path5.join(getTemporaryDirectory(), "pr-diff-range.json"); } function readDiffRangesJsonFile(logger) { const jsonFilePath = getDiffRangesJsonFilePath(); - if (!fs7.existsSync(jsonFilePath)) { + if (!fs5.existsSync(jsonFilePath)) { logger.debug(`Diff ranges JSON file does not exist at ${jsonFilePath}`); return void 0; } - const jsonContents = fs7.readFileSync(jsonFilePath, "utf8"); + const jsonContents = fs5.readFileSync(jsonFilePath, "utf8"); logger.debug( `Read pr-diff-range JSON file from ${jsonFilePath}: ${jsonContents}` @@ -89826,14 +83240,14 @@ var OVERLAY_ANALYSIS_CODE_SCANNING_FEATURES = { swift: "overlay_analysis_code_scanning_swift" /* OverlayAnalysisCodeScanningSwift */ }; function getPathToParsedConfigFile(tempDir) { - return path10.join(tempDir, "config"); + return path6.join(tempDir, "config"); } async function getConfig(tempDir, logger) { const configFile = getPathToParsedConfigFile(tempDir); - if (!fs8.existsSync(configFile)) { + if (!fs6.existsSync(configFile)) { return void 0; } - const configString = fs8.readFileSync(configFile, "utf8"); + const configString = fs6.readFileSync(configFile, "utf8"); logger.debug("Loaded config:"); logger.debug(configString); const config = JSON.parse(configString); @@ -90051,16 +83465,16 @@ async function sendStatusReport(statusReport) { } // src/upload-lib.ts -var fs14 = __toESM(require("fs")); -var path15 = __toESM(require("path")); +var fs12 = __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 jsonschema2 = __toESM(require_lib2()); // src/codeql.ts -var fs12 = __toESM(require("fs")); -var path13 = __toESM(require("path")); +var fs10 = __toESM(require("fs")); +var path9 = __toESM(require("path")); var core11 = __toESM(require_core()); var toolrunner3 = __toESM(require_toolrunner()); @@ -90305,8 +83719,8 @@ function wrapCliConfigurationError(cliError) { } // src/setup-codeql.ts -var fs11 = __toESM(require("fs")); -var path12 = __toESM(require("path")); +var fs9 = __toESM(require("fs")); +var path8 = __toESM(require("path")); var toolcache3 = __toESM(require_tool_cache()); var import_fast_deep_equal = __toESM(require_fast_deep_equal()); var semver7 = __toESM(require_semver2()); @@ -90367,7 +83781,7 @@ var v4_default = v4; // src/tar.ts var import_child_process = require("child_process"); -var fs9 = __toESM(require("fs")); +var fs7 = __toESM(require("fs")); var stream = __toESM(require("stream")); var import_toolrunner = __toESM(require_toolrunner()); var io4 = __toESM(require_io()); @@ -90440,7 +83854,7 @@ async function isZstdAvailable(logger) { } } async function extract(tarPath, dest, compressionMethod, tarVersion, logger) { - fs9.mkdirSync(dest, { recursive: true }); + fs7.mkdirSync(dest, { recursive: true }); switch (compressionMethod) { case "gzip": return await toolcache.extractTar(tarPath, dest); @@ -90524,9 +83938,9 @@ function inferCompressionMethod(tarPath) { } // src/tools-download.ts -var fs10 = __toESM(require("fs")); +var fs8 = __toESM(require("fs")); var os2 = __toESM(require("os")); -var path11 = __toESM(require("path")); +var path7 = __toESM(require("path")); var import_perf_hooks = require("perf_hooks"); var core10 = __toESM(require_core()); var import_http_client = __toESM(require_lib()); @@ -90631,7 +84045,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat }; } async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorization, headers, tarVersion, logger) { - fs10.mkdirSync(dest, { recursive: true }); + fs8.mkdirSync(dest, { recursive: true }); const agent = new import_http_client.HttpClient().getAgent(codeqlURL); headers = Object.assign( { "User-Agent": "CodeQL Action" }, @@ -90659,7 +84073,7 @@ async function downloadAndExtractZstdWithStreaming(codeqlURL, dest, authorizatio await extractTarZst(response, dest, tarVersion, logger); } function getToolcacheDirectory(version) { - return path11.join( + return path7.join( getRequiredEnvParam("RUNNER_TOOL_CACHE"), TOOLCACHE_TOOL_NAME, semver6.clean(version) || version, @@ -90668,7 +84082,7 @@ function getToolcacheDirectory(version) { } function writeToolcacheMarkerFile(extractedPath, logger) { const markerFilePath = `${extractedPath}.complete`; - fs10.writeFileSync(markerFilePath, ""); + fs8.writeFileSync(markerFilePath, ""); logger.info(`Created toolcache marker file ${markerFilePath}`); } function sanitizeUrlForStatusReport(url2) { @@ -90803,7 +84217,7 @@ async function findOverridingToolsInCache(humanReadableVersion, logger) { const candidates = toolcache3.findAllVersions("CodeQL").filter(isGoodVersion).map((version) => ({ folder: toolcache3.find("CodeQL", version), version - })).filter(({ folder }) => fs11.existsSync(path12.join(folder, "pinned-version"))); + })).filter(({ folder }) => fs9.existsSync(path8.join(folder, "pinned-version"))); if (candidates.length === 1) { const candidate = candidates[0]; logger.debug( @@ -91176,7 +84590,7 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) { ); } function getTempExtractionDir(tempDir) { - return path12.join(tempDir, v4_default()); + return path8.join(tempDir, v4_default()); } async function getNightlyToolsUrl(logger) { const zstdAvailability = await isZstdAvailable(logger); @@ -91264,7 +84678,7 @@ async function setupCodeQL(toolsInput, apiDetails, tempDir, variant, defaultCliV toolsDownloadStatusReport )}` ); - let codeqlCmd = path13.join(codeqlFolder, "codeql", "codeql"); + let codeqlCmd = path9.join(codeqlFolder, "codeql", "codeql"); if (process.platform === "win32") { codeqlCmd += ".exe"; } else if (process.platform !== "linux" && process.platform !== "darwin") { @@ -91326,12 +84740,12 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async isTracedLanguage(language) { const extractorPath = await this.resolveExtractor(language); - const tracingConfigPath = path13.join( + const tracingConfigPath = path9.join( extractorPath, "tools", "tracing-config.lua" ); - return fs12.existsSync(tracingConfigPath); + return fs10.existsSync(tracingConfigPath); }, async isScannedLanguage(language) { return !await this.isTracedLanguage(language); @@ -91402,7 +84816,7 @@ async function getCodeQLForCmd(cmd, checkVersion) { }, async runAutobuild(config, language) { applyAutobuildAzurePipelinesTimeoutFix(); - const autobuildCmd = path13.join( + const autobuildCmd = path9.join( await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh" @@ -91786,7 +85200,7 @@ async function writeCodeScanningConfigFile(config, logger) { logger.startGroup("Augmented user configuration file contents"); logger.info(dump(augmentedConfig)); logger.endGroup(); - fs12.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); + fs10.writeFileSync(codeScanningConfigFile, dump(augmentedConfig)); return codeScanningConfigFile; } var TRAP_CACHE_SIZE_MB = 1024; @@ -91809,7 +85223,7 @@ async function getTrapCachingExtractorConfigArgsForLang(config, language) { ]; } function getGeneratedCodeScanningConfigPath(config) { - return path13.resolve(config.tempDir, "user-config.yaml"); + return path9.resolve(config.tempDir, "user-config.yaml"); } function getExtractionVerbosityArguments(enableDebugLogging) { return enableDebugLogging ? [`--verbosity=${EXTRACTION_DEBUG_MODE_VERBOSITY}`] : []; @@ -91830,7 +85244,7 @@ async function getJobRunUuidSarifOptions(codeql) { } // src/fingerprints.ts -var fs13 = __toESM(require("fs")); +var fs11 = __toESM(require("fs")); var import_path = __toESM(require("path")); // node_modules/long/index.js @@ -92818,7 +86232,7 @@ async function hash(callback, filepath) { } updateHash(current); }; - const readStream = fs13.createReadStream(filepath, "utf8"); + const readStream = fs11.createReadStream(filepath, "utf8"); for await (const data of readStream) { for (let i = 0; i < data.length; ++i) { processCharacter(data.charCodeAt(i)); @@ -92893,11 +86307,11 @@ function resolveUriToFile(location, artifacts, sourceRoot, logger) { if (!import_path.default.isAbsolute(uri)) { uri = srcRootPrefix + uri; } - if (!fs13.existsSync(uri)) { + if (!fs11.existsSync(uri)) { logger.debug(`Unable to compute fingerprint for non-existent file: ${uri}`); return void 0; } - if (fs13.statSync(uri).isDirectory()) { + if (fs11.statSync(uri).isDirectory()) { logger.debug(`Unable to compute fingerprint for directory: ${uri}`); return void 0; } @@ -92995,7 +86409,7 @@ function combineSarifFiles(sarifFiles, logger) { for (const sarifFile of sarifFiles) { logger.debug(`Loading SARIF file: ${sarifFile}`); const sarifObject = JSON.parse( - fs14.readFileSync(sarifFile, "utf8") + fs12.readFileSync(sarifFile, "utf8") ); if (combinedSarif.version === null) { combinedSarif.version = sarifObject.version; @@ -93067,7 +86481,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(fs12.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"; @@ -93120,14 +86534,14 @@ async function combineSarifFilesUsingCLI(sarifFiles, gitHubVersion, features, lo ); codeQL = initCodeQLResult.codeql; } - 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"); + const baseTempDir = path11.resolve(tempDir, "combined-sarif"); + fs12.mkdirSync(baseTempDir, { recursive: true }); + const outputDirectory = fs12.mkdtempSync(path11.resolve(baseTempDir, "output-")); + const outputFile = path11.resolve(outputDirectory, "combined-sarif.sarif"); await codeQL.mergeResults(sarifFiles, outputFile, { mergeRunsFromEqualCategory: true }); - return JSON.parse(fs14.readFileSync(outputFile, "utf8")); + return JSON.parse(fs12.readFileSync(outputFile, "utf8")); } function populateRunAutomationDetails(sarif, category, analysis_key, environment) { const automationID = getAutomationID2(category, analysis_key, environment); @@ -93156,7 +86570,7 @@ function getAutomationID2(category, analysis_key, environment) { async function uploadPayload(payload, repositoryNwo, logger, analysis) { logger.info("Uploading results"); if (shouldSkipSarifUpload()) { - const payloadSaveFile = path15.join( + const payloadSaveFile = path11.join( getTemporaryDirectory(), `payload-${analysis.kind}.json` ); @@ -93164,7 +86578,7 @@ async function uploadPayload(payload, repositoryNwo, logger, analysis) { `SARIF upload disabled by an environment variable. Saving to ${payloadSaveFile}` ); logger.info(`Payload: ${JSON.stringify(payload, null, 2)}`); - fs14.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); + fs12.writeFileSync(payloadSaveFile, JSON.stringify(payload, null, 2)); return "dummy-sarif-id"; } const client = getApiClient(); @@ -93198,12 +86612,12 @@ async function uploadPayload(payload, repositoryNwo, logger, analysis) { function findSarifFilesInDir(sarifPath, isSarif) { const sarifFiles = []; const walkSarifFiles = (dir) => { - const entries = fs14.readdirSync(dir, { withFileTypes: true }); + const entries = fs12.readdirSync(dir, { withFileTypes: true }); for (const entry of entries) { if (entry.isFile() && isSarif(entry.name)) { - sarifFiles.push(path15.resolve(dir, entry.name)); + sarifFiles.push(path11.resolve(dir, entry.name)); } else if (entry.isDirectory()) { - walkSarifFiles(path15.resolve(dir, entry.name)); + walkSarifFiles(path11.resolve(dir, entry.name)); } } }; @@ -93211,7 +86625,7 @@ function findSarifFilesInDir(sarifPath, isSarif) { return sarifFiles; } async function getGroupedSarifFilePaths(logger, sarifPath) { - const stats = fs14.statSync(sarifPath, { throwIfNoEntry: false }); + const stats = fs12.statSync(sarifPath, { throwIfNoEntry: false }); if (stats === void 0) { throw new ConfigurationError(`Path does not exist: ${sarifPath}`); } @@ -93219,7 +86633,7 @@ async function getGroupedSarifFilePaths(logger, sarifPath) { if (stats.isDirectory()) { let unassignedSarifFiles = findSarifFilesInDir( sarifPath, - (name) => path15.extname(name) === ".sarif" + (name) => path11.extname(name) === ".sarif" ); logger.debug( `Found the following .sarif files in ${sarifPath}: ${unassignedSarifFiles.join(", ")}` @@ -93276,7 +86690,7 @@ function countResultsInSarif(sarif) { } function readSarifFile(sarifFilePath) { try { - return JSON.parse(fs14.readFileSync(sarifFilePath, "utf8")); + return JSON.parse(fs12.readFileSync(sarifFilePath, "utf8")); } catch (e) { throw new InvalidSarifUploadError( `Invalid SARIF. JSON syntax error: ${getErrorMessage(e)}` @@ -93345,7 +86759,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") + fs12.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; @@ -93447,19 +86861,19 @@ async function uploadPostProcessedFiles(logger, checkoutPath, uploadTarget, post }; } function dumpSarifFile(sarifPayload, outputDir, logger, uploadTarget) { - if (!fs14.existsSync(outputDir)) { - fs14.mkdirSync(outputDir, { recursive: true }); - } else if (!fs14.lstatSync(outputDir).isDirectory()) { + if (!fs12.existsSync(outputDir)) { + fs12.mkdirSync(outputDir, { recursive: true }); + } else if (!fs12.lstatSync(outputDir).isDirectory()) { throw new ConfigurationError( `The path that processed SARIF files should be written to exists, but is not a directory: ${outputDir}` ); } - const outputFile = path15.resolve( + const outputFile = path11.resolve( outputDir, `upload${uploadTarget.sarifExtension}` ); logger.info(`Writing processed SARIF file to ${outputFile}`); - fs14.writeFileSync(outputFile, sarifPayload); + fs12.writeFileSync(outputFile, sarifPayload); } var STATUS_CHECK_FREQUENCY_MILLISECONDS = 5 * 1e3; var STATUS_CHECK_TIMEOUT_MILLISECONDS = 2 * 60 * 1e3; @@ -93602,7 +87016,7 @@ function filterAlertsByDiffRange(logger, sarif) { if (!locationUri || locationStartLine === void 0) { return false; } - const locationPath = path15.join(checkoutPath, locationUri).replaceAll(path15.sep, "/"); + const locationPath = path11.join(checkoutPath, locationUri).replaceAll(path11.sep, "/"); return diffRanges.some( (range) => range.path === locationPath && (range.startLine <= locationStartLine && range.endLine >= locationStartLine || range.startLine === 0 && range.endLine === 0) ); @@ -93771,52 +87185,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/package-lock.json b/package-lock.json index 75b8a361a3..c331455486 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,6 @@ "archiver": "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.1", - "del": "^8.0.0", "fast-deep-equal": "^3.1.3", "follow-redirects": "^1.15.11", "get-folder-size": "^5.0.0", @@ -1581,6 +1580,7 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", @@ -1592,6 +1592,7 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", + "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -1599,6 +1600,7 @@ }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", @@ -4078,6 +4080,7 @@ }, "node_modules/braces": { "version": "3.0.3", + "dev": true, "license": "MIT", "dependencies": { "fill-range": "^7.1.1" @@ -4674,38 +4677,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/del": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-8.0.0.tgz", - "integrity": "sha512-R6ep6JJ+eOBZsBr9esiNN1gxFbZE4Q2cULkUSFumGYecAiS6qodDvcPx/sFuWHMNul7DWmrtoEOpYSm7o6tbSA==", - "license": "MIT", - "dependencies": { - "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": ">=18" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "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": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/delayed-stream": { "version": "1.0.0", "license": "MIT", @@ -5757,6 +5728,7 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -5802,6 +5774,7 @@ }, "node_modules/fastq": { "version": "1.8.0", + "dev": true, "license": "ISC", "dependencies": { "reusify": "^1.0.4" @@ -5841,6 +5814,7 @@ }, "node_modules/fill-range": { "version": "7.1.1", + "dev": true, "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" @@ -6117,6 +6091,7 @@ }, "node_modules/glob-parent": { "version": "5.1.2", + "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.1" @@ -6173,6 +6148,7 @@ "version": "14.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-14.1.0.tgz", "integrity": "sha512-0Ia46fDOaT7k4og1PDW4YbodWWr3scS2vAr2lTbsplOt2WkKp0vQbkI9wKis/T5LV/dqPjO3bpS/z6GTJB82LA==", + "dev": true, "license": "MIT", "dependencies": { "@sindresorhus/merge-streams": "^2.1.0", @@ -6193,6 +6169,7 @@ "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, "license": "MIT", "engines": { "node": ">=18" @@ -6205,6 +6182,7 @@ "version": "7.0.5", "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, "license": "MIT", "engines": { "node": ">= 4" @@ -6566,6 +6544,7 @@ }, "node_modules/is-extglob": { "version": "2.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6580,6 +6559,7 @@ }, "node_modules/is-glob": { "version": "4.0.3", + "dev": true, "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" @@ -6609,6 +6589,7 @@ }, "node_modules/is-number": { "version": "7.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.12.0" @@ -6628,18 +6609,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-path-cwd": { - "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": "^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, @@ -7096,6 +7065,7 @@ }, "node_modules/merge2": { "version": "1.4.1", + "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -7105,6 +7075,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" @@ -7589,6 +7560,7 @@ "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" }, @@ -7682,6 +7654,7 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-6.0.0.tgz", "integrity": "sha512-Vj7sf++t5pBD637NSfkxpHSMfWaeig5+DKWLhcqIYx6mWQz5hdJTGDVMQiJcw1ZYkhs7AazKDGpRVji1LJCZUQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=18" @@ -7699,6 +7672,7 @@ }, "node_modules/picomatch": { "version": "2.3.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8.6" @@ -7814,6 +7788,7 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", + "dev": true, "funding": [ { "type": "github", @@ -7966,6 +7941,7 @@ }, "node_modules/reusify": { "version": "1.0.4", + "dev": true, "license": "MIT", "engines": { "iojs": ">=1.0.0", @@ -8007,6 +7983,7 @@ }, "node_modules/run-parallel": { "version": "1.2.0", + "dev": true, "funding": [ { "type": "github", @@ -8218,6 +8195,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true, "license": "MIT", "engines": { "node": ">=14.16" @@ -8738,6 +8716,7 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", + "dev": true, "license": "MIT", "dependencies": { "is-number": "^7.0.0" @@ -9070,6 +9049,7 @@ "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 c7ef02b47a..e9e03b31ce 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "archiver": "^7.0.1", "check-disk-space": "^3.4.0", "console-log-level": "^1.4.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 4e5b31ec3f..f09aa9c89b 100644 --- a/src/analyze.ts +++ b/src/analyze.ts @@ -3,7 +3,6 @@ import * as path from "path"; import { performance } from "perf_hooks"; import * as io from "@actions/io"; -import * as del from "del"; import * as yaml from "js-yaml"; import { getTemporaryDirectory, PullRequestBranches } from "./actions-util"; @@ -671,7 +670,7 @@ export async function runFinalize( logger: Logger, ): Promise { try { - await del.deleteAsync(outputDir, { force: true }); + await fs.promises.rm(outputDir, { force: true, recursive: true }); } catch (error: any) { if (error?.code !== "ENOENT") { throw error; diff --git a/src/codeql.test.ts b/src/codeql.test.ts index 3a259a8eca..6730f8d8bb 100644 --- a/src/codeql.test.ts +++ b/src/codeql.test.ts @@ -5,7 +5,6 @@ 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 * as del from "del"; import * as yaml from "js-yaml"; import nock from "nock"; import * as sinon from "sinon"; @@ -557,7 +556,7 @@ const injectedConfigMacro = test.macro({ const augmentedConfig = yaml.load(fs.readFileSync(configFile, "utf8")); t.deepEqual(augmentedConfig, expectedConfig); - await del.deleteAsync(configFile, { force: true }); + await fs.promises.rm(configFile, { force: true }); }); }, @@ -1046,7 +1045,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.deleteAsync(configFile, { force: true }); + await fs.promises.rm(configFile, { force: true }); }); export function stubToolRunnerConstructor( diff --git a/src/debug-artifacts.ts b/src/debug-artifacts.ts index 90e493d680..b8197af37e 100644 --- a/src/debug-artifacts.ts +++ b/src/debug-artifacts.ts @@ -5,7 +5,6 @@ import * as artifact from "@actions/artifact"; import * as artifactLegacy from "@actions/artifact-legacy"; import * as core from "@actions/core"; import archiver from "archiver"; -import * as del from "del"; import { getOptionalInput, getTemporaryDirectory } from "./actions-util"; import { dbIsFinalized } from "./analyze"; @@ -345,7 +344,7 @@ async function createPartialDatabaseBundle( ); // See `bundleDb` for explanation behind deleting existing db bundle. if (fs.existsSync(databaseBundlePath)) { - await del.deleteAsync(databaseBundlePath, { force: true }); + await fs.promises.rm(databaseBundlePath, { force: true }); } const output = fs.createWriteStream(databaseBundlePath); const zip = archiver("zip"); diff --git a/src/util.ts b/src/util.ts index 6aa8e7d9a3..8defde9ac2 100644 --- a/src/util.ts +++ b/src/util.ts @@ -6,7 +6,6 @@ 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 * as del from "del"; import getFolderSize from "get-folder-size"; import * as yaml from "js-yaml"; import * as semver from "semver"; @@ -167,7 +166,7 @@ export async function withTmpDir( ): Promise { const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "codeql-action-")); const result = await body(tmpDir); - await del.deleteAsync(tmpDir, { force: true }); + await fs.promises.rm(tmpDir, { force: true, recursive: true }); return result; } @@ -756,7 +755,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.deleteAsync(databaseBundlePath, { force: true }); + await fs.promises.rm(databaseBundlePath, { force: true }); } await codeql.databaseBundle(databasePath, databaseBundlePath, dbName); return databaseBundlePath; @@ -1266,16 +1265,10 @@ export async function checkSipEnablement( export async function cleanUpGlob(glob: string, name: string, logger: Logger) { logger.debug(`Cleaning up ${name}.`); try { - const deletedPaths = await del.deleteAsync(glob, { force: true }); - if (deletedPaths.length === 0) { - logger.warning( - `Failed to clean up ${name}: no files found matching ${glob}.`, - ); - } else if (deletedPaths.length === 1) { - logger.debug(`Cleaned up ${name}.`); - } else { - logger.debug(`Cleaned up ${name} (${deletedPaths.length} files).`); - } + await fs.promises.rm(glob, { + force: true, + recursive: true, + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } From d84f470a9ab95e1bc53beef7405f73c48959c804 Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Tue, 28 Oct 2025 13:06:14 +0000 Subject: [PATCH 2/2] Improve method naming --- lib/analyze-action.js | 10 +++++----- lib/init-action-post.js | 10 +++++----- lib/init-action.js | 10 +++++----- lib/setup-codeql-action.js | 10 +++++----- lib/upload-lib.js | 10 +++++----- lib/upload-sarif-action.js | 10 +++++----- src/tar.ts | 4 ++-- src/tools-download.ts | 6 +++--- src/util.ts | 4 ++-- 9 files changed, 37 insertions(+), 37 deletions(-) diff --git a/lib/analyze-action.js b/lib/analyze-action.js index f12d73777e..1ba59615e1 100644 --- a/lib/analyze-action.js +++ b/lib/analyze-action.js @@ -83381,10 +83381,10 @@ async function checkSipEnablement(logger) { return void 0; } } -async function cleanUpGlob(glob2, name, logger) { +async function cleanUpPath(file, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - await fs.promises.rm(glob2, { + await fs.promises.rm(file, { force: true, recursive: true }); @@ -85564,7 +85564,7 @@ async function extractTarZst(tar, dest, tarVersion, logger) { }); }); } catch (e) { - await cleanUpGlob(dest, "extraction destination directory", logger); + await cleanUpPath(dest, "extraction destination directory", logger); throw e; } } @@ -85644,7 +85644,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}` ); core9.warning(`Falling back to downloading the bundle before extracting.`); - await cleanUpGlob(dest, "CodeQL bundle", logger); + await cleanUpPath(dest, "CodeQL bundle", logger); } const toolsDownloadStart = import_perf_hooks.performance.now(); const archivedBundlePath = await toolcache2.downloadTool( @@ -85677,7 +85677,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat )}).` ); } finally { - await cleanUpGlob(archivedBundlePath, "CodeQL bundle archive", logger); + await cleanUpPath(archivedBundlePath, "CodeQL bundle archive", logger); } return { compressionMethod, diff --git a/lib/init-action-post.js b/lib/init-action-post.js index 23fdb2c60b..fcccf61a4f 100644 --- a/lib/init-action-post.js +++ b/lib/init-action-post.js @@ -121643,10 +121643,10 @@ async function checkSipEnablement(logger) { return void 0; } } -async function cleanUpGlob(glob2, name, logger) { +async function cleanUpPath(file, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - await fs.promises.rm(glob2, { + await fs.promises.rm(file, { force: true, recursive: true }); @@ -123406,7 +123406,7 @@ async function extractTarZst(tar, dest, tarVersion, logger) { }); }); } catch (e) { - await cleanUpGlob(dest, "extraction destination directory", logger); + await cleanUpPath(dest, "extraction destination directory", logger); throw e; } } @@ -123486,7 +123486,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}` ); core9.warning(`Falling back to downloading the bundle before extracting.`); - await cleanUpGlob(dest, "CodeQL bundle", logger); + await cleanUpPath(dest, "CodeQL bundle", logger); } const toolsDownloadStart = import_perf_hooks.performance.now(); const archivedBundlePath = await toolcache2.downloadTool( @@ -123519,7 +123519,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat )}).` ); } finally { - await cleanUpGlob(archivedBundlePath, "CodeQL bundle archive", logger); + await cleanUpPath(archivedBundlePath, "CodeQL bundle archive", logger); } return { compressionMethod, diff --git a/lib/init-action.js b/lib/init-action.js index 9a3a5e15d1..bacce8851b 100644 --- a/lib/init-action.js +++ b/lib/init-action.js @@ -80702,10 +80702,10 @@ async function checkSipEnablement(logger) { return void 0; } } -async function cleanUpGlob(glob2, name, logger) { +async function cleanUpPath(file, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - await fs.promises.rm(glob2, { + await fs.promises.rm(file, { force: true, recursive: true }); @@ -83728,7 +83728,7 @@ async function extractTarZst(tar, dest, tarVersion, logger) { }); }); } catch (e) { - await cleanUpGlob(dest, "extraction destination directory", logger); + await cleanUpPath(dest, "extraction destination directory", logger); throw e; } } @@ -83808,7 +83808,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}` ); core9.warning(`Falling back to downloading the bundle before extracting.`); - await cleanUpGlob(dest, "CodeQL bundle", logger); + await cleanUpPath(dest, "CodeQL bundle", logger); } const toolsDownloadStart = import_perf_hooks2.performance.now(); const archivedBundlePath = await toolcache2.downloadTool( @@ -83841,7 +83841,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat )}).` ); } finally { - await cleanUpGlob(archivedBundlePath, "CodeQL bundle archive", logger); + await cleanUpPath(archivedBundlePath, "CodeQL bundle archive", logger); } return { compressionMethod, diff --git a/lib/setup-codeql-action.js b/lib/setup-codeql-action.js index 83046fe048..5c238534ee 100644 --- a/lib/setup-codeql-action.js +++ b/lib/setup-codeql-action.js @@ -79199,10 +79199,10 @@ async function checkSipEnablement(logger) { return void 0; } } -async function cleanUpGlob(glob, name, logger) { +async function cleanUpPath(file, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - await fs.promises.rm(glob, { + await fs.promises.rm(file, { force: true, recursive: true }); @@ -80686,7 +80686,7 @@ async function extractTarZst(tar, dest, tarVersion, logger) { }); }); } catch (e) { - await cleanUpGlob(dest, "extraction destination directory", logger); + await cleanUpPath(dest, "extraction destination directory", logger); throw e; } } @@ -80766,7 +80766,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}` ); core9.warning(`Falling back to downloading the bundle before extracting.`); - await cleanUpGlob(dest, "CodeQL bundle", logger); + await cleanUpPath(dest, "CodeQL bundle", logger); } const toolsDownloadStart = import_perf_hooks.performance.now(); const archivedBundlePath = await toolcache2.downloadTool( @@ -80799,7 +80799,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat )}).` ); } finally { - await cleanUpGlob(archivedBundlePath, "CodeQL bundle archive", logger); + await cleanUpPath(archivedBundlePath, "CodeQL bundle archive", logger); } return { compressionMethod, diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 857527793c..1b248a9608 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -81841,10 +81841,10 @@ function satisfiesGHESVersion(ghesVersion, range, defaultIfInvalid) { function cloneObject(obj) { return JSON.parse(JSON.stringify(obj)); } -async function cleanUpGlob(glob, name, logger) { +async function cleanUpPath(file, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - await fs.promises.rm(glob, { + await fs.promises.rm(file, { force: true, recursive: true }); @@ -83247,7 +83247,7 @@ async function extractTarZst(tar, dest, tarVersion, logger) { }); }); } catch (e) { - await cleanUpGlob(dest, "extraction destination directory", logger); + await cleanUpPath(dest, "extraction destination directory", logger); throw e; } } @@ -83327,7 +83327,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}` ); core9.warning(`Falling back to downloading the bundle before extracting.`); - await cleanUpGlob(dest, "CodeQL bundle", logger); + await cleanUpPath(dest, "CodeQL bundle", logger); } const toolsDownloadStart = import_perf_hooks.performance.now(); const archivedBundlePath = await toolcache2.downloadTool( @@ -83360,7 +83360,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat )}).` ); } finally { - await cleanUpGlob(archivedBundlePath, "CodeQL bundle archive", logger); + await cleanUpPath(archivedBundlePath, "CodeQL bundle archive", logger); } return { compressionMethod, diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 313f8b1702..75c785dc7e 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -82027,10 +82027,10 @@ async function checkSipEnablement(logger) { return void 0; } } -async function cleanUpGlob(glob, name, logger) { +async function cleanUpPath(file, name, logger) { logger.debug(`Cleaning up ${name}.`); try { - await fs.promises.rm(glob, { + await fs.promises.rm(file, { force: true, recursive: true }); @@ -83920,7 +83920,7 @@ async function extractTarZst(tar, dest, tarVersion, logger) { }); }); } catch (e) { - await cleanUpGlob(dest, "extraction destination directory", logger); + await cleanUpPath(dest, "extraction destination directory", logger); throw e; } } @@ -84000,7 +84000,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat `Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}` ); core10.warning(`Falling back to downloading the bundle before extracting.`); - await cleanUpGlob(dest, "CodeQL bundle", logger); + await cleanUpPath(dest, "CodeQL bundle", logger); } const toolsDownloadStart = import_perf_hooks.performance.now(); const archivedBundlePath = await toolcache2.downloadTool( @@ -84033,7 +84033,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat )}).` ); } finally { - await cleanUpGlob(archivedBundlePath, "CodeQL bundle archive", logger); + await cleanUpPath(archivedBundlePath, "CodeQL bundle archive", logger); } return { compressionMethod, diff --git a/src/tar.ts b/src/tar.ts index 93e9a05548..723716b016 100644 --- a/src/tar.ts +++ b/src/tar.ts @@ -9,7 +9,7 @@ import * as semver from "semver"; import { CommandInvocationError } from "./actions-util"; import { Logger } from "./logging"; -import { assertNever, cleanUpGlob, isBinaryAccessible } from "./util"; +import { assertNever, cleanUpPath, isBinaryAccessible } from "./util"; const MIN_REQUIRED_BSD_TAR_VERSION = "3.4.3"; const MIN_REQUIRED_GNU_TAR_VERSION = "1.31"; @@ -217,7 +217,7 @@ export async function extractTarZst( }); }); } catch (e) { - await cleanUpGlob(dest, "extraction destination directory", logger); + await cleanUpPath(dest, "extraction destination directory", logger); throw e; } } diff --git a/src/tools-download.ts b/src/tools-download.ts index 5d47440edd..4cfba397e9 100644 --- a/src/tools-download.ts +++ b/src/tools-download.ts @@ -12,7 +12,7 @@ import * as semver from "semver"; import { formatDuration, Logger } from "./logging"; import * as tar from "./tar"; -import { cleanUpGlob, getErrorMessage, getRequiredEnvParam } from "./util"; +import { cleanUpPath, getErrorMessage, getRequiredEnvParam } from "./util"; /** * High watermark to use when streaming the download and extraction of the CodeQL tools. @@ -130,7 +130,7 @@ export async function downloadAndExtract( // If we failed during processing, we want to clean up the destination directory // before we try again. - await cleanUpGlob(dest, "CodeQL bundle", logger); + await cleanUpPath(dest, "CodeQL bundle", logger); } const toolsDownloadStart = performance.now(); @@ -167,7 +167,7 @@ export async function downloadAndExtract( )}).`, ); } finally { - await cleanUpGlob(archivedBundlePath, "CodeQL bundle archive", logger); + await cleanUpPath(archivedBundlePath, "CodeQL bundle archive", logger); } return { diff --git a/src/util.ts b/src/util.ts index 8defde9ac2..7caee46a09 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1262,10 +1262,10 @@ export async function checkSipEnablement( } } -export async function cleanUpGlob(glob: string, name: string, logger: Logger) { +export async function cleanUpPath(file: string, name: string, logger: Logger) { logger.debug(`Cleaning up ${name}.`); try { - await fs.promises.rm(glob, { + await fs.promises.rm(file, { force: true, recursive: true, });