diff --git a/lib/analyze-action-post.js b/lib/analyze-action-post.js index 358c33c10c..299808b693 100644 --- a/lib/analyze-action-post.js +++ b/lib/analyze-action-post.js @@ -26507,7 +26507,6 @@ var require_package = __commonJS({ "@schemastore/package": "0.0.10", archiver: "^7.0.1", "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", @@ -26728,7 +26727,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); @@ -26739,7 +26738,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; @@ -26762,7 +26761,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) { @@ -91363,7 +91362,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; @@ -91441,21 +91440,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; @@ -91474,7 +91473,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; @@ -91494,13 +91493,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; @@ -91523,7 +91522,7 @@ var require_ours = __commonJS({ configurable: true, enumerable: true, get() { - return promises2; + return promises3; } }); module2.exports.Stream = CustomStream.Stream; @@ -97754,14 +97753,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 065802bfda..425667dcfe 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: 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: 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; @@ -20530,12 +20530,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 }); @@ -20546,7 +20546,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; @@ -21760,16 +21760,16 @@ var require_dist_node11 = __commonJS({ var import_graphql = require_dist_node9(); var import_auth_token = require_dist_node10(); var VERSION = "5.2.2"; - var noop2 = () => { + var noop = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); function createLogger(logger = {}) { if (typeof logger.debug !== "function") { - logger.debug = noop2; + logger.debug = noop; } if (typeof logger.info !== "function") { - logger.info = noop2; + logger.info = noop; } if (typeof logger.warn !== "function") { logger.warn = consoleWarn; @@ -24533,5857 +24533,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 release2(obj) { - tail.next = obj; - tail = obj; - } - return { - get, - release: release2 - }; - } - 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++; - release2(); - } - } - function idle() { - return _running === 0 && self2.length() === 0; - } - function push(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release2; - 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 = release2; - 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 release2(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"; @@ -30432,7 +24583,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 = []; @@ -30561,7 +24712,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(); @@ -30836,7 +24987,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(); @@ -30861,7 +25012,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; @@ -30874,7 +25025,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; @@ -30911,7 +25062,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); @@ -30985,7 +25136,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; @@ -31173,7 +25324,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) { @@ -31409,7 +25560,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) => { @@ -32222,10 +26373,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(); @@ -32356,7 +26507,6 @@ var require_package = __commonJS({ "@schemastore/package": "0.0.10", archiver: "^7.0.1", "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", @@ -32577,7 +26727,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); @@ -32588,7 +26738,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; @@ -32611,7 +26761,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) { @@ -33512,18 +27662,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(); } @@ -33950,7 +28100,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 || {}; @@ -33960,7 +28110,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; @@ -33998,14 +28148,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; @@ -34096,16 +28246,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; @@ -34114,10 +28264,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; } @@ -34982,7 +29132,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"); @@ -35056,7 +29206,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; @@ -35281,8 +29431,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); @@ -35378,7 +29528,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) { @@ -35386,7 +29536,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); } @@ -35424,7 +29574,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; } @@ -35462,10 +29612,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)) { @@ -35798,7 +29948,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) { @@ -35806,7 +29956,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 = { @@ -35895,8 +30045,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 = []; @@ -36265,8 +30415,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); @@ -36398,7 +30548,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"; @@ -36413,12 +30563,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); @@ -36436,7 +30586,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); } } @@ -36447,12 +30597,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]; } @@ -36496,7 +30646,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(); @@ -36525,7 +30675,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 === "")); @@ -36549,8 +30699,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); @@ -36585,9 +30735,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}'`); @@ -36671,8 +30821,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; } }; @@ -36792,9 +30942,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(); @@ -36844,7 +30994,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; @@ -36875,7 +31025,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); @@ -36910,7 +31060,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) { @@ -36922,10 +31072,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(); } @@ -38143,7 +32293,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 }); @@ -38259,11 +32409,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* () { @@ -38280,16 +32430,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) { @@ -38306,7 +32456,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("."); @@ -38329,7 +32479,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; @@ -38374,7 +32524,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"); @@ -38941,7 +33091,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 }); @@ -39103,7 +33253,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; } }); @@ -39880,13 +34030,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) { @@ -39901,7 +34051,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 }); @@ -39919,7 +34069,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) { @@ -40448,7 +34598,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 }) { @@ -40545,7 +34695,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; @@ -40854,7 +35004,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; @@ -41188,7 +35338,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 { @@ -41476,7 +35626,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; @@ -42547,7 +36697,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(); @@ -43064,7 +37214,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; @@ -43086,7 +37236,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; @@ -43111,7 +37261,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; @@ -44863,7 +39013,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 }); @@ -44938,7 +39088,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; @@ -46212,15 +40362,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); @@ -46268,9 +40418,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; } @@ -46416,7 +40566,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(); @@ -50147,7 +44297,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) { @@ -50170,7 +44320,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 { @@ -50419,10 +44569,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) { @@ -50507,9 +44657,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) { @@ -51590,9 +45740,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) { @@ -51885,9 +46035,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) { @@ -71189,8 +65339,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}'`); } } @@ -71250,8 +65400,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; @@ -73848,7 +67998,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; @@ -74018,11 +68168,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) { @@ -74129,7 +68279,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); @@ -74155,7 +68305,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 @@ -74272,7 +68422,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(); @@ -74290,12 +68440,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); } } }); @@ -74594,7 +68744,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(); @@ -74732,7 +68882,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); @@ -74746,7 +68896,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, @@ -74757,7 +68907,7 @@ Other caches with similar key:`); } }))); } finally { - fs20.closeSync(fd); + fs17.closeSync(fd); } return; }); @@ -80001,9 +74151,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* () { @@ -80047,13 +74197,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) { @@ -80099,7 +74249,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" @@ -80108,7 +74258,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"]; @@ -80123,7 +74273,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", @@ -80132,7 +74282,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: @@ -80172,7 +74322,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); }); @@ -80242,7 +74392,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()); @@ -80339,7 +74489,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()) { @@ -80408,7 +74558,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); @@ -80471,7 +74621,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); @@ -80535,7 +74685,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); @@ -80673,7 +74823,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(); @@ -80737,10 +74887,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; } @@ -80917,10 +75067,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")); @@ -80941,8 +75091,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; @@ -80964,7 +75114,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, [], { @@ -80988,7 +75138,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; @@ -81029,7 +75179,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}'`; @@ -81200,12 +75350,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); @@ -81219,11 +75369,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); @@ -81247,9 +75397,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 { @@ -81262,13 +75412,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); } } @@ -81322,7 +75472,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; @@ -81330,7 +75480,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); @@ -81340,9 +75490,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) { @@ -81519,7 +75669,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); @@ -81848,7 +75998,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop2() { + function noop() { } function parseUrl(input) { var parsed; @@ -81924,7 +76074,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) { @@ -82055,7 +76205,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) { @@ -82063,7 +76213,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); } @@ -82101,7 +76251,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; } @@ -82139,10 +76289,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)) { @@ -82293,7 +76443,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"; @@ -82308,12 +76458,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); @@ -82331,7 +76481,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); } } @@ -82342,12 +76492,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]; } @@ -82395,7 +76545,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(); @@ -82424,7 +76574,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 === "")); @@ -82448,8 +76598,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); @@ -82484,9 +76634,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}'`); @@ -82570,8 +76720,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; } }; @@ -82695,9 +76845,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(); @@ -82749,7 +76899,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; @@ -82773,7 +76923,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()) { @@ -82783,7 +76933,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); @@ -82818,7 +76968,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) { @@ -82830,10 +76980,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(); } @@ -82932,10 +77082,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; @@ -82951,17 +77101,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) { @@ -85948,786 +80098,55 @@ __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 fsPromises4 = __toESM(require("fs/promises")); +var fs = __toESM(require("fs")); +var fsPromises = __toESM(require("fs/promises")); 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()); -// 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(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_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 path20 = isNegativePattern(filePath) ? filePath.slice(1) : filePath; - return import_node_path2.default.isAbsolute(path20) ? path20 : import_node_path2.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_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 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_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 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_path6.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path.join)(itemPath, directoryItem)) ) ); } @@ -89422,13 +82841,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.` @@ -89508,13 +82927,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( @@ -89534,14 +82953,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; } @@ -89563,10 +82982,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", @@ -89669,9 +83088,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; @@ -89715,15 +83134,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(); } @@ -89754,7 +83173,7 @@ function getErrorMessage(error2) { } async function checkDiskUsage(logger) { try { - const diskUsage = await fsPromises4.statfs( + const diskUsage = await fsPromises.statfs( getRequiredEnvParam("GITHUB_WORKSPACE") ); const blockSizeInBytes = diskUsage.bsize; @@ -89805,19 +83224,13 @@ function satisfiesGHESVersion(ghesVersion, range, defaultIfInvalid) { function cloneObject(obj) { return JSON.parse(JSON.stringify(obj)); } -async function cleanUpGlob(glob2, name, logger) { +async function cleanUpPath(file, 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(file, { + force: true, + recursive: true + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } @@ -89867,17 +83280,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}` @@ -90089,8 +83502,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()); @@ -90277,8 +83690,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()); @@ -90523,8 +83936,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()); @@ -90549,12 +83962,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 @@ -90563,8 +83976,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 @@ -90690,8 +84103,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}`); } @@ -90797,12 +84210,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" ); @@ -90815,7 +84228,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); @@ -90825,14 +84238,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) { @@ -90854,7 +84267,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` ); @@ -91177,7 +84590,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 ); } @@ -91356,12 +84769,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) { @@ -91374,7 +84787,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}.` @@ -91454,12 +84867,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}` @@ -91467,11 +84880,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}` @@ -91534,7 +84947,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 []; @@ -91738,14 +85151,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); @@ -91793,8 +85206,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()); @@ -91855,7 +85268,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()); @@ -91928,7 +85341,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); @@ -91994,7 +85407,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; } } @@ -92012,9 +85425,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()); @@ -92074,7 +85487,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( @@ -92107,7 +85520,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, @@ -92119,7 +85532,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" }, @@ -92147,7 +85560,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, @@ -92156,7 +85569,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) { @@ -92291,7 +85704,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( @@ -92664,7 +86077,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); @@ -92712,8 +86125,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; @@ -92728,18 +86141,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) { @@ -92785,7 +86198,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") { @@ -92847,12 +86260,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); @@ -92923,7 +86336,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" @@ -93307,7 +86720,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; @@ -93330,7 +86743,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}`] : []; @@ -93618,7 +87031,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 { @@ -93684,10 +87097,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 @@ -93719,8 +87132,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}` @@ -93840,7 +87253,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) ); @@ -93870,7 +87283,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) { @@ -93888,13 +87301,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, @@ -93937,7 +87350,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."); @@ -93974,8 +87387,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") ); @@ -94189,15 +87602,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 @@ -95185,7 +88598,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)); @@ -95260,11 +88673,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; } @@ -95362,7 +88775,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; @@ -95434,7 +88847,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"; @@ -95487,14 +88900,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); @@ -95523,7 +88936,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` ); @@ -95531,7 +88944,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(); @@ -95565,12 +88978,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)); } } }; @@ -95578,11 +88991,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( @@ -95595,7 +89008,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}`); } @@ -95603,7 +89016,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(", ")}` @@ -95660,7 +89073,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)}` @@ -95729,7 +89142,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; @@ -95861,19 +89274,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; @@ -96016,7 +89429,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) ); @@ -96108,7 +89521,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", @@ -96436,52 +89849,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 9ca39ca4b5..2861d45d7b 100644 --- a/lib/autobuild-action.js +++ b/lib/autobuild-action.js @@ -26507,7 +26507,6 @@ var require_package = __commonJS({ "@schemastore/package": "0.0.10", archiver: "^7.0.1", "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 0ddf6651e3..44301891d0 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: 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: 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; @@ -20530,12 +20530,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 }); @@ -20546,7 +20546,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; @@ -21760,16 +21760,16 @@ var require_dist_node11 = __commonJS({ var import_graphql = require_dist_node9(); var import_auth_token = require_dist_node10(); var VERSION = "5.2.2"; - var noop2 = () => { + var noop = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); function createLogger(logger = {}) { if (typeof logger.debug !== "function") { - logger.debug = noop2; + logger.debug = noop; } if (typeof logger.info !== "function") { - logger.info = noop2; + logger.info = noop; } if (typeof logger.warn !== "function") { logger.warn = consoleWarn; @@ -24533,5857 +24533,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 release2(obj) { - tail.next = obj; - tail = obj; - } - return { - get, - release: release2 - }; - } - 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++; - release2(); - } - } - function idle() { - return _running === 0 && self2.length() === 0; - } - function push(value, done) { - var current = cache.get(); - current.context = context3; - current.release = release2; - 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 = release2; - 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 release2(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"; @@ -30432,7 +24583,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 = []; @@ -30561,7 +24712,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(); @@ -30836,7 +24987,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(); @@ -30861,7 +25012,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; @@ -30874,7 +25025,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; @@ -30911,7 +25062,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); @@ -30985,7 +25136,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; @@ -31173,7 +25324,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) { @@ -31409,7 +25560,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) => { @@ -32222,10 +26373,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(); @@ -32356,7 +26507,6 @@ var require_package = __commonJS({ "@schemastore/package": "0.0.10", archiver: "^7.0.1", "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", @@ -32577,7 +26727,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); @@ -32588,7 +26738,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; @@ -32611,7 +26761,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) { @@ -33512,18 +27662,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(); } @@ -33950,7 +28100,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 || {}; @@ -33960,7 +28110,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; @@ -33998,14 +28148,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; @@ -34096,16 +28246,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; @@ -34114,10 +28264,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; } @@ -34982,7 +29132,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"); @@ -35056,7 +29206,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; @@ -35281,8 +29431,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); @@ -35378,7 +29528,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) { @@ -35386,7 +29536,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); } @@ -35424,7 +29574,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; } @@ -35462,10 +29612,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)) { @@ -35798,7 +29948,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) { @@ -35806,7 +29956,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 = { @@ -35895,8 +30045,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 = []; @@ -36265,8 +30415,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); @@ -36398,7 +30548,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"; @@ -36413,12 +30563,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); @@ -36436,7 +30586,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); } } @@ -36447,12 +30597,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]; } @@ -36496,7 +30646,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(); @@ -36525,7 +30675,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 === "")); @@ -36549,8 +30699,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); @@ -36585,9 +30735,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}'`); @@ -36671,8 +30821,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; } }; @@ -36792,9 +30942,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(); @@ -36844,7 +30994,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; @@ -36875,7 +31025,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); @@ -36910,7 +31060,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) { @@ -36922,10 +31072,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(); } @@ -38143,7 +32293,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 }); @@ -38259,11 +32409,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* () { @@ -38280,16 +32430,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) { @@ -38306,7 +32456,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("."); @@ -38329,7 +32479,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; @@ -38374,7 +32524,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"); @@ -38941,7 +33091,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 }); @@ -39103,7 +33253,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; } }); @@ -39880,13 +34030,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) { @@ -39901,7 +34051,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 }); @@ -39919,7 +34069,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) { @@ -40448,7 +34598,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 }) { @@ -40545,7 +34695,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; @@ -40854,7 +35004,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; @@ -41188,7 +35338,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 { @@ -41476,7 +35626,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; @@ -42547,7 +36697,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(); @@ -43064,7 +37214,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; @@ -43086,7 +37236,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; @@ -43111,7 +37261,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; @@ -44863,7 +39013,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 }); @@ -44938,7 +39088,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; @@ -46212,15 +40362,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); @@ -46268,9 +40418,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; } @@ -46416,7 +40566,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(); @@ -50147,7 +44297,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) { @@ -50170,7 +44320,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 { @@ -50419,10 +44569,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) { @@ -50507,9 +44657,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) { @@ -51590,9 +45740,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) { @@ -51885,9 +46035,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) { @@ -71189,8 +65339,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}'`); } } @@ -71250,8 +65400,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; @@ -73848,7 +67998,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; @@ -74018,11 +68168,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) { @@ -74129,7 +68279,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); @@ -74155,7 +68305,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 @@ -74272,7 +68422,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(); @@ -74290,12 +68440,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); } } }); @@ -74594,7 +68744,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(); @@ -74732,7 +68882,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); @@ -74746,7 +68896,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, @@ -74757,7 +68907,7 @@ Other caches with similar key:`); } }))); } finally { - fs20.closeSync(fd); + fs17.closeSync(fd); } return; }); @@ -80001,9 +74151,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* () { @@ -80047,13 +74197,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) { @@ -80099,7 +74249,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" @@ -80108,7 +74258,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"]; @@ -80123,7 +74273,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", @@ -80132,7 +74282,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: @@ -80172,7 +74322,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); }); @@ -80242,7 +74392,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()); @@ -80339,7 +74489,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()) { @@ -80408,7 +74558,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); @@ -80471,7 +74621,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); @@ -80535,7 +74685,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); @@ -80673,7 +74823,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(); @@ -80737,10 +74887,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; } @@ -80917,10 +75067,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")); @@ -80941,8 +75091,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; @@ -80964,7 +75114,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, [], { @@ -80988,7 +75138,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; @@ -81029,7 +75179,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}'`; @@ -81200,12 +75350,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); @@ -81219,11 +75369,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); @@ -81247,9 +75397,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 { @@ -81262,13 +75412,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); } } @@ -81322,7 +75472,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; @@ -81330,7 +75480,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); @@ -81340,9 +75490,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) { @@ -81519,7 +75669,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); @@ -81848,7 +75998,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop2() { + function noop() { } function parseUrl(input) { var parsed; @@ -81924,7 +76074,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) { @@ -84132,13 +78282,13 @@ These characters are not allowed in the artifact name due to limitations with ce } (0, core_1.info)(`Artifact name is valid!`); } - 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()} @@ -84701,15 +78851,15 @@ var require_upload_zip_specification = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.validateRootDirectory = validateRootDirectory; exports2.getUploadZipSpecification = getUploadZipSpecification; - 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!`); @@ -84719,7 +78869,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`); } @@ -84896,7 +79046,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: "/" }; @@ -85064,8 +79214,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(); @@ -85574,8 +79724,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); @@ -85613,13 +79763,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": @@ -85652,7 +79802,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) { @@ -85673,8 +79823,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) { @@ -85683,7 +79833,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); @@ -85697,15 +79847,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 { @@ -85773,19 +79923,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 += "/"; } @@ -85832,7 +79982,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 = {})); @@ -85965,7 +80115,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; @@ -86072,7 +80222,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"); } @@ -86130,7 +80280,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); @@ -86189,7 +80339,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); @@ -86480,10 +80630,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); @@ -86568,14 +80718,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 = { @@ -86710,7 +80860,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) => { @@ -86990,7 +81140,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) => { @@ -87189,7 +81339,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++) { @@ -87404,7 +81554,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); @@ -87458,7 +81608,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; @@ -87717,54 +81867,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 (platform === "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 @@ -87780,9 +81930,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") { @@ -87790,22 +81940,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++; @@ -87815,11 +81965,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) { @@ -87827,80 +81977,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); }); @@ -87910,7 +82060,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; } @@ -87919,7 +82069,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); }); @@ -87929,7 +82079,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; } @@ -87949,13 +82099,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; @@ -87984,16 +82134,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; @@ -88027,7 +82177,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; @@ -88038,10 +82188,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"; @@ -88066,7 +82216,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(); } @@ -88101,7 +82251,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(); @@ -88115,7 +82265,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, { @@ -88124,7 +82274,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 || "")) @@ -88133,12 +82283,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(); } @@ -88150,48 +82300,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); @@ -88199,16 +82349,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); @@ -88216,17 +82366,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); @@ -88234,9 +82384,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; @@ -88254,34 +82404,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() @@ -88296,21 +82446,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; }, @@ -88320,7 +82470,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(fs21, "WriteStream", { + Object.defineProperty(fs18, "WriteStream", { get: function() { return WriteStream; }, @@ -88331,7 +82481,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileReadStream = ReadStream; - Object.defineProperty(fs21, "FileReadStream", { + Object.defineProperty(fs18, "FileReadStream", { get: function() { return FileReadStream; }, @@ -88342,7 +82492,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileWriteStream = WriteStream; - Object.defineProperty(fs21, "FileWriteStream", { + Object.defineProperty(fs18, "FileWriteStream", { get: function() { return FileWriteStream; }, @@ -88352,7 +82502,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 @@ -88372,7 +82522,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 @@ -88390,22 +82540,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); @@ -88413,20 +82563,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(); @@ -88434,9 +82584,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]; @@ -88458,7 +82608,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) { @@ -88537,7 +82687,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"); } @@ -88888,7 +83038,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() { }; @@ -89136,19 +83286,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); @@ -89634,7 +83784,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() { }; @@ -90506,22 +84656,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(); } @@ -91146,12 +85296,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); } @@ -92060,7 +86210,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}`); @@ -92076,7 +86226,7 @@ var require_util13 = __commonJS({ } }; module2.exports = { - AggregateError: AggregateError2, + AggregateError, kEmptyObject: Object.freeze({}), once(callback) { let called = false; @@ -92229,7 +86379,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", @@ -92324,7 +86474,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; } @@ -92812,7 +86962,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(); @@ -93023,10 +87173,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 { @@ -93044,7 +87194,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"; @@ -93063,7 +87213,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); } @@ -93159,17 +87309,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; @@ -93197,12 +87347,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); }); @@ -93224,12 +87374,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); }); @@ -93237,13 +87387,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) { @@ -93267,7 +87417,7 @@ var require_end_of_stream = __commonJS({ }); } module2.exports = eos; - module2.exports.finished = finished2; + module2.exports.finished = finished; } }); @@ -93275,14 +87425,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) { @@ -93342,9 +87492,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 { @@ -93429,7 +87579,7 @@ var require_destroy2 = __commonJS({ r.errored = err; } if (sync) { - process6.nextTick(emitErrorNT, stream2, err); + process2.nextTick(emitErrorNT, stream2, err); } else { emitErrorNT(stream2, err); } @@ -93451,7 +87601,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; @@ -93475,15 +87625,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) { @@ -93497,7 +87647,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)) { @@ -93518,9 +87668,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; @@ -93620,7 +87770,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; @@ -93843,7 +87993,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) { @@ -93855,7 +88005,7 @@ var require_state3 = __commonJS({ return getDefaultHighWaterMark(state.objectMode); } module2.exports = { - getHighWaterMark: getHighWaterMark2, + getHighWaterMark, getDefaultHighWaterMark, setDefaultHighWaterMark }; @@ -93866,7 +88016,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; @@ -93908,9 +88058,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) { @@ -93960,7 +88110,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, @@ -93987,7 +88137,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: { @@ -94081,7 +88231,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 = []; @@ -94345,7 +88495,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) { @@ -94361,7 +88511,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) { @@ -94388,9 +88538,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) { @@ -94540,7 +88690,7 @@ var require_readable3 = __commonJS({ if (state.length) { emitReadable(this); } else if (!state.reading) { - process6.nextTick(nReadingNextTick, this); + process2.nextTick(nReadingNextTick, this); } } } @@ -94550,7 +88700,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; }; @@ -94558,7 +88708,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; }; @@ -94590,7 +88740,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) { @@ -94867,7 +89017,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) { @@ -94876,7 +89026,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' @@ -94925,7 +89075,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, @@ -94944,7 +89094,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, @@ -94966,7 +89116,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; @@ -95078,7 +89228,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; } @@ -95168,7 +89318,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); } @@ -95186,7 +89336,7 @@ var require_writable = __commonJS({ stream: stream2, state }; - process6.nextTick(afterWriteTick, state.afterWriteTickInfo); + process2.nextTick(afterWriteTick, state.afterWriteTickInfo); } } else { afterWrite(stream2, state, 1, cb); @@ -95323,7 +89473,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); } @@ -95352,7 +89502,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; @@ -95381,7 +89531,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); @@ -95516,7 +89666,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; @@ -95545,7 +89695,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, @@ -95557,7 +89707,7 @@ var require_duplexify = __commonJS({ isDuplexNodeStream, isReadableStream, isWritableStream - } = require_utils10(); + } = require_utils6(); var eos = require_end_of_stream(); var { AbortError, @@ -95658,9 +89808,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); } }); }, @@ -95739,7 +89889,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, { @@ -96014,13 +90164,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, @@ -96130,10 +90280,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 { @@ -96157,15 +90307,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, @@ -96174,13 +90324,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 @@ -96285,7 +90435,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])) { @@ -96332,7 +90482,7 @@ var require_pipeline3 = __commonJS({ if (!error2) { lastStreamCleanup.forEach((fn) => fn()); } - process6.nextTick(callback, error2, value); + process2.nextTick(callback, error2, value); } } let ret; @@ -96411,11 +90561,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)) { @@ -96496,7 +90646,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; } @@ -96517,7 +90667,7 @@ var require_pipeline3 = __commonJS({ }; var endFn = endFn2; if (isReadableFinished(src)) { - process6.nextTick(endFn2); + process2.nextTick(endFn2); } else { src.once("end", endFn2); } @@ -96570,7 +90720,7 @@ var require_compose = __commonJS({ isTransformStream, isWritableStream, isReadableStream - } = require_utils10(); + } = require_utils6(); var { AbortError, codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } @@ -96760,10 +90910,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, @@ -97007,7 +91157,7 @@ var require_operators = __commonJS({ }); this.once("error", () => { }); - await finished2(this.destroy(err)); + await finished(this.destroy(err)); throw err; } const ac = new AbortController2(); @@ -97158,10 +91308,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; @@ -97189,14 +91339,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(); @@ -97212,8 +91362,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; @@ -97290,21 +91440,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; @@ -97323,7 +91473,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; @@ -97343,13 +91493,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; @@ -97372,7 +91522,7 @@ var require_ours = __commonJS({ configurable: true, enumerable: true, get() { - return promises3; + return promises5; } }); module2.exports.Stream = CustomStream.Stream; @@ -98032,9 +92182,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; } }); @@ -98056,10 +92206,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; @@ -99056,11 +93206,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; @@ -102308,12 +96458,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; @@ -103066,8 +97216,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 @@ -103114,8 +97264,8 @@ var require_commonjs16 = __commonJS({ /** * @internal */ - getRootString(path19) { - return path19.startsWith("/") ? "/" : ""; + getRootString(path15) { + return path15.startsWith("/") ? "/" : ""; } /** * @internal @@ -103165,8 +97315,8 @@ var require_commonjs16 = __commonJS({ * * @internal */ - constructor(cwd = process.cwd(), pathImpl, sep4, { nocase, childrenCacheSize = 16 * 1024, fs: fs20 = defaultFS } = {}) { - this.#fs = fsFromOption(fs20); + constructor(cwd = process.cwd(), pathImpl, sep4, { 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); } @@ -103205,11 +97355,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 @@ -103588,7 +97738,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(); @@ -103603,14 +97753,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; } } @@ -103629,9 +97779,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; @@ -103639,7 +97789,7 @@ var require_commonjs16 = __commonJS({ sync = false; } }; - process6(); + process2(); return results; } streamSync(entry = this.cwd, opts = {}) { @@ -103657,7 +97807,7 @@ var require_commonjs16 = __commonJS({ } const queue = [entry]; let processing = 0; - const process6 = () => { + const process2 = () => { let paused = false; while (!paused) { const dir = queue.shift(); @@ -103691,14 +97841,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); } }; @@ -103725,8 +97875,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 @@ -103755,8 +97905,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 @@ -103779,7 +97929,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 }); @@ -103953,13 +98103,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; @@ -104086,8 +98236,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) ]); @@ -104289,7 +98439,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 { @@ -104305,9 +98455,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; @@ -104326,11 +98476,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() { @@ -104546,8 +98696,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); @@ -104585,8 +98735,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 @@ -104631,7 +98781,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 { @@ -104885,7 +99035,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; } }); @@ -104941,8 +99091,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(); @@ -104967,8 +99117,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() : {}; @@ -104981,12 +99131,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; @@ -104998,7 +99148,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 = []; @@ -105006,14 +99156,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, "/"); @@ -105094,8 +99244,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(); @@ -105143,7 +99293,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) { @@ -105171,7 +99321,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; @@ -105183,11 +99333,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()) { @@ -105211,7 +99361,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 = { @@ -105246,13 +99396,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) { @@ -105310,7 +99460,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) { @@ -105481,7 +99631,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; @@ -105524,10 +99674,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 { @@ -105980,7 +100130,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, @@ -106064,7 +100214,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)) { @@ -106556,7 +100706,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) { @@ -106673,22 +100823,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; @@ -106882,17 +101032,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); @@ -106987,7 +101137,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); } @@ -106996,7 +101146,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(); } }); @@ -107625,10 +101775,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); @@ -108331,7 +102481,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.")); @@ -108710,7 +102860,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; @@ -108843,7 +102993,7 @@ var require_extract = __commonJS({ } _continueWrite(err) { const cb = this._callback; - this._callback = noop2; + this._callback = noop; cb(err); } _write(data, cb) { @@ -108913,7 +103063,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; @@ -108944,7 +103094,7 @@ var require_extract = __commonJS({ module2.exports = function extract2(opts) { return new Extract(opts); }; - function noop2() { + function noop() { } function overflow(size) { size &= 511; @@ -108954,7 +103104,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 @@ -108978,7 +103128,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; @@ -109072,7 +103222,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 = []; @@ -109084,7 +103234,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; @@ -109159,7 +103309,7 @@ var require_pack = __commonJS({ } _doDrain() { const drain = this._drain; - this._drain = noop2; + this._drain = noop; drain(); } _predestroy() { @@ -109195,7 +103345,7 @@ var require_pack = __commonJS({ } return "file"; } - function noop2() { + function noop() { } function overflow(self2, size) { size &= 511; @@ -110123,7 +104273,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_) { @@ -110132,11 +104282,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) { @@ -110191,7 +104341,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)) { @@ -110200,7 +104350,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(); } @@ -110973,8 +105123,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; } @@ -111006,7 +105156,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"); @@ -111039,7 +105189,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, @@ -111221,26 +105371,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)); @@ -111283,10 +105433,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; @@ -111674,8 +105824,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) { @@ -111686,7 +105836,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; } @@ -111694,7 +105844,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; @@ -111702,8 +105852,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); }); @@ -111725,19 +105875,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 @@ -111762,8 +105912,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; @@ -111805,11 +105955,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(); @@ -111945,10 +106095,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") { @@ -112186,12 +106336,12 @@ var require_dist_node16 = __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; }); }); @@ -112919,13 +107069,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()} @@ -112971,25 +107121,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)) { @@ -113014,11 +107164,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; @@ -113030,13 +107180,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]; @@ -113046,7 +107196,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)); @@ -113066,7 +107216,7 @@ var require_tmp = __commonJS({ do { const name = _generateTmpName(sanitizedOptions); try { - fs20.statSync(name); + fs17.statSync(name); } catch (e) { return name; } @@ -113077,10 +107227,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 { @@ -113094,9 +107244,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 { @@ -113109,7 +107259,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)); }); @@ -113118,7 +107268,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) @@ -113132,20 +107282,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; } @@ -113161,7 +107311,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); @@ -113223,35 +107373,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", @@ -113261,13 +107411,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}".`); } @@ -113289,7 +107439,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}".`)); } @@ -113299,7 +107449,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}".`); } @@ -113346,10 +107496,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", { @@ -113373,42 +107523,42 @@ var require_tmp = __commonJS({ var require_tmp_promise = __commonJS({ "node_modules/tmp-promise/index.js"(exports2, module2) { "use strict"; - var { promisify: promisify2 } = require("util"); + var { promisify } = require("util"); var tmp = require_tmp(); module2.exports.fileSync = tmp.fileSync; - var fileWithOptions = promisify2( + var fileWithOptions = promisify( (options, cb) => tmp.file( options, - (err, path19, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path19, fd, cleanup: promisify2(cleanup) }) + (err, path15, fd, cleanup) => err ? cb(err) : cb(void 0, { path: path15, fd, cleanup: promisify(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 = promisify2( + var dirWithOptions = promisify( (options, cb) => tmp.dir( options, - (err, path19, cleanup) => err ? cb(err) : cb(void 0, { path: path19, cleanup: promisify2(cleanup) }) + (err, path15, cleanup) => err ? cb(err) : cb(void 0, { path: path15, cleanup: promisify(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 = promisify2(tmp.tmpName); + module2.exports.tmpName = promisify(tmp.tmpName); module2.exports.tmpdir = tmp.tmpdir; module2.exports.setGracefulCleanup = tmp.setGracefulCleanup; } @@ -113786,7 +107936,7 @@ var require_crc64 = __commonJS({ }); // node_modules/@actions/artifact-legacy/lib/internal/utils.js -var require_utils11 = __commonJS({ +var require_utils7 = __commonJS({ "node_modules/@actions/artifact-legacy/lib/internal/utils.js"(exports2) { "use strict"; var __awaiter4 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { @@ -114096,7 +108246,7 @@ var require_http_manager = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.HttpManager = void 0; - var utils_1 = require_utils11(); + var utils_1 = require_utils7(); var HttpManager = class { constructor(clientCount, userAgent) { if (clientCount < 1) { @@ -114203,10 +108353,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", @@ -114239,9 +108389,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; @@ -114259,7 +108409,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 = []; @@ -114351,7 +108501,7 @@ var require_requestUtils2 = __commonJS({ }; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.retryHttpClientRequest = exports2.retry = void 0; - var utils_1 = require_utils11(); + var utils_1 = require_utils7(); var core18 = __importStar4(require_core()); var config_variables_1 = require_config_variables(); function retry3(name, operation, customErrorMessages, maxAttempts) { @@ -114468,11 +108618,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_utils11(); + var utils_1 = require_utils7(); var config_variables_1 = require_config_variables(); var util_1 = require("util"); var url_1 = require("url"); @@ -114482,7 +108632,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"); @@ -114619,7 +108769,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 { @@ -114665,7 +108815,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 @@ -114860,10 +109010,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_utils11(); + var utils_1 = require_utils7(); var url_1 = require("url"); var status_reporter_1 = require_status_reporter(); var perf_hooks_1 = require("perf_hooks"); @@ -114951,7 +109101,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); @@ -114993,7 +109143,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; @@ -115110,21 +109260,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 { @@ -115206,7 +109356,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_utils11(); + var utils_1 = require_utils7(); 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(); @@ -115266,7 +109416,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(); @@ -115280,12 +109430,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 { @@ -115300,7 +109450,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 = []; @@ -115309,18 +109459,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 { @@ -115461,7 +109611,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) { @@ -115469,7 +109619,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); } @@ -115507,7 +109657,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; } @@ -115545,10 +109695,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)) { @@ -115699,7 +109849,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"; @@ -115714,12 +109864,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); @@ -115737,7 +109887,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); } } @@ -115748,12 +109898,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]; } @@ -115801,7 +109951,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(); @@ -115830,7 +109980,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 === "")); @@ -115854,8 +110004,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); @@ -115890,9 +110040,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}'`); @@ -115976,8 +110126,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; } }; @@ -116101,9 +110251,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(); @@ -116155,7 +110305,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; @@ -116179,7 +110329,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()) { @@ -116189,7 +110339,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); @@ -116224,7 +110374,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) { @@ -116236,10 +110386,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(); } @@ -116338,10 +110488,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; @@ -116357,17 +110507,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) { @@ -119352,779 +113502,48 @@ 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 fsPromises4 = __toESM(require("fs/promises")); -var path5 = __toESM(require("path")); +var fs = __toESM(require("fs")); +var fsPromises = __toESM(require("fs/promises")); +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(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_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 path19 = isNegativePattern(filePath) ? filePath.slice(1) : filePath; - return import_node_path2.default.isAbsolute(path19) ? path19 : import_node_path2.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_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 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_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 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_path6.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path.join)(itemPath, directoryItem)) ) ); } @@ -122774,7 +116193,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; @@ -122891,9 +116310,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; @@ -122925,7 +116344,7 @@ function getTestingEnvironment() { } function doesDirectoryExist(dirPath) { try { - const stats = fs4.lstatSync(dirPath); + const stats = fs.lstatSync(dirPath); return stats.isDirectory(); } catch { return false; @@ -122935,13 +116354,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; @@ -122960,7 +116379,7 @@ function getErrorMessage(error2) { } async function checkDiskUsage(logger) { try { - const diskUsage = await fsPromises4.statfs( + const diskUsage = await fsPromises.statfs( getRequiredEnvParam("GITHUB_WORKSPACE") ); const blockSizeInBytes = diskUsage.bsize; @@ -122997,19 +116416,13 @@ function satisfiesGHESVersion(ghesVersion, range, defaultIfInvalid) { function cloneObject(obj) { return JSON.parse(JSON.stringify(obj)); } -async function cleanUpGlob(glob2, name, logger) { +async function cleanUpPath(file, 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(file, { + force: true, + recursive: true + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } @@ -123054,17 +116467,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}` @@ -123074,26 +116487,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)); } } }; @@ -123417,8 +116830,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()); @@ -123663,8 +117076,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) => { @@ -123703,12 +117116,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 @@ -123716,8 +117129,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 @@ -123843,8 +117256,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}`); } @@ -123950,12 +117363,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" ); @@ -123968,7 +117381,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); @@ -123978,14 +117391,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) { @@ -124213,7 +117626,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 ); } @@ -124392,12 +117805,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) { @@ -124410,7 +117823,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}.` @@ -124474,15 +117887,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}` @@ -124519,14 +117932,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); @@ -124565,8 +117978,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()); @@ -124627,7 +118040,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()); @@ -124700,7 +118113,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); @@ -124766,7 +118179,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; } } @@ -124784,9 +118197,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()); @@ -124846,7 +118259,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( @@ -124879,7 +118292,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, @@ -124891,7 +118304,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" }, @@ -124919,7 +118332,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, @@ -124928,7 +118341,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) { @@ -125063,7 +118476,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( @@ -125436,7 +118849,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); @@ -125524,7 +118937,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") { @@ -125586,12 +118999,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); @@ -125662,7 +119075,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" @@ -126046,7 +119459,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; @@ -126069,7 +119482,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}`] : []; @@ -126090,16 +119503,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 @@ -126130,7 +119543,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 { @@ -126148,17 +119561,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; } } @@ -126209,13 +119622,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" ); @@ -126289,8 +119702,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 @@ -126317,17 +119730,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; @@ -126353,7 +119766,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()); @@ -126560,15 +119973,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 @@ -127556,7 +120969,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)); @@ -127631,11 +121044,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; } @@ -127733,7 +121146,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; @@ -127805,7 +121218,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"; @@ -127858,14 +121271,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); @@ -127894,7 +121307,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` ); @@ -127902,7 +121315,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(); @@ -127936,12 +121349,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)); } } }; @@ -127949,11 +121362,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( @@ -127983,7 +121396,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)}` @@ -128052,7 +121465,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; @@ -128311,7 +121724,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) ); @@ -128323,8 +121736,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) { @@ -128352,15 +121765,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}.` ); @@ -128578,7 +121991,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 @@ -128752,52 +122165,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 6eca66e41b..e08457955c 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: 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: 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; @@ -22460,12 +22460,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 }); @@ -22476,7 +22476,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; @@ -23690,16 +23690,16 @@ var require_dist_node11 = __commonJS({ var import_graphql = require_dist_node9(); var import_auth_token = require_dist_node10(); var VERSION = "5.2.2"; - var noop2 = () => { + var noop = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); function createLogger(logger = {}) { if (typeof logger.debug !== "function") { - logger.debug = noop2; + logger.debug = noop; } if (typeof logger.info !== "function") { - logger.info = noop2; + logger.info = noop; } if (typeof logger.warn !== "function") { logger.warn = consoleWarn; @@ -26463,5855 +26463,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 release2(obj) { - tail.next = obj; - tail = obj; - } - return { - get, - release: release2 - }; - } - 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++; - release2(); - } - } - function idle() { - return _running === 0 && self2.length() === 0; - } - function push(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release2; - 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 = release2; - 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 release2(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) { @@ -32356,7 +26507,6 @@ var require_package = __commonJS({ "@schemastore/package": "0.0.10", archiver: "^7.0.1", "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", @@ -32577,7 +26727,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); @@ -32588,7 +26738,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; @@ -32611,7 +26761,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) { @@ -33512,18 +27662,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(); } @@ -33950,7 +28100,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 || {}; @@ -33960,7 +28110,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; @@ -33998,14 +28148,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; @@ -34096,16 +28246,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; @@ -34114,10 +28264,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; } @@ -34982,7 +29132,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"); @@ -35056,7 +29206,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; @@ -35281,8 +29431,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); @@ -35529,7 +29679,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) { @@ -35537,7 +29687,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); } @@ -35575,7 +29725,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; } @@ -35613,10 +29763,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)) { @@ -35949,7 +30099,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) { @@ -35957,7 +30107,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 = { @@ -36046,8 +30196,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 = []; @@ -36416,8 +30566,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); @@ -36549,7 +30699,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"; @@ -36564,12 +30714,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); @@ -36587,7 +30737,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); } } @@ -36598,12 +30748,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]; } @@ -36647,7 +30797,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(); @@ -36676,7 +30826,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 === "")); @@ -36700,8 +30850,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); @@ -36736,9 +30886,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}'`); @@ -36822,8 +30972,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; } }; @@ -36943,9 +31093,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(); @@ -36995,7 +31145,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; @@ -37026,7 +31176,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); @@ -37061,7 +31211,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) { @@ -37073,10 +31223,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(); } @@ -38294,7 +32444,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 }); @@ -38410,11 +32560,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* () { @@ -38431,16 +32581,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) { @@ -38457,7 +32607,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("."); @@ -38480,7 +32630,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; @@ -38525,7 +32675,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"); @@ -39092,7 +33242,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 }); @@ -39254,7 +33404,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; } }); @@ -40031,13 +34181,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) { @@ -40052,7 +34202,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 }); @@ -40070,7 +34220,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) { @@ -40599,7 +34749,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 }) { @@ -40696,7 +34846,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; @@ -41005,7 +35155,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; @@ -41339,7 +35489,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 { @@ -41627,7 +35777,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; @@ -42698,7 +36848,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(); @@ -43215,7 +37365,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; @@ -43237,7 +37387,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; @@ -43262,7 +37412,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; @@ -45014,7 +39164,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 }); @@ -45089,7 +39239,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; @@ -46363,15 +40513,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); @@ -46419,9 +40569,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; } @@ -46567,7 +40717,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(); @@ -50298,7 +44448,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) { @@ -50321,7 +44471,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 { @@ -50570,10 +44720,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) { @@ -50658,9 +44808,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) { @@ -51741,9 +45891,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) { @@ -52036,9 +46186,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) { @@ -71340,8 +65490,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}'`); } } @@ -71401,8 +65551,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; @@ -73999,7 +68149,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; @@ -74169,11 +68319,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) { @@ -74280,7 +68430,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); @@ -74306,7 +68456,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 @@ -74423,7 +68573,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(); @@ -74441,12 +68591,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); } } }); @@ -74745,7 +68895,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(); @@ -74883,7 +69033,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); @@ -74897,7 +69047,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, @@ -74908,7 +69058,7 @@ Other caches with similar key:`); } }))); } finally { - fs18.closeSync(fd); + fs15.closeSync(fd); } return; }); @@ -80152,9 +74302,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* () { @@ -80198,13 +74348,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) { @@ -80250,7 +74400,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" @@ -80259,7 +74409,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"]; @@ -80274,7 +74424,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", @@ -80283,7 +74433,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: @@ -80323,7 +74473,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); }); @@ -80393,7 +74543,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()); @@ -80490,7 +74640,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()) { @@ -80559,7 +74709,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); @@ -80622,7 +74772,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); @@ -80686,7 +74836,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); @@ -80866,7 +75016,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) { @@ -80874,7 +75024,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); } @@ -80912,7 +75062,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; } @@ -80950,10 +75100,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)) { @@ -81104,7 +75254,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"; @@ -81119,12 +75269,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); @@ -81142,7 +75292,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); } } @@ -81153,12 +75303,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]; } @@ -81206,7 +75356,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(); @@ -81235,7 +75385,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 === "")); @@ -81259,8 +75409,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); @@ -81295,9 +75445,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}'`); @@ -81381,8 +75531,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; } }; @@ -81506,9 +75656,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(); @@ -81560,7 +75710,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; @@ -81584,7 +75734,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()) { @@ -81594,7 +75744,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); @@ -81629,7 +75779,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) { @@ -81641,10 +75791,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(); } @@ -81743,10 +75893,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; @@ -81762,17 +75912,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) { @@ -81921,7 +76071,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(); @@ -81985,10 +76135,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; } @@ -82165,10 +76315,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")); @@ -82189,8 +76339,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; @@ -82212,7 +76362,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, [], { @@ -82236,7 +76386,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; @@ -82277,7 +76427,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}'`; @@ -82448,12 +76598,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); @@ -82467,11 +76617,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); @@ -82495,9 +76645,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 { @@ -82510,13 +76660,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); } } @@ -82570,7 +76720,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; @@ -82578,7 +76728,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); @@ -82588,9 +76738,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) { @@ -82767,7 +76917,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); @@ -83096,7 +77246,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop2() { + function noop() { } function parseUrl(input) { var parsed; @@ -83172,7 +77322,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) { @@ -83198,8 +77348,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()); @@ -83259,780 +77409,49 @@ 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 fsPromises4 = __toESM(require("fs/promises")); +var fs = __toESM(require("fs")); +var fsPromises = __toESM(require("fs/promises")); 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()); -// 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(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_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 path20 = isNegativePattern(filePath) ? filePath.slice(1) : filePath; - return import_node_path2.default.isAbsolute(path20) ? path20 : import_node_path2.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_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 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_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 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_path6.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path.join)(itemPath, directoryItem)) ) ); } @@ -86725,13 +80144,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.` @@ -86801,13 +80220,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( @@ -86827,14 +80246,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; } @@ -86853,10 +80272,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", @@ -87019,15 +80438,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(); } @@ -87069,7 +80488,7 @@ function prettyPrintPack(pack) { } async function checkDiskUsage(logger) { try { - const diskUsage = await fsPromises4.statfs( + const diskUsage = await fsPromises.statfs( getRequiredEnvParam("GITHUB_WORKSPACE") ); const blockSizeInBytes = diskUsage.bsize; @@ -87126,19 +80545,13 @@ var BuildMode = /* @__PURE__ */ ((BuildMode3) => { function cloneObject(obj) { return JSON.parse(JSON.stringify(obj)); } -async function cleanUpGlob(glob2, name, logger) { +async function cleanUpPath(file, 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(file, { + force: true, + recursive: true + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } @@ -87186,17 +80599,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}` @@ -87623,12 +81036,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()); @@ -87771,11 +81184,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) { @@ -87971,8 +81384,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 @@ -87981,8 +81394,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 @@ -88086,8 +81499,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}`); } @@ -88193,12 +81606,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" ); @@ -88211,7 +81624,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); @@ -88221,14 +81634,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) { @@ -88250,7 +81663,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` ); @@ -88585,7 +81998,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 ); } @@ -88764,12 +82177,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) { @@ -88782,7 +82195,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}.` @@ -88881,8 +82294,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"; @@ -88898,13 +82311,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()) { @@ -88916,7 +82329,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) { @@ -89018,9 +82431,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( @@ -89185,8 +82598,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) ); @@ -89320,10 +82733,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"]); @@ -89337,7 +82750,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 = {}; @@ -89415,7 +82828,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) ); @@ -89423,7 +82836,7 @@ function getLocalConfig(logger, configFile, validateConfig) { return parseUserConfig( logger, configFile, - fs9.readFileSync(configFile, "utf-8"), + fs6.readFileSync(configFile, "utf-8"), validateConfig ); } @@ -89463,13 +82876,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); } @@ -89479,9 +82892,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(","); @@ -89759,14 +83172,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()); @@ -90011,15 +83424,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()); @@ -90092,7 +83505,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); @@ -90158,7 +83571,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; } } @@ -90176,9 +83589,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()); @@ -90238,7 +83651,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( @@ -90271,7 +83684,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, @@ -90283,7 +83696,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" }, @@ -90311,7 +83724,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, @@ -90320,7 +83733,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) { @@ -90455,7 +83868,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( @@ -90828,7 +84241,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); @@ -90876,8 +84289,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; @@ -90889,8 +84302,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" ), @@ -90938,7 +84351,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") { @@ -90994,12 +84407,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); @@ -91070,7 +84483,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" @@ -91454,7 +84867,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; @@ -91477,7 +84890,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}`] : []; @@ -91532,7 +84945,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( @@ -91567,25 +84980,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") { @@ -91610,7 +85023,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" @@ -91620,8 +85033,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.` @@ -91881,8 +85294,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) { @@ -92033,15 +85446,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}.` ); @@ -92171,7 +85584,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") || "" ); @@ -92339,21 +85752,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( @@ -92592,52 +86005,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 a154962154..e8e8f4259b 100644 --- a/lib/resolve-environment-action.js +++ b/lib/resolve-environment-action.js @@ -26507,7 +26507,6 @@ var require_package = __commonJS({ "@schemastore/package": "0.0.10", archiver: "^7.0.1", "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 bfea57ebd0..a44b15af8e 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: 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: 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; @@ -20530,12 +20530,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 }); @@ -20546,7 +20546,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; @@ -21760,16 +21760,16 @@ var require_dist_node11 = __commonJS({ var import_graphql = require_dist_node9(); var import_auth_token = require_dist_node10(); var VERSION = "5.2.2"; - var noop2 = () => { + var noop = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); function createLogger(logger = {}) { if (typeof logger.debug !== "function") { - logger.debug = noop2; + logger.debug = noop; } if (typeof logger.info !== "function") { - logger.info = noop2; + logger.info = noop; } if (typeof logger.warn !== "function") { logger.warn = consoleWarn; @@ -24533,5857 +24533,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 release2(obj) { - tail.next = obj; - tail = obj; - } - return { - get, - release: release2 - }; - } - 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++; - release2(); - } - } - function idle() { - return _running === 0 && self2.length() === 0; - } - function push(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release2; - 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 = release2; - 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 release2(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"; @@ -30432,7 +24583,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 = []; @@ -30561,7 +24712,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(); @@ -30836,7 +24987,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(); @@ -30861,7 +25012,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; @@ -30874,7 +25025,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; @@ -30911,7 +25062,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); @@ -30985,7 +25136,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; @@ -31173,7 +25324,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) { @@ -31409,7 +25560,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) => { @@ -32222,10 +26373,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(); @@ -32356,7 +26507,6 @@ var require_package = __commonJS({ "@schemastore/package": "0.0.10", archiver: "^7.0.1", "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", @@ -32577,7 +26727,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); @@ -32588,7 +26738,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; @@ -32611,7 +26761,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) { @@ -33512,18 +27662,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(); } @@ -33950,7 +28100,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 || {}; @@ -33960,7 +28110,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; @@ -34081,7 +28231,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) { @@ -34089,7 +28239,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); } @@ -34127,7 +28277,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; } @@ -34165,10 +28315,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)) { @@ -34501,7 +28651,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) { @@ -34509,7 +28659,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 = { @@ -34598,8 +28748,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 = []; @@ -34968,8 +29118,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); @@ -35101,7 +29251,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"; @@ -35116,12 +29266,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); @@ -35139,7 +29289,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); } } @@ -35150,12 +29300,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]; } @@ -35199,7 +29349,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(); @@ -35228,7 +29378,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 === "")); @@ -35252,8 +29402,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); @@ -35288,9 +29438,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}'`); @@ -35374,8 +29524,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; } }; @@ -35495,9 +29645,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(); @@ -35547,7 +29697,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; @@ -35578,7 +29728,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); @@ -35613,7 +29763,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) { @@ -35625,10 +29775,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(); } @@ -36846,7 +30996,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 }); @@ -36962,11 +31112,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* () { @@ -36983,16 +31133,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) { @@ -37009,7 +31159,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("."); @@ -37032,7 +31182,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; @@ -37077,7 +31227,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"); @@ -37644,7 +31794,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 }); @@ -37806,7 +31956,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; } }); @@ -38583,13 +32733,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) { @@ -38604,7 +32754,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 }); @@ -38622,7 +32772,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) { @@ -39151,7 +33301,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 }) { @@ -39248,7 +33398,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; @@ -39557,7 +33707,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; @@ -39891,7 +34041,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 { @@ -40179,7 +34329,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; @@ -41250,7 +35400,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(); @@ -41767,7 +35917,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; @@ -41789,7 +35939,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; @@ -41814,7 +35964,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; @@ -43566,7 +37716,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 }); @@ -43641,7 +37791,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; @@ -44915,15 +39065,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); @@ -44971,9 +39121,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; } @@ -45119,7 +39269,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(); @@ -48850,7 +43000,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) { @@ -48873,7 +43023,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 { @@ -49122,10 +43272,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) { @@ -49210,9 +43360,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) { @@ -50293,9 +44443,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) { @@ -50588,9 +44738,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) { @@ -69892,8 +64042,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}'`); } } @@ -69953,8 +64103,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; @@ -72551,7 +66701,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; @@ -72721,11 +66871,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) { @@ -72832,7 +66982,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); @@ -72858,7 +67008,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 @@ -72975,7 +67125,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(); @@ -72993,12 +67143,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); } } }); @@ -73297,7 +67447,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(); @@ -73435,7 +67585,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); @@ -73449,7 +67599,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, @@ -73460,7 +67610,7 @@ Other caches with similar key:`); } }))); } finally { - fs11.closeSync(fd); + fs9.closeSync(fd); } return; }); @@ -78704,9 +72854,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* () { @@ -78750,13 +72900,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) { @@ -78802,7 +72952,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" @@ -78811,7 +72961,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"]; @@ -78826,7 +72976,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", @@ -78835,7 +72985,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: @@ -78875,7 +73025,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); }); @@ -78945,7 +73095,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()); @@ -79042,7 +73192,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()) { @@ -79111,7 +73261,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); @@ -79174,7 +73324,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); @@ -79238,7 +73388,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); @@ -79317,14 +73467,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; @@ -79415,16 +73565,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; @@ -79433,10 +73583,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; } @@ -80301,7 +74451,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"); @@ -80375,7 +74525,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; @@ -80600,8 +74750,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); @@ -80673,7 +74823,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(); @@ -80737,10 +74887,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; } @@ -80917,10 +75067,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")); @@ -80941,8 +75091,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; @@ -80964,7 +75114,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, [], { @@ -80988,7 +75138,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; @@ -81029,7 +75179,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}'`; @@ -81200,12 +75350,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); @@ -81219,11 +75369,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); @@ -81247,9 +75397,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 { @@ -81262,13 +75412,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); } } @@ -81322,7 +75472,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; @@ -81330,7 +75480,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); @@ -81340,9 +75490,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) { @@ -81519,7 +75669,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); @@ -81848,7 +75998,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop2() { + function noop() { } function parseUrl(input) { var parsed; @@ -81924,7 +76074,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) { @@ -82007,778 +76157,48 @@ 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 fsPromises4 = __toESM(require("fs/promises")); -var path5 = __toESM(require("path")); +var fs = __toESM(require("fs")); +var fsPromises = __toESM(require("fs/promises")); +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(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_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 path12 = isNegativePattern(filePath) ? filePath.slice(1) : filePath; - return import_node_path2.default.isAbsolute(path12) ? path12 : import_node_path2.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_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 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_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 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_path6.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path.join)(itemPath, directoryItem)) ) ); } @@ -85417,7 +78837,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; @@ -85579,7 +78999,7 @@ function getErrorMessage(error2) { } async function checkDiskUsage(logger) { try { - const diskUsage = await fsPromises4.statfs( + const diskUsage = await fsPromises.statfs( getRequiredEnvParam("GITHUB_WORKSPACE") ); const blockSizeInBytes = diskUsage.bsize; @@ -85622,19 +79042,13 @@ function checkActionVersion(version, githubVersion) { 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 { - 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(file, { + force: true, + recursive: true + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } @@ -85679,17 +79093,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}` @@ -85930,8 +79344,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 @@ -85939,8 +79353,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 @@ -86032,8 +79446,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}`); } @@ -86131,12 +79545,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" ); @@ -86149,7 +79563,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); @@ -86159,14 +79573,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) { @@ -86390,7 +79804,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 ); } @@ -86569,12 +79983,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) { @@ -86587,7 +80001,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}.` @@ -86654,8 +80068,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()); @@ -86968,15 +80382,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()); @@ -87049,7 +80463,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); @@ -87115,7 +80529,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; } } @@ -87133,9 +80547,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()); @@ -87195,7 +80609,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( @@ -87228,7 +80642,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, @@ -87240,7 +80654,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" }, @@ -87268,7 +80682,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, @@ -87277,7 +80691,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) { @@ -87412,7 +80826,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( @@ -87785,7 +81199,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); @@ -87873,7 +81287,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") { @@ -87929,12 +81343,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); @@ -88005,7 +81419,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" @@ -88389,7 +81803,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; @@ -88412,7 +81826,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}`] : []; @@ -88778,52 +82192,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 537928eb06..80bb67c1a7 100644 --- a/lib/start-proxy-action-post.js +++ b/lib/start-proxy-action-post.js @@ -26507,7 +26507,6 @@ var require_package = __commonJS({ "@schemastore/package": "0.0.10", archiver: "^7.0.1", "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 fdbb81db96..40a8c8fc94 100644 --- a/lib/start-proxy-action.js +++ b/lib/start-proxy-action.js @@ -45043,7 +45043,6 @@ var require_package = __commonJS({ "@schemastore/package": "0.0.10", archiver: "^7.0.1", "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 0ab3ef89a9..3aa22bbfcd 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; @@ -21827,12 +21827,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 }); @@ -21843,7 +21843,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; @@ -23057,16 +23057,16 @@ var require_dist_node11 = __commonJS({ var import_graphql = require_dist_node9(); var import_auth_token = require_dist_node10(); var VERSION = "5.2.2"; - var noop2 = () => { + var noop = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); function createLogger(logger = {}) { if (typeof logger.debug !== "function") { - logger.debug = noop2; + logger.debug = noop; } if (typeof logger.info !== "function") { - logger.info = noop2; + logger.info = noop; } if (typeof logger.warn !== "function") { logger.warn = consoleWarn; @@ -25830,5857 +25830,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"; @@ -31729,7 +25880,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 = []; @@ -31858,7 +26009,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(); @@ -32133,7 +26284,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(); @@ -32158,7 +26309,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; @@ -32171,7 +26322,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; @@ -32208,7 +26359,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); @@ -32282,7 +26433,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; @@ -32470,7 +26621,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) { @@ -32706,7 +26857,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) => { @@ -33519,10 +27670,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(); @@ -33653,7 +27804,6 @@ var require_package = __commonJS({ "@schemastore/package": "0.0.10", archiver: "^7.0.1", "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", @@ -33874,7 +28024,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); @@ -33885,7 +28035,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; @@ -33908,7 +28058,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) { @@ -34809,18 +28959,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(); } @@ -35247,7 +29397,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 || {}; @@ -35257,7 +29407,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; @@ -35378,7 +29528,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) { @@ -35386,7 +29536,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); } @@ -35424,7 +29574,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; } @@ -35462,10 +29612,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)) { @@ -35798,7 +29948,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) { @@ -35806,7 +29956,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 = { @@ -35895,8 +30045,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 = []; @@ -36265,8 +30415,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); @@ -36398,7 +30548,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"; @@ -36413,12 +30563,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); @@ -36436,7 +30586,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); } } @@ -36447,12 +30597,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]; } @@ -36496,7 +30646,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(); @@ -36525,7 +30675,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 === "")); @@ -36549,8 +30699,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); @@ -36585,9 +30735,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}'`); @@ -36671,8 +30821,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; } }; @@ -36792,9 +30942,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(); @@ -36844,7 +30994,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; @@ -36875,7 +31025,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); @@ -36910,7 +31060,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) { @@ -36922,10 +31072,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(); } @@ -38143,7 +32293,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 }); @@ -38259,11 +32409,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* () { @@ -38280,16 +32430,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) { @@ -38306,7 +32456,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("."); @@ -38329,7 +32479,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; @@ -38374,7 +32524,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"); @@ -38941,7 +33091,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 }); @@ -39103,7 +33253,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; } }); @@ -39880,13 +34030,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) { @@ -39901,7 +34051,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 }); @@ -39919,7 +34069,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) { @@ -40448,7 +34598,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 }) { @@ -40545,7 +34695,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; @@ -40854,7 +35004,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; @@ -41188,7 +35338,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 { @@ -41476,7 +35626,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; @@ -42547,7 +36697,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(); @@ -43064,7 +37214,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; @@ -43086,7 +37236,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; @@ -43111,7 +37261,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; @@ -44863,7 +39013,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 }); @@ -44938,7 +39088,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; @@ -46212,15 +40362,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); @@ -46268,9 +40418,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; } @@ -46416,7 +40566,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(); @@ -50147,7 +44297,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) { @@ -50170,7 +44320,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 { @@ -50419,10 +44569,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) { @@ -50507,9 +44657,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) { @@ -51590,9 +45740,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) { @@ -51885,9 +46035,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) { @@ -71189,8 +65339,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}'`); } } @@ -71250,8 +65400,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; @@ -73848,7 +67998,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; @@ -74018,11 +68168,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) { @@ -74129,7 +68279,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); @@ -74155,7 +68305,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 @@ -74272,7 +68422,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(); @@ -74290,12 +68440,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); } } }); @@ -74594,7 +68744,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(); @@ -74732,7 +68882,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); @@ -74746,7 +68896,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, @@ -74757,7 +68907,7 @@ Other caches with similar key:`); } }))); } finally { - fs14.closeSync(fd); + fs12.closeSync(fd); } return; }); @@ -80001,9 +74151,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* () { @@ -80047,13 +74197,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) { @@ -80099,7 +74249,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" @@ -80108,7 +74258,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"]; @@ -80123,7 +74273,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", @@ -80132,7 +74282,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: @@ -80172,7 +74322,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); }); @@ -80242,7 +74392,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()); @@ -80339,7 +74489,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()) { @@ -80408,7 +74558,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); @@ -80471,7 +74621,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); @@ -80535,7 +74685,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); @@ -80673,7 +74823,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(); @@ -80737,10 +74887,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; } @@ -80917,10 +75067,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")); @@ -80941,8 +75091,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; @@ -80964,7 +75114,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, [], { @@ -80988,7 +75138,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; @@ -81029,7 +75179,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}'`; @@ -81200,12 +75350,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); @@ -81219,11 +75369,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); @@ -81247,9 +75397,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 { @@ -81262,13 +75412,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); } } @@ -81322,7 +75472,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; @@ -81330,7 +75480,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); @@ -81340,9 +75490,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) { @@ -81519,7 +75669,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); @@ -81848,7 +75998,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop2() { + function noop() { } function parseUrl(input) { var parsed; @@ -81924,7 +76074,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) { @@ -84869,785 +79019,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)) ) ); } @@ -88291,7 +81711,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; @@ -88428,19 +81848,13 @@ 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 { - 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(file, { + force: true, + recursive: true + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } @@ -88485,17 +81899,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}` @@ -88801,8 +82215,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()); @@ -89047,8 +82461,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()); @@ -89064,8 +82478,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()); @@ -89075,8 +82489,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 @@ -89202,8 +82616,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}`); } @@ -89298,12 +82712,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" ); @@ -89316,7 +82730,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); @@ -89326,14 +82740,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) { @@ -89551,15 +82965,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}` @@ -89596,14 +83010,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); @@ -89639,8 +83053,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()); @@ -89701,7 +83115,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()); @@ -89774,7 +83188,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); @@ -89840,7 +83254,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; } } @@ -89858,9 +83272,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()); @@ -89920,7 +83334,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( @@ -89953,7 +83367,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, @@ -89965,7 +83379,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" }, @@ -89993,7 +83407,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, @@ -90002,7 +83416,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) { @@ -90137,7 +83551,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( @@ -90510,7 +83924,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); @@ -90598,7 +84012,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") { @@ -90660,12 +84074,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); @@ -90736,7 +84150,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" @@ -91120,7 +84534,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; @@ -91143,7 +84557,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}`] : []; @@ -91164,7 +84578,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 @@ -92152,7 +85566,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)); @@ -92227,11 +85641,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; } @@ -92329,7 +85743,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; @@ -92401,7 +85815,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"; @@ -92454,14 +85868,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); @@ -92490,7 +85904,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` ); @@ -92498,7 +85912,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(); @@ -92532,12 +85946,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)); } } }; @@ -92545,11 +85959,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( @@ -92562,7 +85976,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}`); } @@ -92570,7 +85984,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(", ")}` @@ -92627,7 +86041,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)}` @@ -92696,7 +86110,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; @@ -92828,19 +86242,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; @@ -92983,7 +86397,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) ); @@ -93023,52 +86437,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 556d839c7e..ca3f7ca2a0 100644 --- a/lib/upload-sarif-action-post.js +++ b/lib/upload-sarif-action-post.js @@ -26507,7 +26507,6 @@ var require_package = __commonJS({ "@schemastore/package": "0.0.10", archiver: "^7.0.1", "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", @@ -26728,7 +26727,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); @@ -26739,7 +26738,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; @@ -26762,7 +26761,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) { @@ -82810,7 +82809,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; @@ -82888,21 +82887,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; @@ -82921,7 +82920,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; @@ -82941,13 +82940,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; @@ -82970,7 +82969,7 @@ var require_ours = __commonJS({ configurable: true, enumerable: true, get() { - return promises; + return promises2; } }); module2.exports.Stream = CustomStream.Stream; @@ -89201,14 +89200,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 75ae9e6413..e0f18ba7b8 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: 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: 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; @@ -20530,12 +20530,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 }); @@ -20546,7 +20546,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; @@ -21760,16 +21760,16 @@ var require_dist_node11 = __commonJS({ var import_graphql = require_dist_node9(); var import_auth_token = require_dist_node10(); var VERSION = "5.2.2"; - var noop2 = () => { + var noop = () => { }; var consoleWarn = console.warn.bind(console); var consoleError = console.error.bind(console); function createLogger(logger = {}) { if (typeof logger.debug !== "function") { - logger.debug = noop2; + logger.debug = noop; } if (typeof logger.info !== "function") { - logger.info = noop2; + logger.info = noop; } if (typeof logger.warn !== "function") { logger.warn = consoleWarn; @@ -24533,5857 +24533,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 release2(obj) { - tail.next = obj; - tail = obj; - } - return { - get, - release: release2 - }; - } - 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++; - release2(); - } - } - function idle() { - return _running === 0 && self2.length() === 0; - } - function push(value, done) { - var current = cache.get(); - current.context = context2; - current.release = release2; - 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 = release2; - 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 release2(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"; @@ -30432,7 +24583,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 = []; @@ -30561,7 +24712,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(); @@ -30836,7 +24987,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(); @@ -30861,7 +25012,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; @@ -30874,7 +25025,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; @@ -30911,7 +25062,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); @@ -30985,7 +25136,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; @@ -31173,7 +25324,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) { @@ -31409,7 +25560,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) => { @@ -32222,10 +26373,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(); @@ -32356,7 +26507,6 @@ var require_package = __commonJS({ "@schemastore/package": "0.0.10", archiver: "^7.0.1", "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", @@ -32577,7 +26727,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); @@ -32588,7 +26738,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; @@ -32611,7 +26761,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) { @@ -33512,18 +27662,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(); } @@ -33950,7 +28100,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 || {}; @@ -33960,7 +28110,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; @@ -34081,7 +28231,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) { @@ -34089,7 +28239,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); } @@ -34127,7 +28277,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; } @@ -34165,10 +28315,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)) { @@ -34501,7 +28651,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) { @@ -34509,7 +28659,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 = { @@ -34598,8 +28748,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 = []; @@ -34968,8 +29118,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); @@ -35101,7 +29251,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"; @@ -35116,12 +29266,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); @@ -35139,7 +29289,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); } } @@ -35150,12 +29300,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]; } @@ -35199,7 +29349,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(); @@ -35228,7 +29378,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 === "")); @@ -35252,8 +29402,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); @@ -35288,9 +29438,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}'`); @@ -35374,8 +29524,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; } }; @@ -35495,9 +29645,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(); @@ -35547,7 +29697,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; @@ -35578,7 +29728,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); @@ -35613,7 +29763,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) { @@ -35625,10 +29775,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(); } @@ -36846,7 +30996,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 }); @@ -36962,11 +31112,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* () { @@ -36983,16 +31133,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) { @@ -37009,7 +31159,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("."); @@ -37032,7 +31182,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; @@ -37077,7 +31227,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"); @@ -37644,7 +31794,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 }); @@ -37806,7 +31956,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; } }); @@ -38583,13 +32733,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) { @@ -38604,7 +32754,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 }); @@ -38622,7 +32772,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) { @@ -39151,7 +33301,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 }) { @@ -39248,7 +33398,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; @@ -39557,7 +33707,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; @@ -39891,7 +34041,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 { @@ -40179,7 +34329,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; @@ -41250,7 +35400,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(); @@ -41767,7 +35917,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; @@ -41789,7 +35939,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; @@ -41814,7 +35964,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; @@ -43566,7 +37716,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 }); @@ -43641,7 +37791,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; @@ -44915,15 +39065,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); @@ -44971,9 +39121,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; } @@ -45119,7 +39269,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(); @@ -48850,7 +43000,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) { @@ -48873,7 +43023,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 { @@ -49122,10 +43272,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) { @@ -49210,9 +43360,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) { @@ -50293,9 +44443,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) { @@ -50588,9 +44738,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) { @@ -69892,8 +64042,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}'`); } } @@ -69953,8 +64103,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; @@ -72551,7 +66701,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; @@ -72721,11 +66871,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) { @@ -72832,7 +66982,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); @@ -72858,7 +67008,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 @@ -72975,7 +67125,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(); @@ -72993,12 +67143,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); } } }); @@ -73297,7 +67447,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(); @@ -73435,7 +67585,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); @@ -73449,7 +67599,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, @@ -73460,7 +67610,7 @@ Other caches with similar key:`); } }))); } finally { - fs15.closeSync(fd); + fs13.closeSync(fd); } return; }); @@ -78704,9 +72854,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* () { @@ -78750,13 +72900,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) { @@ -78802,7 +72952,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" @@ -78811,7 +72961,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"]; @@ -78826,7 +72976,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", @@ -78835,7 +72985,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: @@ -78875,7 +73025,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); }); @@ -78945,7 +73095,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()); @@ -79042,7 +73192,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()) { @@ -79111,7 +73261,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); @@ -79174,7 +73324,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); @@ -79238,7 +73388,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); @@ -79317,14 +73467,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; @@ -79415,16 +73565,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; @@ -79433,10 +73583,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; } @@ -80301,7 +74451,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"); @@ -80375,7 +74525,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; @@ -80600,8 +74750,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); @@ -80673,7 +74823,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(); @@ -80737,10 +74887,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; } @@ -80917,10 +75067,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")); @@ -80941,8 +75091,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; @@ -80964,7 +75114,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, [], { @@ -80988,7 +75138,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; @@ -81029,7 +75179,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}'`; @@ -81200,12 +75350,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); @@ -81219,11 +75369,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); @@ -81247,9 +75397,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 { @@ -81262,13 +75412,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); } } @@ -81322,7 +75472,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; @@ -81330,7 +75480,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); @@ -81340,9 +75490,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) { @@ -81519,7 +75669,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); @@ -81848,7 +75998,7 @@ var require_follow_redirects = __commonJS({ }); return exports3; } - function noop2() { + function noop() { } function parseUrl(input) { var parsed; @@ -81924,7 +76074,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) { @@ -84849,778 +78999,48 @@ 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 fsPromises4 = __toESM(require("fs/promises")); -var path5 = __toESM(require("path")); +var fs = __toESM(require("fs")); +var fsPromises = __toESM(require("fs/promises")); +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(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_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 path16 = isNegativePattern(filePath) ? filePath.slice(1) : filePath; - return import_node_path2.default.isAbsolute(path16) ? path16 : import_node_path2.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_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 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_path6.join)(itemPath, directoryItem)) + (directoryItem) => processItem((0, import_node_path.join)(itemPath, directoryItem)) ) ); } @@ -88264,7 +81684,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; @@ -88399,7 +81819,7 @@ function getErrorMessage(error2) { } async function checkDiskUsage(logger) { try { - const diskUsage = await fsPromises4.statfs( + const diskUsage = await fsPromises.statfs( getRequiredEnvParam("GITHUB_WORKSPACE") ); const blockSizeInBytes = diskUsage.bsize; @@ -88450,19 +81870,13 @@ 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 { - 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(file, { + force: true, + recursive: true + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); } @@ -88512,17 +81926,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}` @@ -88846,8 +82260,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 @@ -88855,8 +82269,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 @@ -88982,8 +82396,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}`); } @@ -89081,12 +82495,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" ); @@ -89099,7 +82513,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); @@ -89109,14 +82523,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) { @@ -89340,7 +82754,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 ); } @@ -89519,12 +82933,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) { @@ -89537,7 +82951,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}.` @@ -89604,8 +83018,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()); @@ -89621,18 +83035,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}` @@ -89669,14 +83083,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); @@ -89894,16 +83308,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()); @@ -90148,8 +83562,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()); @@ -90210,7 +83624,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()); @@ -90283,7 +83697,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); @@ -90349,7 +83763,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; } } @@ -90367,9 +83781,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()); @@ -90429,7 +83843,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( @@ -90462,7 +83876,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, @@ -90474,7 +83888,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" }, @@ -90502,7 +83916,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, @@ -90511,7 +83925,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) { @@ -90646,7 +84060,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( @@ -91019,7 +84433,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); @@ -91107,7 +84521,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") { @@ -91169,12 +84583,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); @@ -91245,7 +84659,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" @@ -91629,7 +85043,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; @@ -91652,7 +85066,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}`] : []; @@ -91673,7 +85087,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 @@ -92661,7 +86075,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)); @@ -92736,11 +86150,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; } @@ -92838,7 +86252,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; @@ -92910,7 +86324,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"; @@ -92963,14 +86377,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); @@ -92999,7 +86413,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` ); @@ -93007,7 +86421,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(); @@ -93041,12 +86455,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)); } } }; @@ -93054,7 +86468,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}`); } @@ -93062,7 +86476,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(", ")}` @@ -93119,7 +86533,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)}` @@ -93188,7 +86602,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; @@ -93290,19 +86704,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; @@ -93445,7 +86859,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) ); @@ -93614,52 +87028,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 824583c70d..6b3ca04420 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,6 @@ "@schemastore/package": "0.0.10", "archiver": "^7.0.1", "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", @@ -1616,6 +1615,7 @@ }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "2.0.5", @@ -1627,6 +1627,7 @@ }, "node_modules/@nodelib/fs.stat": { "version": "2.0.5", + "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -1634,6 +1635,7 @@ }, "node_modules/@nodelib/fs.walk": { "version": "1.2.8", + "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.scandir": "2.1.5", @@ -4108,6 +4110,7 @@ }, "node_modules/braces": { "version": "3.0.3", + "dev": true, "license": "MIT", "dependencies": { "fill-range": "^7.1.1" @@ -4697,38 +4700,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", @@ -5780,6 +5751,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", @@ -5825,6 +5797,7 @@ }, "node_modules/fastq": { "version": "1.8.0", + "dev": true, "license": "ISC", "dependencies": { "reusify": "^1.0.4" @@ -5864,6 +5837,7 @@ }, "node_modules/fill-range": { "version": "7.1.1", + "dev": true, "license": "MIT", "dependencies": { "to-regex-range": "^5.0.1" @@ -6140,6 +6114,7 @@ }, "node_modules/glob-parent": { "version": "5.1.2", + "dev": true, "license": "ISC", "dependencies": { "is-glob": "^4.0.1" @@ -6196,6 +6171,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", @@ -6216,6 +6192,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" @@ -6228,6 +6205,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" @@ -6589,6 +6567,7 @@ }, "node_modules/is-extglob": { "version": "2.1.1", + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6603,6 +6582,7 @@ }, "node_modules/is-glob": { "version": "4.0.3", + "dev": true, "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" @@ -6632,6 +6612,7 @@ }, "node_modules/is-number": { "version": "7.0.0", + "dev": true, "license": "MIT", "engines": { "node": ">=0.12.0" @@ -6651,18 +6632,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, @@ -7120,6 +7089,7 @@ }, "node_modules/merge2": { "version": "1.4.1", + "dev": true, "license": "MIT", "engines": { "node": ">= 8" @@ -7129,6 +7099,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" @@ -7613,6 +7584,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" }, @@ -7706,6 +7678,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" @@ -7723,6 +7696,7 @@ }, "node_modules/picomatch": { "version": "2.3.1", + "dev": true, "license": "MIT", "engines": { "node": ">=8.6" @@ -7838,6 +7812,7 @@ }, "node_modules/queue-microtask": { "version": "1.2.3", + "dev": true, "funding": [ { "type": "github", @@ -7990,6 +7965,7 @@ }, "node_modules/reusify": { "version": "1.0.4", + "dev": true, "license": "MIT", "engines": { "iojs": ">=1.0.0", @@ -8031,6 +8007,7 @@ }, "node_modules/run-parallel": { "version": "1.2.0", + "dev": true, "funding": [ { "type": "github", @@ -8242,6 +8219,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" @@ -8762,6 +8740,7 @@ }, "node_modules/to-regex-range": { "version": "5.0.1", + "dev": true, "license": "MIT", "dependencies": { "is-number": "^7.0.0" @@ -9093,6 +9072,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 48fa4c70c0..29e60bd283 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "@schemastore/package": "0.0.10", "archiver": "^7.0.1", "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/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 0379389572..e71a812c47 100644 --- a/src/util.ts +++ b/src/util.ts @@ -6,7 +6,6 @@ import * as path from "path"; import * as core from "@actions/core"; import * as exec from "@actions/exec/lib/exec"; import * as io from "@actions/io"; -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; @@ -1256,19 +1255,13 @@ 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 { - 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(file, { + force: true, + recursive: true, + }); } catch (e) { logger.warning(`Failed to clean up ${name}: ${e}.`); }