From 96ef510cbed1b2bc13cee3297f9cdd53ca840722 Mon Sep 17 00:00:00 2001 From: Alex Egan Date: Mon, 18 May 2026 12:03:53 +0100 Subject: [PATCH 1/5] Updated dependencies --- dist/index.js | 7150 +++++++++++++++++---------------------------- dist/licenses.txt | 2 +- package-lock.json | 117 +- package.json | 8 +- 4 files changed, 2761 insertions(+), 4516 deletions(-) diff --git a/dist/index.js b/dist/index.js index d98e76c..0139401 100644 --- a/dist/index.js +++ b/dist/index.js @@ -274,7 +274,7 @@ var require_tunnel = __commonJS({ connectOptions.headers = connectOptions.headers || {}; connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); } - debug16("making CONNECT request"); + debug2("making CONNECT request"); var connectReq = self2.request(connectOptions); connectReq.useChunkedEncodingByDefault = false; connectReq.once("response", onResponse); @@ -294,40 +294,40 @@ var require_tunnel = __commonJS({ connectReq.removeAllListeners(); socket.removeAllListeners(); if (res.statusCode !== 200) { - debug16( + debug2( "tunneling socket could not be established, statusCode=%d", res.statusCode ); socket.destroy(); - var error9 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); - error9.code = "ECONNRESET"; - options.request.emit("error", error9); + var error2 = new Error("tunneling socket could not be established, statusCode=" + res.statusCode); + error2.code = "ECONNRESET"; + options.request.emit("error", error2); self2.removeSocket(placeholder); return; } if (head.length > 0) { - debug16("got illegal response body from proxy"); + debug2("got illegal response body from proxy"); socket.destroy(); - var error9 = new Error("got illegal response body from proxy"); - error9.code = "ECONNRESET"; - options.request.emit("error", error9); + var error2 = new Error("got illegal response body from proxy"); + error2.code = "ECONNRESET"; + options.request.emit("error", error2); self2.removeSocket(placeholder); return; } - debug16("tunneling connection has established"); + debug2("tunneling connection has established"); self2.sockets[self2.sockets.indexOf(placeholder)] = socket; return cb(socket); } function onError(cause) { connectReq.removeAllListeners(); - debug16( + debug2( "tunneling socket could not be established, cause=%s\n", cause.message, cause.stack ); - var error9 = new Error("tunneling socket could not be established, cause=" + cause.message); - error9.code = "ECONNRESET"; - options.request.emit("error", error9); + var error2 = new Error("tunneling socket could not be established, cause=" + cause.message); + error2.code = "ECONNRESET"; + options.request.emit("error", error2); self2.removeSocket(placeholder); } }; @@ -382,9 +382,9 @@ var require_tunnel = __commonJS({ } return target; } - var debug16; + var debug2; if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug16 = function() { + debug2 = function() { var args = Array.prototype.slice.call(arguments); if (typeof args[0] === "string") { args[0] = "TUNNEL: " + args[0]; @@ -394,10 +394,10 @@ var require_tunnel = __commonJS({ console.error.apply(console, args); }; } else { - debug16 = function() { + debug2 = function() { }; } - exports2.debug = debug16; + exports2.debug = debug2; } }); @@ -3510,11 +3510,11 @@ var require_util2 = __commonJS({ var assert = require("assert"); var { isUint8Array } = require("util/types"); var supportedHashes = []; - var crypto4; + var crypto5; try { - crypto4 = require("crypto"); + crypto5 = require("crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto4.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto5.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -3791,7 +3791,7 @@ var require_util2 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto4 === void 0) { + if (crypto5 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -3806,7 +3806,7 @@ var require_util2 = __commonJS({ for (const item of metadata2) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto4.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto5.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -5152,8 +5152,8 @@ var require_body = __commonJS({ var { parseMIMEType, serializeAMimeType } = require_dataURL(); var random; try { - const crypto4 = require("node:crypto"); - random = (max) => crypto4.randomInt(0, max); + const crypto5 = require("node:crypto"); + random = (max) => crypto5.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -5455,7 +5455,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r throw new TypeError("Body is unusable"); } const promise = createDeferredPromise(); - const errorSteps = (error9) => promise.reject(error9); + const errorSteps = (error2) => promise.reject(error2); const successSteps = (data) => { try { promise.resolve(convertBytesToJSValue(data)); @@ -5741,16 +5741,16 @@ var require_request = __commonJS({ this.onError(err); } } - onError(error9) { + onError(error2) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error9 }); + channels.error.publish({ request: this, error: error2 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error9); + return this[kHandler].onError(error2); } onFinally() { if (this.errorHandler) { @@ -6613,8 +6613,8 @@ var require_RedirectHandler = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error9) { - this.handler.onError(error9); + onError(error2) { + this.handler.onError(error2); } onHeaders(statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util3.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -8755,7 +8755,7 @@ var require_pool = __commonJS({ this[kOptions] = { ...util3.deepClone(options), connect, allowH2 }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; - this.on("connectionError", (origin2, targets, error9) => { + this.on("connectionError", (origin2, targets, error2) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -10364,13 +10364,13 @@ var require_mock_utils = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data, headers, trailers, error: error9 }, delay: delay4, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error2 }, delay: delay4, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error9 !== null) { + if (error2 !== null) { deleteMockDispatch(this[kDispatches], key); - handler2.onError(error9); + handler2.onError(error2); return true; } if (typeof delay4 === "number" && delay4 > 0) { @@ -10408,19 +10408,19 @@ var require_mock_utils = __commonJS({ if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler2); - } catch (error9) { - if (error9 instanceof MockNotMatchedError) { + } catch (error2) { + if (error2 instanceof MockNotMatchedError) { const netConnect = agent[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error9.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler2); } else { - throw new MockNotMatchedError(`${error9.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error9; + throw error2; } } } else { @@ -10583,11 +10583,11 @@ var require_mock_interceptor = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error9) { - if (typeof error9 === "undefined") { + replyWithError(error2) { + if (typeof error2 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error9 }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error2 }); return new MockScope(newMockDispatch); } /** @@ -12914,17 +12914,17 @@ var require_fetch = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error9) { + abort(error2) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error9) { - error9 = new DOMException2("The operation was aborted.", "AbortError"); + if (!error2) { + error2 = new DOMException2("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error9; - this.connection?.destroy(error9); - this.emit("terminated", error9); + this.serializedAbortReason = error2; + this.connection?.destroy(error2); + this.emit("terminated", error2); } }; function fetch2(input, init = {}) { @@ -13028,13 +13028,13 @@ var require_fetch = __commonJS({ performance.markResourceTiming(timingInfo, originalURL.href, initiatorType, globalThis2, cacheState); } } - function abortFetch(p, request2, responseObject, error9) { - if (!error9) { - error9 = new DOMException2("The operation was aborted.", "AbortError"); + function abortFetch(p, request2, responseObject, error2) { + if (!error2) { + error2 = new DOMException2("The operation was aborted.", "AbortError"); } - p.reject(error9); + p.reject(error2); if (request2.body != null && isReadable(request2.body?.stream)) { - request2.body.stream.cancel(error9).catch((err) => { + request2.body.stream.cancel(error2).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13046,7 +13046,7 @@ var require_fetch = __commonJS({ } const response = responseObject[kState]; if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error9).catch((err) => { + response.body.stream.cancel(error2).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -13826,13 +13826,13 @@ var require_fetch = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error9) { + onError(error2) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error9); - fetchParams.controller.terminate(error9); - reject(error9); + this.body?.destroy(error2); + fetchParams.controller.terminate(error2); + reject(error2); }, onUpgrade(status, headersList, socket) { if (status !== 101) { @@ -14298,8 +14298,8 @@ var require_util4 = __commonJS({ } fr[kResult] = result; fireAProgressEvent("load", fr); - } catch (error9) { - fr[kError] = error9; + } catch (error2) { + fr[kError] = error2; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { @@ -14308,13 +14308,13 @@ var require_util4 = __commonJS({ }); break; } - } catch (error9) { + } catch (error2) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; - fr[kError] = error9; + fr[kError] = error2; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); @@ -16203,9 +16203,9 @@ var require_connection = __commonJS({ channels.open = diagnosticsChannel.channel("undici:websocket:open"); channels.close = diagnosticsChannel.channel("undici:websocket:close"); channels.socketError = diagnosticsChannel.channel("undici:websocket:socket_error"); - var crypto4; + var crypto5; try { - crypto4 = require("crypto"); + crypto5 = require("crypto"); } catch { } function establishWebSocketConnection(url2, protocols, ws, onEstablish, options) { @@ -16224,7 +16224,7 @@ var require_connection = __commonJS({ const headersList = new Headers2(options.headers)[kHeadersList]; request2.headersList = headersList; } - const keyValue = crypto4.randomBytes(16).toString("base64"); + const keyValue = crypto5.randomBytes(16).toString("base64"); request2.headersList.append("sec-websocket-key", keyValue); request2.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -16253,7 +16253,7 @@ var require_connection = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto4.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto5.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -16314,11 +16314,11 @@ var require_connection = __commonJS({ }); } } - function onSocketError(error9) { + function onSocketError(error2) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error9); + channels.socketError.publish(error2); } this.destroy(); } @@ -16333,9 +16333,9 @@ var require_frame = __commonJS({ "node_modules/undici/lib/websocket/frame.js"(exports2, module2) { "use strict"; var { maxUnsigned16Bit } = require_constants5(); - var crypto4; + var crypto5; try { - crypto4 = require("crypto"); + crypto5 = require("crypto"); } catch { } var WebsocketFrameSend = class { @@ -16344,7 +16344,7 @@ var require_frame = __commonJS({ */ constructor(data) { this.frameData = data; - this.maskKey = crypto4.randomBytes(4); + this.maskKey = crypto5.randomBytes(4); } createFrame(opcode) { const bodyLength = this.frameData?.byteLength ?? 0; @@ -17462,12 +17462,12 @@ var require_lib = __commonJS({ throw new Error("Client has already been disposed."); } const parsedUrl = new URL(requestUrl); - let info17 = this._prepareRequest(verb, parsedUrl, headers); + let info2 = this._prepareRequest(verb, parsedUrl, headers); const maxTries = this._allowRetries && RetryableHttpVerbs2.includes(verb) ? this._maxRetries + 1 : 1; let numTries = 0; let response; do { - response = yield this.requestRaw(info17, data); + response = yield this.requestRaw(info2, data); if (response && response.message && response.message.statusCode === HttpCodes2.Unauthorized) { let authenticationHandler; for (const handler2 of this.handlers) { @@ -17477,7 +17477,7 @@ var require_lib = __commonJS({ } } if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info17, data); + return authenticationHandler.handleAuthentication(this, info2, data); } else { return response; } @@ -17500,8 +17500,8 @@ var require_lib = __commonJS({ } } } - info17 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info17, data); + info2 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info2, data); redirectsRemaining--; } if (!response.message.statusCode || !HttpResponseRetryCodes2.includes(response.message.statusCode)) { @@ -17530,7 +17530,7 @@ var require_lib = __commonJS({ * @param info * @param data */ - requestRaw(info17, data) { + requestRaw(info2, data) { return __awaiter15(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { function callbackForResult(err, res) { @@ -17542,7 +17542,7 @@ var require_lib = __commonJS({ resolve2(res); } } - this.requestRawWithCallback(info17, data, callbackForResult); + this.requestRawWithCallback(info2, data, callbackForResult); }); }); } @@ -17552,12 +17552,12 @@ var require_lib = __commonJS({ * @param data * @param onResult */ - requestRawWithCallback(info17, data, onResult) { + requestRawWithCallback(info2, data, onResult) { if (typeof data === "string") { - if (!info17.options.headers) { - info17.options.headers = {}; + if (!info2.options.headers) { + info2.options.headers = {}; } - info17.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + info2.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); } let callbackCalled = false; function handleResult(err, res) { @@ -17566,7 +17566,7 @@ var require_lib = __commonJS({ onResult(err, res); } } - const req = info17.httpModule.request(info17.options, (msg) => { + const req = info2.httpModule.request(info2.options, (msg) => { const res = new HttpClientResponse2(msg); handleResult(void 0, res); }); @@ -17578,7 +17578,7 @@ var require_lib = __commonJS({ if (socket) { socket.end(); } - handleResult(new Error(`Request timeout: ${info17.options.path}`)); + handleResult(new Error(`Request timeout: ${info2.options.path}`)); }); req.on("error", function(err) { handleResult(err); @@ -17614,27 +17614,27 @@ var require_lib = __commonJS({ return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); } _prepareRequest(method, requestUrl, headers) { - const info17 = {}; - info17.parsedUrl = requestUrl; - const usingSsl = info17.parsedUrl.protocol === "https:"; - info17.httpModule = usingSsl ? https3 : http3; + const info2 = {}; + info2.parsedUrl = requestUrl; + const usingSsl = info2.parsedUrl.protocol === "https:"; + info2.httpModule = usingSsl ? https3 : http3; const defaultPort = usingSsl ? 443 : 80; - info17.options = {}; - info17.options.host = info17.parsedUrl.hostname; - info17.options.port = info17.parsedUrl.port ? parseInt(info17.parsedUrl.port) : defaultPort; - info17.options.path = (info17.parsedUrl.pathname || "") + (info17.parsedUrl.search || ""); - info17.options.method = method; - info17.options.headers = this._mergeHeaders(headers); + info2.options = {}; + info2.options.host = info2.parsedUrl.hostname; + info2.options.port = info2.parsedUrl.port ? parseInt(info2.parsedUrl.port) : defaultPort; + info2.options.path = (info2.parsedUrl.pathname || "") + (info2.parsedUrl.search || ""); + info2.options.method = method; + info2.options.headers = this._mergeHeaders(headers); if (this.userAgent != null) { - info17.options.headers["user-agent"] = this.userAgent; + info2.options.headers["user-agent"] = this.userAgent; } - info17.options.agent = this._getAgent(info17.parsedUrl); + info2.options.agent = this._getAgent(info2.parsedUrl); if (this.handlers) { for (const handler2 of this.handlers) { - handler2.prepareRequest(info17.options); + handler2.prepareRequest(info2.options); } } - return info17; + return info2; } _mergeHeaders(headers) { if (this.requestOptions && this.requestOptions.headers) { @@ -17953,8 +17953,8 @@ var require_add = __commonJS({ } if (kind === "error") { hook2 = function(method, options) { - return Promise.resolve().then(method.bind(null, options)).catch(function(error9) { - return orig(error9, options); + return Promise.resolve().then(method.bind(null, options)).catch(function(error2) { + return orig(error2, options); }); }; } @@ -18686,7 +18686,7 @@ var require_dist_node5 = __commonJS({ } if (status >= 400) { const data = await getResponseData2(response); - const error9 = new import_request_error3.RequestError(toErrorMessage2(data), status, { + const error2 = new import_request_error3.RequestError(toErrorMessage2(data), status, { response: { url: url2, status, @@ -18695,7 +18695,7 @@ var require_dist_node5 = __commonJS({ }, request: requestOptions }); - throw error9; + throw error2; } return parseSuccessResponseBody ? await getResponseData2(response) : response.body; }).then((data) => { @@ -18705,17 +18705,17 @@ var require_dist_node5 = __commonJS({ headers, data }; - }).catch((error9) => { - if (error9 instanceof import_request_error3.RequestError) - throw error9; - else if (error9.name === "AbortError") - throw error9; - let message = error9.message; - if (error9.name === "TypeError" && "cause" in error9) { - if (error9.cause instanceof Error) { - message = error9.cause.message; - } else if (typeof error9.cause === "string") { - message = error9.cause; + }).catch((error2) => { + if (error2 instanceof import_request_error3.RequestError) + throw error2; + else if (error2.name === "AbortError") + throw error2; + let message = error2.message; + if (error2.name === "TypeError" && "cause" in error2) { + if (error2.cause instanceof Error) { + message = error2.cause.message; + } else if (typeof error2.cause === "string") { + message = error2.cause; } } throw new import_request_error3.RequestError(message, 500, { @@ -21387,9 +21387,9 @@ var require_dist_node10 = __commonJS({ /<([^<>]+)>;\s*rel="next"/ ) || [])[1]; return { value: normalizedResponse }; - } catch (error9) { - if (error9.status !== 409) - throw error9; + } catch (error2) { + if (error2.status !== 409) + throw error2; url2 = ""; return { value: { @@ -21794,2795 +21794,6 @@ var require_github = __commonJS({ } }); -// node_modules/@actions/core/lib/utils.js -var require_utils4 = __commonJS({ - "node_modules/@actions/core/lib/utils.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toCommandProperties = exports2.toCommandValue = void 0; - function toCommandValue2(input) { - if (input === null || input === void 0) { - return ""; - } else if (typeof input === "string" || input instanceof String) { - return input; - } - return JSON.stringify(input); - } - exports2.toCommandValue = toCommandValue2; - function toCommandProperties2(annotationProperties) { - if (!Object.keys(annotationProperties).length) { - return {}; - } - return { - title: annotationProperties.title, - file: annotationProperties.file, - line: annotationProperties.startLine, - endLine: annotationProperties.endLine, - col: annotationProperties.startColumn, - endColumn: annotationProperties.endColumn - }; - } - exports2.toCommandProperties = toCommandProperties2; - } -}); - -// node_modules/@actions/core/lib/command.js -var require_command = __commonJS({ - "node_modules/@actions/core/lib/command.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.issue = exports2.issueCommand = void 0; - var os6 = __importStar(require("os")); - var utils_1 = require_utils4(); - function issueCommand2(command, properties, message) { - const cmd = new Command2(command, properties, message); - process.stdout.write(cmd.toString() + os6.EOL); - } - exports2.issueCommand = issueCommand2; - function issue2(name, message = "") { - issueCommand2(name, {}, message); - } - exports2.issue = issue2; - var CMD_STRING2 = "::"; - var Command2 = class { - constructor(command, properties, message) { - if (!command) { - command = "missing.command"; - } - this.command = command; - this.properties = properties; - this.message = message; - } - toString() { - let cmdStr = CMD_STRING2 + this.command; - if (this.properties && Object.keys(this.properties).length > 0) { - cmdStr += " "; - let first = true; - for (const key in this.properties) { - if (this.properties.hasOwnProperty(key)) { - const val = this.properties[key]; - if (val) { - if (first) { - first = false; - } else { - cmdStr += ","; - } - cmdStr += `${key}=${escapeProperty2(val)}`; - } - } - } - } - cmdStr += `${CMD_STRING2}${escapeData2(this.message)}`; - return cmdStr; - } - }; - function escapeData2(s) { - return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A"); - } - function escapeProperty2(s) { - return (0, utils_1.toCommandValue)(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); - } - } -}); - -// node_modules/@actions/core/lib/file-command.js -var require_file_command = __commonJS({ - "node_modules/@actions/core/lib/file-command.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.prepareKeyValueMessage = exports2.issueFileCommand = void 0; - var crypto4 = __importStar(require("crypto")); - var fs13 = __importStar(require("fs")); - var os6 = __importStar(require("os")); - var utils_1 = require_utils4(); - function issueFileCommand2(command, message) { - const filePath = process.env[`GITHUB_${command}`]; - if (!filePath) { - throw new Error(`Unable to find environment variable for file command ${command}`); - } - if (!fs13.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`); - } - fs13.appendFileSync(filePath, `${(0, utils_1.toCommandValue)(message)}${os6.EOL}`, { - encoding: "utf8" - }); - } - exports2.issueFileCommand = issueFileCommand2; - function prepareKeyValueMessage2(key, value) { - const delimiter2 = `ghadelimiter_${crypto4.randomUUID()}`; - const convertedValue = (0, utils_1.toCommandValue)(value); - if (key.includes(delimiter2)) { - throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter2}"`); - } - if (convertedValue.includes(delimiter2)) { - throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter2}"`); - } - return `${key}<<${delimiter2}${os6.EOL}${convertedValue}${os6.EOL}${delimiter2}`; - } - exports2.prepareKeyValueMessage = prepareKeyValueMessage2; - } -}); - -// node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js -var require_proxy2 = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/proxy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.checkBypass = exports2.getProxyUrl = void 0; - function getProxyUrl2(reqUrl) { - const usingSsl = reqUrl.protocol === "https:"; - if (checkBypass2(reqUrl)) { - return void 0; - } - const proxyVar = (() => { - if (usingSsl) { - return process.env["https_proxy"] || process.env["HTTPS_PROXY"]; - } else { - return process.env["http_proxy"] || process.env["HTTP_PROXY"]; - } - })(); - if (proxyVar) { - try { - return new DecodedURL2(proxyVar); - } catch (_a) { - if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://")) - return new DecodedURL2(`http://${proxyVar}`); - } - } else { - return void 0; - } - } - exports2.getProxyUrl = getProxyUrl2; - function checkBypass2(reqUrl) { - if (!reqUrl.hostname) { - return false; - } - const reqHost = reqUrl.hostname; - if (isLoopbackAddress2(reqHost)) { - return true; - } - const noProxy = process.env["no_proxy"] || process.env["NO_PROXY"] || ""; - if (!noProxy) { - return false; - } - let reqPort; - if (reqUrl.port) { - reqPort = Number(reqUrl.port); - } else if (reqUrl.protocol === "http:") { - reqPort = 80; - } else if (reqUrl.protocol === "https:") { - reqPort = 443; - } - const upperReqHosts = [reqUrl.hostname.toUpperCase()]; - if (typeof reqPort === "number") { - upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`); - } - for (const upperNoProxyItem of noProxy.split(",").map((x) => x.trim().toUpperCase()).filter((x) => x)) { - if (upperNoProxyItem === "*" || upperReqHosts.some((x) => x === upperNoProxyItem || x.endsWith(`.${upperNoProxyItem}`) || upperNoProxyItem.startsWith(".") && x.endsWith(`${upperNoProxyItem}`))) { - return true; - } - } - return false; - } - exports2.checkBypass = checkBypass2; - function isLoopbackAddress2(host) { - const hostLower = host.toLowerCase(); - return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]"); - } - var DecodedURL2 = class extends URL { - constructor(url2, base) { - super(url2, base); - this._decodedUsername = decodeURIComponent(super.username); - this._decodedPassword = decodeURIComponent(super.password); - } - get username() { - return this._decodedUsername; - } - get password() { - return this._decodedPassword; - } - }; - } -}); - -// node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js -var require_lib2 = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/index.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.HttpClient = exports2.isHttps = exports2.HttpClientResponse = exports2.HttpClientError = exports2.getProxyUrl = exports2.MediaTypes = exports2.Headers = exports2.HttpCodes = void 0; - var http3 = __importStar(require("http")); - var https3 = __importStar(require("https")); - var pm = __importStar(require_proxy2()); - var tunnel2 = __importStar(require_tunnel2()); - var undici_1 = require_undici(); - var HttpCodes2; - (function(HttpCodes3) { - HttpCodes3[HttpCodes3["OK"] = 200] = "OK"; - HttpCodes3[HttpCodes3["MultipleChoices"] = 300] = "MultipleChoices"; - HttpCodes3[HttpCodes3["MovedPermanently"] = 301] = "MovedPermanently"; - HttpCodes3[HttpCodes3["ResourceMoved"] = 302] = "ResourceMoved"; - HttpCodes3[HttpCodes3["SeeOther"] = 303] = "SeeOther"; - HttpCodes3[HttpCodes3["NotModified"] = 304] = "NotModified"; - HttpCodes3[HttpCodes3["UseProxy"] = 305] = "UseProxy"; - HttpCodes3[HttpCodes3["SwitchProxy"] = 306] = "SwitchProxy"; - HttpCodes3[HttpCodes3["TemporaryRedirect"] = 307] = "TemporaryRedirect"; - HttpCodes3[HttpCodes3["PermanentRedirect"] = 308] = "PermanentRedirect"; - HttpCodes3[HttpCodes3["BadRequest"] = 400] = "BadRequest"; - HttpCodes3[HttpCodes3["Unauthorized"] = 401] = "Unauthorized"; - HttpCodes3[HttpCodes3["PaymentRequired"] = 402] = "PaymentRequired"; - HttpCodes3[HttpCodes3["Forbidden"] = 403] = "Forbidden"; - HttpCodes3[HttpCodes3["NotFound"] = 404] = "NotFound"; - HttpCodes3[HttpCodes3["MethodNotAllowed"] = 405] = "MethodNotAllowed"; - HttpCodes3[HttpCodes3["NotAcceptable"] = 406] = "NotAcceptable"; - HttpCodes3[HttpCodes3["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired"; - HttpCodes3[HttpCodes3["RequestTimeout"] = 408] = "RequestTimeout"; - HttpCodes3[HttpCodes3["Conflict"] = 409] = "Conflict"; - HttpCodes3[HttpCodes3["Gone"] = 410] = "Gone"; - HttpCodes3[HttpCodes3["TooManyRequests"] = 429] = "TooManyRequests"; - HttpCodes3[HttpCodes3["InternalServerError"] = 500] = "InternalServerError"; - HttpCodes3[HttpCodes3["NotImplemented"] = 501] = "NotImplemented"; - HttpCodes3[HttpCodes3["BadGateway"] = 502] = "BadGateway"; - HttpCodes3[HttpCodes3["ServiceUnavailable"] = 503] = "ServiceUnavailable"; - HttpCodes3[HttpCodes3["GatewayTimeout"] = 504] = "GatewayTimeout"; - })(HttpCodes2 || (exports2.HttpCodes = HttpCodes2 = {})); - var Headers2; - (function(Headers3) { - Headers3["Accept"] = "accept"; - Headers3["ContentType"] = "content-type"; - })(Headers2 || (exports2.Headers = Headers2 = {})); - var MediaTypes2; - (function(MediaTypes3) { - MediaTypes3["ApplicationJson"] = "application/json"; - })(MediaTypes2 || (exports2.MediaTypes = MediaTypes2 = {})); - function getProxyUrl2(serverUrl) { - const proxyUrl = pm.getProxyUrl(new URL(serverUrl)); - return proxyUrl ? proxyUrl.href : ""; - } - exports2.getProxyUrl = getProxyUrl2; - var HttpRedirectCodes2 = [ - HttpCodes2.MovedPermanently, - HttpCodes2.ResourceMoved, - HttpCodes2.SeeOther, - HttpCodes2.TemporaryRedirect, - HttpCodes2.PermanentRedirect - ]; - var HttpResponseRetryCodes2 = [ - HttpCodes2.BadGateway, - HttpCodes2.ServiceUnavailable, - HttpCodes2.GatewayTimeout - ]; - var RetryableHttpVerbs2 = ["OPTIONS", "GET", "DELETE", "HEAD"]; - var ExponentialBackoffCeiling2 = 10; - var ExponentialBackoffTimeSlice2 = 5; - var HttpClientError2 = class _HttpClientError extends Error { - constructor(message, statusCode) { - super(message); - this.name = "HttpClientError"; - this.statusCode = statusCode; - Object.setPrototypeOf(this, _HttpClientError.prototype); - } - }; - exports2.HttpClientError = HttpClientError2; - var HttpClientResponse2 = class { - constructor(message) { - this.message = message; - } - readBody() { - return __awaiter15(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter15(this, void 0, void 0, function* () { - let output = Buffer.alloc(0); - this.message.on("data", (chunk) => { - output = Buffer.concat([output, chunk]); - }); - this.message.on("end", () => { - resolve2(output.toString()); - }); - })); - }); - } - readBodyBuffer() { - return __awaiter15(this, void 0, void 0, function* () { - return new Promise((resolve2) => __awaiter15(this, void 0, void 0, function* () { - const chunks = []; - this.message.on("data", (chunk) => { - chunks.push(chunk); - }); - this.message.on("end", () => { - resolve2(Buffer.concat(chunks)); - }); - })); - }); - } - }; - exports2.HttpClientResponse = HttpClientResponse2; - function isHttps(requestUrl) { - const parsedUrl = new URL(requestUrl); - return parsedUrl.protocol === "https:"; - } - exports2.isHttps = isHttps; - var HttpClient3 = class { - constructor(userAgent2, handlers, requestOptions) { - this._ignoreSslError = false; - this._allowRedirects = true; - this._allowRedirectDowngrade = false; - this._maxRedirects = 50; - this._allowRetries = false; - this._maxRetries = 1; - this._keepAlive = false; - this._disposed = false; - this.userAgent = userAgent2; - this.handlers = handlers || []; - this.requestOptions = requestOptions; - if (requestOptions) { - if (requestOptions.ignoreSslError != null) { - this._ignoreSslError = requestOptions.ignoreSslError; - } - this._socketTimeout = requestOptions.socketTimeout; - if (requestOptions.allowRedirects != null) { - this._allowRedirects = requestOptions.allowRedirects; - } - if (requestOptions.allowRedirectDowngrade != null) { - this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade; - } - if (requestOptions.maxRedirects != null) { - this._maxRedirects = Math.max(requestOptions.maxRedirects, 0); - } - if (requestOptions.keepAlive != null) { - this._keepAlive = requestOptions.keepAlive; - } - if (requestOptions.allowRetries != null) { - this._allowRetries = requestOptions.allowRetries; - } - if (requestOptions.maxRetries != null) { - this._maxRetries = requestOptions.maxRetries; - } - } - } - options(requestUrl, additionalHeaders) { - return __awaiter15(this, void 0, void 0, function* () { - return this.request("OPTIONS", requestUrl, null, additionalHeaders || {}); - }); - } - get(requestUrl, additionalHeaders) { - return __awaiter15(this, void 0, void 0, function* () { - return this.request("GET", requestUrl, null, additionalHeaders || {}); - }); - } - del(requestUrl, additionalHeaders) { - return __awaiter15(this, void 0, void 0, function* () { - return this.request("DELETE", requestUrl, null, additionalHeaders || {}); - }); - } - post(requestUrl, data, additionalHeaders) { - return __awaiter15(this, void 0, void 0, function* () { - return this.request("POST", requestUrl, data, additionalHeaders || {}); - }); - } - patch(requestUrl, data, additionalHeaders) { - return __awaiter15(this, void 0, void 0, function* () { - return this.request("PATCH", requestUrl, data, additionalHeaders || {}); - }); - } - put(requestUrl, data, additionalHeaders) { - return __awaiter15(this, void 0, void 0, function* () { - return this.request("PUT", requestUrl, data, additionalHeaders || {}); - }); - } - head(requestUrl, additionalHeaders) { - return __awaiter15(this, void 0, void 0, function* () { - return this.request("HEAD", requestUrl, null, additionalHeaders || {}); - }); - } - sendStream(verb, requestUrl, stream4, additionalHeaders) { - return __awaiter15(this, void 0, void 0, function* () { - return this.request(verb, requestUrl, stream4, additionalHeaders); - }); - } - /** - * Gets a typed object from an endpoint - * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise - */ - getJson(requestUrl, additionalHeaders = {}) { - return __awaiter15(this, void 0, void 0, function* () { - additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes2.ApplicationJson); - const res = yield this.get(requestUrl, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - postJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter15(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes2.ApplicationJson); - additionalHeaders[Headers2.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.ContentType, MediaTypes2.ApplicationJson); - const res = yield this.post(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - putJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter15(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes2.ApplicationJson); - additionalHeaders[Headers2.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.ContentType, MediaTypes2.ApplicationJson); - const res = yield this.put(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - patchJson(requestUrl, obj, additionalHeaders = {}) { - return __awaiter15(this, void 0, void 0, function* () { - const data = JSON.stringify(obj, null, 2); - additionalHeaders[Headers2.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.Accept, MediaTypes2.ApplicationJson); - additionalHeaders[Headers2.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers2.ContentType, MediaTypes2.ApplicationJson); - const res = yield this.patch(requestUrl, data, additionalHeaders); - return this._processResponse(res, this.requestOptions); - }); - } - /** - * Makes a raw http request. - * All other methods such as get, post, patch, and request ultimately call this. - * Prefer get, del, post and patch - */ - request(verb, requestUrl, data, headers) { - return __awaiter15(this, void 0, void 0, function* () { - if (this._disposed) { - throw new Error("Client has already been disposed."); - } - const parsedUrl = new URL(requestUrl); - let info17 = this._prepareRequest(verb, parsedUrl, headers); - const maxTries = this._allowRetries && RetryableHttpVerbs2.includes(verb) ? this._maxRetries + 1 : 1; - let numTries = 0; - let response; - do { - response = yield this.requestRaw(info17, data); - if (response && response.message && response.message.statusCode === HttpCodes2.Unauthorized) { - let authenticationHandler; - for (const handler2 of this.handlers) { - if (handler2.canHandleAuthentication(response)) { - authenticationHandler = handler2; - break; - } - } - if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info17, data); - } else { - return response; - } - } - let redirectsRemaining = this._maxRedirects; - while (response.message.statusCode && HttpRedirectCodes2.includes(response.message.statusCode) && this._allowRedirects && redirectsRemaining > 0) { - const redirectUrl = response.message.headers["location"]; - if (!redirectUrl) { - break; - } - const parsedRedirectUrl = new URL(redirectUrl); - if (parsedUrl.protocol === "https:" && parsedUrl.protocol !== parsedRedirectUrl.protocol && !this._allowRedirectDowngrade) { - throw new Error("Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true."); - } - yield response.readBody(); - if (parsedRedirectUrl.hostname !== parsedUrl.hostname) { - for (const header in headers) { - if (header.toLowerCase() === "authorization") { - delete headers[header]; - } - } - } - info17 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info17, data); - redirectsRemaining--; - } - if (!response.message.statusCode || !HttpResponseRetryCodes2.includes(response.message.statusCode)) { - return response; - } - numTries += 1; - if (numTries < maxTries) { - yield response.readBody(); - yield this._performExponentialBackoff(numTries); - } - } while (numTries < maxTries); - return response; - }); - } - /** - * Needs to be called if keepAlive is set to true in request options. - */ - dispose() { - if (this._agent) { - this._agent.destroy(); - } - this._disposed = true; - } - /** - * Raw request. - * @param info - * @param data - */ - requestRaw(info17, data) { - return __awaiter15(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => { - function callbackForResult(err, res) { - if (err) { - reject(err); - } else if (!res) { - reject(new Error("Unknown error")); - } else { - resolve2(res); - } - } - this.requestRawWithCallback(info17, data, callbackForResult); - }); - }); - } - /** - * Raw request with callback. - * @param info - * @param data - * @param onResult - */ - requestRawWithCallback(info17, data, onResult) { - if (typeof data === "string") { - if (!info17.options.headers) { - info17.options.headers = {}; - } - info17.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); - } - let callbackCalled = false; - function handleResult(err, res) { - if (!callbackCalled) { - callbackCalled = true; - onResult(err, res); - } - } - const req = info17.httpModule.request(info17.options, (msg) => { - const res = new HttpClientResponse2(msg); - handleResult(void 0, res); - }); - let socket; - req.on("socket", (sock) => { - socket = sock; - }); - req.setTimeout(this._socketTimeout || 3 * 6e4, () => { - if (socket) { - socket.end(); - } - handleResult(new Error(`Request timeout: ${info17.options.path}`)); - }); - req.on("error", function(err) { - handleResult(err); - }); - if (data && typeof data === "string") { - req.write(data, "utf8"); - } - if (data && typeof data !== "string") { - data.on("close", function() { - req.end(); - }); - data.pipe(req); - } else { - req.end(); - } - } - /** - * Gets an http agent. This function is useful when you need an http agent that handles - * routing through a proxy server - depending upon the url and proxy environment variables. - * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com - */ - getAgent(serverUrl) { - const parsedUrl = new URL(serverUrl); - return this._getAgent(parsedUrl); - } - getAgentDispatcher(serverUrl) { - const parsedUrl = new URL(serverUrl); - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (!useProxy) { - return; - } - return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); - } - _prepareRequest(method, requestUrl, headers) { - const info17 = {}; - info17.parsedUrl = requestUrl; - const usingSsl = info17.parsedUrl.protocol === "https:"; - info17.httpModule = usingSsl ? https3 : http3; - const defaultPort = usingSsl ? 443 : 80; - info17.options = {}; - info17.options.host = info17.parsedUrl.hostname; - info17.options.port = info17.parsedUrl.port ? parseInt(info17.parsedUrl.port) : defaultPort; - info17.options.path = (info17.parsedUrl.pathname || "") + (info17.parsedUrl.search || ""); - info17.options.method = method; - info17.options.headers = this._mergeHeaders(headers); - if (this.userAgent != null) { - info17.options.headers["user-agent"] = this.userAgent; - } - info17.options.agent = this._getAgent(info17.parsedUrl); - if (this.handlers) { - for (const handler2 of this.handlers) { - handler2.prepareRequest(info17.options); - } - } - return info17; - } - _mergeHeaders(headers) { - if (this.requestOptions && this.requestOptions.headers) { - return Object.assign({}, lowercaseKeys3(this.requestOptions.headers), lowercaseKeys3(headers || {})); - } - return lowercaseKeys3(headers || {}); - } - _getExistingOrDefaultHeader(additionalHeaders, header, _default) { - let clientHeader; - if (this.requestOptions && this.requestOptions.headers) { - clientHeader = lowercaseKeys3(this.requestOptions.headers)[header]; - } - return additionalHeaders[header] || clientHeader || _default; - } - _getAgent(parsedUrl) { - let agent; - const proxyUrl = pm.getProxyUrl(parsedUrl); - const useProxy = proxyUrl && proxyUrl.hostname; - if (this._keepAlive && useProxy) { - agent = this._proxyAgent; - } - if (!useProxy) { - agent = this._agent; - } - if (agent) { - return agent; - } - const usingSsl = parsedUrl.protocol === "https:"; - let maxSockets = 100; - if (this.requestOptions) { - maxSockets = this.requestOptions.maxSockets || http3.globalAgent.maxSockets; - } - if (proxyUrl && proxyUrl.hostname) { - const agentOptions = { - maxSockets, - keepAlive: this._keepAlive, - proxy: Object.assign(Object.assign({}, (proxyUrl.username || proxyUrl.password) && { - proxyAuth: `${proxyUrl.username}:${proxyUrl.password}` - }), { host: proxyUrl.hostname, port: proxyUrl.port }) - }; - let tunnelAgent; - const overHttps = proxyUrl.protocol === "https:"; - if (usingSsl) { - tunnelAgent = overHttps ? tunnel2.httpsOverHttps : tunnel2.httpsOverHttp; - } else { - tunnelAgent = overHttps ? tunnel2.httpOverHttps : tunnel2.httpOverHttp; - } - agent = tunnelAgent(agentOptions); - this._proxyAgent = agent; - } - if (!agent) { - const options = { keepAlive: this._keepAlive, maxSockets }; - agent = usingSsl ? new https3.Agent(options) : new http3.Agent(options); - this._agent = agent; - } - if (usingSsl && this._ignoreSslError) { - agent.options = Object.assign(agent.options || {}, { - rejectUnauthorized: false - }); - } - return agent; - } - _getProxyAgentDispatcher(parsedUrl, proxyUrl) { - let proxyAgent; - if (this._keepAlive) { - proxyAgent = this._proxyAgentDispatcher; - } - if (proxyAgent) { - return proxyAgent; - } - const usingSsl = parsedUrl.protocol === "https:"; - proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && { - token: `Basic ${Buffer.from(`${proxyUrl.username}:${proxyUrl.password}`).toString("base64")}` - })); - this._proxyAgentDispatcher = proxyAgent; - if (usingSsl && this._ignoreSslError) { - proxyAgent.options = Object.assign(proxyAgent.options.requestTls || {}, { - rejectUnauthorized: false - }); - } - return proxyAgent; - } - _performExponentialBackoff(retryNumber) { - return __awaiter15(this, void 0, void 0, function* () { - retryNumber = Math.min(ExponentialBackoffCeiling2, retryNumber); - const ms = ExponentialBackoffTimeSlice2 * Math.pow(2, retryNumber); - return new Promise((resolve2) => setTimeout(() => resolve2(), ms)); - }); - } - _processResponse(res, options) { - return __awaiter15(this, void 0, void 0, function* () { - return new Promise((resolve2, reject) => __awaiter15(this, void 0, void 0, function* () { - const statusCode = res.message.statusCode || 0; - const response = { - statusCode, - result: null, - headers: {} - }; - if (statusCode === HttpCodes2.NotFound) { - resolve2(response); - } - function dateTimeDeserializer(key, value) { - if (typeof value === "string") { - const a = new Date(value); - if (!isNaN(a.valueOf())) { - return a; - } - } - return value; - } - let obj; - let contents; - try { - contents = yield res.readBody(); - if (contents && contents.length > 0) { - if (options && options.deserializeDates) { - obj = JSON.parse(contents, dateTimeDeserializer); - } else { - obj = JSON.parse(contents); - } - response.result = obj; - } - response.headers = res.message.headers; - } catch (err) { - } - if (statusCode > 299) { - let msg; - if (obj && obj.message) { - msg = obj.message; - } else if (contents && contents.length > 0) { - msg = contents; - } else { - msg = `Failed request: (${statusCode})`; - } - const err = new HttpClientError2(msg, statusCode); - err.result = response.result; - reject(err); - } else { - resolve2(response); - } - })); - }); - } - }; - exports2.HttpClient = HttpClient3; - var lowercaseKeys3 = (obj) => Object.keys(obj).reduce((c, k) => (c[k.toLowerCase()] = obj[k], c), {}); - } -}); - -// node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js -var require_auth = __commonJS({ - "node_modules/@actions/core/node_modules/@actions/http-client/lib/auth.js"(exports2) { - "use strict"; - var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PersonalAccessTokenCredentialHandler = exports2.BearerCredentialHandler = exports2.BasicCredentialHandler = void 0; - var BasicCredentialHandler = class { - constructor(username, password) { - this.username = username; - this.password = password; - } - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`${this.username}:${this.password}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter15(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BasicCredentialHandler = BasicCredentialHandler; - var BearerCredentialHandler2 = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Bearer ${this.token}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter15(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.BearerCredentialHandler = BearerCredentialHandler2; - var PersonalAccessTokenCredentialHandler = class { - constructor(token) { - this.token = token; - } - // currently implements pre-authorization - // TODO: support preAuth = false where it hooks on 401 - prepareRequest(options) { - if (!options.headers) { - throw Error("The request has no headers"); - } - options.headers["Authorization"] = `Basic ${Buffer.from(`PAT:${this.token}`).toString("base64")}`; - } - // This handler cannot handle 401 - canHandleAuthentication() { - return false; - } - handleAuthentication() { - return __awaiter15(this, void 0, void 0, function* () { - throw new Error("not implemented"); - }); - } - }; - exports2.PersonalAccessTokenCredentialHandler = PersonalAccessTokenCredentialHandler; - } -}); - -// node_modules/@actions/core/lib/oidc-utils.js -var require_oidc_utils = __commonJS({ - "node_modules/@actions/core/lib/oidc-utils.js"(exports2) { - "use strict"; - var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.OidcClient = void 0; - var http_client_1 = require_lib2(); - var auth_1 = require_auth(); - var core_1 = require_core(); - var OidcClient2 = class _OidcClient { - static createHttpClient(allowRetry = true, maxRetry = 10) { - const requestOptions = { - allowRetries: allowRetry, - maxRetries: maxRetry - }; - return new http_client_1.HttpClient("actions/oidc-client", [new auth_1.BearerCredentialHandler(_OidcClient.getRequestToken())], requestOptions); - } - static getRequestToken() { - const token = process.env["ACTIONS_ID_TOKEN_REQUEST_TOKEN"]; - if (!token) { - throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_TOKEN env variable"); - } - return token; - } - static getIDTokenUrl() { - const runtimeUrl = process.env["ACTIONS_ID_TOKEN_REQUEST_URL"]; - if (!runtimeUrl) { - throw new Error("Unable to get ACTIONS_ID_TOKEN_REQUEST_URL env variable"); - } - return runtimeUrl; - } - static getCall(id_token_url) { - var _a; - return __awaiter15(this, void 0, void 0, function* () { - const httpclient = _OidcClient.createHttpClient(); - const res = yield httpclient.getJson(id_token_url).catch((error9) => { - throw new Error(`Failed to get ID Token. - - Error Code : ${error9.statusCode} - - Error Message: ${error9.message}`); - }); - const id_token = (_a = res.result) === null || _a === void 0 ? void 0 : _a.value; - if (!id_token) { - throw new Error("Response json body do not have ID Token field"); - } - return id_token; - }); - } - static getIDToken(audience) { - return __awaiter15(this, void 0, void 0, function* () { - try { - let id_token_url = _OidcClient.getIDTokenUrl(); - if (audience) { - const encodedAudience = encodeURIComponent(audience); - id_token_url = `${id_token_url}&audience=${encodedAudience}`; - } - (0, core_1.debug)(`ID token url is ${id_token_url}`); - const id_token = yield _OidcClient.getCall(id_token_url); - (0, core_1.setSecret)(id_token); - return id_token; - } catch (error9) { - throw new Error(`Error message: ${error9.message}`); - } - }); - } - }; - exports2.OidcClient = OidcClient2; - } -}); - -// node_modules/@actions/core/lib/summary.js -var require_summary = __commonJS({ - "node_modules/@actions/core/lib/summary.js"(exports2) { - "use strict"; - var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.summary = exports2.markdownSummary = exports2.SUMMARY_DOCS_URL = exports2.SUMMARY_ENV_VAR = void 0; - var os_1 = require("os"); - var fs_1 = require("fs"); - var { access: access3, appendFile: appendFile2, writeFile: writeFile2 } = fs_1.promises; - exports2.SUMMARY_ENV_VAR = "GITHUB_STEP_SUMMARY"; - exports2.SUMMARY_DOCS_URL = "https://docs.github.com/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary"; - var Summary2 = class { - constructor() { - this._buffer = ""; - } - /** - * Finds the summary file path from the environment, rejects if env var is not found or file does not exist - * Also checks r/w permissions. - * - * @returns step summary file path - */ - filePath() { - return __awaiter15(this, void 0, void 0, function* () { - if (this._filePath) { - return this._filePath; - } - const pathFromEnv = process.env[exports2.SUMMARY_ENV_VAR]; - if (!pathFromEnv) { - throw new Error(`Unable to find environment variable for $${exports2.SUMMARY_ENV_VAR}. Check if your runtime environment supports job summaries.`); - } - try { - yield access3(pathFromEnv, fs_1.constants.R_OK | fs_1.constants.W_OK); - } catch (_a) { - throw new Error(`Unable to access summary file: '${pathFromEnv}'. Check if the file has correct read/write permissions.`); - } - this._filePath = pathFromEnv; - return this._filePath; - }); - } - /** - * Wraps content in an HTML tag, adding any HTML attributes - * - * @param {string} tag HTML tag to wrap - * @param {string | null} content content within the tag - * @param {[attribute: string]: string} attrs key-value list of HTML attributes to add - * - * @returns {string} content wrapped in HTML element - */ - wrap(tag, content, attrs = {}) { - const htmlAttrs = Object.entries(attrs).map(([key, value]) => ` ${key}="${value}"`).join(""); - if (!content) { - return `<${tag}${htmlAttrs}>`; - } - return `<${tag}${htmlAttrs}>${content}`; - } - /** - * Writes text in the buffer to the summary buffer file and empties buffer. Will append by default. - * - * @param {SummaryWriteOptions} [options] (optional) options for write operation - * - * @returns {Promise} summary instance - */ - write(options) { - return __awaiter15(this, void 0, void 0, function* () { - const overwrite = !!(options === null || options === void 0 ? void 0 : options.overwrite); - const filePath = yield this.filePath(); - const writeFunc = overwrite ? writeFile2 : appendFile2; - yield writeFunc(filePath, this._buffer, { encoding: "utf8" }); - return this.emptyBuffer(); - }); - } - /** - * Clears the summary buffer and wipes the summary file - * - * @returns {Summary} summary instance - */ - clear() { - return __awaiter15(this, void 0, void 0, function* () { - return this.emptyBuffer().write({ overwrite: true }); - }); - } - /** - * Returns the current summary buffer as a string - * - * @returns {string} string of summary buffer - */ - stringify() { - return this._buffer; - } - /** - * If the summary buffer is empty - * - * @returns {boolen} true if the buffer is empty - */ - isEmptyBuffer() { - return this._buffer.length === 0; - } - /** - * Resets the summary buffer without writing to summary file - * - * @returns {Summary} summary instance - */ - emptyBuffer() { - this._buffer = ""; - return this; - } - /** - * Adds raw text to the summary buffer - * - * @param {string} text content to add - * @param {boolean} [addEOL=false] (optional) append an EOL to the raw text (default: false) - * - * @returns {Summary} summary instance - */ - addRaw(text, addEOL = false) { - this._buffer += text; - return addEOL ? this.addEOL() : this; - } - /** - * Adds the operating system-specific end-of-line marker to the buffer - * - * @returns {Summary} summary instance - */ - addEOL() { - return this.addRaw(os_1.EOL); - } - /** - * Adds an HTML codeblock to the summary buffer - * - * @param {string} code content to render within fenced code block - * @param {string} lang (optional) language to syntax highlight code - * - * @returns {Summary} summary instance - */ - addCodeBlock(code, lang) { - const attrs = Object.assign({}, lang && { lang }); - const element = this.wrap("pre", this.wrap("code", code), attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML list to the summary buffer - * - * @param {string[]} items list of items to render - * @param {boolean} [ordered=false] (optional) if the rendered list should be ordered or not (default: false) - * - * @returns {Summary} summary instance - */ - addList(items, ordered = false) { - const tag = ordered ? "ol" : "ul"; - const listItems = items.map((item) => this.wrap("li", item)).join(""); - const element = this.wrap(tag, listItems); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML table to the summary buffer - * - * @param {SummaryTableCell[]} rows table rows - * - * @returns {Summary} summary instance - */ - addTable(rows) { - const tableBody = rows.map((row) => { - const cells = row.map((cell) => { - if (typeof cell === "string") { - return this.wrap("td", cell); - } - const { header, data, colspan, rowspan } = cell; - const tag = header ? "th" : "td"; - const attrs = Object.assign(Object.assign({}, colspan && { colspan }), rowspan && { rowspan }); - return this.wrap(tag, data, attrs); - }).join(""); - return this.wrap("tr", cells); - }).join(""); - const element = this.wrap("table", tableBody); - return this.addRaw(element).addEOL(); - } - /** - * Adds a collapsable HTML details element to the summary buffer - * - * @param {string} label text for the closed state - * @param {string} content collapsable content - * - * @returns {Summary} summary instance - */ - addDetails(label, content) { - const element = this.wrap("details", this.wrap("summary", label) + content); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML image tag to the summary buffer - * - * @param {string} src path to the image you to embed - * @param {string} alt text description of the image - * @param {SummaryImageOptions} options (optional) addition image attributes - * - * @returns {Summary} summary instance - */ - addImage(src, alt, options) { - const { width, height } = options || {}; - const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); - const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML section heading element - * - * @param {string} text heading text - * @param {number | string} [level=1] (optional) the heading level, default: 1 - * - * @returns {Summary} summary instance - */ - addHeading(text, level) { - const tag = `h${level}`; - const allowedTag = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag) ? tag : "h1"; - const element = this.wrap(allowedTag, text); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML thematic break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addSeparator() { - const element = this.wrap("hr", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML line break (
) to the summary buffer - * - * @returns {Summary} summary instance - */ - addBreak() { - const element = this.wrap("br", null); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML blockquote to the summary buffer - * - * @param {string} text quote text - * @param {string} cite (optional) citation url - * - * @returns {Summary} summary instance - */ - addQuote(text, cite) { - const attrs = Object.assign({}, cite && { cite }); - const element = this.wrap("blockquote", text, attrs); - return this.addRaw(element).addEOL(); - } - /** - * Adds an HTML anchor tag to the summary buffer - * - * @param {string} text link text/content - * @param {string} href hyperlink - * - * @returns {Summary} summary instance - */ - addLink(text, href) { - const element = this.wrap("a", text, { href }); - return this.addRaw(element).addEOL(); - } - }; - var _summary2 = new Summary2(); - exports2.markdownSummary = _summary2; - exports2.summary = _summary2; - } -}); - -// node_modules/@actions/core/lib/path-utils.js -var require_path_utils = __commonJS({ - "node_modules/@actions/core/lib/path-utils.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = void 0; - var path10 = __importStar(require("path")); - function toPosixPath2(pth) { - return pth.replace(/[\\]/g, "/"); - } - exports2.toPosixPath = toPosixPath2; - function toWin32Path2(pth) { - return pth.replace(/[/]/g, "\\"); - } - exports2.toWin32Path = toWin32Path2; - function toPlatformPath2(pth) { - return pth.replace(/[/\\]/g, path10.sep); - } - exports2.toPlatformPath = toPlatformPath2; - } -}); - -// node_modules/@actions/io/lib/io-util.js -var require_io_util = __commonJS({ - "node_modules/@actions/io/lib/io-util.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var _a; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getCmdPath = exports2.tryGetExecutablePath = exports2.isRooted = exports2.isDirectory = exports2.exists = exports2.READONLY = exports2.UV_FS_O_EXLOCK = exports2.IS_WINDOWS = exports2.unlink = exports2.symlink = exports2.stat = exports2.rmdir = exports2.rm = exports2.rename = exports2.readlink = exports2.readdir = exports2.open = exports2.mkdir = exports2.lstat = exports2.copyFile = exports2.chmod = void 0; - var fs13 = __importStar(require("fs")); - var path10 = __importStar(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 = fs13.constants.O_RDONLY; - function exists3(fsPath) { - return __awaiter15(this, void 0, void 0, function* () { - try { - yield exports2.stat(fsPath); - } catch (err) { - if (err.code === "ENOENT") { - return false; - } - throw err; - } - return true; - }); - } - exports2.exists = exists3; - function isDirectory2(fsPath, useStat = false) { - return __awaiter15(this, void 0, void 0, function* () { - const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); - return stats.isDirectory(); - }); - } - exports2.isDirectory = isDirectory2; - function isRooted2(p) { - p = normalizeSeparators(p); - if (!p) { - throw new Error('isRooted() parameter "p" cannot be empty'); - } - if (exports2.IS_WINDOWS) { - return p.startsWith("\\") || /^[A-Z]:/i.test(p); - } - return p.startsWith("/"); - } - exports2.isRooted = isRooted2; - function tryGetExecutablePath2(filePath, extensions) { - return __awaiter15(this, void 0, void 0, function* () { - let stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - const upperExt = path10.extname(filePath).toUpperCase(); - if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { - return filePath; - } - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - const originalFilePath = filePath; - for (const extension of extensions) { - filePath = originalFilePath + extension; - stats = void 0; - try { - stats = yield exports2.stat(filePath); - } catch (err) { - if (err.code !== "ENOENT") { - console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); - } - } - if (stats && stats.isFile()) { - if (exports2.IS_WINDOWS) { - try { - const directory = path10.dirname(filePath); - const upperName = path10.basename(filePath).toUpperCase(); - for (const actualName of yield exports2.readdir(directory)) { - if (upperName === actualName.toUpperCase()) { - filePath = path10.join(directory, actualName); - break; - } - } - } catch (err) { - console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); - } - return filePath; - } else { - if (isUnixExecutable(stats)) { - return filePath; - } - } - } - } - return ""; - }); - } - exports2.tryGetExecutablePath = tryGetExecutablePath2; - function normalizeSeparators(p) { - p = p || ""; - if (exports2.IS_WINDOWS) { - p = p.replace(/\//g, "\\"); - return p.replace(/\\\\+/g, "\\"); - } - return p.replace(/\/\/+/g, "/"); - } - function isUnixExecutable(stats) { - return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); - } - function getCmdPath() { - var _a2; - return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; - } - exports2.getCmdPath = getCmdPath; - } -}); - -// node_modules/@actions/io/lib/io.js -var require_io = __commonJS({ - "node_modules/@actions/io/lib/io.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - 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 path10 = __importStar(require("path")); - var ioUtil = __importStar(require_io_util()); - function cp(source, dest, options = {}) { - return __awaiter15(this, void 0, void 0, function* () { - const { force, recursive, copySourceDirectory } = readCopyOptions(options); - const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; - if (destStat && destStat.isFile() && !force) { - return; - } - const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path10.join(dest, path10.basename(source)) : dest; - if (!(yield ioUtil.exists(source))) { - throw new Error(`no such file or directory: ${source}`); - } - const sourceStat = yield ioUtil.stat(source); - if (sourceStat.isDirectory()) { - if (!recursive) { - throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); - } else { - yield cpDirRecursive(source, newDest, 0, force); - } - } else { - if (path10.relative(source, newDest) === "") { - throw new Error(`'${newDest}' and '${source}' are the same file`); - } - yield copyFile2(source, newDest, force); - } - }); - } - exports2.cp = cp; - function mv(source, dest, options = {}) { - return __awaiter15(this, void 0, void 0, function* () { - if (yield ioUtil.exists(dest)) { - let destExists = true; - if (yield ioUtil.isDirectory(dest)) { - dest = path10.join(dest, path10.basename(source)); - destExists = yield ioUtil.exists(dest); - } - if (destExists) { - if (options.force == null || options.force) { - yield rmRF(dest); - } else { - throw new Error("Destination already exists"); - } - } - } - yield mkdirP(path10.dirname(dest)); - yield ioUtil.rename(source, dest); - }); - } - exports2.mv = mv; - function rmRF(inputPath) { - return __awaiter15(this, void 0, void 0, function* () { - if (ioUtil.IS_WINDOWS) { - if (/[*"<>|]/.test(inputPath)) { - throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); - } - } - try { - yield ioUtil.rm(inputPath, { - force: true, - maxRetries: 3, - recursive: true, - retryDelay: 300 - }); - } catch (err) { - throw new Error(`File was unable to be removed ${err}`); - } - }); - } - exports2.rmRF = rmRF; - function mkdirP(fsPath) { - return __awaiter15(this, void 0, void 0, function* () { - assert_1.ok(fsPath, "a path argument must be provided"); - yield ioUtil.mkdir(fsPath, { recursive: true }); - }); - } - exports2.mkdirP = mkdirP; - function which2(tool, check) { - return __awaiter15(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - if (check) { - const result = yield which2(tool, false); - if (!result) { - if (ioUtil.IS_WINDOWS) { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); - } else { - throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); - } - } - return result; - } - const matches = yield findInPath(tool); - if (matches && matches.length > 0) { - return matches[0]; - } - return ""; - }); - } - exports2.which = which2; - function findInPath(tool) { - return __awaiter15(this, void 0, void 0, function* () { - if (!tool) { - throw new Error("parameter 'tool' is required"); - } - const extensions = []; - if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { - for (const extension of process.env["PATHEXT"].split(path10.delimiter)) { - if (extension) { - extensions.push(extension); - } - } - } - if (ioUtil.isRooted(tool)) { - const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); - if (filePath) { - return [filePath]; - } - return []; - } - if (tool.includes(path10.sep)) { - return []; - } - const directories = []; - if (process.env.PATH) { - for (const p of process.env.PATH.split(path10.delimiter)) { - if (p) { - directories.push(p); - } - } - } - const matches = []; - for (const directory of directories) { - const filePath = yield ioUtil.tryGetExecutablePath(path10.join(directory, tool), extensions); - if (filePath) { - matches.push(filePath); - } - } - return matches; - }); - } - exports2.findInPath = findInPath; - function readCopyOptions(options) { - const force = options.force == null ? true : options.force; - const recursive = Boolean(options.recursive); - const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); - return { force, recursive, copySourceDirectory }; - } - function cpDirRecursive(sourceDir, destDir, currentDepth, force) { - return __awaiter15(this, void 0, void 0, function* () { - if (currentDepth >= 255) - return; - currentDepth++; - yield mkdirP(destDir); - const files = yield ioUtil.readdir(sourceDir); - for (const fileName of files) { - const srcFile = `${sourceDir}/${fileName}`; - const destFile = `${destDir}/${fileName}`; - const srcFileStat = yield ioUtil.lstat(srcFile); - if (srcFileStat.isDirectory()) { - yield cpDirRecursive(srcFile, destFile, currentDepth, force); - } else { - yield copyFile2(srcFile, destFile, force); - } - } - yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); - }); - } - function copyFile2(srcFile, destFile, force) { - return __awaiter15(this, void 0, void 0, function* () { - if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { - try { - yield ioUtil.lstat(destFile); - yield ioUtil.unlink(destFile); - } catch (e) { - if (e.code === "EPERM") { - yield ioUtil.chmod(destFile, "0666"); - yield ioUtil.unlink(destFile); - } - } - const symlinkFull = yield ioUtil.readlink(srcFile); - yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); - } else if (!(yield ioUtil.exists(destFile)) || force) { - yield ioUtil.copyFile(srcFile, destFile); - } - }); - } - } -}); - -// node_modules/@actions/exec/lib/toolrunner.js -var require_toolrunner = __commonJS({ - "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.argStringToArray = exports2.ToolRunner = void 0; - var os6 = __importStar(require("os")); - var events = __importStar(require("events")); - var child = __importStar(require("child_process")); - var path10 = __importStar(require("path")); - var io = __importStar(require_io()); - var ioUtil = __importStar(require_io_util()); - var timers_1 = require("timers"); - var IS_WINDOWS3 = process.platform === "win32"; - var ToolRunner2 = class extends events.EventEmitter { - constructor(toolPath, args, options) { - super(); - if (!toolPath) { - throw new Error("Parameter 'toolPath' cannot be null or empty."); - } - this.toolPath = toolPath; - this.args = args || []; - this.options = options || {}; - } - _debug(message) { - if (this.options.listeners && this.options.listeners.debug) { - this.options.listeners.debug(message); - } - } - _getCommandString(options, noPrefix) { - const toolPath = this._getSpawnFileName(); - const args = this._getSpawnArgs(options); - let cmd = noPrefix ? "" : "[command]"; - if (IS_WINDOWS3) { - if (this._isCmdFile()) { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } else if (options.windowsVerbatimArguments) { - cmd += `"${toolPath}"`; - for (const a of args) { - cmd += ` ${a}`; - } - } else { - cmd += this._windowsQuoteCmdArg(toolPath); - for (const a of args) { - cmd += ` ${this._windowsQuoteCmdArg(a)}`; - } - } - } else { - cmd += toolPath; - for (const a of args) { - cmd += ` ${a}`; - } - } - return cmd; - } - _processLineBuffer(data, strBuffer, onLine) { - try { - let s = strBuffer + data.toString(); - let n = s.indexOf(os6.EOL); - while (n > -1) { - const line = s.substring(0, n); - onLine(line); - s = s.substring(n + os6.EOL.length); - n = s.indexOf(os6.EOL); - } - return s; - } catch (err) { - this._debug(`error processing line. Failed with error ${err}`); - return ""; - } - } - _getSpawnFileName() { - if (IS_WINDOWS3) { - if (this._isCmdFile()) { - return process.env["COMSPEC"] || "cmd.exe"; - } - } - return this.toolPath; - } - _getSpawnArgs(options) { - if (IS_WINDOWS3) { - if (this._isCmdFile()) { - let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; - for (const a of this.args) { - argline += " "; - argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); - } - argline += '"'; - return [argline]; - } - } - return this.args; - } - _endsWith(str, end) { - return str.endsWith(end); - } - _isCmdFile() { - const upperToolPath = this.toolPath.toUpperCase(); - return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); - } - _windowsQuoteCmdArg(arg) { - if (!this._isCmdFile()) { - return this._uvQuoteCmdArg(arg); - } - if (!arg) { - return '""'; - } - const cmdSpecialChars = [ - " ", - " ", - "&", - "(", - ")", - "[", - "]", - "{", - "}", - "^", - "=", - ";", - "!", - "'", - "+", - ",", - "`", - "~", - "|", - "<", - ">", - '"' - ]; - let needsQuotes = false; - for (const char of arg) { - if (cmdSpecialChars.some((x) => x === char)) { - needsQuotes = true; - break; - } - } - if (!needsQuotes) { - return arg; - } - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === "\\") { - reverse += "\\"; - } else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += '"'; - } else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split("").reverse().join(""); - } - _uvQuoteCmdArg(arg) { - if (!arg) { - return '""'; - } - if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { - return arg; - } - if (!arg.includes('"') && !arg.includes("\\")) { - return `"${arg}"`; - } - let reverse = '"'; - let quoteHit = true; - for (let i = arg.length; i > 0; i--) { - reverse += arg[i - 1]; - if (quoteHit && arg[i - 1] === "\\") { - reverse += "\\"; - } else if (arg[i - 1] === '"') { - quoteHit = true; - reverse += "\\"; - } else { - quoteHit = false; - } - } - reverse += '"'; - return reverse.split("").reverse().join(""); - } - _cloneExecOptions(options) { - options = options || {}; - const result = { - cwd: options.cwd || process.cwd(), - env: options.env || process.env, - silent: options.silent || false, - windowsVerbatimArguments: options.windowsVerbatimArguments || false, - failOnStdErr: options.failOnStdErr || false, - ignoreReturnCode: options.ignoreReturnCode || false, - delay: options.delay || 1e4 - }; - result.outStream = options.outStream || process.stdout; - result.errStream = options.errStream || process.stderr; - return result; - } - _getSpawnOptions(options, toolPath) { - options = options || {}; - const result = {}; - result.cwd = options.cwd; - result.env = options.env; - result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); - if (options.windowsVerbatimArguments) { - result.argv0 = `"${toolPath}"`; - } - return result; - } - /** - * Exec a tool. - * Output will be streamed to the live console. - * Returns promise with return code - * - * @param tool path to tool to exec - * @param options optional exec options. See ExecOptions - * @returns number - */ - exec() { - return __awaiter15(this, void 0, void 0, function* () { - if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS3 && this.toolPath.includes("\\"))) { - this.toolPath = path10.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); - } - this.toolPath = yield io.which(this.toolPath, true); - return new Promise((resolve2, reject) => __awaiter15(this, void 0, void 0, function* () { - this._debug(`exec tool: ${this.toolPath}`); - this._debug("arguments:"); - for (const arg of this.args) { - this._debug(` ${arg}`); - } - const optionsNonNull = this._cloneExecOptions(this.options); - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os6.EOL); - } - const state3 = new ExecState(optionsNonNull, this.toolPath); - state3.on("debug", (message) => { - this._debug(message); - }); - if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { - return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); - } - const fileName = this._getSpawnFileName(); - const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); - let stdbuffer = ""; - if (cp.stdout) { - cp.stdout.on("data", (data) => { - if (this.options.listeners && this.options.listeners.stdout) { - this.options.listeners.stdout(data); - } - if (!optionsNonNull.silent && optionsNonNull.outStream) { - optionsNonNull.outStream.write(data); - } - stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { - if (this.options.listeners && this.options.listeners.stdline) { - this.options.listeners.stdline(line); - } - }); - }); - } - let errbuffer = ""; - if (cp.stderr) { - cp.stderr.on("data", (data) => { - state3.processStderr = true; - if (this.options.listeners && this.options.listeners.stderr) { - this.options.listeners.stderr(data); - } - if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { - const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; - s.write(data); - } - errbuffer = this._processLineBuffer(data, errbuffer, (line) => { - if (this.options.listeners && this.options.listeners.errline) { - this.options.listeners.errline(line); - } - }); - }); - } - cp.on("error", (err) => { - state3.processError = err.message; - state3.processExited = true; - state3.processClosed = true; - state3.CheckComplete(); - }); - cp.on("exit", (code) => { - state3.processExitCode = code; - state3.processExited = true; - this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); - state3.CheckComplete(); - }); - cp.on("close", (code) => { - state3.processExitCode = code; - state3.processExited = true; - state3.processClosed = true; - this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); - state3.CheckComplete(); - }); - state3.on("done", (error9, exitCode) => { - if (stdbuffer.length > 0) { - this.emit("stdline", stdbuffer); - } - if (errbuffer.length > 0) { - this.emit("errline", errbuffer); - } - cp.removeAllListeners(); - if (error9) { - reject(error9); - } else { - resolve2(exitCode); - } - }); - if (this.options.input) { - if (!cp.stdin) { - throw new Error("child process missing stdin"); - } - cp.stdin.end(this.options.input); - } - })); - }); - } - }; - exports2.ToolRunner = ToolRunner2; - function argStringToArray2(argString) { - const args = []; - let inQuotes = false; - let escaped = false; - let arg = ""; - function append(c) { - if (escaped && c !== '"') { - arg += "\\"; - } - arg += c; - escaped = false; - } - for (let i = 0; i < argString.length; i++) { - const c = argString.charAt(i); - if (c === '"') { - if (!escaped) { - inQuotes = !inQuotes; - } else { - append(c); - } - continue; - } - if (c === "\\" && escaped) { - append(c); - continue; - } - if (c === "\\" && inQuotes) { - escaped = true; - continue; - } - if (c === " " && !inQuotes) { - if (arg.length > 0) { - args.push(arg); - arg = ""; - } - continue; - } - append(c); - } - if (arg.length > 0) { - args.push(arg.trim()); - } - return args; - } - exports2.argStringToArray = argStringToArray2; - var ExecState = class _ExecState extends events.EventEmitter { - constructor(options, toolPath) { - super(); - this.processClosed = false; - this.processError = ""; - this.processExitCode = 0; - this.processExited = false; - this.processStderr = false; - this.delay = 1e4; - this.done = false; - this.timeout = null; - if (!toolPath) { - throw new Error("toolPath must not be empty"); - } - this.options = options; - this.toolPath = toolPath; - if (options.delay) { - this.delay = options.delay; - } - } - CheckComplete() { - if (this.done) { - return; - } - if (this.processClosed) { - this._setResult(); - } else if (this.processExited) { - this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); - } - } - _debug(message) { - this.emit("debug", message); - } - _setResult() { - let error9; - if (this.processExited) { - if (this.processError) { - error9 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); - } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { - error9 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); - } else if (this.processStderr && this.options.failOnStdErr) { - error9 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); - } - } - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - this.done = true; - this.emit("done", error9, this.processExitCode); - } - static HandleTimeout(state3) { - if (state3.done) { - return; - } - if (!state3.processClosed && state3.processExited) { - const message = `The STDIO streams did not close within ${state3.delay / 1e3} seconds of the exit event from process '${state3.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; - state3._debug(message); - } - state3._setResult(); - } - }; - } -}); - -// node_modules/@actions/exec/lib/exec.js -var require_exec = __commonJS({ - "node_modules/@actions/exec/lib/exec.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - Object.defineProperty(o, k2, { enumerable: true, get: function() { - return m[k]; - } }); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getExecOutput = exports2.exec = void 0; - var string_decoder_1 = require("string_decoder"); - var tr = __importStar(require_toolrunner()); - function exec10(commandLine, args, options) { - return __awaiter15(this, void 0, void 0, function* () { - const commandArgs = tr.argStringToArray(commandLine); - if (commandArgs.length === 0) { - throw new Error(`Parameter 'commandLine' cannot be null or empty.`); - } - const toolPath = commandArgs[0]; - args = commandArgs.slice(1).concat(args || []); - const runner = new tr.ToolRunner(toolPath, args, options); - return runner.exec(); - }); - } - exports2.exec = exec10; - function getExecOutput11(commandLine, args, options) { - var _a, _b; - return __awaiter15(this, void 0, void 0, function* () { - let stdout = ""; - let stderr = ""; - const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); - const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); - const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; - const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; - const stdErrListener = (data) => { - stderr += stderrDecoder.write(data); - if (originalStdErrListener) { - originalStdErrListener(data); - } - }; - const stdOutListener = (data) => { - stdout += stdoutDecoder.write(data); - if (originalStdoutListener) { - originalStdoutListener(data); - } - }; - const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); - const exitCode = yield exec10(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); - stdout += stdoutDecoder.end(); - stderr += stderrDecoder.end(); - return { - exitCode, - stdout, - stderr - }; - }); - } - exports2.getExecOutput = getExecOutput11; - } -}); - -// node_modules/@actions/core/lib/platform.js -var require_platform = __commonJS({ - "node_modules/@actions/core/lib/platform.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - var __importDefault = exports2 && exports2.__importDefault || function(mod) { - return mod && mod.__esModule ? mod : { "default": mod }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getDetails = exports2.isLinux = exports2.isMacOS = exports2.isWindows = exports2.arch = exports2.platform = void 0; - var os_1 = __importDefault(require("os")); - var exec10 = __importStar(require_exec()); - var getWindowsInfo = () => __awaiter15(void 0, void 0, void 0, function* () { - const { stdout: version3 } = yield exec10.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Version"', void 0, { - silent: true - }); - const { stdout: name } = yield exec10.getExecOutput('powershell -command "(Get-CimInstance -ClassName Win32_OperatingSystem).Caption"', void 0, { - silent: true - }); - return { - name: name.trim(), - version: version3.trim() - }; - }); - var getMacOsInfo = () => __awaiter15(void 0, void 0, void 0, function* () { - var _a, _b, _c, _d; - const { stdout } = yield exec10.getExecOutput("sw_vers", void 0, { - silent: true - }); - const version3 = (_b = (_a = stdout.match(/ProductVersion:\s*(.+)/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : ""; - const name = (_d = (_c = stdout.match(/ProductName:\s*(.+)/)) === null || _c === void 0 ? void 0 : _c[1]) !== null && _d !== void 0 ? _d : ""; - return { - name, - version: version3 - }; - }); - var getLinuxInfo = () => __awaiter15(void 0, void 0, void 0, function* () { - const { stdout } = yield exec10.getExecOutput("lsb_release", ["-i", "-r", "-s"], { - silent: true - }); - const [name, version3] = stdout.trim().split("\n"); - return { - name, - version: version3 - }; - }); - exports2.platform = os_1.default.platform(); - exports2.arch = os_1.default.arch(); - exports2.isWindows = exports2.platform === "win32"; - exports2.isMacOS = exports2.platform === "darwin"; - exports2.isLinux = exports2.platform === "linux"; - function getDetails() { - return __awaiter15(this, void 0, void 0, function* () { - return Object.assign(Object.assign({}, yield exports2.isWindows ? getWindowsInfo() : exports2.isMacOS ? getMacOsInfo() : getLinuxInfo()), { - platform: exports2.platform, - arch: exports2.arch, - isWindows: exports2.isWindows, - isMacOS: exports2.isMacOS, - isLinux: exports2.isLinux - }); - }); - } - exports2.getDetails = getDetails; - } -}); - -// node_modules/@actions/core/lib/core.js -var require_core = __commonJS({ - "node_modules/@actions/core/lib/core.js"(exports2) { - "use strict"; - var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - }) : function(o, v) { - o["default"] = v; - }); - var __importStar = exports2 && exports2.__importStar || function(mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) { - for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - } - __setModuleDefault(result, mod); - return result; - }; - var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P ? value : new P(function(resolve2) { - resolve2(value); - }); - } - return new (P || (P = Promise))(function(resolve2, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.platform = exports2.toPlatformPath = exports2.toWin32Path = exports2.toPosixPath = exports2.markdownSummary = exports2.summary = exports2.getIDToken = exports2.getState = exports2.saveState = exports2.group = exports2.endGroup = exports2.startGroup = exports2.info = exports2.notice = exports2.warning = exports2.error = exports2.debug = exports2.isDebug = exports2.setFailed = exports2.setCommandEcho = exports2.setOutput = exports2.getBooleanInput = exports2.getMultilineInput = exports2.getInput = exports2.addPath = exports2.setSecret = exports2.exportVariable = exports2.ExitCode = void 0; - var command_1 = require_command(); - var file_command_1 = require_file_command(); - var utils_1 = require_utils4(); - var os6 = __importStar(require("os")); - var path10 = __importStar(require("path")); - var oidc_utils_1 = require_oidc_utils(); - var ExitCode2; - (function(ExitCode3) { - ExitCode3[ExitCode3["Success"] = 0] = "Success"; - ExitCode3[ExitCode3["Failure"] = 1] = "Failure"; - })(ExitCode2 || (exports2.ExitCode = ExitCode2 = {})); - function exportVariable(name, val) { - const convertedVal = (0, utils_1.toCommandValue)(val); - process.env[name] = convertedVal; - const filePath = process.env["GITHUB_ENV"] || ""; - if (filePath) { - return (0, file_command_1.issueFileCommand)("ENV", (0, file_command_1.prepareKeyValueMessage)(name, val)); - } - (0, command_1.issueCommand)("set-env", { name }, convertedVal); - } - exports2.exportVariable = exportVariable; - function setSecret4(secret) { - (0, command_1.issueCommand)("add-mask", {}, secret); - } - exports2.setSecret = setSecret4; - function addPath(inputPath) { - const filePath = process.env["GITHUB_PATH"] || ""; - if (filePath) { - (0, file_command_1.issueFileCommand)("PATH", inputPath); - } else { - (0, command_1.issueCommand)("add-path", {}, inputPath); - } - process.env["PATH"] = `${inputPath}${path10.delimiter}${process.env["PATH"]}`; - } - exports2.addPath = addPath; - function getInput2(name, options) { - const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; - if (options && options.required && !val) { - throw new Error(`Input required and not supplied: ${name}`); - } - if (options && options.trimWhitespace === false) { - return val; - } - return val.trim(); - } - exports2.getInput = getInput2; - function getMultilineInput(name, options) { - const inputs = getInput2(name, options).split("\n").filter((x) => x !== ""); - if (options && options.trimWhitespace === false) { - return inputs; - } - return inputs.map((input) => input.trim()); - } - exports2.getMultilineInput = getMultilineInput; - function getBooleanInput(name, options) { - const trueValue = ["true", "True", "TRUE"]; - const falseValue = ["false", "False", "FALSE"]; - const val = getInput2(name, options); - if (trueValue.includes(val)) - return true; - if (falseValue.includes(val)) - return false; - throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${name} -Support boolean input list: \`true | True | TRUE | false | False | FALSE\``); - } - exports2.getBooleanInput = getBooleanInput; - function setOutput2(name, value) { - const filePath = process.env["GITHUB_OUTPUT"] || ""; - if (filePath) { - return (0, file_command_1.issueFileCommand)("OUTPUT", (0, file_command_1.prepareKeyValueMessage)(name, value)); - } - process.stdout.write(os6.EOL); - (0, command_1.issueCommand)("set-output", { name }, (0, utils_1.toCommandValue)(value)); - } - exports2.setOutput = setOutput2; - function setCommandEcho(enabled2) { - (0, command_1.issue)("echo", enabled2 ? "on" : "off"); - } - exports2.setCommandEcho = setCommandEcho; - function setFailed2(message) { - process.exitCode = ExitCode2.Failure; - error9(message); - } - exports2.setFailed = setFailed2; - function isDebug() { - return process.env["RUNNER_DEBUG"] === "1"; - } - exports2.isDebug = isDebug; - function debug16(message) { - (0, command_1.issueCommand)("debug", {}, message); - } - exports2.debug = debug16; - function error9(message, properties = {}) { - (0, command_1.issueCommand)("error", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - exports2.error = error9; - function warning15(message, properties = {}) { - (0, command_1.issueCommand)("warning", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - exports2.warning = warning15; - function notice2(message, properties = {}) { - (0, command_1.issueCommand)("notice", (0, utils_1.toCommandProperties)(properties), message instanceof Error ? message.toString() : message); - } - exports2.notice = notice2; - function info17(message) { - process.stdout.write(message + os6.EOL); - } - exports2.info = info17; - function startGroup(name) { - (0, command_1.issue)("group", name); - } - exports2.startGroup = startGroup; - function endGroup() { - (0, command_1.issue)("endgroup"); - } - exports2.endGroup = endGroup; - function group(name, fn) { - return __awaiter15(this, void 0, void 0, function* () { - startGroup(name); - let result; - try { - result = yield fn(); - } finally { - endGroup(); - } - return result; - }); - } - exports2.group = group; - function saveState(name, value) { - const filePath = process.env["GITHUB_STATE"] || ""; - if (filePath) { - return (0, file_command_1.issueFileCommand)("STATE", (0, file_command_1.prepareKeyValueMessage)(name, value)); - } - (0, command_1.issueCommand)("save-state", { name }, (0, utils_1.toCommandValue)(value)); - } - exports2.saveState = saveState; - function getState(name) { - return process.env[`STATE_${name}`] || ""; - } - exports2.getState = getState; - function getIDToken(aud) { - return __awaiter15(this, void 0, void 0, function* () { - return yield oidc_utils_1.OidcClient.getIDToken(aud); - }); - } - exports2.getIDToken = getIDToken; - var summary_1 = require_summary(); - Object.defineProperty(exports2, "summary", { enumerable: true, get: function() { - return summary_1.summary; - } }); - var summary_2 = require_summary(); - Object.defineProperty(exports2, "markdownSummary", { enumerable: true, get: function() { - return summary_2.markdownSummary; - } }); - var path_utils_1 = require_path_utils(); - Object.defineProperty(exports2, "toPosixPath", { enumerable: true, get: function() { - return path_utils_1.toPosixPath; - } }); - Object.defineProperty(exports2, "toWin32Path", { enumerable: true, get: function() { - return path_utils_1.toWin32Path; - } }); - Object.defineProperty(exports2, "toPlatformPath", { enumerable: true, get: function() { - return path_utils_1.toPlatformPath; - } }); - exports2.platform = __importStar(require_platform()); - } -}); - // node_modules/@actions/http-client/node_modules/undici/lib/core/symbols.js var require_symbols6 = __commonJS({ "node_modules/@actions/http-client/node_modules/undici/lib/core/symbols.js"(exports2, module2) { @@ -25815,14 +23026,14 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { connectParams: { version: version3, protocol, port, host }, - error: error9 + error: error2 } = evt; debuglog( "connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, version3, - error9.message + error2.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -25853,14 +23064,14 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { request: { method, path: path10, origin }, - error: error9 + error: error2 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, path10, - error9.message + error2.message ); }); isClientSet = true; @@ -25895,7 +23106,7 @@ var require_diagnostics = __commonJS({ diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { connectParams: { version: version3, protocol, port, host }, - error: error9 + error: error2 } = evt; debuglog( "connection to %s%s using %s%s errored - %s", @@ -25903,7 +23114,7 @@ var require_diagnostics = __commonJS({ port ? `:${port}` : "", protocol, version3, - error9.message + error2.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -26170,16 +23381,16 @@ var require_request3 = __commonJS({ this.onError(err); } } - onError(error9) { + onError(error2) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error9 }); + channels.error.publish({ request: this, error: error2 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error9); + return this[kHandler].onError(error2); } onFinally() { if (this.errorHandler) { @@ -26896,7 +24107,7 @@ var require_connect2 = __commonJS({ }); // node_modules/@actions/http-client/node_modules/undici/lib/llhttp/utils.js -var require_utils5 = __commonJS({ +var require_utils4 = __commonJS({ "node_modules/@actions/http-client/node_modules/undici/lib/llhttp/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -26921,7 +24132,7 @@ var require_constants7 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SPECIAL_HEADERS = exports2.HEADER_STATE = exports2.MINOR = exports2.MAJOR = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.STRICT_TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.STRICT_URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.FINISH = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = void 0; - var utils_1 = require_utils5(); + var utils_1 = require_utils4(); var ERROR; (function(ERROR2) { ERROR2[ERROR2["OK"] = 0] = "OK"; @@ -28294,11 +25505,11 @@ var require_util9 = __commonJS({ var { isUint8Array } = require("node:util/types"); var { webidl } = require_webidl2(); var supportedHashes = []; - var crypto4; + var crypto5; try { - crypto4 = require("node:crypto"); + crypto5 = require("node:crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto4.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto5.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -28571,7 +25782,7 @@ var require_util9 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto4 === void 0) { + if (crypto5 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -28586,7 +25797,7 @@ var require_util9 = __commonJS({ for (const item of metadata2) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto4.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto5.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -29650,8 +26861,8 @@ var require_body2 = __commonJS({ var { multipartFormDataParser } = require_formdata_parser(); var random; try { - const crypto4 = require("node:crypto"); - random = (max) => crypto4.randomInt(0, max); + const crypto5 = require("node:crypto"); + random = (max) => crypto5.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -29896,7 +27107,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r } throwIfAborted(object[kState]); const promise = createDeferredPromise(); - const errorSteps = (error9) => promise.reject(error9); + const errorSteps = (error2) => promise.reject(error2); const successSteps = (data) => { try { promise.resolve(convertBytesToJSValue(data)); @@ -31404,8 +28615,8 @@ var require_client_h2 = __commonJS({ } request2.onRequestSent(); client2[kResume](); - } catch (error9) { - abort(error9); + } catch (error2) { + abort(error2); } } function writeStream(abort, socket, expectsPayload, h2stream, body2, client2, request2, contentLength2) { @@ -31560,8 +28771,8 @@ var require_redirect_handler = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error9) { - this.handler.onError(error9); + onError(error2) { + this.handler.onError(error2); } onHeaders(statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util3.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -32489,7 +29700,7 @@ var require_pool2 = __commonJS({ this[kOptions] = { ...util3.deepClone(options), connect, allowH2 }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; - this.on("connectionError", (origin2, targets, error9) => { + this.on("connectionError", (origin2, targets, error2) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -34856,13 +32067,13 @@ var require_mock_utils2 = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data, headers, trailers, error: error9 }, delay: delay4, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error2 }, delay: delay4, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error9 !== null) { + if (error2 !== null) { deleteMockDispatch(this[kDispatches], key); - handler2.onError(error9); + handler2.onError(error2); return true; } if (typeof delay4 === "number" && delay4 > 0) { @@ -34900,19 +32111,19 @@ var require_mock_utils2 = __commonJS({ if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler2); - } catch (error9) { - if (error9 instanceof MockNotMatchedError) { + } catch (error2) { + if (error2 instanceof MockNotMatchedError) { const netConnect = agent[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error9.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler2); } else { - throw new MockNotMatchedError(`${error9.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error9; + throw error2; } } } else { @@ -35077,11 +32288,11 @@ var require_mock_interceptor2 = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error9) { - if (typeof error9 === "undefined") { + replyWithError(error2) { + if (typeof error2 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error9 }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error2 }); return new MockScope(newMockDispatch); } /** @@ -37599,17 +34810,17 @@ var require_fetch2 = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error9) { + abort(error2) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error9) { - error9 = new DOMException("The operation was aborted.", "AbortError"); + if (!error2) { + error2 = new DOMException("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error9; - this.connection?.destroy(error9); - this.emit("terminated", error9); + this.serializedAbortReason = error2; + this.connection?.destroy(error2); + this.emit("terminated", error2); } }; function handleFetchDone(response) { @@ -37705,12 +34916,12 @@ var require_fetch2 = __commonJS({ ); } var markResourceTiming = performance.markResourceTiming; - function abortFetch(p, request2, responseObject, error9) { + function abortFetch(p, request2, responseObject, error2) { if (p) { - p.reject(error9); + p.reject(error2); } if (request2.body != null && isReadable(request2.body?.stream)) { - request2.body.stream.cancel(error9).catch((err) => { + request2.body.stream.cancel(error2).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -37722,7 +34933,7 @@ var require_fetch2 = __commonJS({ } const response = responseObject[kState]; if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error9).catch((err) => { + response.body.stream.cancel(error2).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -38543,13 +35754,13 @@ var require_fetch2 = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error9) { + onError(error2) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error9); - fetchParams.controller.terminate(error9); - reject(error9); + this.body?.destroy(error2); + fetchParams.controller.terminate(error2); + reject(error2); }, onUpgrade(status, rawHeaders, socket) { if (status !== 101) { @@ -39012,8 +36223,8 @@ var require_util11 = __commonJS({ } fr[kResult] = result; fireAProgressEvent("load", fr); - } catch (error9) { - fr[kError] = error9; + } catch (error2) { + fr[kError] = error2; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { @@ -39022,13 +36233,13 @@ var require_util11 = __commonJS({ }); break; } - } catch (error9) { + } catch (error2) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; - fr[kError] = error9; + fr[kError] = error2; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); @@ -41055,13 +38266,13 @@ var require_frame2 = __commonJS({ "use strict"; var { maxUnsigned16Bit } = require_constants10(); var BUFFER_SIZE = 16386; - var crypto4; + var crypto5; var buffer2 = null; var bufIdx = BUFFER_SIZE; try { - crypto4 = require("node:crypto"); + crypto5 = require("node:crypto"); } catch { - crypto4 = { + crypto5 = { // not full compatibility, but minimum. randomFillSync: function randomFillSync(buffer3, _offset, _size) { for (let i = 0; i < buffer3.length; ++i) { @@ -41074,7 +38285,7 @@ var require_frame2 = __commonJS({ function generateMask() { if (bufIdx === BUFFER_SIZE) { bufIdx = 0; - crypto4.randomFillSync(buffer2 ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + crypto5.randomFillSync(buffer2 ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); } return [buffer2[bufIdx++], buffer2[bufIdx++], buffer2[bufIdx++], buffer2[bufIdx++]]; } @@ -41146,9 +38357,9 @@ var require_connection2 = __commonJS({ var { Headers: Headers2, getHeadersList } = require_headers2(); var { getDecodeSplit } = require_util9(); var { WebsocketFrameSend } = require_frame2(); - var crypto4; + var crypto5; try { - crypto4 = require("node:crypto"); + crypto5 = require("node:crypto"); } catch { } function establishWebSocketConnection(url2, protocols, client2, ws, onEstablish, options) { @@ -41168,7 +38379,7 @@ var require_connection2 = __commonJS({ const headersList = getHeadersList(new Headers2(options.headers)); request2.headersList = headersList; } - const keyValue = crypto4.randomBytes(16).toString("base64"); + const keyValue = crypto5.randomBytes(16).toString("base64"); request2.headersList.append("sec-websocket-key", keyValue); request2.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -41198,7 +38409,7 @@ var require_connection2 = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto4.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto5.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -41296,11 +38507,11 @@ var require_connection2 = __commonJS({ }); } } - function onSocketError(error9) { + function onSocketError(error2) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error9); + channels.socketError.publish(error2); } this.destroy(); } @@ -41525,9 +38736,9 @@ var require_receiver2 = __commonJS({ } this.#state = parserStates.INFO; } else { - this.#extensions.get("permessage-deflate").decompress(body2, this.#info.fin, (error9, data) => { - if (error9) { - closeWebSocketConnection(this.ws, 1007, error9.message, error9.message.length); + this.#extensions.get("permessage-deflate").decompress(body2, this.#info.fin, (error2, data) => { + if (error2) { + closeWebSocketConnection(this.ws, 1007, error2.message, error2.message.length); return; } this.#fragments.push(data); @@ -42559,8 +39770,8 @@ var require_eventsource = __commonJS({ pipeline( response.body.stream, eventSourceStream, - (error9) => { - if (error9?.aborted === false) { + (error2) => { + if (error2?.aborted === false) { this.close(); this.dispatchEvent(new Event("error")); } @@ -44110,9 +41321,9 @@ var require_reflection_type_check = __commonJS({ var reflection_info_1 = require_reflection_info(); var oneof_1 = require_oneof(); var ReflectionTypeCheck = class { - constructor(info17) { + constructor(info2) { var _a; - this.fields = (_a = info17.fields) !== null && _a !== void 0 ? _a : []; + this.fields = (_a = info2.fields) !== null && _a !== void 0 ? _a : []; } prepare() { if (this.data) @@ -44358,8 +41569,8 @@ var require_reflection_json_reader = __commonJS({ var assert_1 = require_assert(); var reflection_long_convert_1 = require_reflection_long_convert(); var ReflectionJsonReader = class { - constructor(info17) { - this.info = info17; + constructor(info2) { + this.info = info2; } prepare() { var _a; @@ -44634,8 +41845,8 @@ var require_reflection_json_reader = __commonJS({ break; return base64_1.base64decode(json); } - } catch (error9) { - e = error9.message; + } catch (error2) { + e = error2.message; } this.assert(false, fieldName + (e ? " - " + e : ""), json); } @@ -44655,9 +41866,9 @@ var require_reflection_json_writer = __commonJS({ var reflection_info_1 = require_reflection_info(); var assert_1 = require_assert(); var ReflectionJsonWriter = class { - constructor(info17) { + constructor(info2) { var _a; - this.fields = (_a = info17.fields) !== null && _a !== void 0 ? _a : []; + this.fields = (_a = info2.fields) !== null && _a !== void 0 ? _a : []; } /** * Converts the message to a JSON object, based on the field descriptors. @@ -44910,8 +42121,8 @@ var require_reflection_binary_reader = __commonJS({ var reflection_long_convert_1 = require_reflection_long_convert(); var reflection_scalar_default_1 = require_reflection_scalar_default(); var ReflectionBinaryReader = class { - constructor(info17) { - this.info = info17; + constructor(info2) { + this.info = info2; } prepare() { var _a; @@ -45084,8 +42295,8 @@ var require_reflection_binary_writer = __commonJS({ var assert_1 = require_assert(); var pb_long_1 = require_pb_long(); var ReflectionBinaryWriter = class { - constructor(info17) { - this.info = info17; + constructor(info2) { + this.info = info2; } prepare() { if (!this.fields) { @@ -45335,9 +42546,9 @@ var require_reflection_merge_partial = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.reflectionMergePartial = void 0; - function reflectionMergePartial4(info17, target, source) { + function reflectionMergePartial4(info2, target, source) { let fieldValue, input = source, output; - for (let field of info17.fields) { + for (let field of info2.fields) { let name = field.localName; if (field.oneof) { const group = input[field.oneof]; @@ -45406,12 +42617,12 @@ var require_reflection_equals = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.reflectionEquals = void 0; var reflection_info_1 = require_reflection_info(); - function reflectionEquals(info17, a, b) { + function reflectionEquals(info2, a, b) { if (a === b) return true; if (!a || !b) return false; - for (let field of info17.fields) { + for (let field of info2.fields) { let localName = field.localName; let val_a = field.oneof ? a[field.oneof][localName] : a[localName]; let val_b = field.oneof ? b[field.oneof][localName] : b[localName]; @@ -46206,12 +43417,12 @@ var require_rpc_output_stream = __commonJS({ * at a time. * Can be used to wrap a stream by using the other stream's `onNext`. */ - notifyNext(message, error9, complete) { - runtime_1.assert((message ? 1 : 0) + (error9 ? 1 : 0) + (complete ? 1 : 0) <= 1, "only one emission at a time"); + notifyNext(message, error2, complete) { + runtime_1.assert((message ? 1 : 0) + (error2 ? 1 : 0) + (complete ? 1 : 0) <= 1, "only one emission at a time"); if (message) this.notifyMessage(message); - if (error9) - this.notifyError(error9); + if (error2) + this.notifyError(error2); if (complete) this.notifyComplete(); } @@ -46231,12 +43442,12 @@ var require_rpc_output_stream = __commonJS({ * * Triggers onNext and onError callbacks. */ - notifyError(error9) { + notifyError(error2) { runtime_1.assert(!this.closed, "stream is closed"); - this._closed = error9; - this.pushIt(error9); - this._lis.err.forEach((l) => l(error9)); - this._lis.nxt.forEach((l) => l(void 0, error9, false)); + this._closed = error2; + this.pushIt(error2); + this._lis.err.forEach((l) => l(error2)); + this._lis.nxt.forEach((l) => l(void 0, error2, false)); this.clearLis(); } /** @@ -46700,8 +43911,8 @@ var require_test_transport = __commonJS({ } try { yield delay4(this.responseDelay, abort)(void 0); - } catch (error9) { - stream4.notifyError(error9); + } catch (error2) { + stream4.notifyError(error2); return; } if (this.data.response instanceof rpc_error_1.RpcError) { @@ -46712,8 +43923,8 @@ var require_test_transport = __commonJS({ stream4.notifyMessage(msg); try { yield delay4(this.betweenResponseDelay, abort)(void 0); - } catch (error9) { - stream4.notifyError(error9); + } catch (error2) { + stream4.notifyError(error2); return; } } @@ -47297,11 +44508,11 @@ var require_common = __commonJS({ let enableOverride = null; let namespacesCache; let enabledCache; - function debug16(...args) { - if (!debug16.enabled) { + function debug2(...args) { + if (!debug2.enabled) { return; } - const self2 = debug16; + const self2 = debug2; const curr = Number(/* @__PURE__ */ new Date()); const ms = curr - (prevTime || curr); self2.diff = ms; @@ -47331,12 +44542,12 @@ var require_common = __commonJS({ const logFn = self2.log || createDebug.log; logFn.apply(self2, args); } - debug16.namespace = namespace; - debug16.useColors = createDebug.useColors(); - debug16.color = createDebug.selectColor(namespace); - debug16.extend = extend2; - debug16.destroy = createDebug.destroy; - Object.defineProperty(debug16, "enabled", { + debug2.namespace = namespace; + debug2.useColors = createDebug.useColors(); + debug2.color = createDebug.selectColor(namespace); + debug2.extend = extend2; + debug2.destroy = createDebug.destroy; + Object.defineProperty(debug2, "enabled", { enumerable: true, configurable: false, get: () => { @@ -47354,9 +44565,9 @@ var require_common = __commonJS({ } }); if (typeof createDebug.init === "function") { - createDebug.init(debug16); + createDebug.init(debug2); } - return debug16; + return debug2; } function extend2(namespace, delimiter2) { const newDebug = createDebug(this.namespace + (typeof delimiter2 === "undefined" ? ":" : delimiter2) + namespace); @@ -47580,14 +44791,14 @@ var require_browser = __commonJS({ } else { exports2.storage.removeItem("debug"); } - } catch (error9) { + } catch (error2) { } } function load() { let r; try { r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG"); - } catch (error9) { + } catch (error2) { } if (!r && typeof process !== "undefined" && "env" in process) { r = process.env.DEBUG; @@ -47597,7 +44808,7 @@ var require_browser = __commonJS({ function localstorage() { try { return localStorage; - } catch (error9) { + } catch (error2) { } } module2.exports = require_common()(exports2); @@ -47605,8 +44816,8 @@ var require_browser = __commonJS({ formatters.j = function(v) { try { return JSON.stringify(v); - } catch (error9) { - return "[UnexpectedJSONParseError]: " + error9.message; + } catch (error2) { + return "[UnexpectedJSONParseError]: " + error2.message; } }; } @@ -47629,7 +44840,7 @@ var require_has_flag = __commonJS({ var require_supports_color = __commonJS({ "node_modules/supports-color/index.js"(exports2, module2) { "use strict"; - var os6 = require("os"); + var os7 = require("os"); var tty = require("tty"); var hasFlag = require_has_flag(); var { env } = process; @@ -47677,7 +44888,7 @@ var require_supports_color = __commonJS({ return min; } if (process.platform === "win32") { - const osRelease = os6.release().split("."); + const osRelease = os7.release().split("."); if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { return Number(osRelease[2]) >= 14931 ? 3 : 2; } @@ -47826,7 +45037,7 @@ var require_node = __commonJS({ 221 ]; } - } catch (error9) { + } catch (error2) { } exports2.inspectOpts = Object.keys(process.env).filter((key) => { return /^debug_/i.test(key); @@ -47881,11 +45092,11 @@ var require_node = __commonJS({ function load() { return process.env.DEBUG; } - function init(debug16) { - debug16.inspectOpts = {}; + function init(debug2) { + debug2.inspectOpts = {}; const keys = Object.keys(exports2.inspectOpts); for (let i = 0; i < keys.length; i++) { - debug16.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; + debug2.inspectOpts[keys[i]] = exports2.inspectOpts[keys[i]]; } } module2.exports = require_common()(exports2); @@ -48148,7 +45359,7 @@ var require_parse_proxy_response = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.parseProxyResponse = void 0; var debug_1 = __importDefault(require_src()); - var debug16 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); + var debug2 = (0, debug_1.default)("https-proxy-agent:parse-proxy-response"); function parseProxyResponse(socket) { return new Promise((resolve2, reject) => { let buffersLength = 0; @@ -48167,12 +45378,12 @@ var require_parse_proxy_response = __commonJS({ } function onend() { cleanup(); - debug16("onend"); + debug2("onend"); reject(new Error("Proxy connection ended before receiving CONNECT response")); } function onerror(err) { cleanup(); - debug16("onerror %o", err); + debug2("onerror %o", err); reject(err); } function ondata(b) { @@ -48181,7 +45392,7 @@ var require_parse_proxy_response = __commonJS({ const buffered = Buffer.concat(buffers, buffersLength); const endOfHeaders = buffered.indexOf("\r\n\r\n"); if (endOfHeaders === -1) { - debug16("have not received end of HTTP headers yet..."); + debug2("have not received end of HTTP headers yet..."); read(); return; } @@ -48214,7 +45425,7 @@ var require_parse_proxy_response = __commonJS({ headers[key] = value; } } - debug16("got proxy server response: %o %o", firstLine, headers); + debug2("got proxy server response: %o %o", firstLine, headers); cleanup(); resolve2({ connect: { @@ -48277,7 +45488,7 @@ var require_dist2 = __commonJS({ var agent_base_1 = require_dist(); var url_1 = require("url"); var parse_proxy_response_1 = require_parse_proxy_response(); - var debug16 = (0, debug_1.default)("https-proxy-agent"); + var debug2 = (0, debug_1.default)("https-proxy-agent"); var setServernameFromNonIpHost = (options) => { if (options.servername === void 0 && options.host && !net.isIP(options.host)) { return { @@ -48293,7 +45504,7 @@ var require_dist2 = __commonJS({ this.options = { path: void 0 }; this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy; this.proxyHeaders = opts?.headers ?? {}; - debug16("Creating new HttpsProxyAgent instance: %o", this.proxy.href); + debug2("Creating new HttpsProxyAgent instance: %o", this.proxy.href); const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; this.connectOpts = { @@ -48315,10 +45526,10 @@ var require_dist2 = __commonJS({ } let socket; if (proxy.protocol === "https:") { - debug16("Creating `tls.Socket`: %o", this.connectOpts); + debug2("Creating `tls.Socket`: %o", this.connectOpts); socket = tls.connect(setServernameFromNonIpHost(this.connectOpts)); } else { - debug16("Creating `net.Socket`: %o", this.connectOpts); + debug2("Creating `net.Socket`: %o", this.connectOpts); socket = net.connect(this.connectOpts); } const headers = typeof this.proxyHeaders === "function" ? this.proxyHeaders() : { ...this.proxyHeaders }; @@ -48346,7 +45557,7 @@ var require_dist2 = __commonJS({ if (connect.statusCode === 200) { req.once("socket", resume); if (opts.secureEndpoint) { - debug16("Upgrading socket connection to TLS"); + debug2("Upgrading socket connection to TLS"); return tls.connect({ ...omit2(setServernameFromNonIpHost(opts), "host", "path", "port"), socket @@ -48358,7 +45569,7 @@ var require_dist2 = __commonJS({ const fakeSocket = new net.Socket({ writable: false }); fakeSocket.readable = true; req.once("socket", (s) => { - debug16("Replaying proxy buffer for failed request"); + debug2("Replaying proxy buffer for failed request"); (0, assert_1.default)(s.listenerCount("data") > 0); s.push(buffered); s.push(null); @@ -48426,13 +45637,13 @@ var require_dist3 = __commonJS({ var events_1 = require("events"); var agent_base_1 = require_dist(); var url_1 = require("url"); - var debug16 = (0, debug_1.default)("http-proxy-agent"); + var debug2 = (0, debug_1.default)("http-proxy-agent"); var HttpProxyAgent2 = class extends agent_base_1.Agent { constructor(proxy, opts) { super(opts); this.proxy = typeof proxy === "string" ? new url_1.URL(proxy) : proxy; this.proxyHeaders = opts?.headers ?? {}; - debug16("Creating new HttpProxyAgent instance: %o", this.proxy.href); + debug2("Creating new HttpProxyAgent instance: %o", this.proxy.href); const host = (this.proxy.hostname || this.proxy.host).replace(/^\[|\]$/g, ""); const port = this.proxy.port ? parseInt(this.proxy.port, 10) : this.proxy.protocol === "https:" ? 443 : 80; this.connectOpts = { @@ -48478,21 +45689,21 @@ var require_dist3 = __commonJS({ } let first; let endOfHeaders; - debug16("Regenerating stored HTTP header string for request"); + debug2("Regenerating stored HTTP header string for request"); req._implicitHeader(); if (req.outputData && req.outputData.length > 0) { - debug16("Patching connection write() output buffer with updated header"); + debug2("Patching connection write() output buffer with updated header"); first = req.outputData[0].data; endOfHeaders = first.indexOf("\r\n\r\n") + 4; req.outputData[0].data = req._header + first.substring(endOfHeaders); - debug16("Output buffer: %o", req.outputData[0].data); + debug2("Output buffer: %o", req.outputData[0].data); } let socket; if (this.proxy.protocol === "https:") { - debug16("Creating `tls.Socket`: %o", this.connectOpts); + debug2("Creating `tls.Socket`: %o", this.connectOpts); socket = tls.connect(this.connectOpts); } else { - debug16("Creating `net.Socket`: %o", this.connectOpts); + debug2("Creating `net.Socket`: %o", this.connectOpts); socket = net.connect(this.connectOpts); } await (0, events_1.once)(socket, "connect"); @@ -49411,13 +46622,13 @@ var require_minimatch = __commonJS({ var require_readdir_glob = __commonJS({ "node_modules/readdir-glob/index.js"(exports2, module2) { module2.exports = readdirGlob; - var fs13 = require("fs"); + var fs14 = require("fs"); var { EventEmitter: EventEmitter3 } = require("events"); var { Minimatch } = require_minimatch(); var { resolve: resolve2 } = require("path"); function readdir2(dir, strict) { return new Promise((resolve3, reject) => { - fs13.readdir(dir, { withFileTypes: true }, (err, files) => { + fs14.readdir(dir, { withFileTypes: true }, (err, files) => { if (err) { switch (err.code) { case "ENOTDIR": @@ -49450,7 +46661,7 @@ var require_readdir_glob = __commonJS({ } function stat2(file, followSymlinks) { return new Promise((resolve3, reject) => { - const statFunc = followSymlinks ? fs13.stat : fs13.lstat; + const statFunc = followSymlinks ? fs14.stat : fs14.lstat; statFunc(file, (err, stats) => { if (err) { switch (err.code) { @@ -49694,9 +46905,9 @@ var require_async = __commonJS({ invokeCallback(callback, err && (err instanceof Error || err.message) ? err : new Error(err)); }); } - function invokeCallback(callback, error9, value) { + function invokeCallback(callback, error2, value) { try { - callback(error9, value); + callback(error2, value); } catch (err) { setImmediate$1((e) => { throw e; @@ -51002,10 +48213,10 @@ var require_async = __commonJS({ function reflect(fn) { var _fn = wrapAsync(fn); return initialParams(function reflectOn(args, reflectCallback) { - args.push((error9, ...cbArgs) => { + args.push((error2, ...cbArgs) => { let retVal = {}; - if (error9) { - retVal.error = error9; + if (error2) { + retVal.error = error2; } if (cbArgs.length > 0) { var value = cbArgs; @@ -51154,20 +48365,20 @@ var require_async = __commonJS({ } } var sortBy$1 = awaitify(sortBy, 3); - function timeout(asyncFn, milliseconds, info17) { + function timeout(asyncFn, milliseconds, info2) { var fn = wrapAsync(asyncFn); return initialParams((args, callback) => { var timedOut = false; var timer; function timeoutCallback() { var name = asyncFn.name || "anonymous"; - var error9 = new Error('Callback function "' + name + '" timed out.'); - error9.code = "ETIMEDOUT"; - if (info17) { - error9.info = info17; + var error2 = new Error('Callback function "' + name + '" timed out.'); + error2.code = "ETIMEDOUT"; + if (info2) { + error2.info = info2; } timedOut = true; - callback(error9); + callback(error2); } args.push((...cbArgs) => { if (!timedOut) { @@ -51210,7 +48421,7 @@ var require_async = __commonJS({ return callback[PROMISE_SYMBOL]; } function tryEach(tasks, callback) { - var error9 = null; + var error2 = null; var result; return eachSeries$1(tasks, (task, taskCb) => { wrapAsync(task)((err, ...args) => { @@ -51220,10 +48431,10 @@ var require_async = __commonJS({ } else { result = args; } - error9 = err; + error2 = err; taskCb(err ? null : {}); }); - }, () => callback(error9, result)); + }, () => callback(error2, result)); } var tryEach$1 = awaitify(tryEach); function unmemoize(fn) { @@ -51515,54 +48726,54 @@ var require_polyfills = __commonJS({ } var chdir; module2.exports = patch; - function patch(fs13) { + function patch(fs14) { if (constants3.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs13); - } - if (!fs13.lutimes) { - patchLutimes(fs13); - } - fs13.chown = chownFix(fs13.chown); - fs13.fchown = chownFix(fs13.fchown); - fs13.lchown = chownFix(fs13.lchown); - fs13.chmod = chmodFix(fs13.chmod); - fs13.fchmod = chmodFix(fs13.fchmod); - fs13.lchmod = chmodFix(fs13.lchmod); - fs13.chownSync = chownFixSync(fs13.chownSync); - fs13.fchownSync = chownFixSync(fs13.fchownSync); - fs13.lchownSync = chownFixSync(fs13.lchownSync); - fs13.chmodSync = chmodFixSync(fs13.chmodSync); - fs13.fchmodSync = chmodFixSync(fs13.fchmodSync); - fs13.lchmodSync = chmodFixSync(fs13.lchmodSync); - fs13.stat = statFix(fs13.stat); - fs13.fstat = statFix(fs13.fstat); - fs13.lstat = statFix(fs13.lstat); - fs13.statSync = statFixSync(fs13.statSync); - fs13.fstatSync = statFixSync(fs13.fstatSync); - fs13.lstatSync = statFixSync(fs13.lstatSync); - if (fs13.chmod && !fs13.lchmod) { - fs13.lchmod = function(path10, mode, cb) { + patchLchmod(fs14); + } + if (!fs14.lutimes) { + patchLutimes(fs14); + } + fs14.chown = chownFix(fs14.chown); + fs14.fchown = chownFix(fs14.fchown); + fs14.lchown = chownFix(fs14.lchown); + fs14.chmod = chmodFix(fs14.chmod); + fs14.fchmod = chmodFix(fs14.fchmod); + fs14.lchmod = chmodFix(fs14.lchmod); + fs14.chownSync = chownFixSync(fs14.chownSync); + fs14.fchownSync = chownFixSync(fs14.fchownSync); + fs14.lchownSync = chownFixSync(fs14.lchownSync); + fs14.chmodSync = chmodFixSync(fs14.chmodSync); + fs14.fchmodSync = chmodFixSync(fs14.fchmodSync); + fs14.lchmodSync = chmodFixSync(fs14.lchmodSync); + fs14.stat = statFix(fs14.stat); + fs14.fstat = statFix(fs14.fstat); + fs14.lstat = statFix(fs14.lstat); + fs14.statSync = statFixSync(fs14.statSync); + fs14.fstatSync = statFixSync(fs14.fstatSync); + fs14.lstatSync = statFixSync(fs14.lstatSync); + if (fs14.chmod && !fs14.lchmod) { + fs14.lchmod = function(path10, mode, cb) { if (cb) process.nextTick(cb); }; - fs13.lchmodSync = function() { + fs14.lchmodSync = function() { }; } - if (fs13.chown && !fs13.lchown) { - fs13.lchown = function(path10, uid, gid, cb) { + if (fs14.chown && !fs14.lchown) { + fs14.lchown = function(path10, uid, gid, cb) { if (cb) process.nextTick(cb); }; - fs13.lchownSync = function() { + fs14.lchownSync = function() { }; } if (platform2 === "win32") { - fs13.rename = typeof fs13.rename !== "function" ? fs13.rename : (function(fs$rename) { + fs14.rename = typeof fs14.rename !== "function" ? fs14.rename : (function(fs$rename) { function rename2(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" || er.code === "EBUSY") && Date.now() - start < 6e4) { setTimeout(function() { - fs13.stat(to, function(stater, st) { + fs14.stat(to, function(stater, st) { if (stater && stater.code === "ENOENT") fs$rename(from, to, CB); else @@ -51578,9 +48789,9 @@ var require_polyfills = __commonJS({ } if (Object.setPrototypeOf) Object.setPrototypeOf(rename2, fs$rename); return rename2; - })(fs13.rename); + })(fs14.rename); } - fs13.read = typeof fs13.read !== "function" ? fs13.read : (function(fs$read) { + fs14.read = typeof fs14.read !== "function" ? fs14.read : (function(fs$read) { function read(fd, buffer2, offset, length, position, callback_) { var callback; if (callback_ && typeof callback_ === "function") { @@ -51588,22 +48799,22 @@ var require_polyfills = __commonJS({ callback = function(er, _2, __) { if (er && er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; - return fs$read.call(fs13, fd, buffer2, offset, length, position, callback); + return fs$read.call(fs14, fd, buffer2, offset, length, position, callback); } callback_.apply(this, arguments); }; } - return fs$read.call(fs13, fd, buffer2, offset, length, position, callback); + return fs$read.call(fs14, fd, buffer2, offset, length, position, callback); } if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); return read; - })(fs13.read); - fs13.readSync = typeof fs13.readSync !== "function" ? fs13.readSync : /* @__PURE__ */ (function(fs$readSync) { + })(fs14.read); + fs14.readSync = typeof fs14.readSync !== "function" ? fs14.readSync : /* @__PURE__ */ (function(fs$readSync) { return function(fd, buffer2, offset, length, position) { var eagCounter = 0; while (true) { try { - return fs$readSync.call(fs13, fd, buffer2, offset, length, position); + return fs$readSync.call(fs14, fd, buffer2, offset, length, position); } catch (er) { if (er.code === "EAGAIN" && eagCounter < 10) { eagCounter++; @@ -51613,10 +48824,10 @@ var require_polyfills = __commonJS({ } } }; - })(fs13.readSync); - function patchLchmod(fs14) { - fs14.lchmod = function(path10, mode, callback) { - fs14.open( + })(fs14.readSync); + function patchLchmod(fs15) { + fs15.lchmod = function(path10, mode, callback) { + fs15.open( path10, constants3.O_WRONLY | constants3.O_SYMLINK, mode, @@ -51625,80 +48836,80 @@ var require_polyfills = __commonJS({ if (callback) callback(err); return; } - fs14.fchmod(fd, mode, function(err2) { - fs14.close(fd, function(err22) { + fs15.fchmod(fd, mode, function(err2) { + fs15.close(fd, function(err22) { if (callback) callback(err2 || err22); }); }); } ); }; - fs14.lchmodSync = function(path10, mode) { - var fd = fs14.openSync(path10, constants3.O_WRONLY | constants3.O_SYMLINK, mode); + fs15.lchmodSync = function(path10, mode) { + var fd = fs15.openSync(path10, constants3.O_WRONLY | constants3.O_SYMLINK, mode); var threw = true; var ret; try { - ret = fs14.fchmodSync(fd, mode); + ret = fs15.fchmodSync(fd, mode); threw = false; } finally { if (threw) { try { - fs14.closeSync(fd); + fs15.closeSync(fd); } catch (er) { } } else { - fs14.closeSync(fd); + fs15.closeSync(fd); } } return ret; }; } - function patchLutimes(fs14) { - if (constants3.hasOwnProperty("O_SYMLINK") && fs14.futimes) { - fs14.lutimes = function(path10, at, mt, cb) { - fs14.open(path10, constants3.O_SYMLINK, function(er, fd) { + function patchLutimes(fs15) { + if (constants3.hasOwnProperty("O_SYMLINK") && fs15.futimes) { + fs15.lutimes = function(path10, at, mt, cb) { + fs15.open(path10, constants3.O_SYMLINK, function(er, fd) { if (er) { if (cb) cb(er); return; } - fs14.futimes(fd, at, mt, function(er2) { - fs14.close(fd, function(er22) { + fs15.futimes(fd, at, mt, function(er2) { + fs15.close(fd, function(er22) { if (cb) cb(er2 || er22); }); }); }); }; - fs14.lutimesSync = function(path10, at, mt) { - var fd = fs14.openSync(path10, constants3.O_SYMLINK); + fs15.lutimesSync = function(path10, at, mt) { + var fd = fs15.openSync(path10, constants3.O_SYMLINK); var ret; var threw = true; try { - ret = fs14.futimesSync(fd, at, mt); + ret = fs15.futimesSync(fd, at, mt); threw = false; } finally { if (threw) { try { - fs14.closeSync(fd); + fs15.closeSync(fd); } catch (er) { } } else { - fs14.closeSync(fd); + fs15.closeSync(fd); } } return ret; }; - } else if (fs14.futimes) { - fs14.lutimes = function(_a, _b, _c, cb) { + } else if (fs15.futimes) { + fs15.lutimes = function(_a, _b, _c, cb) { if (cb) process.nextTick(cb); }; - fs14.lutimesSync = function() { + fs15.lutimesSync = function() { }; } } function chmodFix(orig) { if (!orig) return orig; return function(target, mode, cb) { - return orig.call(fs13, target, mode, function(er) { + return orig.call(fs14, target, mode, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); @@ -51708,7 +48919,7 @@ var require_polyfills = __commonJS({ if (!orig) return orig; return function(target, mode) { try { - return orig.call(fs13, target, mode); + return orig.call(fs14, target, mode); } catch (er) { if (!chownErOk(er)) throw er; } @@ -51717,7 +48928,7 @@ var require_polyfills = __commonJS({ function chownFix(orig) { if (!orig) return orig; return function(target, uid, gid, cb) { - return orig.call(fs13, target, uid, gid, function(er) { + return orig.call(fs14, target, uid, gid, function(er) { if (chownErOk(er)) er = null; if (cb) cb.apply(this, arguments); }); @@ -51727,7 +48938,7 @@ var require_polyfills = __commonJS({ if (!orig) return orig; return function(target, uid, gid) { try { - return orig.call(fs13, target, uid, gid); + return orig.call(fs14, target, uid, gid); } catch (er) { if (!chownErOk(er)) throw er; } @@ -51747,13 +48958,13 @@ var require_polyfills = __commonJS({ } if (cb) cb.apply(this, arguments); } - return options ? orig.call(fs13, target, options, callback) : orig.call(fs13, target, callback); + return options ? orig.call(fs14, target, options, callback) : orig.call(fs14, target, callback); }; } function statFixSync(orig) { if (!orig) return orig; return function(target, options) { - var stats = options ? orig.call(fs13, target, options) : orig.call(fs13, target); + var stats = options ? orig.call(fs14, target, options) : orig.call(fs14, target); if (stats) { if (stats.uid < 0) stats.uid += 4294967296; if (stats.gid < 0) stats.gid += 4294967296; @@ -51782,7 +48993,7 @@ var require_legacy_streams = __commonJS({ "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { var Stream = require("stream").Stream; module2.exports = legacy; - function legacy(fs13) { + function legacy(fs14) { return { ReadStream, WriteStream @@ -51825,7 +49036,7 @@ var require_legacy_streams = __commonJS({ }); return; } - fs13.open(this.path, this.flags, this.mode, function(err, fd) { + fs14.open(this.path, this.flags, this.mode, function(err, fd) { if (err) { self2.emit("error", err); self2.readable = false; @@ -51864,7 +49075,7 @@ var require_legacy_streams = __commonJS({ this.busy = false; this._queue = []; if (this.fd === null) { - this._open = fs13.open; + this._open = fs14.open; this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); this.flush(); } @@ -51899,7 +49110,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 fs13 = require("fs"); + var fs14 = require("fs"); var polyfills = require_polyfills(); var legacy = require_legacy_streams(); var clone = require_clone(); @@ -51922,21 +49133,21 @@ var require_graceful_fs = __commonJS({ } }); } - var debug16 = noop3; + var debug2 = noop3; if (util3.debuglog) - debug16 = util3.debuglog("gfs4"); + debug2 = util3.debuglog("gfs4"); else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) - debug16 = function() { + debug2 = function() { var m = util3.format.apply(util3, arguments); m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); console.error(m); }; - if (!fs13[gracefulQueue]) { + if (!fs14[gracefulQueue]) { queue = global[gracefulQueue] || []; - publishQueue(fs13, queue); - fs13.close = (function(fs$close) { + publishQueue(fs14, queue); + fs14.close = (function(fs$close) { function close(fd, cb) { - return fs$close.call(fs13, fd, function(err) { + return fs$close.call(fs14, fd, function(err) { if (!err) { resetQueue(); } @@ -51948,40 +49159,40 @@ var require_graceful_fs = __commonJS({ value: fs$close }); return close; - })(fs13.close); - fs13.closeSync = (function(fs$closeSync) { + })(fs14.close); + fs14.closeSync = (function(fs$closeSync) { function closeSync(fd) { - fs$closeSync.apply(fs13, arguments); + fs$closeSync.apply(fs14, arguments); resetQueue(); } Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync }); return closeSync; - })(fs13.closeSync); + })(fs14.closeSync); if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { process.on("exit", function() { - debug16(fs13[gracefulQueue]); - require("assert").equal(fs13[gracefulQueue].length, 0); + debug2(fs14[gracefulQueue]); + require("assert").equal(fs14[gracefulQueue].length, 0); }); } } var queue; if (!global[gracefulQueue]) { - publishQueue(global, fs13[gracefulQueue]); - } - module2.exports = patch(clone(fs13)); - if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs13.__patched) { - module2.exports = patch(fs13); - fs13.__patched = true; - } - function patch(fs14) { - polyfills(fs14); - fs14.gracefulify = patch; - fs14.createReadStream = createReadStream2; - fs14.createWriteStream = createWriteStream2; - var fs$readFile = fs14.readFile; - fs14.readFile = readFile; + publishQueue(global, fs14[gracefulQueue]); + } + module2.exports = patch(clone(fs14)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs14.__patched) { + module2.exports = patch(fs14); + fs14.__patched = true; + } + function patch(fs15) { + polyfills(fs15); + fs15.gracefulify = patch; + fs15.createReadStream = createReadStream2; + fs15.createWriteStream = createWriteStream2; + var fs$readFile = fs15.readFile; + fs15.readFile = readFile; function readFile(path10, options, cb) { if (typeof options === "function") cb = options, options = null; @@ -51997,8 +49208,8 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$writeFile = fs14.writeFile; - fs14.writeFile = writeFile2; + var fs$writeFile = fs15.writeFile; + fs15.writeFile = writeFile2; function writeFile2(path10, data, options, cb) { if (typeof options === "function") cb = options, options = null; @@ -52014,9 +49225,9 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$appendFile = fs14.appendFile; + var fs$appendFile = fs15.appendFile; if (fs$appendFile) - fs14.appendFile = appendFile2; + fs15.appendFile = appendFile2; function appendFile2(path10, data, options, cb) { if (typeof options === "function") cb = options, options = null; @@ -52032,9 +49243,9 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$copyFile = fs14.copyFile; + var fs$copyFile = fs15.copyFile; if (fs$copyFile) - fs14.copyFile = copyFile2; + fs15.copyFile = copyFile2; function copyFile2(src, dest, flags, cb) { if (typeof flags === "function") { cb = flags; @@ -52052,8 +49263,8 @@ var require_graceful_fs = __commonJS({ }); } } - var fs$readdir = fs14.readdir; - fs14.readdir = readdir2; + var fs$readdir = fs15.readdir; + fs15.readdir = readdir2; var noReaddirOptionVersions = /^v[0-5]\./; function readdir2(path10, options, cb) { if (typeof options === "function") @@ -52094,21 +49305,21 @@ var require_graceful_fs = __commonJS({ } } if (process.version.substr(0, 4) === "v0.8") { - var legStreams = legacy(fs14); + var legStreams = legacy(fs15); ReadStream = legStreams.ReadStream; WriteStream = legStreams.WriteStream; } - var fs$ReadStream = fs14.ReadStream; + var fs$ReadStream = fs15.ReadStream; if (fs$ReadStream) { ReadStream.prototype = Object.create(fs$ReadStream.prototype); ReadStream.prototype.open = ReadStream$open; } - var fs$WriteStream = fs14.WriteStream; + var fs$WriteStream = fs15.WriteStream; if (fs$WriteStream) { WriteStream.prototype = Object.create(fs$WriteStream.prototype); WriteStream.prototype.open = WriteStream$open; } - Object.defineProperty(fs14, "ReadStream", { + Object.defineProperty(fs15, "ReadStream", { get: function() { return ReadStream; }, @@ -52118,7 +49329,7 @@ var require_graceful_fs = __commonJS({ enumerable: true, configurable: true }); - Object.defineProperty(fs14, "WriteStream", { + Object.defineProperty(fs15, "WriteStream", { get: function() { return WriteStream; }, @@ -52129,7 +49340,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileReadStream = ReadStream; - Object.defineProperty(fs14, "FileReadStream", { + Object.defineProperty(fs15, "FileReadStream", { get: function() { return FileReadStream; }, @@ -52140,7 +49351,7 @@ var require_graceful_fs = __commonJS({ configurable: true }); var FileWriteStream = WriteStream; - Object.defineProperty(fs14, "FileWriteStream", { + Object.defineProperty(fs15, "FileWriteStream", { get: function() { return FileWriteStream; }, @@ -52189,13 +49400,13 @@ var require_graceful_fs = __commonJS({ }); } function createReadStream2(path10, options) { - return new fs14.ReadStream(path10, options); + return new fs15.ReadStream(path10, options); } function createWriteStream2(path10, options) { - return new fs14.WriteStream(path10, options); + return new fs15.WriteStream(path10, options); } - var fs$open = fs14.open; - fs14.open = open2; + var fs$open = fs15.open; + fs15.open = open2; function open2(path10, flags, mode, cb) { if (typeof mode === "function") cb = mode, mode = null; @@ -52211,20 +49422,20 @@ var require_graceful_fs = __commonJS({ }); } } - return fs14; + return fs15; } function enqueue(elem) { - debug16("ENQUEUE", elem[0].name, elem[1]); - fs13[gracefulQueue].push(elem); + debug2("ENQUEUE", elem[0].name, elem[1]); + fs14[gracefulQueue].push(elem); retry2(); } var retryTimer; function resetQueue() { var now = Date.now(); - for (var i = 0; i < fs13[gracefulQueue].length; ++i) { - if (fs13[gracefulQueue][i].length > 2) { - fs13[gracefulQueue][i][3] = now; - fs13[gracefulQueue][i][4] = now; + for (var i = 0; i < fs14[gracefulQueue].length; ++i) { + if (fs14[gracefulQueue][i].length > 2) { + fs14[gracefulQueue][i][3] = now; + fs14[gracefulQueue][i][4] = now; } } retry2(); @@ -52232,19 +49443,19 @@ var require_graceful_fs = __commonJS({ function retry2() { clearTimeout(retryTimer); retryTimer = void 0; - if (fs13[gracefulQueue].length === 0) + if (fs14[gracefulQueue].length === 0) return; - var elem = fs13[gracefulQueue].shift(); + var elem = fs14[gracefulQueue].shift(); var fn = elem[0]; var args = elem[1]; var err = elem[2]; var startTime = elem[3]; var lastTime = elem[4]; if (startTime === void 0) { - debug16("RETRY", fn.name, args); + debug2("RETRY", fn.name, args); fn.apply(null, args); } else if (Date.now() - startTime >= 6e4) { - debug16("TIMEOUT", fn.name, args); + debug2("TIMEOUT", fn.name, args); var cb = args.pop(); if (typeof cb === "function") cb.call(null, err); @@ -52253,10 +49464,10 @@ var require_graceful_fs = __commonJS({ var sinceStart = Math.max(lastTime - startTime, 1); var desiredDelay = Math.min(sinceStart * 1.2, 100); if (sinceAttempt >= desiredDelay) { - debug16("RETRY", fn.name, args); + debug2("RETRY", fn.name, args); fn.apply(null, args.concat([startTime])); } else { - fs13[gracefulQueue].push(elem); + fs14[gracefulQueue].push(elem); } } if (retryTimer === void 0) { @@ -53449,11 +50660,11 @@ var require_stream_readable = __commonJS({ var util3 = Object.create(require_util16()); util3.inherits = require_inherits(); var debugUtil = require("util"); - var debug16 = void 0; + var debug2 = void 0; if (debugUtil && debugUtil.debuglog) { - debug16 = debugUtil.debuglog("stream"); + debug2 = debugUtil.debuglog("stream"); } else { - debug16 = function() { + debug2 = function() { }; } var BufferList = require_BufferList(); @@ -53653,13 +50864,13 @@ var require_stream_readable = __commonJS({ return state3.length; } Readable5.prototype.read = function(n) { - debug16("read", n); + debug2("read", n); n = parseInt(n, 10); var state3 = this._readableState; var nOrig = n; if (n !== 0) state3.emittedReadable = false; if (n === 0 && state3.needReadable && (state3.length >= state3.highWaterMark || state3.ended)) { - debug16("read: emitReadable", state3.length, state3.ended); + debug2("read: emitReadable", state3.length, state3.ended); if (state3.length === 0 && state3.ended) endReadable(this); else emitReadable(this); return null; @@ -53670,16 +50881,16 @@ var require_stream_readable = __commonJS({ return null; } var doRead = state3.needReadable; - debug16("need readable", doRead); + debug2("need readable", doRead); if (state3.length === 0 || state3.length - n < state3.highWaterMark) { doRead = true; - debug16("length less than watermark", doRead); + debug2("length less than watermark", doRead); } if (state3.ended || state3.reading) { doRead = false; - debug16("reading or ended", doRead); + debug2("reading or ended", doRead); } else if (doRead) { - debug16("do read"); + debug2("do read"); state3.reading = true; state3.sync = true; if (state3.length === 0) state3.needReadable = true; @@ -53719,14 +50930,14 @@ var require_stream_readable = __commonJS({ var state3 = stream4._readableState; state3.needReadable = false; if (!state3.emittedReadable) { - debug16("emitReadable", state3.flowing); + debug2("emitReadable", state3.flowing); state3.emittedReadable = true; if (state3.sync) pna.nextTick(emitReadable_, stream4); else emitReadable_(stream4); } } function emitReadable_(stream4) { - debug16("emit readable"); + debug2("emit readable"); stream4.emit("readable"); flow(stream4); } @@ -53739,7 +50950,7 @@ var require_stream_readable = __commonJS({ function maybeReadMore_(stream4, state3) { var len = state3.length; while (!state3.reading && !state3.flowing && !state3.ended && state3.length < state3.highWaterMark) { - debug16("maybeReadMore read 0"); + debug2("maybeReadMore read 0"); stream4.read(0); if (len === state3.length) break; @@ -53765,14 +50976,14 @@ var require_stream_readable = __commonJS({ break; } state3.pipesCount += 1; - debug16("pipe count=%d opts=%j", state3.pipesCount, pipeOpts); + debug2("pipe count=%d opts=%j", state3.pipesCount, pipeOpts); var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; var endFn = doEnd ? onend : unpipe; if (state3.endEmitted) pna.nextTick(endFn); else src.once("end", endFn); dest.on("unpipe", onunpipe); function onunpipe(readable, unpipeInfo) { - debug16("onunpipe"); + debug2("onunpipe"); if (readable === src) { if (unpipeInfo && unpipeInfo.hasUnpiped === false) { unpipeInfo.hasUnpiped = true; @@ -53781,14 +50992,14 @@ var require_stream_readable = __commonJS({ } } function onend() { - debug16("onend"); + debug2("onend"); dest.end(); } var ondrain = pipeOnDrain(src); dest.on("drain", ondrain); var cleanedUp = false; function cleanup() { - debug16("cleanup"); + debug2("cleanup"); dest.removeListener("close", onclose); dest.removeListener("finish", onfinish); dest.removeListener("drain", ondrain); @@ -53803,12 +51014,12 @@ var require_stream_readable = __commonJS({ var increasedAwaitDrain = false; src.on("data", ondata); function ondata(chunk) { - debug16("ondata"); + debug2("ondata"); increasedAwaitDrain = false; var ret = dest.write(chunk); if (false === ret && !increasedAwaitDrain) { if ((state3.pipesCount === 1 && state3.pipes === dest || state3.pipesCount > 1 && indexOf(state3.pipes, dest) !== -1) && !cleanedUp) { - debug16("false write response, pause", state3.awaitDrain); + debug2("false write response, pause", state3.awaitDrain); state3.awaitDrain++; increasedAwaitDrain = true; } @@ -53816,7 +51027,7 @@ var require_stream_readable = __commonJS({ } } function onerror(er) { - debug16("onerror", er); + debug2("onerror", er); unpipe(); dest.removeListener("error", onerror); if (EElistenerCount(dest, "error") === 0) dest.emit("error", er); @@ -53828,18 +51039,18 @@ var require_stream_readable = __commonJS({ } dest.once("close", onclose); function onfinish() { - debug16("onfinish"); + debug2("onfinish"); dest.removeListener("close", onclose); unpipe(); } dest.once("finish", onfinish); function unpipe() { - debug16("unpipe"); + debug2("unpipe"); src.unpipe(dest); } dest.emit("pipe", src); if (!state3.flowing) { - debug16("pipe resume"); + debug2("pipe resume"); src.resume(); } return dest; @@ -53847,7 +51058,7 @@ var require_stream_readable = __commonJS({ function pipeOnDrain(src) { return function() { var state3 = src._readableState; - debug16("pipeOnDrain", state3.awaitDrain); + debug2("pipeOnDrain", state3.awaitDrain); if (state3.awaitDrain) state3.awaitDrain--; if (state3.awaitDrain === 0 && EElistenerCount(src, "data")) { state3.flowing = true; @@ -53907,13 +51118,13 @@ var require_stream_readable = __commonJS({ }; Readable5.prototype.addListener = Readable5.prototype.on; function nReadingNextTick(self2) { - debug16("readable nexttick read 0"); + debug2("readable nexttick read 0"); self2.read(0); } Readable5.prototype.resume = function() { var state3 = this._readableState; if (!state3.flowing) { - debug16("resume"); + debug2("resume"); state3.flowing = true; resume(this, state3); } @@ -53927,7 +51138,7 @@ var require_stream_readable = __commonJS({ } function resume_(stream4, state3) { if (!state3.reading) { - debug16("resume read 0"); + debug2("resume read 0"); stream4.read(0); } state3.resumeScheduled = false; @@ -53937,9 +51148,9 @@ var require_stream_readable = __commonJS({ if (state3.flowing && !state3.reading) stream4.read(0); } Readable5.prototype.pause = function() { - debug16("call pause flowing=%j", this._readableState.flowing); + debug2("call pause flowing=%j", this._readableState.flowing); if (false !== this._readableState.flowing) { - debug16("pause"); + debug2("pause"); this._readableState.flowing = false; this.emit("pause"); } @@ -53947,7 +51158,7 @@ var require_stream_readable = __commonJS({ }; function flow(stream4) { var state3 = stream4._readableState; - debug16("flow", state3.flowing); + debug2("flow", state3.flowing); while (state3.flowing && stream4.read() !== null) { } } @@ -53956,7 +51167,7 @@ var require_stream_readable = __commonJS({ var state3 = this._readableState; var paused = false; stream4.on("end", function() { - debug16("wrapped end"); + debug2("wrapped end"); if (state3.decoder && !state3.ended) { var chunk = state3.decoder.end(); if (chunk && chunk.length) _this.push(chunk); @@ -53964,7 +51175,7 @@ var require_stream_readable = __commonJS({ _this.push(null); }); stream4.on("data", function(chunk) { - debug16("wrapped data"); + debug2("wrapped data"); if (state3.decoder) chunk = state3.decoder.write(chunk); if (state3.objectMode && (chunk === null || chunk === void 0)) return; else if (!state3.objectMode && (!chunk || !chunk.length)) return; @@ -53987,7 +51198,7 @@ var require_stream_readable = __commonJS({ stream4.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); } this._read = function(n2) { - debug16("wrapped _read", n2); + debug2("wrapped _read", n2); if (paused) { paused = false; stream4.resume(); @@ -56634,7 +53845,7 @@ var require_process = __commonJS({ }); // node_modules/readable-stream/lib/internal/streams/utils.js -var require_utils6 = __commonJS({ +var require_utils5 = __commonJS({ "node_modules/readable-stream/lib/internal/streams/utils.js"(exports2, module2) { "use strict"; var { SymbolAsyncIterator, SymbolIterator, SymbolFor } = require_primordials(); @@ -56867,7 +54078,7 @@ var require_end_of_stream = __commonJS({ isNodeStream, willEmitClose: _willEmitClose, kIsClosedPromise - } = require_utils6(); + } = require_utils5(); var addAbortListener; function isRequest(stream4) { return stream4.setHeader && typeof stream4.abort === "function"; @@ -57105,7 +54316,7 @@ var require_destroy2 = __commonJS({ AbortError: AbortError3 } = require_errors3(); var { Symbol: Symbol2 } = require_primordials(); - var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils6(); + var { kIsDestroyed, isDestroyed, isFinished, isServerRequest } = require_utils5(); var kDestroy = Symbol2("kDestroy"); var kConstruct = Symbol2("kConstruct"); function checkError(err, w, r) { @@ -57443,7 +54654,7 @@ var require_add_abort_signal = __commonJS({ "use strict"; var { SymbolDispose } = require_primordials(); var { AbortError: AbortError3, codes } = require_errors3(); - var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils6(); + var { isNodeStream, isWebStream, kControllerErrorFunction } = require_utils5(); var eos = require_end_of_stream(); var { ERR_INVALID_ARG_TYPE } = codes; var addAbortListener; @@ -58024,19 +55235,19 @@ var require_from = __commonJS({ next(); } }; - readable._destroy = function(error9, cb) { + readable._destroy = function(error2, cb) { PromisePrototypeThen( - close(error9), - () => process4.nextTick(cb, error9), + close(error2), + () => process4.nextTick(cb, error2), // nextTick is here in case cb throws - (e) => process4.nextTick(cb, e || error9) + (e) => process4.nextTick(cb, e || error2) ); }; - async function close(error9) { - const hadError = error9 !== void 0 && error9 !== null; + async function close(error2) { + const hadError = error2 !== void 0 && error2 !== null; const hasThrow = typeof iterator2.throw === "function"; if (hadError && hasThrow) { - const { value, done } = await iterator2.throw(error9); + const { value, done } = await iterator2.throw(error2); await value; if (done) { return; @@ -58102,8 +55313,8 @@ var require_readable4 = __commonJS({ var { Buffer: Buffer3 } = require("buffer"); var { addAbortSignal } = require_add_abort_signal(); var eos = require_end_of_stream(); - var debug16 = require_util17().debuglog("stream", (fn) => { - debug16 = fn; + var debug2 = require_util17().debuglog("stream", (fn) => { + debug2 = fn; }); var BufferList = require_buffer_list(); var destroyImpl = require_destroy2(); @@ -58245,12 +55456,12 @@ var require_readable4 = __commonJS({ this.destroy(err); }; Readable5.prototype[SymbolAsyncDispose] = function() { - let error9; + let error2; if (!this.destroyed) { - error9 = this.readableEnded ? null : new AbortError3(); - this.destroy(error9); + error2 = this.readableEnded ? null : new AbortError3(); + this.destroy(error2); } - return new Promise2((resolve2, reject) => eos(this, (err) => err && err !== error9 ? reject(err) : resolve2(null))); + return new Promise2((resolve2, reject) => eos(this, (err) => err && err !== error2 ? reject(err) : resolve2(null))); }; Readable5.prototype.push = function(chunk, encoding) { return readableAddChunk(this, chunk, encoding, false); @@ -58259,7 +55470,7 @@ var require_readable4 = __commonJS({ return readableAddChunk(this, chunk, encoding, true); }; function readableAddChunk(stream4, chunk, encoding, addToFront) { - debug16("readableAddChunk", chunk); + debug2("readableAddChunk", chunk); const state3 = stream4._readableState; let err; if ((state3.state & kObjectMode) === 0) { @@ -58373,7 +55584,7 @@ var require_readable4 = __commonJS({ return state3.ended ? state3.length : 0; } Readable5.prototype.read = function(n) { - debug16("read", n); + debug2("read", n); if (n === void 0) { n = NaN; } else if (!NumberIsInteger(n)) { @@ -58384,7 +55595,7 @@ var require_readable4 = __commonJS({ if (n > state3.highWaterMark) state3.highWaterMark = computeNewHighWaterMark(n); if (n !== 0) state3.state &= ~kEmittedReadable; if (n === 0 && state3.needReadable && ((state3.highWaterMark !== 0 ? state3.length >= state3.highWaterMark : state3.length > 0) || state3.ended)) { - debug16("read: emitReadable", state3.length, state3.ended); + debug2("read: emitReadable", state3.length, state3.ended); if (state3.length === 0 && state3.ended) endReadable(this); else emitReadable(this); return null; @@ -58395,16 +55606,16 @@ var require_readable4 = __commonJS({ return null; } let doRead = (state3.state & kNeedReadable) !== 0; - debug16("need readable", doRead); + debug2("need readable", doRead); if (state3.length === 0 || state3.length - n < state3.highWaterMark) { doRead = true; - debug16("length less than watermark", doRead); + debug2("length less than watermark", doRead); } if (state3.ended || state3.reading || state3.destroyed || state3.errored || !state3.constructed) { doRead = false; - debug16("reading, ended or constructing", doRead); + debug2("reading, ended or constructing", doRead); } else if (doRead) { - debug16("do read"); + debug2("do read"); state3.state |= kReading | kSync; if (state3.length === 0) state3.state |= kNeedReadable; try { @@ -58440,7 +55651,7 @@ var require_readable4 = __commonJS({ return ret; }; function onEofChunk(stream4, state3) { - debug16("onEofChunk"); + debug2("onEofChunk"); if (state3.ended) return; if (state3.decoder) { const chunk = state3.decoder.end(); @@ -58460,17 +55671,17 @@ var require_readable4 = __commonJS({ } function emitReadable(stream4) { const state3 = stream4._readableState; - debug16("emitReadable", state3.needReadable, state3.emittedReadable); + debug2("emitReadable", state3.needReadable, state3.emittedReadable); state3.needReadable = false; if (!state3.emittedReadable) { - debug16("emitReadable", state3.flowing); + debug2("emitReadable", state3.flowing); state3.emittedReadable = true; process4.nextTick(emitReadable_, stream4); } } function emitReadable_(stream4) { const state3 = stream4._readableState; - debug16("emitReadable_", state3.destroyed, state3.length, state3.ended); + debug2("emitReadable_", state3.destroyed, state3.length, state3.ended); if (!state3.destroyed && !state3.errored && (state3.length || state3.ended)) { stream4.emit("readable"); state3.emittedReadable = false; @@ -58487,7 +55698,7 @@ var require_readable4 = __commonJS({ function maybeReadMore_(stream4, state3) { while (!state3.reading && !state3.ended && (state3.length < state3.highWaterMark || state3.flowing && state3.length === 0)) { const len = state3.length; - debug16("maybeReadMore read 0"); + debug2("maybeReadMore read 0"); stream4.read(0); if (len === state3.length) break; @@ -58507,14 +55718,14 @@ var require_readable4 = __commonJS({ } } state3.pipes.push(dest); - debug16("pipe count=%d opts=%j", state3.pipes.length, pipeOpts); + debug2("pipe count=%d opts=%j", state3.pipes.length, pipeOpts); const doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process4.stdout && dest !== process4.stderr; const endFn = doEnd ? onend : unpipe; if (state3.endEmitted) process4.nextTick(endFn); else src.once("end", endFn); dest.on("unpipe", onunpipe); function onunpipe(readable, unpipeInfo) { - debug16("onunpipe"); + debug2("onunpipe"); if (readable === src) { if (unpipeInfo && unpipeInfo.hasUnpiped === false) { unpipeInfo.hasUnpiped = true; @@ -58523,13 +55734,13 @@ var require_readable4 = __commonJS({ } } function onend() { - debug16("onend"); + debug2("onend"); dest.end(); } let ondrain; let cleanedUp = false; function cleanup() { - debug16("cleanup"); + debug2("cleanup"); dest.removeListener("close", onclose); dest.removeListener("finish", onfinish); if (ondrain) { @@ -58546,11 +55757,11 @@ var require_readable4 = __commonJS({ function pause() { if (!cleanedUp) { if (state3.pipes.length === 1 && state3.pipes[0] === dest) { - debug16("false write response, pause", 0); + debug2("false write response, pause", 0); state3.awaitDrainWriters = dest; state3.multiAwaitDrain = false; } else if (state3.pipes.length > 1 && state3.pipes.includes(dest)) { - debug16("false write response, pause", state3.awaitDrainWriters.size); + debug2("false write response, pause", state3.awaitDrainWriters.size); state3.awaitDrainWriters.add(dest); } src.pause(); @@ -58562,15 +55773,15 @@ var require_readable4 = __commonJS({ } src.on("data", ondata); function ondata(chunk) { - debug16("ondata"); + debug2("ondata"); const ret = dest.write(chunk); - debug16("dest.write", ret); + debug2("dest.write", ret); if (ret === false) { pause(); } } function onerror(er) { - debug16("onerror", er); + debug2("onerror", er); unpipe(); dest.removeListener("error", onerror); if (dest.listenerCount("error") === 0) { @@ -58589,20 +55800,20 @@ var require_readable4 = __commonJS({ } dest.once("close", onclose); function onfinish() { - debug16("onfinish"); + debug2("onfinish"); dest.removeListener("close", onclose); unpipe(); } dest.once("finish", onfinish); function unpipe() { - debug16("unpipe"); + debug2("unpipe"); src.unpipe(dest); } dest.emit("pipe", src); if (dest.writableNeedDrain === true) { pause(); } else if (!state3.flowing) { - debug16("pipe resume"); + debug2("pipe resume"); src.resume(); } return dest; @@ -58611,10 +55822,10 @@ var require_readable4 = __commonJS({ return function pipeOnDrainFunctionResult() { const state3 = src._readableState; if (state3.awaitDrainWriters === dest) { - debug16("pipeOnDrain", 1); + debug2("pipeOnDrain", 1); state3.awaitDrainWriters = null; } else if (state3.multiAwaitDrain) { - debug16("pipeOnDrain", state3.awaitDrainWriters.size); + debug2("pipeOnDrain", state3.awaitDrainWriters.size); state3.awaitDrainWriters.delete(dest); } if ((!state3.awaitDrainWriters || state3.awaitDrainWriters.size === 0) && src.listenerCount("data")) { @@ -58656,7 +55867,7 @@ var require_readable4 = __commonJS({ state3.readableListening = state3.needReadable = true; state3.flowing = false; state3.emittedReadable = false; - debug16("on readable", state3.length, state3.reading); + debug2("on readable", state3.length, state3.reading); if (state3.length) { emitReadable(this); } else if (!state3.reading) { @@ -58694,13 +55905,13 @@ var require_readable4 = __commonJS({ } } function nReadingNextTick(self2) { - debug16("readable nexttick read 0"); + debug2("readable nexttick read 0"); self2.read(0); } Readable5.prototype.resume = function() { const state3 = this._readableState; if (!state3.flowing) { - debug16("resume"); + debug2("resume"); state3.flowing = !state3.readableListening; resume(this, state3); } @@ -58714,7 +55925,7 @@ var require_readable4 = __commonJS({ } } function resume_(stream4, state3) { - debug16("resume", state3.reading); + debug2("resume", state3.reading); if (!state3.reading) { stream4.read(0); } @@ -58724,9 +55935,9 @@ var require_readable4 = __commonJS({ if (state3.flowing && !state3.reading) stream4.read(0); } Readable5.prototype.pause = function() { - debug16("call pause flowing=%j", this._readableState.flowing); + debug2("call pause flowing=%j", this._readableState.flowing); if (this._readableState.flowing !== false) { - debug16("pause"); + debug2("pause"); this._readableState.flowing = false; this.emit("pause"); } @@ -58735,7 +55946,7 @@ var require_readable4 = __commonJS({ }; function flow(stream4) { const state3 = stream4._readableState; - debug16("flow", state3.flowing); + debug2("flow", state3.flowing); while (state3.flowing && stream4.read() !== null) ; } Readable5.prototype.wrap = function(stream4) { @@ -58803,14 +56014,14 @@ var require_readable4 = __commonJS({ } } stream4.on("readable", next); - let error9; + let error2; const cleanup = eos( stream4, { writable: false }, (err) => { - error9 = err ? aggregateTwoErrors(error9, err) : null; + error2 = err ? aggregateTwoErrors(error2, err) : null; callback(); callback = nop; } @@ -58820,19 +56031,19 @@ var require_readable4 = __commonJS({ const chunk = stream4.destroyed ? null : stream4.read(); if (chunk !== null) { yield chunk; - } else if (error9) { - throw error9; - } else if (error9 === null) { + } else if (error2) { + throw error2; + } else if (error2 === null) { return; } else { await new Promise2(next); } } } catch (err) { - error9 = aggregateTwoErrors(error9, err); - throw error9; + error2 = aggregateTwoErrors(error2, err); + throw error2; } finally { - if ((error9 || (options === null || options === void 0 ? void 0 : options.destroyOnReturn) !== false) && (error9 === void 0 || stream4._readableState.autoDestroy)) { + if ((error2 || (options === null || options === void 0 ? void 0 : options.destroyOnReturn) !== false) && (error2 === void 0 || stream4._readableState.autoDestroy)) { destroyImpl.destroyer(stream4, null); } else { stream4.off("readable", next); @@ -58984,14 +56195,14 @@ var require_readable4 = __commonJS({ } function endReadable(stream4) { const state3 = stream4._readableState; - debug16("endReadable", state3.endEmitted); + debug2("endReadable", state3.endEmitted); if (!state3.endEmitted) { state3.ended = true; process4.nextTick(endReadableNT, state3, stream4); } } function endReadableNT(state3, stream4) { - debug16("endReadableNT", state3.endEmitted, state3.length); + debug2("endReadableNT", state3.endEmitted, state3.length); if (!state3.errored && !state3.closeEmitted && !state3.endEmitted && state3.length === 0) { state3.endEmitted = true; stream4.emit("end"); @@ -59678,7 +56889,7 @@ var require_duplexify = __commonJS({ isDuplexNodeStream, isReadableStream: isReadableStream3, isWritableStream - } = require_utils6(); + } = require_utils5(); var eos = require_end_of_stream(); var { AbortError: AbortError3, @@ -60278,7 +57489,7 @@ var require_pipeline = __commonJS({ isWebStream, isReadableStream: isReadableStream3, isReadableFinished - } = require_utils6(); + } = require_utils5(); var AbortController2 = globalThis.AbortController || require_abort_controller().AbortController; var PassThrough3; var Readable5; @@ -60326,11 +57537,11 @@ var require_pipeline = __commonJS({ yield* Readable5.prototype[SymbolAsyncIterator].call(val); } async function pumpToNode(iterable, writable, finish, { end }) { - let error9; + let error2; let onresolve = null; const resume = (err) => { if (err) { - error9 = err; + error2 = err; } if (onresolve) { const callback = onresolve; @@ -60339,12 +57550,12 @@ var require_pipeline = __commonJS({ } }; const wait = () => new Promise2((resolve2, reject) => { - if (error9) { - reject(error9); + if (error2) { + reject(error2); } else { onresolve = () => { - if (error9) { - reject(error9); + if (error2) { + reject(error2); } else { resolve2(); } @@ -60374,7 +57585,7 @@ var require_pipeline = __commonJS({ } finish(); } catch (err) { - finish(error9 !== err ? aggregateTwoErrors(error9, err) : err); + finish(error2 !== err ? aggregateTwoErrors(error2, err) : err); } finally { cleanup(); writable.off("drain", resume); @@ -60428,7 +57639,7 @@ var require_pipeline = __commonJS({ if (outerSignal) { disposable = addAbortListener(outerSignal, abort); } - let error9; + let error2; let value; const destroys = []; let finishCount = 0; @@ -60437,23 +57648,23 @@ var require_pipeline = __commonJS({ } function finishImpl(err, final) { var _disposable; - if (err && (!error9 || error9.code === "ERR_STREAM_PREMATURE_CLOSE")) { - error9 = err; + if (err && (!error2 || error2.code === "ERR_STREAM_PREMATURE_CLOSE")) { + error2 = err; } - if (!error9 && !final) { + if (!error2 && !final) { return; } while (destroys.length) { - destroys.shift()(error9); + destroys.shift()(error2); } ; (_disposable = disposable) === null || _disposable === void 0 ? void 0 : _disposable[SymbolDispose](); ac.abort(); if (final) { - if (!error9) { + if (!error2) { lastStreamCleanup.forEach((fn) => fn()); } - process4.nextTick(callback, error9, value); + process4.nextTick(callback, error2, value); } } let ret; @@ -60691,7 +57902,7 @@ var require_compose = __commonJS({ isTransformStream, isWritableStream, isReadableStream: isReadableStream3 - } = require_utils6(); + } = require_utils5(); var { AbortError: AbortError3, codes: { ERR_INVALID_ARG_VALUE, ERR_MISSING_ARGS } @@ -60884,7 +58095,7 @@ var require_operators = __commonJS({ var { finished } = require_end_of_stream(); var staticCompose = require_compose(); var { addAbortSignalNoValidate } = require_add_abort_signal(); - var { isWritable, isNodeStream } = require_utils6(); + var { isWritable, isNodeStream } = require_utils5(); var { deprecate } = require_util17(); var { ArrayPrototypePush, @@ -61279,7 +58490,7 @@ 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_utils6(); + var { isIterable, isNodeStream, isWebStream } = require_utils5(); var { pipelineImpl: pl } = require_pipeline(); var { finished } = require_end_of_stream(); require_stream2(); @@ -61335,7 +58546,7 @@ var require_stream2 = __commonJS({ var { destroyer } = require_destroy2(); var eos = require_end_of_stream(); var promises5 = require_promises(); - var utils = require_utils6(); + var utils = require_utils5(); var Stream = module2.exports = require_legacy().Stream; Stream.isDestroyed = utils.isDestroyed; Stream.isDisturbed = utils.isDisturbed; @@ -67547,8 +64758,8 @@ var require_commonjs6 = __commonJS({ * * @internal */ - constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs13 = defaultFS } = {}) { - this.#fs = fsFromOption(fs13); + constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs14 = defaultFS } = {}) { + this.#fs = fsFromOption(fs14); if (cwd instanceof URL || cwd.startsWith("file://")) { cwd = (0, node_url_1.fileURLToPath)(cwd); } @@ -68107,8 +65318,8 @@ var require_commonjs6 = __commonJS({ /** * @internal */ - newRoot(fs13) { - return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs13 }); + newRoot(fs14) { + return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs14 }); } /** * Return true if the provided path string is an absolute path @@ -68137,8 +65348,8 @@ var require_commonjs6 = __commonJS({ /** * @internal */ - newRoot(fs13) { - return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs13 }); + newRoot(fs14) { + return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs14 }); } /** * Return true if the provided path string is an absolute path @@ -69323,7 +66534,7 @@ var require_commonjs7 = __commonJS({ // node_modules/archiver-utils/file.js var require_file3 = __commonJS({ "node_modules/archiver-utils/file.js"(exports2, module2) { - var fs13 = require_graceful_fs(); + var fs14 = require_graceful_fs(); var path10 = require("path"); var flatten = require_flatten(); var difference = require_difference(); @@ -69350,7 +66561,7 @@ var require_file3 = __commonJS({ }; file.exists = function() { var filepath = path10.join.apply(path10, arguments); - return fs13.existsSync(filepath); + return fs14.existsSync(filepath); }; file.expand = function(...args) { var options = isPlainObject3(args[0]) ? args.shift() : {}; @@ -69368,7 +66579,7 @@ var require_file3 = __commonJS({ if (typeof options.filter === "function") { return options.filter(filepath); } else { - return fs13.statSync(filepath)[options.filter](); + return fs14.statSync(filepath)[options.filter](); } } catch (e) { return false; @@ -69476,7 +66687,7 @@ var require_file3 = __commonJS({ // node_modules/archiver-utils/index.js var require_archiver_utils = __commonJS({ "node_modules/archiver-utils/index.js"(exports2, module2) { - var fs13 = require_graceful_fs(); + var fs14 = require_graceful_fs(); var path10 = require("path"); var isStream = require_is_stream(); var lazystream = require_lazystream(); @@ -69525,7 +66736,7 @@ var require_archiver_utils = __commonJS({ }; utils.lazyReadStream = function(filepath) { return new lazystream.Readable(function() { - return fs13.createReadStream(filepath); + return fs14.createReadStream(filepath); }); }; utils.normalizeInputSource = function(source) { @@ -69553,7 +66764,7 @@ var require_archiver_utils = __commonJS({ callback = base; base = dirpath; } - fs13.readdir(dirpath, function(err, list) { + fs14.readdir(dirpath, function(err, list) { var i = 0; var file; var filepath; @@ -69566,7 +66777,7 @@ var require_archiver_utils = __commonJS({ return callback(null, results); } filepath = path10.join(dirpath, file); - fs13.stat(filepath, function(err2, stats) { + fs14.stat(filepath, function(err2, stats) { results.push({ path: filepath, relative: path10.relative(base, filepath).replace(/\\/g, "/"), @@ -69626,9 +66837,9 @@ var require_error = __commonJS({ }); // node_modules/archiver/lib/core.js -var require_core2 = __commonJS({ +var require_core = __commonJS({ "node_modules/archiver/lib/core.js"(exports2, module2) { - var fs13 = require("fs"); + var fs14 = require("fs"); var glob = require_readdir_glob(); var async = require_async(); var path10 = require("path"); @@ -69692,7 +66903,7 @@ var require_core2 = __commonJS({ data.sourcePath = filepath; task.data = data; this._entriesCount++; - if (data.stats && data.stats instanceof fs13.Stats) { + if (data.stats && data.stats instanceof fs14.Stats) { task = this._updateQueueTaskWithStats(task, data.stats); if (task) { if (data.stats.size) { @@ -69863,7 +67074,7 @@ var require_core2 = __commonJS({ callback(); return; } - fs13.lstat(task.filepath, function(err, stats) { + fs14.lstat(task.filepath, function(err, stats) { if (this._state.aborted) { setImmediate(callback); return; @@ -69906,7 +67117,7 @@ var require_core2 = __commonJS({ task.data.sourceType = "buffer"; task.source = Buffer.concat([]); } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) { - var linkPath = fs13.readlinkSync(task.filepath); + var linkPath = fs14.readlinkSync(task.filepath); var dirName = path10.dirname(task.filepath); task.data.type = "symlink"; task.data.linkname = path10.relative(dirName, path10.resolve(dirName, linkPath)); @@ -70905,7 +68116,7 @@ var require_deflate_crc32_stream = __commonJS({ }); // node_modules/crc32-stream/lib/index.js -var require_lib3 = __commonJS({ +var require_lib2 = __commonJS({ "node_modules/crc32-stream/lib/index.js"(exports2, module2) { "use strict"; module2.exports = { @@ -70920,8 +68131,8 @@ var require_zip_archive_output_stream = __commonJS({ "node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js"(exports2, module2) { var inherits = require("util").inherits; var crc32 = require_crc32(); - var { CRC32Stream } = require_lib3(); - var { DeflateCRC32Stream } = require_lib3(); + var { CRC32Stream } = require_lib2(); + var { DeflateCRC32Stream } = require_lib2(); var ArchiveOutputStream = require_archive_output_stream(); var ZipArchiveEntry = require_zip_archive_entry(); var GeneralPurposeBit = require_general_purpose_bit(); @@ -71043,18 +68254,18 @@ var require_zip_archive_output_stream = __commonJS({ ZipArchiveOutputStream.prototype._smartStream = function(ae, callback) { var deflate = ae.getMethod() === constants3.METHOD_DEFLATED; var process4 = deflate ? new DeflateCRC32Stream(this.options.zlib) : new CRC32Stream(); - var error9 = null; + var error2 = null; function handleStuff() { var digest = process4.digest().readUInt32BE(0); ae.setCrc(digest); ae.setSize(process4.size()); ae.setCompressedSize(process4.size(true)); this._afterAppend(ae); - callback(error9, ae); + callback(error2, ae); } process4.once("end", handleStuff.bind(this)); process4.once("error", function(err) { - error9 = err; + error2 = err; }); process4.pipe(this, { end: false }); return process4; @@ -72484,11 +69695,11 @@ var require_streamx = __commonJS({ } [asyncIterator]() { const stream4 = this; - let error9 = null; + let error2 = null; let promiseResolve = null; let promiseReject = null; this.on("error", (err) => { - error9 = err; + error2 = err; }); this.on("readable", onreadable); this.on("close", onclose); @@ -72520,7 +69731,7 @@ var require_streamx = __commonJS({ } function ondata(data) { if (promiseReject === null) return; - if (error9) promiseReject(error9); + if (error2) promiseReject(error2); else if (data === null && (stream4._duplexState & READ_DONE) === 0) promiseReject(STREAM_DESTROYED); else promiseResolve({ value: data, done: data === null }); promiseReject = promiseResolve = null; @@ -72694,7 +69905,7 @@ var require_streamx = __commonJS({ if (all.length < 2) throw new Error("Pipeline requires at least 2 streams"); let src = all[0]; let dest = null; - let error9 = null; + let error2 = null; for (let i = 1; i < all.length; i++) { dest = all[i]; if (isStreamx(src)) { @@ -72709,14 +69920,14 @@ var require_streamx = __commonJS({ let fin = false; const autoDestroy = isStreamx(dest) || !!(dest._writableState && dest._writableState.autoDestroy); dest.on("error", (err) => { - if (error9 === null) error9 = err; + if (error2 === null) error2 = err; }); dest.on("finish", () => { fin = true; - if (!autoDestroy) done(error9); + if (!autoDestroy) done(error2); }); if (autoDestroy) { - dest.on("close", () => done(error9 || (fin ? null : PREMATURE_CLOSE))); + dest.on("close", () => done(error2 || (fin ? null : PREMATURE_CLOSE))); } } return dest; @@ -72729,8 +69940,8 @@ var require_streamx = __commonJS({ } } function onerror(err) { - if (!err || error9) return; - error9 = err; + if (!err || error2) return; + error2 = err; for (const s of all) { s.destroy(err); } @@ -73300,7 +70511,7 @@ var require_extract = __commonJS({ cb(null); } [Symbol.asyncIterator]() { - let error9 = null; + let error2 = null; let promiseResolve = null; let promiseReject = null; let entryStream = null; @@ -73308,7 +70519,7 @@ var require_extract = __commonJS({ const extract = this; this.on("entry", onentry); this.on("error", (err) => { - error9 = err; + error2 = err; }); this.on("close", onclose); return { @@ -73332,8 +70543,8 @@ var require_extract = __commonJS({ cb(err); } function onnext(resolve2, reject) { - if (error9) { - return reject(error9); + if (error2) { + return reject(error2); } if (entryStream) { resolve2({ value: entryStream, done: false }); @@ -73359,9 +70570,9 @@ var require_extract = __commonJS({ } } function onclose() { - consumeCallback(error9); + consumeCallback(error2); if (!promiseResolve) return; - if (error9) promiseReject(error9); + if (error2) promiseReject(error2); else promiseResolve({ value: void 0, done: true }); promiseResolve = promiseReject = null; } @@ -74095,7 +71306,7 @@ var require_json = __commonJS({ // node_modules/archiver/index.js var require_archiver = __commonJS({ "node_modules/archiver/index.js"(exports2, module2) { - var Archiver = require_core2(); + var Archiver = require_core(); var formats = {}; var vending = function(format, options) { return vending.create(format, options); @@ -74136,7 +71347,7 @@ var require_archiver = __commonJS({ }); // node_modules/@actions/artifact/node_modules/@actions/github/node_modules/@actions/http-client/lib/proxy.js -var require_proxy3 = __commonJS({ +var require_proxy2 = __commonJS({ "node_modules/@actions/artifact/node_modules/@actions/github/node_modules/@actions/http-client/lib/proxy.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -75448,14 +72659,14 @@ var require_diagnostics2 = __commonJS({ diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { connectParams: { version: version3, protocol, port, host }, - error: error9 + error: error2 } = evt; debuglog( "connection to %s using %s%s errored - %s", `${host}${port ? `:${port}` : ""}`, protocol, version3, - error9.message + error2.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -75486,14 +72697,14 @@ var require_diagnostics2 = __commonJS({ diagnosticsChannel.channel("undici:request:error").subscribe((evt) => { const { request: { method, path: path10, origin }, - error: error9 + error: error2 } = evt; debuglog( "request to %s %s/%s errored - %s", method, origin, path10, - error9.message + error2.message ); }); isClientSet = true; @@ -75528,7 +72739,7 @@ var require_diagnostics2 = __commonJS({ diagnosticsChannel.channel("undici:client:connectError").subscribe((evt) => { const { connectParams: { version: version3, protocol, port, host }, - error: error9 + error: error2 } = evt; debuglog( "connection to %s%s using %s%s errored - %s", @@ -75536,7 +72747,7 @@ var require_diagnostics2 = __commonJS({ port ? `:${port}` : "", protocol, version3, - error9.message + error2.message ); }); diagnosticsChannel.channel("undici:client:sendHeaders").subscribe((evt) => { @@ -75803,16 +73014,16 @@ var require_request5 = __commonJS({ this.onError(err); } } - onError(error9) { + onError(error2) { this.onFinally(); if (channels.error.hasSubscribers) { - channels.error.publish({ request: this, error: error9 }); + channels.error.publish({ request: this, error: error2 }); } if (this.aborted) { return; } this.aborted = true; - return this[kHandler].onError(error9); + return this[kHandler].onError(error2); } onFinally() { if (this.errorHandler) { @@ -76529,7 +73740,7 @@ var require_connect3 = __commonJS({ }); // node_modules/@actions/artifact/node_modules/undici/lib/llhttp/utils.js -var require_utils7 = __commonJS({ +var require_utils6 = __commonJS({ "node_modules/@actions/artifact/node_modules/undici/lib/llhttp/utils.js"(exports2) { "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); @@ -76554,7 +73765,7 @@ var require_constants14 = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.SPECIAL_HEADERS = exports2.HEADER_STATE = exports2.MINOR = exports2.MAJOR = exports2.CONNECTION_TOKEN_CHARS = exports2.HEADER_CHARS = exports2.TOKEN = exports2.STRICT_TOKEN = exports2.HEX = exports2.URL_CHAR = exports2.STRICT_URL_CHAR = exports2.USERINFO_CHARS = exports2.MARK = exports2.ALPHANUM = exports2.NUM = exports2.HEX_MAP = exports2.NUM_MAP = exports2.ALPHA = exports2.FINISH = exports2.H_METHOD_MAP = exports2.METHOD_MAP = exports2.METHODS_RTSP = exports2.METHODS_ICE = exports2.METHODS_HTTP = exports2.METHODS = exports2.LENIENT_FLAGS = exports2.FLAGS = exports2.TYPE = exports2.ERROR = void 0; - var utils_1 = require_utils7(); + var utils_1 = require_utils6(); var ERROR; (function(ERROR2) { ERROR2[ERROR2["OK"] = 0] = "OK"; @@ -77927,11 +75138,11 @@ var require_util21 = __commonJS({ var { isUint8Array } = require("node:util/types"); var { webidl } = require_webidl3(); var supportedHashes = []; - var crypto4; + var crypto5; try { - crypto4 = require("node:crypto"); + crypto5 = require("node:crypto"); const possibleRelevantHashes = ["sha256", "sha384", "sha512"]; - supportedHashes = crypto4.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); + supportedHashes = crypto5.getHashes().filter((hash) => possibleRelevantHashes.includes(hash)); } catch { } function responseURL(response) { @@ -78204,7 +75415,7 @@ var require_util21 = __commonJS({ } } function bytesMatch(bytes, metadataList) { - if (crypto4 === void 0) { + if (crypto5 === void 0) { return true; } const parsedMetadata = parseMetadata(metadataList); @@ -78219,7 +75430,7 @@ var require_util21 = __commonJS({ for (const item of metadata2) { const algorithm = item.algo; const expectedValue = item.hash; - let actualValue = crypto4.createHash(algorithm).update(bytes).digest("base64"); + let actualValue = crypto5.createHash(algorithm).update(bytes).digest("base64"); if (actualValue[actualValue.length - 1] === "=") { if (actualValue[actualValue.length - 2] === "=") { actualValue = actualValue.slice(0, -2); @@ -79283,8 +76494,8 @@ var require_body3 = __commonJS({ var { multipartFormDataParser } = require_formdata_parser2(); var random; try { - const crypto4 = require("node:crypto"); - random = (max) => crypto4.randomInt(0, max); + const crypto5 = require("node:crypto"); + random = (max) => crypto5.randomInt(0, max); } catch { random = (max) => Math.floor(Math.random(max)); } @@ -79529,7 +76740,7 @@ Content-Type: ${value.type || "application/octet-stream"}\r } throwIfAborted(object[kState]); const promise = createDeferredPromise(); - const errorSteps = (error9) => promise.reject(error9); + const errorSteps = (error2) => promise.reject(error2); const successSteps = (data) => { try { promise.resolve(convertBytesToJSValue(data)); @@ -81037,8 +78248,8 @@ var require_client_h22 = __commonJS({ } request2.onRequestSent(); client2[kResume](); - } catch (error9) { - abort(error9); + } catch (error2) { + abort(error2); } } function writeStream(abort, socket, expectsPayload, h2stream, body2, client2, request2, contentLength2) { @@ -81193,8 +78404,8 @@ var require_redirect_handler2 = __commonJS({ onUpgrade(statusCode, headers, socket) { this.handler.onUpgrade(statusCode, headers, socket); } - onError(error9) { - this.handler.onError(error9); + onError(error2) { + this.handler.onError(error2); } onHeaders(statusCode, headers, resume, statusText) { this.location = this.history.length >= this.maxRedirections || util3.isDisturbed(this.opts.body) ? null : parseLocation(statusCode, headers); @@ -82122,7 +79333,7 @@ var require_pool3 = __commonJS({ this[kOptions] = { ...util3.deepClone(options), connect, allowH2 }; this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; - this.on("connectionError", (origin2, targets, error9) => { + this.on("connectionError", (origin2, targets, error2) => { for (const target of targets) { const idx = this[kClients].indexOf(target); if (idx !== -1) { @@ -84489,13 +81700,13 @@ var require_mock_utils3 = __commonJS({ if (mockDispatch2.data.callback) { mockDispatch2.data = { ...mockDispatch2.data, ...mockDispatch2.data.callback(opts) }; } - const { data: { statusCode, data, headers, trailers, error: error9 }, delay: delay4, persist } = mockDispatch2; + const { data: { statusCode, data, headers, trailers, error: error2 }, delay: delay4, persist } = mockDispatch2; const { timesInvoked, times } = mockDispatch2; mockDispatch2.consumed = !persist && timesInvoked >= times; mockDispatch2.pending = timesInvoked < times; - if (error9 !== null) { + if (error2 !== null) { deleteMockDispatch(this[kDispatches], key); - handler2.onError(error9); + handler2.onError(error2); return true; } if (typeof delay4 === "number" && delay4 > 0) { @@ -84533,19 +81744,19 @@ var require_mock_utils3 = __commonJS({ if (agent.isMockActive) { try { mockDispatch.call(this, opts, handler2); - } catch (error9) { - if (error9 instanceof MockNotMatchedError) { + } catch (error2) { + if (error2 instanceof MockNotMatchedError) { const netConnect = agent[kGetNetConnect](); if (netConnect === false) { - throw new MockNotMatchedError(`${error9.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); } if (checkNetConnect(netConnect, origin)) { originalDispatch.call(this, opts, handler2); } else { - throw new MockNotMatchedError(`${error9.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + throw new MockNotMatchedError(`${error2.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); } } else { - throw error9; + throw error2; } } } else { @@ -84710,11 +81921,11 @@ var require_mock_interceptor3 = __commonJS({ /** * Mock an undici request with a defined error. */ - replyWithError(error9) { - if (typeof error9 === "undefined") { + replyWithError(error2) { + if (typeof error2 === "undefined") { throw new InvalidArgumentError("error must be defined"); } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error9 }); + const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error: error2 }); return new MockScope(newMockDispatch); } /** @@ -87232,17 +84443,17 @@ var require_fetch3 = __commonJS({ this.emit("terminated", reason); } // https://fetch.spec.whatwg.org/#fetch-controller-abort - abort(error9) { + abort(error2) { if (this.state !== "ongoing") { return; } this.state = "aborted"; - if (!error9) { - error9 = new DOMException("The operation was aborted.", "AbortError"); + if (!error2) { + error2 = new DOMException("The operation was aborted.", "AbortError"); } - this.serializedAbortReason = error9; - this.connection?.destroy(error9); - this.emit("terminated", error9); + this.serializedAbortReason = error2; + this.connection?.destroy(error2); + this.emit("terminated", error2); } }; function handleFetchDone(response) { @@ -87338,12 +84549,12 @@ var require_fetch3 = __commonJS({ ); } var markResourceTiming = performance.markResourceTiming; - function abortFetch(p, request2, responseObject, error9) { + function abortFetch(p, request2, responseObject, error2) { if (p) { - p.reject(error9); + p.reject(error2); } if (request2.body != null && isReadable(request2.body?.stream)) { - request2.body.stream.cancel(error9).catch((err) => { + request2.body.stream.cancel(error2).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -87355,7 +84566,7 @@ var require_fetch3 = __commonJS({ } const response = responseObject[kState]; if (response.body != null && isReadable(response.body?.stream)) { - response.body.stream.cancel(error9).catch((err) => { + response.body.stream.cancel(error2).catch((err) => { if (err.code === "ERR_INVALID_STATE") { return; } @@ -88176,13 +85387,13 @@ var require_fetch3 = __commonJS({ fetchParams.controller.ended = true; this.body.push(null); }, - onError(error9) { + onError(error2) { if (this.abort) { fetchParams.controller.off("terminated", this.abort); } - this.body?.destroy(error9); - fetchParams.controller.terminate(error9); - reject(error9); + this.body?.destroy(error2); + fetchParams.controller.terminate(error2); + reject(error2); }, onUpgrade(status, rawHeaders, socket) { if (status !== 101) { @@ -88645,8 +85856,8 @@ var require_util23 = __commonJS({ } fr[kResult] = result; fireAProgressEvent("load", fr); - } catch (error9) { - fr[kError] = error9; + } catch (error2) { + fr[kError] = error2; fireAProgressEvent("error", fr); } if (fr[kState] !== "loading") { @@ -88655,13 +85866,13 @@ var require_util23 = __commonJS({ }); break; } - } catch (error9) { + } catch (error2) { if (fr[kAborted]) { return; } queueMicrotask(() => { fr[kState] = "done"; - fr[kError] = error9; + fr[kError] = error2; fireAProgressEvent("error", fr); if (fr[kState] !== "loading") { fireAProgressEvent("loadend", fr); @@ -90688,13 +87899,13 @@ var require_frame3 = __commonJS({ "use strict"; var { maxUnsigned16Bit } = require_constants17(); var BUFFER_SIZE = 16386; - var crypto4; + var crypto5; var buffer2 = null; var bufIdx = BUFFER_SIZE; try { - crypto4 = require("node:crypto"); + crypto5 = require("node:crypto"); } catch { - crypto4 = { + crypto5 = { // not full compatibility, but minimum. randomFillSync: function randomFillSync(buffer3, _offset, _size) { for (let i = 0; i < buffer3.length; ++i) { @@ -90707,7 +87918,7 @@ var require_frame3 = __commonJS({ function generateMask() { if (bufIdx === BUFFER_SIZE) { bufIdx = 0; - crypto4.randomFillSync(buffer2 ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); + crypto5.randomFillSync(buffer2 ??= Buffer.allocUnsafe(BUFFER_SIZE), 0, BUFFER_SIZE); } return [buffer2[bufIdx++], buffer2[bufIdx++], buffer2[bufIdx++], buffer2[bufIdx++]]; } @@ -90779,9 +87990,9 @@ var require_connection3 = __commonJS({ var { Headers: Headers2, getHeadersList } = require_headers4(); var { getDecodeSplit } = require_util21(); var { WebsocketFrameSend } = require_frame3(); - var crypto4; + var crypto5; try { - crypto4 = require("node:crypto"); + crypto5 = require("node:crypto"); } catch { } function establishWebSocketConnection(url2, protocols, client2, ws, onEstablish, options) { @@ -90801,7 +88012,7 @@ var require_connection3 = __commonJS({ const headersList = getHeadersList(new Headers2(options.headers)); request2.headersList = headersList; } - const keyValue = crypto4.randomBytes(16).toString("base64"); + const keyValue = crypto5.randomBytes(16).toString("base64"); request2.headersList.append("sec-websocket-key", keyValue); request2.headersList.append("sec-websocket-version", "13"); for (const protocol of protocols) { @@ -90831,7 +88042,7 @@ var require_connection3 = __commonJS({ return; } const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto4.createHash("sha1").update(keyValue + uid).digest("base64"); + const digest = crypto5.createHash("sha1").update(keyValue + uid).digest("base64"); if (secWSAccept !== digest) { failWebsocketConnection(ws, "Incorrect hash received in Sec-WebSocket-Accept header."); return; @@ -90929,11 +88140,11 @@ var require_connection3 = __commonJS({ }); } } - function onSocketError(error9) { + function onSocketError(error2) { const { ws } = this; ws[kReadyState] = states.CLOSING; if (channels.socketError.hasSubscribers) { - channels.socketError.publish(error9); + channels.socketError.publish(error2); } this.destroy(); } @@ -91158,9 +88369,9 @@ var require_receiver3 = __commonJS({ } this.#state = parserStates.INFO; } else { - this.#extensions.get("permessage-deflate").decompress(body2, this.#info.fin, (error9, data) => { - if (error9) { - closeWebSocketConnection(this.ws, 1007, error9.message, error9.message.length); + this.#extensions.get("permessage-deflate").decompress(body2, this.#info.fin, (error2, data) => { + if (error2) { + closeWebSocketConnection(this.ws, 1007, error2.message, error2.message.length); return; } this.#fragments.push(data); @@ -92192,8 +89403,8 @@ var require_eventsource2 = __commonJS({ pipeline( response.body.stream, eventSourceStream, - (error9) => { - if (error9?.aborted === false) { + (error2) => { + if (error2?.aborted === false) { this.close(); this.dispatchEvent(new Event("error")); } @@ -92467,7 +89678,7 @@ var require_undici3 = __commonJS({ }); // node_modules/@actions/artifact/node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js -var require_lib4 = __commonJS({ +var require_lib3 = __commonJS({ "node_modules/@actions/artifact/node_modules/@actions/github/node_modules/@actions/http-client/lib/index.js"(exports2) { "use strict"; var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { @@ -92540,7 +89751,7 @@ var require_lib4 = __commonJS({ exports2.isHttps = isHttps; var http3 = __importStar(require("http")); var https3 = __importStar(require("https")); - var pm = __importStar(require_proxy3()); + var pm = __importStar(require_proxy2()); var tunnel2 = __importStar(require_tunnel2()); var undici_1 = require_undici3(); var HttpCodes2; @@ -92773,12 +89984,12 @@ var require_lib4 = __commonJS({ throw new Error("Client has already been disposed."); } const parsedUrl = new URL(requestUrl); - let info17 = this._prepareRequest(verb, parsedUrl, headers); + let info2 = this._prepareRequest(verb, parsedUrl, headers); const maxTries = this._allowRetries && RetryableHttpVerbs2.includes(verb) ? this._maxRetries + 1 : 1; let numTries = 0; let response; do { - response = yield this.requestRaw(info17, data); + response = yield this.requestRaw(info2, data); if (response && response.message && response.message.statusCode === HttpCodes2.Unauthorized) { let authenticationHandler; for (const handler2 of this.handlers) { @@ -92788,7 +89999,7 @@ var require_lib4 = __commonJS({ } } if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info17, data); + return authenticationHandler.handleAuthentication(this, info2, data); } else { return response; } @@ -92811,8 +90022,8 @@ var require_lib4 = __commonJS({ } } } - info17 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info17, data); + info2 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info2, data); redirectsRemaining--; } if (!response.message.statusCode || !HttpResponseRetryCodes2.includes(response.message.statusCode)) { @@ -92841,7 +90052,7 @@ var require_lib4 = __commonJS({ * @param info * @param data */ - requestRaw(info17, data) { + requestRaw(info2, data) { return __awaiter15(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { function callbackForResult(err, res) { @@ -92853,7 +90064,7 @@ var require_lib4 = __commonJS({ resolve2(res); } } - this.requestRawWithCallback(info17, data, callbackForResult); + this.requestRawWithCallback(info2, data, callbackForResult); }); }); } @@ -92863,12 +90074,12 @@ var require_lib4 = __commonJS({ * @param data * @param onResult */ - requestRawWithCallback(info17, data, onResult) { + requestRawWithCallback(info2, data, onResult) { if (typeof data === "string") { - if (!info17.options.headers) { - info17.options.headers = {}; + if (!info2.options.headers) { + info2.options.headers = {}; } - info17.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + info2.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); } let callbackCalled = false; function handleResult(err, res) { @@ -92877,7 +90088,7 @@ var require_lib4 = __commonJS({ onResult(err, res); } } - const req = info17.httpModule.request(info17.options, (msg) => { + const req = info2.httpModule.request(info2.options, (msg) => { const res = new HttpClientResponse2(msg); handleResult(void 0, res); }); @@ -92889,7 +90100,7 @@ var require_lib4 = __commonJS({ if (socket) { socket.end(); } - handleResult(new Error(`Request timeout: ${info17.options.path}`)); + handleResult(new Error(`Request timeout: ${info2.options.path}`)); }); req.on("error", function(err) { handleResult(err); @@ -92925,27 +90136,27 @@ var require_lib4 = __commonJS({ return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); } _prepareRequest(method, requestUrl, headers) { - const info17 = {}; - info17.parsedUrl = requestUrl; - const usingSsl = info17.parsedUrl.protocol === "https:"; - info17.httpModule = usingSsl ? https3 : http3; + const info2 = {}; + info2.parsedUrl = requestUrl; + const usingSsl = info2.parsedUrl.protocol === "https:"; + info2.httpModule = usingSsl ? https3 : http3; const defaultPort = usingSsl ? 443 : 80; - info17.options = {}; - info17.options.host = info17.parsedUrl.hostname; - info17.options.port = info17.parsedUrl.port ? parseInt(info17.parsedUrl.port) : defaultPort; - info17.options.path = (info17.parsedUrl.pathname || "") + (info17.parsedUrl.search || ""); - info17.options.method = method; - info17.options.headers = this._mergeHeaders(headers); + info2.options = {}; + info2.options.host = info2.parsedUrl.hostname; + info2.options.port = info2.parsedUrl.port ? parseInt(info2.parsedUrl.port) : defaultPort; + info2.options.path = (info2.parsedUrl.pathname || "") + (info2.parsedUrl.search || ""); + info2.options.method = method; + info2.options.headers = this._mergeHeaders(headers); if (this.userAgent != null) { - info17.options.headers["user-agent"] = this.userAgent; + info2.options.headers["user-agent"] = this.userAgent; } - info17.options.agent = this._getAgent(info17.parsedUrl); + info2.options.agent = this._getAgent(info2.parsedUrl); if (this.handlers) { for (const handler2 of this.handlers) { - handler2.prepareRequest(info17.options); + handler2.prepareRequest(info2.options); } } - return info17; + return info2; } _mergeHeaders(headers) { if (this.requestOptions && this.requestOptions.headers) { @@ -94914,8 +92125,8 @@ var require_parser_stream = __commonJS({ this.unzipStream.on("entry", function(entry) { self2.push(entry); }); - this.unzipStream.on("error", function(error9) { - self2.emit("error", error9); + this.unzipStream.on("error", function(error2) { + self2.emit("error", error2); }); } util3.inherits(ParserStream, Transform3); @@ -94951,7 +92162,7 @@ var require_parser_stream = __commonJS({ var require_mkdirp = __commonJS({ "node_modules/mkdirp/index.js"(exports2, module2) { var path10 = require("path"); - var fs13 = require("fs"); + var fs14 = require("fs"); var _0777 = parseInt("0777", 8); module2.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; function mkdirP(p, opts, f, made) { @@ -94962,7 +92173,7 @@ var require_mkdirp = __commonJS({ opts = { mode: opts }; } var mode = opts.mode; - var xfs = opts.fs || fs13; + var xfs = opts.fs || fs14; if (mode === void 0) { mode = _0777; } @@ -95001,7 +92212,7 @@ var require_mkdirp = __commonJS({ opts = { mode: opts }; } var mode = opts.mode; - var xfs = opts.fs || fs13; + var xfs = opts.fs || fs14; if (mode === void 0) { mode = _0777; } @@ -95038,7 +92249,7 @@ 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 fs13 = require("fs"); + var fs14 = require("fs"); var path10 = require("path"); var util3 = require("util"); var mkdirp = require_mkdirp(); @@ -95055,8 +92266,8 @@ var require_extract2 = __commonJS({ this.createdDirectories = {}; var self2 = this; this.unzipStream.on("entry", this._processEntry.bind(this)); - this.unzipStream.on("error", function(error9) { - self2.emit("error", error9); + this.unzipStream.on("error", function(error2) { + self2.emit("error", error2); }); } util3.inherits(Extract, Transform3); @@ -95085,13 +92296,13 @@ var require_extract2 = __commonJS({ var directory = entry.isDirectory ? destPath : path10.dirname(destPath); this.unfinishedEntries++; var writeFileFn = function() { - var pipedStream = fs13.createWriteStream(destPath); + var pipedStream = fs14.createWriteStream(destPath); pipedStream.on("close", function() { self2.unfinishedEntries--; self2._notifyAwaiter(); }); - pipedStream.on("error", function(error9) { - self2.emit("error", error9); + pipedStream.on("error", function(error2) { + self2.emit("error", error2); }); entry.pipe(pipedStream); }; @@ -95308,8 +92519,8 @@ var require_light = __commonJS({ } else { return returned; } - } catch (error9) { - e2 = error9; + } catch (error2) { + e2 = error2; { this.trigger("error", e2); } @@ -95319,8 +92530,8 @@ var require_light = __commonJS({ return (await Promise.all(promises5)).find(function(x) { return x != null; }); - } catch (error9) { - e = error9; + } catch (error2) { + e = error2; { this.trigger("error", e); } @@ -95432,10 +92643,10 @@ var require_light = __commonJS({ _randomIndex() { return Math.random().toString(36).slice(2); } - doDrop({ error: error9, message = "This job has been dropped by Bottleneck" } = {}) { + doDrop({ error: error2, message = "This job has been dropped by Bottleneck" } = {}) { if (this._states.remove(this.options.id)) { if (this.rejectOnDrop) { - this._reject(error9 != null ? error9 : new BottleneckError$1(message)); + this._reject(error2 != null ? error2 : new BottleneckError$1(message)); } this.Events.trigger("dropped", { args: this.args, options: this.options, task: this.task, promise: this.promise }); return true; @@ -95469,7 +92680,7 @@ var require_light = __commonJS({ return this.Events.trigger("scheduled", { args: this.args, options: this.options }); } async doExecute(chained, clearGlobalState, run2, free) { - var error9, eventInfo, passed; + var error2, eventInfo, passed; if (this.retryCount === 0) { this._assertStatus("RUNNING"); this._states.next(this.options.id); @@ -95487,24 +92698,24 @@ var require_light = __commonJS({ return this._resolve(passed); } } catch (error1) { - error9 = error1; - return this._onFailure(error9, eventInfo, clearGlobalState, run2, free); + error2 = error1; + return this._onFailure(error2, eventInfo, clearGlobalState, run2, free); } } doExpire(clearGlobalState, run2, free) { - var error9, eventInfo; + var error2, eventInfo; if (this._states.jobStatus(this.options.id === "RUNNING")) { this._states.next(this.options.id); } this._assertStatus("EXECUTING"); eventInfo = { args: this.args, options: this.options, retryCount: this.retryCount }; - error9 = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); - return this._onFailure(error9, eventInfo, clearGlobalState, run2, free); + error2 = new BottleneckError$1(`This job timed out after ${this.options.expiration} ms.`); + return this._onFailure(error2, eventInfo, clearGlobalState, run2, free); } - async _onFailure(error9, eventInfo, clearGlobalState, run2, free) { + async _onFailure(error2, eventInfo, clearGlobalState, run2, free) { var retry2, retryAfter; if (clearGlobalState()) { - retry2 = await this.Events.trigger("failed", error9, eventInfo); + retry2 = await this.Events.trigger("failed", error2, eventInfo); if (retry2 != null) { retryAfter = ~~retry2; this.Events.trigger("retry", `Retrying ${this.options.id} after ${retryAfter} ms`, eventInfo); @@ -95514,7 +92725,7 @@ var require_light = __commonJS({ this.doDone(eventInfo); await free(this.options, eventInfo); this._assertStatus("DONE"); - return this._reject(error9); + return this._reject(error2); } } } @@ -95793,7 +93004,7 @@ var require_light = __commonJS({ return this._queue.length === 0; } async _tryToRun() { - var args, cb, error9, reject, resolve2, returned, task; + var args, cb, error2, reject, resolve2, returned, task; if (this._running < 1 && this._queue.length > 0) { this._running++; ({ task, args, resolve: resolve2, reject } = this._queue.shift()); @@ -95804,9 +93015,9 @@ var require_light = __commonJS({ return resolve2(returned); }; } catch (error1) { - error9 = error1; + error2 = error1; return function() { - return reject(error9); + return reject(error2); }; } })(); @@ -95940,8 +93151,8 @@ var require_light = __commonJS({ } else { results.push(void 0); } - } catch (error9) { - e = error9; + } catch (error2) { + e = error2; results.push(v.Events.trigger("error", e)); } } @@ -96133,508 +93344,1339 @@ var require_light = __commonJS({ return false; } } - async _free(index, job, options, eventInfo) { - var e, running; - try { - ({ running } = await this._store.__free__(index, options.weight)); - this.Events.trigger("debug", `Freed ${options.id}`, eventInfo); - if (running === 0 && this.empty()) { - return this.Events.trigger("idle"); - } - } catch (error1) { - e = error1; - return this.Events.trigger("error", e); - } + async _free(index, job, options, eventInfo) { + var e, running; + try { + ({ running } = await this._store.__free__(index, options.weight)); + this.Events.trigger("debug", `Freed ${options.id}`, eventInfo); + if (running === 0 && this.empty()) { + return this.Events.trigger("idle"); + } + } catch (error1) { + e = error1; + return this.Events.trigger("error", e); + } + } + _run(index, job, wait) { + var clearGlobalState, free, run2; + job.doRun(); + clearGlobalState = this._clearGlobalState.bind(this, index); + run2 = this._run.bind(this, index, job); + free = this._free.bind(this, index, job); + return this._scheduled[index] = { + timeout: setTimeout(() => { + return job.doExecute(this._limiter, clearGlobalState, run2, free); + }, wait), + expiration: job.options.expiration != null ? setTimeout(function() { + return job.doExpire(clearGlobalState, run2, free); + }, wait + job.options.expiration) : void 0, + job + }; + } + _drainOne(capacity) { + return this._registerLock.schedule(() => { + var args, index, next, options, queue; + if (this.queued() === 0) { + return this.Promise.resolve(null); + } + queue = this._queues.getFirst(); + ({ options, args } = next = queue.first()); + if (capacity != null && options.weight > capacity) { + return this.Promise.resolve(null); + } + this.Events.trigger("debug", `Draining ${options.id}`, { args, options }); + index = this._randomIndex(); + return this._store.__register__(index, options.weight, options.expiration).then(({ success, wait, reservoir }) => { + var empty; + this.Events.trigger("debug", `Drained ${options.id}`, { success, args, options }); + if (success) { + queue.shift(); + empty = this.empty(); + if (empty) { + this.Events.trigger("empty"); + } + if (reservoir === 0) { + this.Events.trigger("depleted", empty); + } + this._run(index, next, wait); + return this.Promise.resolve(options.weight); + } else { + return this.Promise.resolve(null); + } + }); + }); + } + _drainAll(capacity, total = 0) { + return this._drainOne(capacity).then((drained) => { + var newCapacity; + if (drained != null) { + newCapacity = capacity != null ? capacity - drained : capacity; + return this._drainAll(newCapacity, total + drained); + } else { + return this.Promise.resolve(total); + } + }).catch((e) => { + return this.Events.trigger("error", e); + }); + } + _dropAllQueued(message) { + return this._queues.shiftAll(function(job) { + return job.doDrop({ message }); + }); + } + stop(options = {}) { + var done, waitForExecuting; + options = parser$5.load(options, this.stopDefaults); + waitForExecuting = (at) => { + var finished; + finished = () => { + var counts; + counts = this._states.counts; + return counts[0] + counts[1] + counts[2] + counts[3] === at; + }; + return new this.Promise((resolve2, reject) => { + if (finished()) { + return resolve2(); + } else { + return this.on("done", () => { + if (finished()) { + this.removeAllListeners("done"); + return resolve2(); + } + }); + } + }); + }; + done = options.dropWaitingJobs ? (this._run = function(index, next) { + return next.doDrop({ + message: options.dropErrorMessage + }); + }, this._drainOne = () => { + return this.Promise.resolve(null); + }, this._registerLock.schedule(() => { + return this._submitLock.schedule(() => { + var k, ref, v; + ref = this._scheduled; + for (k in ref) { + v = ref[k]; + if (this.jobStatus(v.job.options.id) === "RUNNING") { + clearTimeout(v.timeout); + clearTimeout(v.expiration); + v.job.doDrop({ + message: options.dropErrorMessage + }); + } + } + this._dropAllQueued(options.dropErrorMessage); + return waitForExecuting(0); + }); + })) : this.schedule({ + priority: NUM_PRIORITIES$1 - 1, + weight: 0 + }, () => { + return waitForExecuting(1); + }); + this._receive = function(job) { + return job._reject(new Bottleneck3.prototype.BottleneckError(options.enqueueErrorMessage)); + }; + this.stop = () => { + return this.Promise.reject(new Bottleneck3.prototype.BottleneckError("stop() has already been called")); + }; + return done; + } + async _addToQueue(job) { + var args, blocked, error2, options, reachedHWM, shifted, strategy; + ({ args, options } = job); + try { + ({ reachedHWM, blocked, strategy } = await this._store.__submit__(this.queued(), options.weight)); + } catch (error1) { + error2 = error1; + this.Events.trigger("debug", `Could not queue ${options.id}`, { args, options, error: error2 }); + job.doDrop({ error: error2 }); + return false; + } + if (blocked) { + job.doDrop(); + return true; + } else if (reachedHWM) { + shifted = strategy === Bottleneck3.prototype.strategy.LEAK ? this._queues.shiftLastFrom(options.priority) : strategy === Bottleneck3.prototype.strategy.OVERFLOW_PRIORITY ? this._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck3.prototype.strategy.OVERFLOW ? job : void 0; + if (shifted != null) { + shifted.doDrop(); + } + if (shifted == null || strategy === Bottleneck3.prototype.strategy.OVERFLOW) { + if (shifted == null) { + job.doDrop(); + } + return reachedHWM; + } + } + job.doQueue(reachedHWM, blocked); + this._queues.push(job); + await this._drainAll(); + return reachedHWM; + } + _receive(job) { + if (this._states.jobStatus(job.options.id) != null) { + job._reject(new Bottleneck3.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`)); + return false; + } else { + job.doReceive(); + return this._submitLock.schedule(this._addToQueue, job); + } + } + submit(...args) { + var cb, fn, job, options, ref, ref1, task; + if (typeof args[0] === "function") { + ref = args, [fn, ...args] = ref, [cb] = splice.call(args, -1); + options = parser$5.load({}, this.jobDefaults); + } else { + ref1 = args, [options, fn, ...args] = ref1, [cb] = splice.call(args, -1); + options = parser$5.load(options, this.jobDefaults); + } + task = (...args2) => { + return new this.Promise(function(resolve2, reject) { + return fn(...args2, function(...args3) { + return (args3[0] != null ? reject : resolve2)(args3); + }); + }); + }; + job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); + job.promise.then(function(args2) { + return typeof cb === "function" ? cb(...args2) : void 0; + }).catch(function(args2) { + if (Array.isArray(args2)) { + return typeof cb === "function" ? cb(...args2) : void 0; + } else { + return typeof cb === "function" ? cb(args2) : void 0; + } + }); + return this._receive(job); + } + schedule(...args) { + var job, options, task; + if (typeof args[0] === "function") { + [task, ...args] = args; + options = {}; + } else { + [options, task, ...args] = args; + } + job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); + this._receive(job); + return job.promise; + } + wrap(fn) { + var schedule, wrapped; + schedule = this.schedule.bind(this); + wrapped = function(...args) { + return schedule(fn.bind(this), ...args); + }; + wrapped.withOptions = function(options, ...args) { + return schedule(options, fn, ...args); + }; + return wrapped; + } + async updateSettings(options = {}) { + await this._store.__updateSettings__(parser$5.overwrite(options, this.storeDefaults)); + parser$5.overwrite(options, this.instanceDefaults, this); + return this; + } + currentReservoir() { + return this._store.__currentReservoir__(); + } + incrementReservoir(incr = 0) { + return this._store.__incrementReservoir__(incr); + } + } + Bottleneck3.default = Bottleneck3; + Bottleneck3.Events = Events$4; + Bottleneck3.version = Bottleneck3.prototype.version = require$$8.version; + Bottleneck3.strategy = Bottleneck3.prototype.strategy = { + LEAK: 1, + OVERFLOW: 2, + OVERFLOW_PRIORITY: 4, + BLOCK: 3 + }; + Bottleneck3.BottleneckError = Bottleneck3.prototype.BottleneckError = BottleneckError_1; + Bottleneck3.Group = Bottleneck3.prototype.Group = Group_1; + Bottleneck3.RedisConnection = Bottleneck3.prototype.RedisConnection = require$$2; + Bottleneck3.IORedisConnection = Bottleneck3.prototype.IORedisConnection = require$$3; + Bottleneck3.Batcher = Bottleneck3.prototype.Batcher = Batcher_1; + Bottleneck3.prototype.jobDefaults = { + priority: DEFAULT_PRIORITY$1, + weight: 1, + expiration: null, + id: "" + }; + Bottleneck3.prototype.storeDefaults = { + maxConcurrent: null, + minTime: 0, + highWater: null, + strategy: Bottleneck3.prototype.strategy.LEAK, + penalty: null, + reservoir: null, + reservoirRefreshInterval: null, + reservoirRefreshAmount: null, + reservoirIncreaseInterval: null, + reservoirIncreaseAmount: null, + reservoirIncreaseMaximum: null + }; + Bottleneck3.prototype.localStoreDefaults = { + Promise, + timeout: null, + heartbeatInterval: 250 + }; + Bottleneck3.prototype.redisStoreDefaults = { + Promise, + timeout: null, + heartbeatInterval: 5e3, + clientTimeout: 1e4, + Redis: null, + clientOptions: {}, + clusterNodes: null, + clearDatastore: false, + connection: null + }; + Bottleneck3.prototype.instanceDefaults = { + datastore: "local", + connection: null, + id: "", + rejectOnDrop: true, + trackDoneStatus: false, + Promise + }; + Bottleneck3.prototype.stopDefaults = { + enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", + dropWaitingJobs: true, + dropErrorMessage: "This limiter has been stopped." + }; + return Bottleneck3; + }).call(commonjsGlobal); + var Bottleneck_1 = Bottleneck2; + var lib = Bottleneck_1; + return lib; + })); + } +}); + +// node_modules/@actions/io/lib/io-util.js +var require_io_util = __commonJS({ + "node_modules/@actions/io/lib/io-util.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + 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 = __importStar(require("fs")); + var path10 = __importStar(require("path")); + _a = fs14.promises, exports2.chmod = _a.chmod, exports2.copyFile = _a.copyFile, exports2.lstat = _a.lstat, exports2.mkdir = _a.mkdir, exports2.open = _a.open, exports2.readdir = _a.readdir, exports2.readlink = _a.readlink, exports2.rename = _a.rename, exports2.rm = _a.rm, exports2.rmdir = _a.rmdir, exports2.stat = _a.stat, exports2.symlink = _a.symlink, exports2.unlink = _a.unlink; + exports2.IS_WINDOWS = process.platform === "win32"; + exports2.UV_FS_O_EXLOCK = 268435456; + exports2.READONLY = fs14.constants.O_RDONLY; + function exists3(fsPath) { + return __awaiter15(this, void 0, void 0, function* () { + try { + yield exports2.stat(fsPath); + } catch (err) { + if (err.code === "ENOENT") { + return false; + } + throw err; + } + return true; + }); + } + exports2.exists = exists3; + function isDirectory2(fsPath, useStat = false) { + return __awaiter15(this, void 0, void 0, function* () { + const stats = useStat ? yield exports2.stat(fsPath) : yield exports2.lstat(fsPath); + return stats.isDirectory(); + }); + } + exports2.isDirectory = isDirectory2; + function isRooted2(p) { + p = normalizeSeparators(p); + if (!p) { + throw new Error('isRooted() parameter "p" cannot be empty'); + } + if (exports2.IS_WINDOWS) { + return p.startsWith("\\") || /^[A-Z]:/i.test(p); + } + return p.startsWith("/"); + } + exports2.isRooted = isRooted2; + function tryGetExecutablePath2(filePath, extensions) { + return __awaiter15(this, void 0, void 0, function* () { + let stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + const upperExt = path10.extname(filePath).toUpperCase(); + if (extensions.some((validExt) => validExt.toUpperCase() === upperExt)) { + return filePath; + } + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + const originalFilePath = filePath; + for (const extension of extensions) { + filePath = originalFilePath + extension; + stats = void 0; + try { + stats = yield exports2.stat(filePath); + } catch (err) { + if (err.code !== "ENOENT") { + console.log(`Unexpected error attempting to determine if executable file exists '${filePath}': ${err}`); + } + } + if (stats && stats.isFile()) { + if (exports2.IS_WINDOWS) { + try { + const directory = path10.dirname(filePath); + const upperName = path10.basename(filePath).toUpperCase(); + for (const actualName of yield exports2.readdir(directory)) { + if (upperName === actualName.toUpperCase()) { + filePath = path10.join(directory, actualName); + break; + } + } + } catch (err) { + console.log(`Unexpected error attempting to determine the actual case of the file '${filePath}': ${err}`); + } + return filePath; + } else { + if (isUnixExecutable(stats)) { + return filePath; + } + } + } + } + return ""; + }); + } + exports2.tryGetExecutablePath = tryGetExecutablePath2; + function normalizeSeparators(p) { + p = p || ""; + if (exports2.IS_WINDOWS) { + p = p.replace(/\//g, "\\"); + return p.replace(/\\\\+/g, "\\"); + } + return p.replace(/\/\/+/g, "/"); + } + function isUnixExecutable(stats) { + return (stats.mode & 1) > 0 || (stats.mode & 8) > 0 && stats.gid === process.getgid() || (stats.mode & 64) > 0 && stats.uid === process.getuid(); + } + function getCmdPath() { + var _a2; + return (_a2 = process.env["COMSPEC"]) !== null && _a2 !== void 0 ? _a2 : `cmd.exe`; + } + exports2.getCmdPath = getCmdPath; + } +}); + +// node_modules/@actions/io/lib/io.js +var require_io = __commonJS({ + "node_modules/@actions/io/lib/io.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + 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 path10 = __importStar(require("path")); + var ioUtil = __importStar(require_io_util()); + function cp(source, dest, options = {}) { + return __awaiter15(this, void 0, void 0, function* () { + const { force, recursive, copySourceDirectory } = readCopyOptions(options); + const destStat = (yield ioUtil.exists(dest)) ? yield ioUtil.stat(dest) : null; + if (destStat && destStat.isFile() && !force) { + return; + } + const newDest = destStat && destStat.isDirectory() && copySourceDirectory ? path10.join(dest, path10.basename(source)) : dest; + if (!(yield ioUtil.exists(source))) { + throw new Error(`no such file or directory: ${source}`); + } + const sourceStat = yield ioUtil.stat(source); + if (sourceStat.isDirectory()) { + if (!recursive) { + throw new Error(`Failed to copy. ${source} is a directory, but tried to copy without recursive flag.`); + } else { + yield cpDirRecursive(source, newDest, 0, force); + } + } else { + if (path10.relative(source, newDest) === "") { + throw new Error(`'${newDest}' and '${source}' are the same file`); + } + yield copyFile2(source, newDest, force); + } + }); + } + exports2.cp = cp; + function mv(source, dest, options = {}) { + return __awaiter15(this, void 0, void 0, function* () { + if (yield ioUtil.exists(dest)) { + let destExists = true; + if (yield ioUtil.isDirectory(dest)) { + dest = path10.join(dest, path10.basename(source)); + destExists = yield ioUtil.exists(dest); + } + if (destExists) { + if (options.force == null || options.force) { + yield rmRF(dest); + } else { + throw new Error("Destination already exists"); + } + } + } + yield mkdirP(path10.dirname(dest)); + yield ioUtil.rename(source, dest); + }); + } + exports2.mv = mv; + function rmRF(inputPath) { + return __awaiter15(this, void 0, void 0, function* () { + if (ioUtil.IS_WINDOWS) { + if (/[*"<>|]/.test(inputPath)) { + throw new Error('File path must not contain `*`, `"`, `<`, `>` or `|` on Windows'); + } + } + try { + yield ioUtil.rm(inputPath, { + force: true, + maxRetries: 3, + recursive: true, + retryDelay: 300 + }); + } catch (err) { + throw new Error(`File was unable to be removed ${err}`); + } + }); + } + exports2.rmRF = rmRF; + function mkdirP(fsPath) { + return __awaiter15(this, void 0, void 0, function* () { + assert_1.ok(fsPath, "a path argument must be provided"); + yield ioUtil.mkdir(fsPath, { recursive: true }); + }); + } + exports2.mkdirP = mkdirP; + function which2(tool, check) { + return __awaiter15(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + if (check) { + const result = yield which2(tool, false); + if (!result) { + if (ioUtil.IS_WINDOWS) { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.`); + } else { + throw new Error(`Unable to locate executable file: ${tool}. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.`); + } + } + return result; + } + const matches = yield findInPath(tool); + if (matches && matches.length > 0) { + return matches[0]; + } + return ""; + }); + } + exports2.which = which2; + function findInPath(tool) { + return __awaiter15(this, void 0, void 0, function* () { + if (!tool) { + throw new Error("parameter 'tool' is required"); + } + const extensions = []; + if (ioUtil.IS_WINDOWS && process.env["PATHEXT"]) { + for (const extension of process.env["PATHEXT"].split(path10.delimiter)) { + if (extension) { + extensions.push(extension); + } + } + } + if (ioUtil.isRooted(tool)) { + const filePath = yield ioUtil.tryGetExecutablePath(tool, extensions); + if (filePath) { + return [filePath]; + } + return []; + } + if (tool.includes(path10.sep)) { + return []; + } + const directories = []; + if (process.env.PATH) { + for (const p of process.env.PATH.split(path10.delimiter)) { + if (p) { + directories.push(p); + } + } + } + const matches = []; + for (const directory of directories) { + const filePath = yield ioUtil.tryGetExecutablePath(path10.join(directory, tool), extensions); + if (filePath) { + matches.push(filePath); + } + } + return matches; + }); + } + exports2.findInPath = findInPath; + function readCopyOptions(options) { + const force = options.force == null ? true : options.force; + const recursive = Boolean(options.recursive); + const copySourceDirectory = options.copySourceDirectory == null ? true : Boolean(options.copySourceDirectory); + return { force, recursive, copySourceDirectory }; + } + function cpDirRecursive(sourceDir, destDir, currentDepth, force) { + return __awaiter15(this, void 0, void 0, function* () { + if (currentDepth >= 255) + return; + currentDepth++; + yield mkdirP(destDir); + const files = yield ioUtil.readdir(sourceDir); + for (const fileName of files) { + const srcFile = `${sourceDir}/${fileName}`; + const destFile = `${destDir}/${fileName}`; + const srcFileStat = yield ioUtil.lstat(srcFile); + if (srcFileStat.isDirectory()) { + yield cpDirRecursive(srcFile, destFile, currentDepth, force); + } else { + yield copyFile2(srcFile, destFile, force); + } + } + yield ioUtil.chmod(destDir, (yield ioUtil.stat(sourceDir)).mode); + }); + } + function copyFile2(srcFile, destFile, force) { + return __awaiter15(this, void 0, void 0, function* () { + if ((yield ioUtil.lstat(srcFile)).isSymbolicLink()) { + try { + yield ioUtil.lstat(destFile); + yield ioUtil.unlink(destFile); + } catch (e) { + if (e.code === "EPERM") { + yield ioUtil.chmod(destFile, "0666"); + yield ioUtil.unlink(destFile); + } + } + const symlinkFull = yield ioUtil.readlink(srcFile); + yield ioUtil.symlink(symlinkFull, destFile, ioUtil.IS_WINDOWS ? "junction" : null); + } else if (!(yield ioUtil.exists(destFile)) || force) { + yield ioUtil.copyFile(srcFile, destFile); + } + }); + } + } +}); + +// node_modules/@actions/exec/lib/toolrunner.js +var require_toolrunner = __commonJS({ + "node_modules/@actions/exec/lib/toolrunner.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.argStringToArray = exports2.ToolRunner = void 0; + var os7 = __importStar(require("os")); + var events = __importStar(require("events")); + var child = __importStar(require("child_process")); + var path10 = __importStar(require("path")); + var io = __importStar(require_io()); + var ioUtil = __importStar(require_io_util()); + var timers_1 = require("timers"); + var IS_WINDOWS3 = process.platform === "win32"; + var ToolRunner2 = class extends events.EventEmitter { + constructor(toolPath, args, options) { + super(); + if (!toolPath) { + throw new Error("Parameter 'toolPath' cannot be null or empty."); + } + this.toolPath = toolPath; + this.args = args || []; + this.options = options || {}; + } + _debug(message) { + if (this.options.listeners && this.options.listeners.debug) { + this.options.listeners.debug(message); + } + } + _getCommandString(options, noPrefix) { + const toolPath = this._getSpawnFileName(); + const args = this._getSpawnArgs(options); + let cmd = noPrefix ? "" : "[command]"; + if (IS_WINDOWS3) { + if (this._isCmdFile()) { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } else if (options.windowsVerbatimArguments) { + cmd += `"${toolPath}"`; + for (const a of args) { + cmd += ` ${a}`; + } + } else { + cmd += this._windowsQuoteCmdArg(toolPath); + for (const a of args) { + cmd += ` ${this._windowsQuoteCmdArg(a)}`; + } + } + } else { + cmd += toolPath; + for (const a of args) { + cmd += ` ${a}`; + } + } + return cmd; + } + _processLineBuffer(data, strBuffer, onLine) { + try { + let s = strBuffer + data.toString(); + let n = s.indexOf(os7.EOL); + while (n > -1) { + const line = s.substring(0, n); + onLine(line); + s = s.substring(n + os7.EOL.length); + n = s.indexOf(os7.EOL); + } + return s; + } catch (err) { + this._debug(`error processing line. Failed with error ${err}`); + return ""; + } + } + _getSpawnFileName() { + if (IS_WINDOWS3) { + if (this._isCmdFile()) { + return process.env["COMSPEC"] || "cmd.exe"; + } + } + return this.toolPath; + } + _getSpawnArgs(options) { + if (IS_WINDOWS3) { + if (this._isCmdFile()) { + let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`; + for (const a of this.args) { + argline += " "; + argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a); + } + argline += '"'; + return [argline]; + } + } + return this.args; + } + _endsWith(str, end) { + return str.endsWith(end); + } + _isCmdFile() { + const upperToolPath = this.toolPath.toUpperCase(); + return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT"); + } + _windowsQuoteCmdArg(arg) { + if (!this._isCmdFile()) { + return this._uvQuoteCmdArg(arg); + } + if (!arg) { + return '""'; + } + const cmdSpecialChars = [ + " ", + " ", + "&", + "(", + ")", + "[", + "]", + "{", + "}", + "^", + "=", + ";", + "!", + "'", + "+", + ",", + "`", + "~", + "|", + "<", + ">", + '"' + ]; + let needsQuotes = false; + for (const char of arg) { + if (cmdSpecialChars.some((x) => x === char)) { + needsQuotes = true; + break; } - _run(index, job, wait) { - var clearGlobalState, free, run2; - job.doRun(); - clearGlobalState = this._clearGlobalState.bind(this, index); - run2 = this._run.bind(this, index, job); - free = this._free.bind(this, index, job); - return this._scheduled[index] = { - timeout: setTimeout(() => { - return job.doExecute(this._limiter, clearGlobalState, run2, free); - }, wait), - expiration: job.options.expiration != null ? setTimeout(function() { - return job.doExpire(clearGlobalState, run2, free); - }, wait + job.options.expiration) : void 0, - job - }; + } + if (!needsQuotes) { + return arg; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += '"'; + } else { + quoteHit = false; } - _drainOne(capacity) { - return this._registerLock.schedule(() => { - var args, index, next, options, queue; - if (this.queued() === 0) { - return this.Promise.resolve(null); - } - queue = this._queues.getFirst(); - ({ options, args } = next = queue.first()); - if (capacity != null && options.weight > capacity) { - return this.Promise.resolve(null); - } - this.Events.trigger("debug", `Draining ${options.id}`, { args, options }); - index = this._randomIndex(); - return this._store.__register__(index, options.weight, options.expiration).then(({ success, wait, reservoir }) => { - var empty; - this.Events.trigger("debug", `Drained ${options.id}`, { success, args, options }); - if (success) { - queue.shift(); - empty = this.empty(); - if (empty) { - this.Events.trigger("empty"); - } - if (reservoir === 0) { - this.Events.trigger("depleted", empty); - } - this._run(index, next, wait); - return this.Promise.resolve(options.weight); - } else { - return this.Promise.resolve(null); - } - }); - }); + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _uvQuoteCmdArg(arg) { + if (!arg) { + return '""'; + } + if (!arg.includes(" ") && !arg.includes(" ") && !arg.includes('"')) { + return arg; + } + if (!arg.includes('"') && !arg.includes("\\")) { + return `"${arg}"`; + } + let reverse = '"'; + let quoteHit = true; + for (let i = arg.length; i > 0; i--) { + reverse += arg[i - 1]; + if (quoteHit && arg[i - 1] === "\\") { + reverse += "\\"; + } else if (arg[i - 1] === '"') { + quoteHit = true; + reverse += "\\"; + } else { + quoteHit = false; } - _drainAll(capacity, total = 0) { - return this._drainOne(capacity).then((drained) => { - var newCapacity; - if (drained != null) { - newCapacity = capacity != null ? capacity - drained : capacity; - return this._drainAll(newCapacity, total + drained); - } else { - return this.Promise.resolve(total); - } - }).catch((e) => { - return this.Events.trigger("error", e); - }); + } + reverse += '"'; + return reverse.split("").reverse().join(""); + } + _cloneExecOptions(options) { + options = options || {}; + const result = { + cwd: options.cwd || process.cwd(), + env: options.env || process.env, + silent: options.silent || false, + windowsVerbatimArguments: options.windowsVerbatimArguments || false, + failOnStdErr: options.failOnStdErr || false, + ignoreReturnCode: options.ignoreReturnCode || false, + delay: options.delay || 1e4 + }; + result.outStream = options.outStream || process.stdout; + result.errStream = options.errStream || process.stderr; + return result; + } + _getSpawnOptions(options, toolPath) { + options = options || {}; + const result = {}; + result.cwd = options.cwd; + result.env = options.env; + result["windowsVerbatimArguments"] = options.windowsVerbatimArguments || this._isCmdFile(); + if (options.windowsVerbatimArguments) { + result.argv0 = `"${toolPath}"`; + } + return result; + } + /** + * Exec a tool. + * Output will be streamed to the live console. + * Returns promise with return code + * + * @param tool path to tool to exec + * @param options optional exec options. See ExecOptions + * @returns number + */ + exec() { + return __awaiter15(this, void 0, void 0, function* () { + if (!ioUtil.isRooted(this.toolPath) && (this.toolPath.includes("/") || IS_WINDOWS3 && this.toolPath.includes("\\"))) { + this.toolPath = path10.resolve(process.cwd(), this.options.cwd || process.cwd(), this.toolPath); } - _dropAllQueued(message) { - return this._queues.shiftAll(function(job) { - return job.doDrop({ message }); + this.toolPath = yield io.which(this.toolPath, true); + return new Promise((resolve2, reject) => __awaiter15(this, void 0, void 0, function* () { + this._debug(`exec tool: ${this.toolPath}`); + this._debug("arguments:"); + for (const arg of this.args) { + this._debug(` ${arg}`); + } + const optionsNonNull = this._cloneExecOptions(this.options); + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(this._getCommandString(optionsNonNull) + os7.EOL); + } + const state3 = new ExecState(optionsNonNull, this.toolPath); + state3.on("debug", (message) => { + this._debug(message); }); - } - stop(options = {}) { - var done, waitForExecuting; - options = parser$5.load(options, this.stopDefaults); - waitForExecuting = (at) => { - var finished; - finished = () => { - var counts; - counts = this._states.counts; - return counts[0] + counts[1] + counts[2] + counts[3] === at; - }; - return new this.Promise((resolve2, reject) => { - if (finished()) { - return resolve2(); - } else { - return this.on("done", () => { - if (finished()) { - this.removeAllListeners("done"); - return resolve2(); - } - }); + if (this.options.cwd && !(yield ioUtil.exists(this.options.cwd))) { + return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`)); + } + const fileName = this._getSpawnFileName(); + const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName)); + let stdbuffer = ""; + if (cp.stdout) { + cp.stdout.on("data", (data) => { + if (this.options.listeners && this.options.listeners.stdout) { + this.options.listeners.stdout(data); } - }); - }; - done = options.dropWaitingJobs ? (this._run = function(index, next) { - return next.doDrop({ - message: options.dropErrorMessage - }); - }, this._drainOne = () => { - return this.Promise.resolve(null); - }, this._registerLock.schedule(() => { - return this._submitLock.schedule(() => { - var k, ref, v; - ref = this._scheduled; - for (k in ref) { - v = ref[k]; - if (this.jobStatus(v.job.options.id) === "RUNNING") { - clearTimeout(v.timeout); - clearTimeout(v.expiration); - v.job.doDrop({ - message: options.dropErrorMessage - }); - } + if (!optionsNonNull.silent && optionsNonNull.outStream) { + optionsNonNull.outStream.write(data); } - this._dropAllQueued(options.dropErrorMessage); - return waitForExecuting(0); + stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { + if (this.options.listeners && this.options.listeners.stdline) { + this.options.listeners.stdline(line); + } + }); }); - })) : this.schedule({ - priority: NUM_PRIORITIES$1 - 1, - weight: 0 - }, () => { - return waitForExecuting(1); - }); - this._receive = function(job) { - return job._reject(new Bottleneck3.prototype.BottleneckError(options.enqueueErrorMessage)); - }; - this.stop = () => { - return this.Promise.reject(new Bottleneck3.prototype.BottleneckError("stop() has already been called")); - }; - return done; - } - async _addToQueue(job) { - var args, blocked, error9, options, reachedHWM, shifted, strategy; - ({ args, options } = job); - try { - ({ reachedHWM, blocked, strategy } = await this._store.__submit__(this.queued(), options.weight)); - } catch (error1) { - error9 = error1; - this.Events.trigger("debug", `Could not queue ${options.id}`, { args, options, error: error9 }); - job.doDrop({ error: error9 }); - return false; } - if (blocked) { - job.doDrop(); - return true; - } else if (reachedHWM) { - shifted = strategy === Bottleneck3.prototype.strategy.LEAK ? this._queues.shiftLastFrom(options.priority) : strategy === Bottleneck3.prototype.strategy.OVERFLOW_PRIORITY ? this._queues.shiftLastFrom(options.priority + 1) : strategy === Bottleneck3.prototype.strategy.OVERFLOW ? job : void 0; - if (shifted != null) { - shifted.doDrop(); - } - if (shifted == null || strategy === Bottleneck3.prototype.strategy.OVERFLOW) { - if (shifted == null) { - job.doDrop(); + let errbuffer = ""; + if (cp.stderr) { + cp.stderr.on("data", (data) => { + state3.processStderr = true; + if (this.options.listeners && this.options.listeners.stderr) { + this.options.listeners.stderr(data); } - return reachedHWM; - } - } - job.doQueue(reachedHWM, blocked); - this._queues.push(job); - await this._drainAll(); - return reachedHWM; - } - _receive(job) { - if (this._states.jobStatus(job.options.id) != null) { - job._reject(new Bottleneck3.prototype.BottleneckError(`A job with the same id already exists (id=${job.options.id})`)); - return false; - } else { - job.doReceive(); - return this._submitLock.schedule(this._addToQueue, job); - } - } - submit(...args) { - var cb, fn, job, options, ref, ref1, task; - if (typeof args[0] === "function") { - ref = args, [fn, ...args] = ref, [cb] = splice.call(args, -1); - options = parser$5.load({}, this.jobDefaults); - } else { - ref1 = args, [options, fn, ...args] = ref1, [cb] = splice.call(args, -1); - options = parser$5.load(options, this.jobDefaults); - } - task = (...args2) => { - return new this.Promise(function(resolve2, reject) { - return fn(...args2, function(...args3) { - return (args3[0] != null ? reject : resolve2)(args3); + if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { + const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; + s.write(data); + } + errbuffer = this._processLineBuffer(data, errbuffer, (line) => { + if (this.options.listeners && this.options.listeners.errline) { + this.options.listeners.errline(line); + } }); }); - }; - job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - job.promise.then(function(args2) { - return typeof cb === "function" ? cb(...args2) : void 0; - }).catch(function(args2) { - if (Array.isArray(args2)) { - return typeof cb === "function" ? cb(...args2) : void 0; + } + cp.on("error", (err) => { + state3.processError = err.message; + state3.processExited = true; + state3.processClosed = true; + state3.CheckComplete(); + }); + cp.on("exit", (code) => { + state3.processExitCode = code; + state3.processExited = true; + this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); + state3.CheckComplete(); + }); + cp.on("close", (code) => { + state3.processExitCode = code; + state3.processExited = true; + state3.processClosed = true; + this._debug(`STDIO streams have closed for tool '${this.toolPath}'`); + state3.CheckComplete(); + }); + state3.on("done", (error2, exitCode) => { + if (stdbuffer.length > 0) { + this.emit("stdline", stdbuffer); + } + if (errbuffer.length > 0) { + this.emit("errline", errbuffer); + } + cp.removeAllListeners(); + if (error2) { + reject(error2); } else { - return typeof cb === "function" ? cb(args2) : void 0; + resolve2(exitCode); } }); - return this._receive(job); - } - schedule(...args) { - var job, options, task; - if (typeof args[0] === "function") { - [task, ...args] = args; - options = {}; - } else { - [options, task, ...args] = args; + if (this.options.input) { + if (!cp.stdin) { + throw new Error("child process missing stdin"); + } + cp.stdin.end(this.options.input); } - job = new Job$1(task, args, options, this.jobDefaults, this.rejectOnDrop, this.Events, this._states, this.Promise); - this._receive(job); - return job.promise; + })); + }); + } + }; + exports2.ToolRunner = ToolRunner2; + function argStringToArray2(argString) { + const args = []; + let inQuotes = false; + let escaped = false; + let arg = ""; + function append(c) { + if (escaped && c !== '"') { + arg += "\\"; + } + arg += c; + escaped = false; + } + for (let i = 0; i < argString.length; i++) { + const c = argString.charAt(i); + if (c === '"') { + if (!escaped) { + inQuotes = !inQuotes; + } else { + append(c); } - wrap(fn) { - var schedule, wrapped; - schedule = this.schedule.bind(this); - wrapped = function(...args) { - return schedule(fn.bind(this), ...args); - }; - wrapped.withOptions = function(options, ...args) { - return schedule(options, fn, ...args); - }; - return wrapped; + continue; + } + if (c === "\\" && escaped) { + append(c); + continue; + } + if (c === "\\" && inQuotes) { + escaped = true; + continue; + } + if (c === " " && !inQuotes) { + if (arg.length > 0) { + args.push(arg); + arg = ""; } - async updateSettings(options = {}) { - await this._store.__updateSettings__(parser$5.overwrite(options, this.storeDefaults)); - parser$5.overwrite(options, this.instanceDefaults, this); - return this; + continue; + } + append(c); + } + if (arg.length > 0) { + args.push(arg.trim()); + } + return args; + } + exports2.argStringToArray = argStringToArray2; + var ExecState = class _ExecState extends events.EventEmitter { + constructor(options, toolPath) { + super(); + this.processClosed = false; + this.processError = ""; + this.processExitCode = 0; + this.processExited = false; + this.processStderr = false; + this.delay = 1e4; + this.done = false; + this.timeout = null; + if (!toolPath) { + throw new Error("toolPath must not be empty"); + } + this.options = options; + this.toolPath = toolPath; + if (options.delay) { + this.delay = options.delay; + } + } + CheckComplete() { + if (this.done) { + return; + } + if (this.processClosed) { + this._setResult(); + } else if (this.processExited) { + this.timeout = timers_1.setTimeout(_ExecState.HandleTimeout, this.delay, this); + } + } + _debug(message) { + this.emit("debug", message); + } + _setResult() { + let error2; + if (this.processExited) { + if (this.processError) { + error2 = new Error(`There was an error when attempting to execute the process '${this.toolPath}'. This may indicate the process failed to start. Error: ${this.processError}`); + } else if (this.processExitCode !== 0 && !this.options.ignoreReturnCode) { + error2 = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`); + } else if (this.processStderr && this.options.failOnStdErr) { + error2 = new Error(`The process '${this.toolPath}' failed because one or more lines were written to the STDERR stream`); } - currentReservoir() { - return this._store.__currentReservoir__(); + } + if (this.timeout) { + clearTimeout(this.timeout); + this.timeout = null; + } + this.done = true; + this.emit("done", error2, this.processExitCode); + } + static HandleTimeout(state3) { + if (state3.done) { + return; + } + if (!state3.processClosed && state3.processExited) { + const message = `The STDIO streams did not close within ${state3.delay / 1e3} seconds of the exit event from process '${state3.toolPath}'. This may indicate a child process inherited the STDIO streams and has not yet exited.`; + state3._debug(message); + } + state3._setResult(); + } + }; + } +}); + +// node_modules/@actions/exec/lib/exec.js +var require_exec = __commonJS({ + "node_modules/@actions/exec/lib/exec.js"(exports2) { + "use strict"; + var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); + } + __setModuleDefault(result, mod); + return result; + }; + var __awaiter15 = exports2 && exports2.__awaiter || function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P ? value : new P(function(resolve2) { + resolve2(value); + }); + } + return new (P || (P = Promise))(function(resolve2, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); } - incrementReservoir(incr = 0) { - return this._store.__incrementReservoir__(incr); + } + function rejected(value) { + try { + step(generator["throw"](value)); + } catch (e) { + reject(e); } } - Bottleneck3.default = Bottleneck3; - Bottleneck3.Events = Events$4; - Bottleneck3.version = Bottleneck3.prototype.version = require$$8.version; - Bottleneck3.strategy = Bottleneck3.prototype.strategy = { - LEAK: 1, - OVERFLOW: 2, - OVERFLOW_PRIORITY: 4, - BLOCK: 3 - }; - Bottleneck3.BottleneckError = Bottleneck3.prototype.BottleneckError = BottleneckError_1; - Bottleneck3.Group = Bottleneck3.prototype.Group = Group_1; - Bottleneck3.RedisConnection = Bottleneck3.prototype.RedisConnection = require$$2; - Bottleneck3.IORedisConnection = Bottleneck3.prototype.IORedisConnection = require$$3; - Bottleneck3.Batcher = Bottleneck3.prototype.Batcher = Batcher_1; - Bottleneck3.prototype.jobDefaults = { - priority: DEFAULT_PRIORITY$1, - weight: 1, - expiration: null, - id: "" - }; - Bottleneck3.prototype.storeDefaults = { - maxConcurrent: null, - minTime: 0, - highWater: null, - strategy: Bottleneck3.prototype.strategy.LEAK, - penalty: null, - reservoir: null, - reservoirRefreshInterval: null, - reservoirRefreshAmount: null, - reservoirIncreaseInterval: null, - reservoirIncreaseAmount: null, - reservoirIncreaseMaximum: null - }; - Bottleneck3.prototype.localStoreDefaults = { - Promise, - timeout: null, - heartbeatInterval: 250 - }; - Bottleneck3.prototype.redisStoreDefaults = { - Promise, - timeout: null, - heartbeatInterval: 5e3, - clientTimeout: 1e4, - Redis: null, - clientOptions: {}, - clusterNodes: null, - clearDatastore: false, - connection: null + function step(result) { + result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected); + } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getExecOutput = exports2.exec = void 0; + var string_decoder_1 = require("string_decoder"); + var tr = __importStar(require_toolrunner()); + function exec10(commandLine, args, options) { + return __awaiter15(this, void 0, void 0, function* () { + const commandArgs = tr.argStringToArray(commandLine); + if (commandArgs.length === 0) { + throw new Error(`Parameter 'commandLine' cannot be null or empty.`); + } + const toolPath = commandArgs[0]; + args = commandArgs.slice(1).concat(args || []); + const runner = new tr.ToolRunner(toolPath, args, options); + return runner.exec(); + }); + } + exports2.exec = exec10; + function getExecOutput11(commandLine, args, options) { + var _a, _b; + return __awaiter15(this, void 0, void 0, function* () { + let stdout = ""; + let stderr = ""; + const stdoutDecoder = new string_decoder_1.StringDecoder("utf8"); + const stderrDecoder = new string_decoder_1.StringDecoder("utf8"); + const originalStdoutListener = (_a = options === null || options === void 0 ? void 0 : options.listeners) === null || _a === void 0 ? void 0 : _a.stdout; + const originalStdErrListener = (_b = options === null || options === void 0 ? void 0 : options.listeners) === null || _b === void 0 ? void 0 : _b.stderr; + const stdErrListener = (data) => { + stderr += stderrDecoder.write(data); + if (originalStdErrListener) { + originalStdErrListener(data); + } }; - Bottleneck3.prototype.instanceDefaults = { - datastore: "local", - connection: null, - id: "", - rejectOnDrop: true, - trackDoneStatus: false, - Promise + const stdOutListener = (data) => { + stdout += stdoutDecoder.write(data); + if (originalStdoutListener) { + originalStdoutListener(data); + } }; - Bottleneck3.prototype.stopDefaults = { - enqueueErrorMessage: "This limiter has been stopped and cannot accept new jobs.", - dropWaitingJobs: true, - dropErrorMessage: "This limiter has been stopped." + const listeners = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.listeners), { stdout: stdOutListener, stderr: stdErrListener }); + const exitCode = yield exec10(commandLine, args, Object.assign(Object.assign({}, options), { listeners })); + stdout += stdoutDecoder.end(); + stderr += stderrDecoder.end(); + return { + exitCode, + stdout, + stderr }; - return Bottleneck3; - }).call(commonjsGlobal); - var Bottleneck_1 = Bottleneck2; - var lib = Bottleneck_1; - return lib; - })); + }); + } + exports2.getExecOutput = getExecOutput11; } }); // src/utils/github.utils.ts var import_github = __toESM(require_github()); -var core2 = __toESM(require_core()); - -// src/app.input.ts -var core = __toESM(require_core()); -var path = __toESM(require("path")); - -// src/utils/url.utils.ts -function sanitiseUrl(url2) { - if (url2) { - return url2.trim().replace(/\/+$/, ""); - } - return url2; -} - -// src/app.output.ts -var RESULT_FILEPATH = "result-filepath"; -var STDOUT_SCAN_COMMAND = "stdout-scan-command"; -var RAW_RESULT_FILE_NAME = "scanoss-raw.json"; -var CYCLONEDX_FILE_NAME = "scanoss-cyclonedx.json"; -var SPDXLITE_FILE_NAME = "scanoss-spdxlite.json"; -var CSV_FILE_NAME = "scanoss-sbom.csv"; - -// src/app.input.ts -function validateFilename(filename) { - if (!filename) { - return RAW_RESULT_FILE_NAME; - } - const normalizedPath = path.normalize(filename); - if (normalizedPath.includes("..") || normalizedPath.startsWith("/") || normalizedPath.includes("\\")) { - core.warning(`Invalid filename detected: ${filename}. Using default: ${RAW_RESULT_FILE_NAME}`); - return RAW_RESULT_FILE_NAME; - } - const basename5 = path.basename(normalizedPath); - const safeFilenameRegex = /^[a-zA-Z0-9._-]+$/; - if (!safeFilenameRegex.test(basename5)) { - core.warning(`Unsafe filename detected: ${filename}. Using default: ${RAW_RESULT_FILE_NAME}`); - return RAW_RESULT_FILE_NAME; - } - if (!basename5.includes(".")) { - return `${basename5}.json`; - } - return basename5; -} -function validateScanPath(scanPath) { - if (!scanPath) { - return "."; - } - const normalizedPath = path.normalize(scanPath).replace(/\\/g, "/"); - const windowsAbsolutePattern = /^[a-zA-Z]:/; - if (path.isAbsolute(scanPath) || windowsAbsolutePattern.test(normalizedPath)) { - core.warning(`Absolute scan paths not allowed: ${scanPath}. Using default: .`); - return "."; - } - if (normalizedPath.includes("..")) { - core.warning(`Invalid scan path detected: "${scanPath}". Using default: .`); - return "."; - } - const cleaned = normalizedPath.startsWith("./") ? normalizedPath.slice(2) : normalizedPath; - return cleaned || "."; -} -var POLICIES = core.getInput("policies"); -var POLICIES_HALT_ON_FAILURE = !(core.getInput("policies.halt_on_failure") === "false"); -var HALT_ON_ERROR = !(core.getInput("halt_on_error") === "false"); -var DEPENDENCIES_ENABLED = core.getInput("dependencies.enabled") === "true"; -var DEPENDENCIES_SCOPE = core.getInput("dependencies.scope"); -var DEPENDENCY_SCOPE_EXCLUDE = core.getInput("dependencies.scope.exclude"); -var DEPENDENCY_SCOPE_INCLUDE = core.getInput("dependencies.scope.include"); -var API_KEY = core.getInput("api.key"); -var API_URL = sanitiseUrl(core.getInput("api.url")); -var OUTPUT_FILEPATH = validateFilename(core.getInput("output.filepath")); -var GITHUB_TOKEN = core.getInput("github.token"); -var REPO_DIR = process.env.GITHUB_WORKSPACE; -var COPYLEFT_LICENSE_INCLUDE = core.getInput("licenses.copyleft.include"); -var COPYLEFT_LICENSE_EXCLUDE = core.getInput("licenses.copyleft.exclude"); -var COPYLEFT_LICENSE_EXPLICIT = core.getInput("licenses.copyleft.explicit"); -var RUNTIME_CONTAINER = core.getInput("runtimeContainer") || "ghcr.io/scanoss/scanoss-py:v1.52.1"; -var SKIP_SNIPPETS = core.getInput("skipSnippets") === "true"; -var MATCH_ANNOTATIONS = core.getInput("matchAnnotations") === "true"; -var SCAN_FILES = core.getInput("scanFiles") === "true"; -var SCANOSS_SETTINGS = core.getInput("scanossSettings") === "true"; -var SETTINGS_FILE_PATH = core.getInput("settingsFilepath") || "scanoss.json"; -var SCAN_MODE = core.getInput("scanMode") || "full"; -var SCAN_PATH = validateScanPath(core.getInput("scanPath")); -var EXECUTABLE = "docker"; -var DEBUG = core.getInput("debug") === "true"; -var DEPENDENCY_TRACK_ENABLED = core.getInput("deptrack.upload") === "true"; -var DEPENDENCY_TRACK_URL = sanitiseUrl(core.getInput("deptrack.url")); -var DEPENDENCY_TRACK_API_KEY = core.getInput("deptrack.apikey"); -var DEPENDENCY_TRACK_PROJECT_ID = core.getInput("deptrack.projectid"); -var DEPENDENCY_TRACK_PROJECT_NAME = core.getInput("deptrack.projectname"); -var DEPENDENCY_TRACK_PROJECT_VERSION = core.getInput("deptrack.projectversion"); -var DEPENDENCY_TRACK_UPLOAD_TOKEN = ""; -var setDependencyTrackUploadToken = (version3) => { - DEPENDENCY_TRACK_UPLOAD_TOKEN = version3; -}; -var setDependencyTrackProjectId = (id) => { - DEPENDENCY_TRACK_PROJECT_ID = id; -}; - -// src/utils/github.utils.ts -var prEvents = ["pull_request", "pull_request_review", "pull_request_review_comment"]; -var FIND_FIRST_RUN_EVENT = "workflow_dispatch"; -function isPullRequest() { - return prEvents.includes(import_github.context.eventName); -} -function getSHA() { - let sha = import_github.context.sha; - if (isPullRequest()) { - const pull = import_github.context.payload.pull_request; - if (pull?.head.sha) { - sha = pull?.head.sha; - } - } - return sha; -} -function resolveRepoAndSha() { - if (isPullRequest()) { - const pull = import_github.context.payload.pull_request; - if (pull?.head) { - return { - owner: pull.head.repo?.owner.login || import_github.context.repo.owner, - repo: pull.head.repo?.name || import_github.context.repo.repo, - sha: pull.head.sha || import_github.context.sha - }; - } - } - return { - owner: import_github.context.repo.owner, - repo: import_github.context.repo.repo, - sha: import_github.context.sha - }; -} -async function createCommentOnPR(message) { - const octokit = (0, import_github.getOctokit)(GITHUB_TOKEN); - core2.debug("Creating comment on PR"); - octokit.rest.issues.createComment({ - issue_number: import_github.context.issue.number, - owner: import_github.context.repo.owner, - repo: import_github.context.repo.repo, - body: message - }); -} -async function getFirstRunId() { - let firstRunId = import_github.context.runId; - if (import_github.context.eventName === FIND_FIRST_RUN_EVENT) { - const firstRun = await loadFirstRun(import_github.context.repo.owner, import_github.context.repo.repo); - if (firstRun) { - core2.info(`First Run ID found: ${firstRun.id}`); - firstRunId = firstRun.id; - } - } - return firstRunId; -} -async function loadFirstRun(owner, repo) { - const octokit = (0, import_github.getOctokit)(GITHUB_TOKEN); - const sha = getSHA(); - const workflowRun = await octokit.rest.actions.getWorkflowRun({ - owner, - repo, - run_id: import_github.context.runId - }); - const runs = await octokit.rest.actions.listWorkflowRuns({ - owner, - repo, - head_sha: sha, - workflow_id: workflowRun.data.workflow_id - }); - const filteredRuns = runs.data.workflow_runs.filter((run2) => run2.head_sha === sha); - const sortedRuns = filteredRuns.sort( - (a, b) => a.created_at && b.created_at ? new Date(a.created_at).getTime() - new Date(b.created_at).getTime() : 0 - ); - return sortedRuns.length ? sortedRuns[0] : null; -} - -// src/services/report.service.ts -var core8 = __toESM(require_core()); - -// src/policies/policy-check.ts -var import_github5 = __toESM(require_github()); -var import_fs3 = require("fs"); -var core3 = __toESM(require_core()); -// node_modules/@actions/artifact/node_modules/@actions/core/lib/command.js +// node_modules/@actions/core/lib/command.js var os = __toESM(require("os"), 1); -// node_modules/@actions/artifact/node_modules/@actions/core/lib/utils.js +// node_modules/@actions/core/lib/utils.js function toCommandValue(input) { if (input === null || input === void 0) { return ""; @@ -96657,7 +94699,7 @@ function toCommandProperties(annotationProperties) { }; } -// node_modules/@actions/artifact/node_modules/@actions/core/lib/command.js +// node_modules/@actions/core/lib/command.js function issueCommand(command, properties, message) { const cmd = new Command(command, properties, message); process.stdout.write(cmd.toString() + os.EOL); @@ -96702,8 +94744,36 @@ function escapeProperty(s) { return toCommandValue(s).replace(/%/g, "%25").replace(/\r/g, "%0D").replace(/\n/g, "%0A").replace(/:/g, "%3A").replace(/,/g, "%2C"); } -// node_modules/@actions/artifact/node_modules/@actions/core/lib/core.js -var os3 = __toESM(require("os"), 1); +// node_modules/@actions/core/lib/file-command.js +var crypto2 = __toESM(require("crypto"), 1); +var fs = __toESM(require("fs"), 1); +var os2 = __toESM(require("os"), 1); +function issueFileCommand(command, message) { + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } + fs.appendFileSync(filePath, `${toCommandValue(message)}${os2.EOL}`, { + encoding: "utf8" + }); +} +function prepareKeyValueMessage(key, value) { + const delimiter2 = `ghadelimiter_${crypto2.randomUUID()}`; + const convertedValue = toCommandValue(value); + if (key.includes(delimiter2)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter2}"`); + } + if (convertedValue.includes(delimiter2)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter2}"`); + } + return `${key}<<${delimiter2}${os2.EOL}${convertedValue}${os2.EOL}${delimiter2}`; +} + +// node_modules/@actions/core/lib/core.js +var os4 = __toESM(require("os"), 1); // node_modules/@actions/http-client/lib/index.js var http = __toESM(require("http"), 1); @@ -97032,12 +95102,12 @@ var HttpClient = class { throw new Error("Client has already been disposed."); } const parsedUrl = new URL(requestUrl); - let info17 = this._prepareRequest(verb, parsedUrl, headers); + let info2 = this._prepareRequest(verb, parsedUrl, headers); const maxTries = this._allowRetries && RetryableHttpVerbs.includes(verb) ? this._maxRetries + 1 : 1; let numTries = 0; let response; do { - response = yield this.requestRaw(info17, data); + response = yield this.requestRaw(info2, data); if (response && response.message && response.message.statusCode === HttpCodes.Unauthorized) { let authenticationHandler; for (const handler2 of this.handlers) { @@ -97047,7 +95117,7 @@ var HttpClient = class { } } if (authenticationHandler) { - return authenticationHandler.handleAuthentication(this, info17, data); + return authenticationHandler.handleAuthentication(this, info2, data); } else { return response; } @@ -97070,8 +95140,8 @@ var HttpClient = class { } } } - info17 = this._prepareRequest(verb, parsedRedirectUrl, headers); - response = yield this.requestRaw(info17, data); + info2 = this._prepareRequest(verb, parsedRedirectUrl, headers); + response = yield this.requestRaw(info2, data); redirectsRemaining--; } if (!response.message.statusCode || !HttpResponseRetryCodes.includes(response.message.statusCode)) { @@ -97100,7 +95170,7 @@ var HttpClient = class { * @param info * @param data */ - requestRaw(info17, data) { + requestRaw(info2, data) { return __awaiter(this, void 0, void 0, function* () { return new Promise((resolve2, reject) => { function callbackForResult(err, res) { @@ -97112,7 +95182,7 @@ var HttpClient = class { resolve2(res); } } - this.requestRawWithCallback(info17, data, callbackForResult); + this.requestRawWithCallback(info2, data, callbackForResult); }); }); } @@ -97122,12 +95192,12 @@ var HttpClient = class { * @param data * @param onResult */ - requestRawWithCallback(info17, data, onResult) { + requestRawWithCallback(info2, data, onResult) { if (typeof data === "string") { - if (!info17.options.headers) { - info17.options.headers = {}; + if (!info2.options.headers) { + info2.options.headers = {}; } - info17.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); + info2.options.headers["Content-Length"] = Buffer.byteLength(data, "utf8"); } let callbackCalled = false; function handleResult(err, res) { @@ -97136,7 +95206,7 @@ var HttpClient = class { onResult(err, res); } } - const req = info17.httpModule.request(info17.options, (msg) => { + const req = info2.httpModule.request(info2.options, (msg) => { const res = new HttpClientResponse(msg); handleResult(void 0, res); }); @@ -97148,7 +95218,7 @@ var HttpClient = class { if (socket) { socket.end(); } - handleResult(new Error(`Request timeout: ${info17.options.path}`)); + handleResult(new Error(`Request timeout: ${info2.options.path}`)); }); req.on("error", function(err) { handleResult(err); @@ -97184,27 +95254,27 @@ var HttpClient = class { return this._getProxyAgentDispatcher(parsedUrl, proxyUrl); } _prepareRequest(method, requestUrl, headers) { - const info17 = {}; - info17.parsedUrl = requestUrl; - const usingSsl = info17.parsedUrl.protocol === "https:"; - info17.httpModule = usingSsl ? https : http; + const info2 = {}; + info2.parsedUrl = requestUrl; + const usingSsl = info2.parsedUrl.protocol === "https:"; + info2.httpModule = usingSsl ? https : http; const defaultPort = usingSsl ? 443 : 80; - info17.options = {}; - info17.options.host = info17.parsedUrl.hostname; - info17.options.port = info17.parsedUrl.port ? parseInt(info17.parsedUrl.port) : defaultPort; - info17.options.path = (info17.parsedUrl.pathname || "") + (info17.parsedUrl.search || ""); - info17.options.method = method; - info17.options.headers = this._mergeHeaders(headers); + info2.options = {}; + info2.options.host = info2.parsedUrl.hostname; + info2.options.port = info2.parsedUrl.port ? parseInt(info2.parsedUrl.port) : defaultPort; + info2.options.path = (info2.parsedUrl.pathname || "") + (info2.parsedUrl.search || ""); + info2.options.method = method; + info2.options.headers = this._mergeHeaders(headers); if (this.userAgent != null) { - info17.options.headers["user-agent"] = this.userAgent; + info2.options.headers["user-agent"] = this.userAgent; } - info17.options.agent = this._getAgent(info17.parsedUrl); + info2.options.agent = this._getAgent(info2.parsedUrl); if (this.handlers) { for (const handler2 of this.handlers) { - handler2.prepareRequest(info17.options); + handler2.prepareRequest(info2.options); } } - return info17; + return info2; } _mergeHeaders(headers) { if (this.requestOptions && this.requestOptions.headers) { @@ -97464,7 +95534,7 @@ var BearerCredentialHandler = class { } }; -// node_modules/@actions/artifact/node_modules/@actions/core/lib/summary.js +// node_modules/@actions/core/lib/summary.js var import_os = require("os"); var import_fs = require("fs"); var __awaiter3 = function(thisArg, _arguments, P, generator) { @@ -97747,24 +95817,25 @@ var Summary = class { } }; var _summary = new Summary(); +var summary = _summary; -// node_modules/@actions/artifact/node_modules/@actions/core/lib/platform.js +// node_modules/@actions/core/lib/platform.js var import_os2 = __toESM(require("os"), 1); -// node_modules/@actions/artifact/node_modules/@actions/io/lib/io-util.js -var fs = __toESM(require("fs"), 1); -var { chmod, copyFile, lstat, mkdir, open, readdir, rename, rm, rmdir, stat, symlink, unlink } = fs.promises; +// node_modules/@actions/core/node_modules/@actions/io/lib/io-util.js +var fs2 = __toESM(require("fs"), 1); +var { chmod, copyFile, lstat, mkdir, open, readdir, rename, rm, rmdir, stat, symlink, unlink } = fs2.promises; var IS_WINDOWS = process.platform === "win32"; -var READONLY = fs.constants.O_RDONLY; +var READONLY = fs2.constants.O_RDONLY; -// node_modules/@actions/artifact/node_modules/@actions/exec/lib/toolrunner.js +// node_modules/@actions/core/node_modules/@actions/exec/lib/toolrunner.js var IS_WINDOWS2 = process.platform === "win32"; -// node_modules/@actions/artifact/node_modules/@actions/core/lib/platform.js +// node_modules/@actions/core/lib/platform.js var platform = import_os2.default.platform(); var arch = import_os2.default.arch(); -// node_modules/@actions/artifact/node_modules/@actions/core/lib/core.js +// node_modules/@actions/core/lib/core.js var ExitCode; (function(ExitCode2) { ExitCode2[ExitCode2["Success"] = 0] = "Success"; @@ -97773,19 +95844,219 @@ var ExitCode; function setSecret(secret) { issueCommand("add-mask", {}, secret); } -function debug2(message) { +function getInput(name, options) { + const val = process.env[`INPUT_${name.replace(/ /g, "_").toUpperCase()}`] || ""; + if (options && options.required && !val) { + throw new Error(`Input required and not supplied: ${name}`); + } + if (options && options.trimWhitespace === false) { + return val; + } + return val.trim(); +} +function setOutput(name, value) { + const filePath = process.env["GITHUB_OUTPUT"] || ""; + if (filePath) { + return issueFileCommand("OUTPUT", prepareKeyValueMessage(name, value)); + } + process.stdout.write(os4.EOL); + issueCommand("set-output", { name }, toCommandValue(value)); +} +function setFailed(message) { + process.exitCode = ExitCode.Failure; + error(message); +} +function debug(message) { issueCommand("debug", {}, message); } function error(message, properties = {}) { issueCommand("error", toCommandProperties(properties), message instanceof Error ? message.toString() : message); } -function warning2(message, properties = {}) { +function warning(message, properties = {}) { issueCommand("warning", toCommandProperties(properties), message instanceof Error ? message.toString() : message); } -function info2(message) { - process.stdout.write(message + os3.EOL); +function notice(message, properties = {}) { + issueCommand("notice", toCommandProperties(properties), message instanceof Error ? message.toString() : message); +} +function info(message) { + process.stdout.write(message + os4.EOL); +} + +// src/app.input.ts +var path = __toESM(require("path")); + +// src/utils/url.utils.ts +function sanitiseUrl(url2) { + if (url2) { + return url2.trim().replace(/\/+$/, ""); + } + return url2; +} + +// src/app.output.ts +var RESULT_FILEPATH = "result-filepath"; +var STDOUT_SCAN_COMMAND = "stdout-scan-command"; +var RAW_RESULT_FILE_NAME = "scanoss-raw.json"; +var CYCLONEDX_FILE_NAME = "scanoss-cyclonedx.json"; +var SPDXLITE_FILE_NAME = "scanoss-spdxlite.json"; +var CSV_FILE_NAME = "scanoss-sbom.csv"; + +// src/app.input.ts +function validateFilename(filename) { + if (!filename) { + return RAW_RESULT_FILE_NAME; + } + const normalizedPath = path.normalize(filename); + if (normalizedPath.includes("..") || normalizedPath.startsWith("/") || normalizedPath.includes("\\")) { + warning(`Invalid filename detected: ${filename}. Using default: ${RAW_RESULT_FILE_NAME}`); + return RAW_RESULT_FILE_NAME; + } + const basename5 = path.basename(normalizedPath); + const safeFilenameRegex = /^[a-zA-Z0-9._-]+$/; + if (!safeFilenameRegex.test(basename5)) { + warning(`Unsafe filename detected: ${filename}. Using default: ${RAW_RESULT_FILE_NAME}`); + return RAW_RESULT_FILE_NAME; + } + if (!basename5.includes(".")) { + return `${basename5}.json`; + } + return basename5; +} +function validateScanPath(scanPath) { + if (!scanPath) { + return "."; + } + const normalizedPath = path.normalize(scanPath).replace(/\\/g, "/"); + const windowsAbsolutePattern = /^[a-zA-Z]:/; + if (path.isAbsolute(scanPath) || windowsAbsolutePattern.test(normalizedPath)) { + warning(`Absolute scan paths not allowed: ${scanPath}. Using default: .`); + return "."; + } + if (normalizedPath.includes("..")) { + warning(`Invalid scan path detected: "${scanPath}". Using default: .`); + return "."; + } + const cleaned = normalizedPath.startsWith("./") ? normalizedPath.slice(2) : normalizedPath; + return cleaned || "."; +} +var POLICIES = getInput("policies"); +var POLICIES_HALT_ON_FAILURE = !(getInput("policies.halt_on_failure") === "false"); +var HALT_ON_ERROR = !(getInput("halt_on_error") === "false"); +var DEPENDENCIES_ENABLED = getInput("dependencies.enabled") === "true"; +var DEPENDENCIES_SCOPE = getInput("dependencies.scope"); +var DEPENDENCY_SCOPE_EXCLUDE = getInput("dependencies.scope.exclude"); +var DEPENDENCY_SCOPE_INCLUDE = getInput("dependencies.scope.include"); +var API_KEY = getInput("api.key"); +var API_URL = sanitiseUrl(getInput("api.url")); +var OUTPUT_FILEPATH = validateFilename(getInput("output.filepath")); +var GITHUB_TOKEN = getInput("github.token"); +var REPO_DIR = process.env.GITHUB_WORKSPACE; +var COPYLEFT_LICENSE_INCLUDE = getInput("licenses.copyleft.include"); +var COPYLEFT_LICENSE_EXCLUDE = getInput("licenses.copyleft.exclude"); +var COPYLEFT_LICENSE_EXPLICIT = getInput("licenses.copyleft.explicit"); +var RUNTIME_CONTAINER = getInput("runtimeContainer") || "ghcr.io/scanoss/scanoss-py:v1.52.1"; +var SKIP_SNIPPETS = getInput("skipSnippets") === "true"; +var MATCH_ANNOTATIONS = getInput("matchAnnotations") === "true"; +var SCAN_FILES = getInput("scanFiles") === "true"; +var SCANOSS_SETTINGS = getInput("scanossSettings") === "true"; +var SETTINGS_FILE_PATH = getInput("settingsFilepath") || "scanoss.json"; +var SCAN_MODE = getInput("scanMode") || "full"; +var SCAN_PATH = validateScanPath(getInput("scanPath")); +var EXECUTABLE = "docker"; +var DEBUG = getInput("debug") === "true"; +var DEPENDENCY_TRACK_ENABLED = getInput("deptrack.upload") === "true"; +var DEPENDENCY_TRACK_URL = sanitiseUrl(getInput("deptrack.url")); +var DEPENDENCY_TRACK_API_KEY = getInput("deptrack.apikey"); +var DEPENDENCY_TRACK_PROJECT_ID = getInput("deptrack.projectid"); +var DEPENDENCY_TRACK_PROJECT_NAME = getInput("deptrack.projectname"); +var DEPENDENCY_TRACK_PROJECT_VERSION = getInput("deptrack.projectversion"); +var DEPENDENCY_TRACK_UPLOAD_TOKEN = ""; +var setDependencyTrackUploadToken = (version3) => { + DEPENDENCY_TRACK_UPLOAD_TOKEN = version3; +}; +var setDependencyTrackProjectId = (id) => { + DEPENDENCY_TRACK_PROJECT_ID = id; +}; + +// src/utils/github.utils.ts +var prEvents = ["pull_request", "pull_request_review", "pull_request_review_comment"]; +var FIND_FIRST_RUN_EVENT = "workflow_dispatch"; +function isPullRequest() { + return prEvents.includes(import_github.context.eventName); +} +function getSHA() { + let sha = import_github.context.sha; + if (isPullRequest()) { + const pull = import_github.context.payload.pull_request; + if (pull?.head.sha) { + sha = pull?.head.sha; + } + } + return sha; +} +function resolveRepoAndSha() { + if (isPullRequest()) { + const pull = import_github.context.payload.pull_request; + if (pull?.head) { + return { + owner: pull.head.repo?.owner.login || import_github.context.repo.owner, + repo: pull.head.repo?.name || import_github.context.repo.repo, + sha: pull.head.sha || import_github.context.sha + }; + } + } + return { + owner: import_github.context.repo.owner, + repo: import_github.context.repo.repo, + sha: import_github.context.sha + }; +} +async function createCommentOnPR(message) { + const octokit = (0, import_github.getOctokit)(GITHUB_TOKEN); + debug("Creating comment on PR"); + octokit.rest.issues.createComment({ + issue_number: import_github.context.issue.number, + owner: import_github.context.repo.owner, + repo: import_github.context.repo.repo, + body: message + }); +} +async function getFirstRunId() { + let firstRunId = import_github.context.runId; + if (import_github.context.eventName === FIND_FIRST_RUN_EVENT) { + const firstRun = await loadFirstRun(import_github.context.repo.owner, import_github.context.repo.repo); + if (firstRun) { + info(`First Run ID found: ${firstRun.id}`); + firstRunId = firstRun.id; + } + } + return firstRunId; +} +async function loadFirstRun(owner, repo) { + const octokit = (0, import_github.getOctokit)(GITHUB_TOKEN); + const sha = getSHA(); + const workflowRun = await octokit.rest.actions.getWorkflowRun({ + owner, + repo, + run_id: import_github.context.runId + }); + const runs = await octokit.rest.actions.listWorkflowRuns({ + owner, + repo, + head_sha: sha, + workflow_id: workflowRun.data.workflow_id + }); + const filteredRuns = runs.data.workflow_runs.filter((run2) => run2.head_sha === sha); + const sortedRuns = filteredRuns.sort( + (a, b) => a.created_at && b.created_at ? new Date(a.created_at).getTime() - new Date(b.created_at).getTime() : 0 + ); + return sortedRuns.length ? sortedRuns[0] : null; } +// src/policies/policy-check.ts +var import_github5 = __toESM(require_github()); +var import_fs3 = require("fs"); + // node_modules/@actions/artifact/lib/internal/shared/config.js var import_os3 = __toESM(require("os"), 1); function getUploadChunkSize() { @@ -97834,10 +96105,10 @@ function getConcurrency() { throw new Error("Invalid value set for ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY env variable"); } if (concurrency < concurrencyCap) { - info2(`Set concurrency based on the value set in ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY.`); + info(`Set concurrency based on the value set in ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY.`); return concurrency; } - info2(`ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY is higher than the cap of ${concurrencyCap} based on the number of cpus. Set it to the maximum value allowed.`); + info(`ACTIONS_ARTIFACT_UPLOAD_CONCURRENCY is higher than the cap of ${concurrencyCap} based on the number of cpus. Set it to the maximum value allowed.`); return concurrencyCap; } return 5; @@ -97863,7 +96134,7 @@ function getMaxArtifactListCount() { } // node_modules/@actions/artifact/lib/internal/upload/upload-artifact.js -var fs5 = __toESM(require("fs"), 1); +var fs6 = __toESM(require("fs"), 1); var path3 = __toESM(require("path"), 1); // node_modules/@actions/artifact/lib/generated/google/protobuf/timestamp.js @@ -99491,7 +97762,7 @@ function getExpiration(retentionDays) { } const maxRetentionDays = getRetentionDays(); if (maxRetentionDays && maxRetentionDays < retentionDays) { - warning2(`Retention days cannot be greater than the maximum allowed retention set within the repository. Using ${maxRetentionDays} instead.`); + warning(`Retention days cannot be greater than the maximum allowed retention set within the repository. Using ${maxRetentionDays} instead.`); retentionDays = maxRetentionDays; } const expirationDate = /* @__PURE__ */ new Date(); @@ -99540,7 +97811,7 @@ Invalid characters include: ${Array.from(invalidArtifactNameCharacters.values()) These characters are not allowed in the artifact name due to limitations with certain file systems such as NTFS. To maintain file system agnostic behavior, these characters are intentionally not allowed to prevent potential problems with downloads on different file systems.`); } } - info2(`Artifact name is valid!`); + info(`Artifact name is valid!`); } function validateFilePath(path10) { if (!path10) { @@ -99708,8 +97979,8 @@ function getBackendIdsFromToken() { workflowRunBackendId: scopeParts[1], workflowJobRunBackendId: scopeParts[2] }; - debug2(`Workflow Run Backend ID: ${ids.workflowRunBackendId}`); - debug2(`Workflow Job Run Backend ID: ${ids.workflowJobRunBackendId}`); + debug(`Workflow Run Backend ID: ${ids.workflowRunBackendId}`); + debug(`Workflow Job Run Backend ID: ${ids.workflowJobRunBackendId}`); return ids; } throw InvalidJwtError; @@ -99724,13 +97995,13 @@ function maskSigUrl(url2) { setSecret(signature); setSecret(encodeURIComponent(signature)); } - } catch (error9) { - debug2(`Failed to parse URL: ${url2} ${error9 instanceof Error ? error9.message : String(error9)}`); + } catch (error2) { + debug(`Failed to parse URL: ${url2} ${error2 instanceof Error ? error2.message : String(error2)}`); } } function maskSecretUrls(body2) { if (typeof body2 !== "object" || body2 === null) { - debug2("body is not an object or is null"); + debug("body is not an object or is null"); return; } if ("signed_upload_url" in body2 && typeof body2.signed_upload_url === "string") { @@ -99794,7 +98065,7 @@ var ArtifactHttpClient = class { request(service, method, contentType2, data) { return __awaiter4(this, void 0, void 0, function* () { const url2 = new URL(`/twirp/${service}/${method}`, this.baseUrl).href; - debug2(`[Request] ${method} ${url2}`); + debug(`[Request] ${method} ${url2}`); const headers = { "Content-Type": contentType2 }; @@ -99803,8 +98074,8 @@ var ArtifactHttpClient = class { return this.httpClient.post(url2, JSON.stringify(data), headers); })); return body2; - } catch (error9) { - throw new Error(`Failed to ${method}: ${error9.message}`); + } catch (error2) { + throw new Error(`Failed to ${method}: ${error2.message}`); } }); } @@ -99819,11 +98090,11 @@ var ArtifactHttpClient = class { const response = yield operation(); const statusCode = response.message.statusCode; rawBody = yield response.readBody(); - debug2(`[Response] - ${response.message.statusCode}`); - debug2(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`); + debug(`[Response] - ${response.message.statusCode}`); + debug(`Headers: ${JSON.stringify(response.message.headers, null, 2)}`); const body2 = JSON.parse(rawBody); maskSecretUrls(body2); - debug2(`Body: ${JSON.stringify(body2, null, 2)}`); + debug(`Body: ${JSON.stringify(body2, null, 2)}`); if (this.isSuccessStatusCode(statusCode)) { return { response, body: body2 }; } @@ -99835,18 +98106,18 @@ var ArtifactHttpClient = class { } errorMessage = `${errorMessage}: ${body2.msg}`; } - } catch (error9) { - if (error9 instanceof SyntaxError) { - debug2(`Raw Body: ${rawBody}`); + } catch (error2) { + if (error2 instanceof SyntaxError) { + debug(`Raw Body: ${rawBody}`); } - if (error9 instanceof UsageError) { - throw error9; + if (error2 instanceof UsageError) { + throw error2; } - if (NetworkError.isNetworkErrorCode(error9 === null || error9 === void 0 ? void 0 : error9.code)) { - throw new NetworkError(error9 === null || error9 === void 0 ? void 0 : error9.code); + if (NetworkError.isNetworkErrorCode(error2 === null || error2 === void 0 ? void 0 : error2.code)) { + throw new NetworkError(error2 === null || error2 === void 0 ? void 0 : error2.code); } isRetryable = true; - errorMessage = error9.message; + errorMessage = error2.message; } if (!isRetryable) { throw new Error(`Received non-retryable error: ${errorMessage}`); @@ -99855,7 +98126,7 @@ var ArtifactHttpClient = class { throw new Error(`Failed to make request after ${this.maxAttempts} attempts: ${errorMessage}`); } const retryTimeMilliseconds = this.getExponentialRetryTimeMilliseconds(attempt); - info2(`Attempt ${attempt + 1} of ${this.maxAttempts} failed with error: ${errorMessage}. Retrying request in ${retryTimeMilliseconds} ms...`); + info(`Attempt ${attempt + 1} of ${this.maxAttempts} failed with error: ${errorMessage}. Retrying request in ${retryTimeMilliseconds} ms...`); yield this.sleep(retryTimeMilliseconds); attempt++; } @@ -99902,23 +98173,23 @@ function internalArtifactTwirpClient(options) { } // node_modules/@actions/artifact/lib/internal/upload/upload-zip-specification.js -var fs2 = __toESM(require("fs"), 1); +var fs3 = __toESM(require("fs"), 1); var import_path = require("path"); function validateRootDirectory(rootDirectory) { - if (!fs2.existsSync(rootDirectory)) { + if (!fs3.existsSync(rootDirectory)) { throw new Error(`The provided rootDirectory ${rootDirectory} does not exist`); } - if (!fs2.statSync(rootDirectory).isDirectory()) { + if (!fs3.statSync(rootDirectory).isDirectory()) { throw new Error(`The provided rootDirectory ${rootDirectory} is not a valid directory`); } - info2(`Root directory input is valid!`); + info(`Root directory input is valid!`); } function getUploadZipSpecification(filesToZip, rootDirectory) { const specification = []; rootDirectory = (0, import_path.normalize)(rootDirectory); rootDirectory = (0, import_path.resolve)(rootDirectory); for (let file of filesToZip) { - const stats = fs2.lstatSync(file, { throwIfNoEntry: false }); + const stats = fs3.lstatSync(file, { throwIfNoEntry: false }); if (!stats) { throw new Error(`File ${file} does not exist`); } @@ -100088,14 +98359,14 @@ function disable() { return result; } function createDebugger(namespace) { - const newDebugger = Object.assign(debug16, { + const newDebugger = Object.assign(debug2, { enabled: enabled(namespace), destroy, log: debugObj.log, namespace, extend }); - function debug16(...args) { + function debug2(...args) { if (!newDebugger.enabled) { return; } @@ -100294,7 +98565,7 @@ function createHttpHeaders(rawHeaders) { } // node_modules/@typespec/ts-http-runtime/dist/esm/util/uuidUtils.js -function randomUUID() { +function randomUUID2() { return crypto.randomUUID(); } @@ -100334,7 +98605,7 @@ var PipelineRequestImpl = class { this.abortSignal = options.abortSignal; this.onUploadProgress = options.onUploadProgress; this.onDownloadProgress = options.onDownloadProgress; - this.requestId = options.requestId || randomUUID(); + this.requestId = options.requestId || randomUUID2(); this.allowInsecureConnection = options.allowInsecureConnection ?? false; this.enableBrowserStreams = options.enableBrowserStreams ?? false; this.requestOverrides = options.requestOverrides; @@ -101692,7 +99963,7 @@ async function concat(sources) { // node_modules/@typespec/ts-http-runtime/dist/esm/policies/multipartPolicy.js function generateBoundary() { - return `----AzSDKFormBoundary${randomUUID()}`; + return `----AzSDKFormBoundary${randomUUID2()}`; } function encodeHeaders(headers) { let result = ""; @@ -101957,8 +100228,8 @@ function getErrorMessage(e) { function isError2(e) { return isError(e); } -function randomUUID2() { - return randomUUID(); +function randomUUID3() { + return randomUUID2(); } var isNodeLike2 = isNodeLike; @@ -102255,14 +100526,14 @@ function tryCreateSpan(tracingClient2, request2, spanAttributes) { return void 0; } } -function tryProcessError(span, error9) { +function tryProcessError(span, error2) { try { span.setStatus({ status: "error", - error: isError2(error9) ? error9 : void 0 + error: isError2(error2) ? error2 : void 0 }); - if (isRestError2(error9) && error9.statusCode) { - span.setAttribute("http.status_code", error9.statusCode); + if (isRestError2(error2) && error2.statusCode) { + span.setAttribute("http.status_code", error2.statusCode); } span.end(); } catch (e) { @@ -102573,9 +100844,9 @@ function bearerTokenAuthenticationPolicy(options) { logger: logger7 }); let response; - let error9; + let error2; let shouldSendRequest; - [response, error9] = await trySendRequest(request2, next); + [response, error2] = await trySendRequest(request2, next); if (isChallengeResponse(response)) { let claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); if (claims) { @@ -102594,7 +100865,7 @@ function bearerTokenAuthenticationPolicy(options) { logger: logger7 }, parsedClaim); if (shouldSendRequest) { - [response, error9] = await trySendRequest(request2, next); + [response, error2] = await trySendRequest(request2, next); } } else if (callbacks.authorizeRequestOnChallenge) { shouldSendRequest = await callbacks.authorizeRequestOnChallenge({ @@ -102605,7 +100876,7 @@ function bearerTokenAuthenticationPolicy(options) { logger: logger7 }); if (shouldSendRequest) { - [response, error9] = await trySendRequest(request2, next); + [response, error2] = await trySendRequest(request2, next); } if (isChallengeResponse(response)) { claims = getCaeChallengeClaims(response.headers.get("WWW-Authenticate")); @@ -102625,14 +100896,14 @@ function bearerTokenAuthenticationPolicy(options) { logger: logger7 }, parsedClaim); if (shouldSendRequest) { - [response, error9] = await trySendRequest(request2, next); + [response, error2] = await trySendRequest(request2, next); } } } } } - if (error9) { - throw error9; + if (error2) { + throw error2; } else { return response; } @@ -103578,12 +101849,12 @@ function getOperationRequestInfo(request2) { if (hasOriginalRequest(request2)) { return getOperationRequestInfo(request2[originalRequestSymbol]); } - let info17 = state2.operationRequestMap.get(request2); - if (!info17) { - info17 = {}; - state2.operationRequestMap.set(request2, info17); + let info2 = state2.operationRequestMap.get(request2); + if (!info2) { + info2 = {}; + state2.operationRequestMap.set(request2, info2); } - return info17; + return info2; } // node_modules/@azure/core-client/dist/esm/deserializationPolicy.js @@ -103649,9 +101920,9 @@ async function deserializeResponseBody(jsonContentTypes, xmlContentTypes, respon return parsedResponse; } const responseSpec = getOperationResponseMap(parsedResponse); - const { error: error9, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options); - if (error9) { - throw error9; + const { error: error2, shouldReturnResponse } = handleErrorResponse(parsedResponse, operationSpec, responseSpec, options); + if (error2) { + throw error2; } else if (shouldReturnResponse) { return parsedResponse; } @@ -103698,13 +101969,13 @@ function handleErrorResponse(parsedResponse, operationSpec, responseSpec, option } const errorResponseSpec = responseSpec ?? operationSpec.responses.default; const initialErrorMessage = parsedResponse.request.streamResponseStatusCodes?.has(parsedResponse.status) ? `Unexpected status code: ${parsedResponse.status}` : parsedResponse.bodyAsText; - const error9 = new RestError2(initialErrorMessage, { + const error2 = new RestError2(initialErrorMessage, { statusCode: parsedResponse.status, request: parsedResponse.request, response: parsedResponse }); if (!errorResponseSpec && !(parsedResponse.parsedBody?.error?.code && parsedResponse.parsedBody?.error?.message)) { - throw error9; + throw error2; } const defaultBodyMapper = errorResponseSpec?.bodyMapper; const defaultHeadersMapper = errorResponseSpec?.headersMapper; @@ -103724,21 +101995,21 @@ function handleErrorResponse(parsedResponse, operationSpec, responseSpec, option deserializedError = operationSpec.serializer.deserialize(defaultBodyMapper, valueToDeserialize, "error.response.parsedBody", options); } const internalError = parsedBody.error || deserializedError || parsedBody; - error9.code = internalError.code; + error2.code = internalError.code; if (internalError.message) { - error9.message = internalError.message; + error2.message = internalError.message; } if (defaultBodyMapper) { - error9.response.parsedBody = deserializedError; + error2.response.parsedBody = deserializedError; } } if (parsedResponse.headers && defaultHeadersMapper) { - error9.response.parsedHeaders = operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders"); + error2.response.parsedHeaders = operationSpec.serializer.deserialize(defaultHeadersMapper, parsedResponse.headers.toJSON(), "operationRes.parsedHeaders"); } } catch (defaultError) { - error9.message = `Error "${defaultError.message}" occurred in deserializing the responseBody - "${parsedResponse.bodyAsText}" for the default response.`; + error2.message = `Error "${defaultError.message}" occurred in deserializing the responseBody - "${parsedResponse.bodyAsText}" for the default response.`; } - return { error: error9, shouldReturnResponse: false }; + return { error: error2, shouldReturnResponse: false }; } async function parse(jsonContentTypes, xmlContentTypes, operationResponse, opts, parseXML2) { if (!operationResponse.request.streamResponseStatusCodes?.has(operationResponse.status) && operationResponse.bodyAsText) { @@ -103877,8 +102148,8 @@ function serializeRequestBody(request2, operationArguments, operationSpec, strin request2.body = JSON.stringify(request2.body); } } - } catch (error9) { - throw new Error(`Error "${error9.message}" occurred in serializing the payload - ${JSON.stringify(serializedName, void 0, " ")}.`); + } catch (error2) { + throw new Error(`Error "${error2.message}" occurred in serializing the payload - ${JSON.stringify(serializedName, void 0, " ")}.`); } } else if (operationSpec.formDataParameters && operationSpec.formDataParameters.length > 0) { request2.formData = {}; @@ -104247,16 +102518,16 @@ var ServiceClient = class { options.onResponse(rawResponse, flatResponse); } return flatResponse; - } catch (error9) { - if (typeof error9 === "object" && error9?.response) { - const rawResponse = error9.response; - const flatResponse = flattenResponse(rawResponse, operationSpec.responses[error9.statusCode] || operationSpec.responses["default"]); - error9.details = flatResponse; + } catch (error2) { + if (typeof error2 === "object" && error2?.response) { + const rawResponse = error2.response; + const flatResponse = flattenResponse(rawResponse, operationSpec.responses[error2.statusCode] || operationSpec.responses["default"]); + error2.details = flatResponse; if (options?.onResponse) { - options.onResponse(rawResponse, flatResponse, error9); + options.onResponse(rawResponse, flatResponse, error2); } } - throw error9; + throw error2; } } }; @@ -104675,10 +102946,10 @@ var ExtendedServiceClient = class extends ServiceClient { async sendOperationRequest(operationArguments, operationSpec) { const userProvidedCallBack = operationArguments?.options?.onResponse; let lastResponse; - function onResponse(rawResponse, flatResponse, error9) { + function onResponse(rawResponse, flatResponse, error2) { lastResponse = rawResponse; if (userProvidedCallBack) { - userProvidedCallBack(rawResponse, flatResponse, error9); + userProvidedCallBack(rawResponse, flatResponse, error2); } } operationArguments.options = { @@ -106322,11 +104593,11 @@ var XMLParser = class { }; // node_modules/fast-xml-builder/src/orderedJs2Xml.js -var EOL5 = "\n"; +var EOL6 = "\n"; function toXml(jArray, options) { let indentation = ""; if (options.format && options.indentBy.length > 0) { - indentation = EOL5; + indentation = EOL6; } return arrToStr(jArray, options, "", indentation); } @@ -108293,25 +106564,25 @@ function storageRetryPolicy(options = {}) { const maxRetryDelayInMs = options.maxRetryDelayInMs ?? DEFAULT_RETRY_OPTIONS2.maxRetryDelayInMs; const secondaryHost = options.secondaryHost ?? DEFAULT_RETRY_OPTIONS2.secondaryHost; const tryTimeoutInMs = options.tryTimeoutInMs ?? DEFAULT_RETRY_OPTIONS2.tryTimeoutInMs; - function shouldRetry({ isPrimaryRetry, attempt, response, error: error9 }) { + function shouldRetry({ isPrimaryRetry, attempt, response, error: error2 }) { if (attempt >= maxTries) { logger5.info(`RetryPolicy: Attempt(s) ${attempt} >= maxTries ${maxTries}, no further try.`); return false; } - if (error9) { + if (error2) { for (const retriableError of retriableErrors) { - if (error9.name.toUpperCase().includes(retriableError) || error9.message.toUpperCase().includes(retriableError) || error9.code && error9.code.toString().toUpperCase() === retriableError) { + if (error2.name.toUpperCase().includes(retriableError) || error2.message.toUpperCase().includes(retriableError) || error2.code && error2.code.toString().toUpperCase() === retriableError) { logger5.info(`RetryPolicy: Network error ${retriableError} found, will retry.`); return true; } } - if (error9?.code === "PARSE_ERROR" && error9?.message.startsWith(`Error "Error: Unclosed root tag`)) { + if (error2?.code === "PARSE_ERROR" && error2?.message.startsWith(`Error "Error: Unclosed root tag`)) { logger5.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."); return true; } } - if (response || error9) { - const statusCode = response?.status ?? error9?.statusCode ?? 0; + if (response || error2) { + const statusCode = response?.status ?? error2?.statusCode ?? 0; if (!isPrimaryRetry && statusCode === 404) { logger5.info(`RetryPolicy: Secondary access with 404, will retry.`); return true; @@ -108365,12 +106636,12 @@ function storageRetryPolicy(options = {}) { let attempt = 1; let retryAgain = true; let response; - let error9; + let error2; while (retryAgain) { const isPrimaryRetry = secondaryHas404 || !secondaryUrl || !["GET", "HEAD", "OPTIONS"].includes(request2.method) || attempt % 2 === 1; request2.url = isPrimaryRetry ? primaryUrl : secondaryUrl; response = void 0; - error9 = void 0; + error2 = void 0; try { logger5.info(`RetryPolicy: =====> Try=${attempt} ${isPrimaryRetry ? "Primary" : "Secondary"}`); response = await next(request2); @@ -108378,13 +106649,13 @@ function storageRetryPolicy(options = {}) { } catch (e) { if (isRestError2(e)) { logger5.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`); - error9 = e; + error2 = e; } else { logger5.error(`RetryPolicy: Caught error, message: ${getErrorMessage(e)}`); throw e; } } - retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error9 }); + retryAgain = shouldRetry({ isPrimaryRetry, attempt, response, error: error2 }); if (retryAgain) { await delay3(calculateDelay(isPrimaryRetry, attempt), request2.abortSignal, RETRY_ABORT_ERROR2); } @@ -108393,7 +106664,7 @@ function storageRetryPolicy(options = {}) { if (response) { return response; } - throw error9 ?? new RestError2("RetryPolicy failed without known error."); + throw error2 ?? new RestError2("RetryPolicy failed without known error."); } }; } @@ -122584,7 +120855,7 @@ function getAccountNameFromUrl(url2) { accountName = ""; } return accountName; - } catch (error9) { + } catch (error2) { throw new Error("Unable to extract accountName with provided information."); } } @@ -124045,7 +122316,7 @@ var BlobLeaseClient = class { this._containerOrBlobOperation = clientContext.blob; } if (!leaseId2) { - leaseId2 = randomUUID2(); + leaseId2 = randomUUID3(); } this._leaseId = leaseId2; } @@ -124268,8 +122539,8 @@ var RetriableReadableStream = class extends import_node_stream3.Readable { this.source = newSource; this.setSourceEventHandlers(); return; - }).catch((error9) => { - this.destroy(error9); + }).catch((error2) => { + this.destroy(error2); }); } else { this.destroy(new Error(`Data corruption failure: received less data than required and reached maxRetires limitation. Received data offset: ${this.offset - 1}, data needed offset: ${this.end}, retries: ${this.retries}, max retries: ${this.maxRetryRequests}`)); @@ -124278,10 +122549,10 @@ var RetriableReadableStream = class extends import_node_stream3.Readable { this.destroy(new Error(`Data corruption failure: Received more data than original request, data needed offset is ${this.end}, received offset: ${this.offset - 1}`)); } }; - _destroy(error9, callback) { + _destroy(error2, callback) { this.removeSourceEventHandlers(); this.source.destroy(); - callback(error9 === null ? void 0 : error9); + callback(error2 === null ? void 0 : error2); } }; @@ -125961,9 +124232,9 @@ var Poller = class { if (this.operation.state.isCancelled) { this.stopped = true; if (!this.resolveOnUnsuccessful) { - const error9 = new PollerCancelledError("Operation was canceled"); - this.reject(error9); - throw error9; + const error2 = new PollerCancelledError("Operation was canceled"); + this.reject(error2); + throw error2; } } if (this.isDone() && this.resolve) { @@ -126268,8 +124539,8 @@ var Batch = class { this.actives--; this.completed++; this.parallelExecute(); - } catch (error9) { - this.emitter.emit("error", error9); + } catch (error2) { + this.emitter.emit("error", error2); } }); } @@ -126284,9 +124555,9 @@ var Batch = class { this.parallelExecute(); return new Promise((resolve2, reject) => { this.emitter.on("finish", resolve2); - this.emitter.on("error", (error9) => { + this.emitter.on("error", (error2) => { this.state = BatchStates.Error; - reject(error9); + reject(error2); }); }); } @@ -127136,8 +125407,8 @@ var BlobClient = class _BlobClient extends StorageClient2 { if (!buffer2) { try { buffer2 = Buffer.alloc(count); - } catch (error9) { - throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error9.message}`); + } catch (error2) { + throw new Error(`Unable to allocate the buffer of size: ${count}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${error2.message}`); } } if (buffer2.length < count) { @@ -127224,7 +125495,7 @@ var BlobClient = class _BlobClient extends StorageClient2 { throw new Error("Provided containerName is invalid."); } return { blobName, containerName }; - } catch (error9) { + } catch (error2) { throw new Error("Unable to extract blobName and containerName with provided information."); } } @@ -128188,7 +126459,7 @@ var BlockBlobClient = class _BlockBlobClient extends BlobClient { throw new RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${BLOCK_BLOB_MAX_BLOCKS}`); } const blockList = []; - const blockIDPrefix = randomUUID2(); + const blockIDPrefix = randomUUID3(); let transferProgress = 0; const batch = new Batch(options.concurrency); for (let i = 0; i < numBlocks; i++) { @@ -128269,7 +126540,7 @@ var BlockBlobClient = class _BlockBlobClient extends BlobClient { } return tracingClient.withSpan("BlockBlobClient-uploadStream", options, async (updatedOptions) => { let blockNum = 0; - const blockIDPrefix = randomUUID2(); + const blockIDPrefix = randomUUID3(); let transferProgress = 0; const blockList = []; const scheduler = new BufferScheduler( @@ -129049,7 +127320,7 @@ var KnownEncryptionAlgorithmType2; })(KnownEncryptionAlgorithmType2 || (KnownEncryptionAlgorithmType2 = {})); // node_modules/@actions/artifact/lib/internal/upload/blob-upload.js -var crypto2 = __toESM(require("crypto"), 1); +var crypto3 = __toESM(require("crypto"), 1); var stream = __toESM(require("stream"), 1); var __awaiter5 = function(thisArg, _arguments, P, generator) { function adopt(value) { @@ -129100,9 +127371,9 @@ function uploadToBlobStorage(authenticatedUploadURL, uploadStream, contentType2) const bufferSize = getUploadChunkSize(); const blobClient = new BlobClient(authenticatedUploadURL); const blockBlobClient = blobClient.getBlockBlobClient(); - debug2(`Uploading artifact to blob storage with maxConcurrency: ${maxConcurrency}, bufferSize: ${bufferSize}, contentType: ${contentType2}`); + debug(`Uploading artifact to blob storage with maxConcurrency: ${maxConcurrency}, bufferSize: ${bufferSize}, contentType: ${contentType2}`); const uploadCallback = (progress) => { - info2(`Uploaded bytes ${progress.loadedBytes}`); + info(`Uploaded bytes ${progress.loadedBytes}`); uploadByteCount = progress.loadedBytes; lastProgressTime = Date.now(); }; @@ -129113,29 +127384,29 @@ function uploadToBlobStorage(authenticatedUploadURL, uploadStream, contentType2) }; let sha256Hash = void 0; const blobUploadStream = new stream.PassThrough(); - const hashStream = crypto2.createHash("sha256"); + const hashStream = crypto3.createHash("sha256"); uploadStream.pipe(blobUploadStream); uploadStream.pipe(hashStream).setEncoding("hex"); - info2("Beginning upload of artifact content to blob storage"); + info("Beginning upload of artifact content to blob storage"); try { yield Promise.race([ blockBlobClient.uploadStream(blobUploadStream, bufferSize, maxConcurrency, options), chunkTimer(getUploadChunkTimeout()) ]); - } catch (error9) { - if (NetworkError.isNetworkErrorCode(error9 === null || error9 === void 0 ? void 0 : error9.code)) { - throw new NetworkError(error9 === null || error9 === void 0 ? void 0 : error9.code); + } catch (error2) { + if (NetworkError.isNetworkErrorCode(error2 === null || error2 === void 0 ? void 0 : error2.code)) { + throw new NetworkError(error2 === null || error2 === void 0 ? void 0 : error2.code); } - throw error9; + throw error2; } finally { abortController.abort(); } - info2("Finished uploading artifact content to blob storage!"); + info("Finished uploading artifact content to blob storage!"); hashStream.end(); sha256Hash = hashStream.read(); - info2(`SHA256 digest of uploaded artifact is ${sha256Hash}`); + info(`SHA256 digest of uploaded artifact is ${sha256Hash}`); if (uploadByteCount === 0) { - warning2(`No data was uploaded to blob storage. Reported upload byte count is 0.`); + warning(`No data was uploaded to blob storage. Reported upload byte count is 0.`); } return { uploadSize: uploadByteCount, @@ -129150,7 +127421,7 @@ var import_archiver = __toESM(require_archiver(), 1); // node_modules/@actions/artifact/lib/internal/upload/stream.js var stream2 = __toESM(require("stream"), 1); -var fs4 = __toESM(require("fs"), 1); +var fs5 = __toESM(require("fs"), 1); var import_promises = require("fs/promises"); var __awaiter6 = function(thisArg, _arguments, P, generator) { function adopt(value) { @@ -129192,20 +127463,20 @@ var WaterMarkedUploadStream = class extends stream2.Transform { }; function createRawFileUploadStream(filePath) { return __awaiter6(this, void 0, void 0, function* () { - debug2(`Creating raw file upload stream for: ${filePath}`); + debug(`Creating raw file upload stream for: ${filePath}`); const bufferSize = getUploadChunkSize(); const uploadStream = new WaterMarkedUploadStream(bufferSize); let sourcePath = filePath; - const stats = yield fs4.promises.lstat(filePath); + const stats = yield fs5.promises.lstat(filePath); if (stats.isSymbolicLink()) { sourcePath = yield (0, import_promises.realpath)(filePath); } - const fileStream = fs4.createReadStream(sourcePath, { + const fileStream = fs5.createReadStream(sourcePath, { highWaterMark: bufferSize }); - fileStream.on("error", (error9) => { + fileStream.on("error", (error2) => { error("An error has occurred while reading the file for upload"); - error(String(error9)); + error(String(error2)); uploadStream.destroy(new Error("An error has occurred during file read for the artifact")); }); fileStream.pipe(uploadStream); @@ -129244,7 +127515,7 @@ var __awaiter7 = function(thisArg, _arguments, P, generator) { var DEFAULT_COMPRESSION_LEVEL = 6; function createZipUploadStream(uploadSpecification_1) { return __awaiter7(this, arguments, void 0, function* (uploadSpecification, compressionLevel = DEFAULT_COMPRESSION_LEVEL) { - debug2(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); + debug(`Creating Artifact archive with compressionLevel: ${compressionLevel}`); const zip = import_archiver.default.create("zip", { highWaterMark: getUploadChunkSize(), zlib: { level: compressionLevel } @@ -129268,32 +127539,32 @@ function createZipUploadStream(uploadSpecification_1) { } const bufferSize = getUploadChunkSize(); const zipUploadStream = new WaterMarkedUploadStream(bufferSize); - debug2(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`); - debug2(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`); + debug(`Zip write high watermark value ${zipUploadStream.writableHighWaterMark}`); + debug(`Zip read high watermark value ${zipUploadStream.readableHighWaterMark}`); zip.pipe(zipUploadStream); zip.finalize(); return zipUploadStream; }); } -var zipErrorCallback = (error9) => { +var zipErrorCallback = (error2) => { error("An error has occurred while creating the zip file for upload"); - info2(error9); + info(error2); throw new Error("An error has occurred during zip creation for the artifact"); }; -var zipWarningCallback = (error9) => { - if (error9.code === "ENOENT") { - warning2("ENOENT warning during artifact zip creation. No such file or directory"); - info2(error9); +var zipWarningCallback = (error2) => { + if (error2.code === "ENOENT") { + warning("ENOENT warning during artifact zip creation. No such file or directory"); + info(error2); } else { - warning2(`A non-blocking warning has occurred during artifact zip creation: ${error9.code}`); - info2(error9); + warning(`A non-blocking warning has occurred during artifact zip creation: ${error2.code}`); + info(error2); } }; var zipFinishCallback = () => { - debug2("Zip stream for upload has finished."); + debug("Zip stream for upload has finished."); }; var zipEndCallback = () => { - debug2("Zip stream for upload has ended."); + debug("Zip stream for upload has ended."); }; // node_modules/@actions/artifact/lib/internal/upload/types.js @@ -129400,7 +127671,7 @@ function uploadArtifact(name, files, rootDirectory, options) { if (files.length > 1) { throw new Error("skipArchive option is only supported when uploading a single file"); } - if (!fs5.existsSync(files[0])) { + if (!fs6.existsSync(files[0])) { throw new FilesNotFoundError(files); } artifactFileName = path3.basename(files[0]); @@ -129439,7 +127710,7 @@ function uploadArtifact(name, files, rootDirectory, options) { } else { stream4 = yield createZipUploadStream(zipSpecification, options === null || options === void 0 ? void 0 : options.compressionLevel); } - info2(`Uploading artifact: ${artifactFileName}`); + info(`Uploading artifact: ${artifactFileName}`); const uploadResult = yield uploadToBlobStorage(createArtifactResp.signedUploadUrl, stream4, contentType2); const finalizeArtifactReq = { workflowRunBackendId: backendIds.workflowRunBackendId, @@ -129452,13 +127723,13 @@ function uploadArtifact(name, files, rootDirectory, options) { value: `sha256:${uploadResult.sha256Hash}` }); } - info2(`Finalizing artifact upload`); + info(`Finalizing artifact upload`); const finalizeArtifactResp = yield artifactClient.FinalizeArtifact(finalizeArtifactReq); if (!finalizeArtifactResp.ok) { throw new InvalidResponseError("FinalizeArtifact: response from backend was not ok"); } const artifactId = BigInt(finalizeArtifactResp.artifactId); - info2(`Artifact ${name} successfully finalized. Artifact ID ${artifactId}`); + info(`Artifact ${name} successfully finalized. Artifact ID ${artifactId}`); return { size: uploadResult.uploadSize, digest: uploadResult.sha256Hash, @@ -129470,7 +127741,7 @@ function uploadArtifact(name, files, rootDirectory, options) { // node_modules/@actions/artifact/lib/internal/download/download-artifact.js var import_promises3 = __toESM(require("fs/promises"), 1); var fsSync = __toESM(require("fs"), 1); -var crypto3 = __toESM(require("crypto"), 1); +var crypto4 = __toESM(require("crypto"), 1); var stream3 = __toESM(require("stream"), 1); var path4 = __toESM(require("path"), 1); @@ -129526,7 +127797,7 @@ var Context = class { }; // node_modules/@actions/artifact/node_modules/@actions/github/lib/internal/utils.js -var httpClient = __toESM(require_lib4(), 1); +var httpClient = __toESM(require_lib3(), 1); var import_undici2 = __toESM(require_undici3(), 1); var __awaiter9 = function(thisArg, _arguments, P, generator) { function adopt(value) { @@ -129640,8 +127911,8 @@ function addHook(state3, kind, name, hook2) { } if (kind === "error") { hook2 = (method, options) => { - return Promise.resolve().then(method.bind(null, options)).catch((error9) => { - return orig(error9, options); + return Promise.resolve().then(method.bind(null, options)).catch((error2) => { + return orig(error2, options); }); }; } @@ -130184,26 +128455,26 @@ async function fetchWrapper(requestOptions) { // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. ...requestOptions.body && { duplex: "half" } }); - } catch (error9) { + } catch (error2) { let message = "Unknown Error"; - if (error9 instanceof Error) { - if (error9.name === "AbortError") { - error9.status = 500; - throw error9; + if (error2 instanceof Error) { + if (error2.name === "AbortError") { + error2.status = 500; + throw error2; } - message = error9.message; - if (error9.name === "TypeError" && "cause" in error9) { - if (error9.cause instanceof Error) { - message = error9.cause.message; - } else if (typeof error9.cause === "string") { - message = error9.cause; + message = error2.message; + if (error2.name === "TypeError" && "cause" in error2) { + if (error2.cause instanceof Error) { + message = error2.cause.message; + } else if (typeof error2.cause === "string") { + message = error2.cause; } } } const requestError = new RequestError(message, 500, { request: requestOptions }); - requestError.cause = error9; + requestError.cause = error2; throw requestError; } const status = fetchResponse.status; @@ -133101,8 +131372,8 @@ function iterator(octokit, route, parameters) { } } return { value: normalizedResponse }; - } catch (error9) { - if (error9.status !== 409) throw error9; + } catch (error2) { + if (error2.status !== 409) throw error2; url2 = ""; return { value: { @@ -133224,11 +131495,11 @@ function exists2(path10) { try { yield import_promises3.default.access(path10); return true; - } catch (error9) { - if (error9.code === "ENOENT") { + } catch (error2) { + if (error2.code === "ENOENT") { return false; } else { - throw error9; + throw error2; } } }); @@ -133239,9 +131510,9 @@ function streamExtract(url2, directory, skipDecompress) { while (retryCount < 5) { try { return yield streamExtractExternal(url2, directory, { skipDecompress }); - } catch (error9) { + } catch (error2) { retryCount++; - debug2(`Failed to download artifact after ${retryCount} retries due to ${error9.message}. Retrying in 5 seconds...`); + debug(`Failed to download artifact after ${retryCount} retries due to ${error2.message}. Retrying in 5 seconds...`); yield new Promise((resolve2) => setTimeout(resolve2, 5e3)); } } @@ -133267,8 +131538,8 @@ function streamExtractExternal(url_1, directory_1) { if (filenameMatch && filenameMatch[1]) { fileName = path4.basename(decodeURIComponent(filenameMatch[1].trim())); } - debug2(`Content-Type: ${contentType2}, mimeType: ${mimeType}, urlEndsWithZip: ${urlEndsWithZip}, isZip: ${isZip}, skipDecompress: ${skipDecompress}`); - debug2(`Content-Disposition: ${contentDisposition}, fileName: ${fileName}`); + debug(`Content-Type: ${contentType2}, mimeType: ${mimeType}, urlEndsWithZip: ${urlEndsWithZip}, isZip: ${isZip}, skipDecompress: ${skipDecompress}`); + debug(`Content-Disposition: ${contentDisposition}, fileName: ${fileName}`); let sha256Digest = void 0; return new Promise((resolve2, reject) => { const timerFn = () => { @@ -133277,12 +131548,12 @@ function streamExtractExternal(url_1, directory_1) { reject(timeoutError); }; const timer = setTimeout(timerFn, timeout); - const onError = (error9) => { - debug2(`response.message: Artifact download failed: ${error9.message}`); + const onError = (error2) => { + debug(`response.message: Artifact download failed: ${error2.message}`); clearTimeout(timer); - reject(error9); + reject(error2); }; - const hashStream = crypto3.createHash("sha256").setEncoding("hex"); + const hashStream = crypto4.createHash("sha256").setEncoding("hex"); const passThrough = new stream3.PassThrough().on("data", () => { timer.refresh(); }).on("error", onError); @@ -133293,7 +131564,7 @@ function streamExtractExternal(url_1, directory_1) { if (hashStream) { hashStream.end(); sha256Digest = hashStream.read(); - info2(`SHA256 digest of downloaded artifact is ${sha256Digest}`); + info(`SHA256 digest of downloaded artifact is ${sha256Digest}`); } resolve2({ sha256Digest: `sha256:${sha256Digest}` }); }; @@ -133302,7 +131573,7 @@ function streamExtractExternal(url_1, directory_1) { } else { const filePath = path4.join(directory, fileName); const writeStream = fsSync.createWriteStream(filePath); - info2(`Downloading raw file (non-zip) to: ${filePath}`); + info(`Downloading raw file (non-zip) to: ${filePath}`); passThrough.pipe(writeStream).on("close", onClose).on("error", onError); } }); @@ -133313,7 +131584,7 @@ function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, tok const downloadPath = yield resolveOrCreateDirectory(options === null || options === void 0 ? void 0 : options.path); const api = getOctokit2(token); let digestMismatch = false; - info2(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`); + info(`Downloading artifact '${artifactId}' from '${repositoryOwner}/${repositoryName}'`); const { headers, status } = yield api.rest.actions.downloadArtifact({ owner: repositoryOwner, repo: repositoryName, @@ -133330,20 +131601,20 @@ function downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, tok if (!location) { throw new Error(`Unable to redirect to artifact download url`); } - info2(`Redirecting to blob download url: ${scrubQueryParameters(location)}`); + info(`Redirecting to blob download url: ${scrubQueryParameters(location)}`); try { - info2(`Starting download of artifact to: ${downloadPath}`); + info(`Starting download of artifact to: ${downloadPath}`); const extractResponse = yield streamExtract(location, downloadPath, options === null || options === void 0 ? void 0 : options.skipDecompress); - info2(`Artifact download completed successfully.`); + info(`Artifact download completed successfully.`); if (options === null || options === void 0 ? void 0 : options.expectedHash) { if ((options === null || options === void 0 ? void 0 : options.expectedHash) !== extractResponse.sha256Digest) { digestMismatch = true; - debug2(`Computed digest: ${extractResponse.sha256Digest}`); - debug2(`Expected digest: ${options.expectedHash}`); + debug(`Computed digest: ${extractResponse.sha256Digest}`); + debug(`Expected digest: ${options.expectedHash}`); } } - } catch (error9) { - throw new Error(`Unable to download and extract artifact: ${error9.message}`); + } catch (error2) { + throw new Error(`Unable to download and extract artifact: ${error2.message}`); } return { downloadPath, digestMismatch }; }); @@ -133365,7 +131636,7 @@ function downloadArtifactInternal(artifactId, options) { Are you trying to download from a different run? Try specifying a github-token with \`actions:read\` scope.`); } if (artifacts.length > 1) { - warning2("Multiple artifacts found, defaulting to first."); + warning("Multiple artifacts found, defaulting to first."); } const signedReq = { workflowRunBackendId: artifacts[0].workflowRunBackendId, @@ -133373,20 +131644,20 @@ Are you trying to download from a different run? Try specifying a github-token w name: artifacts[0].name }; const { signedUrl } = yield artifactClient.GetSignedArtifactURL(signedReq); - info2(`Redirecting to blob download url: ${scrubQueryParameters(signedUrl)}`); + info(`Redirecting to blob download url: ${scrubQueryParameters(signedUrl)}`); try { - info2(`Starting download of artifact to: ${downloadPath}`); + info(`Starting download of artifact to: ${downloadPath}`); const extractResponse = yield streamExtract(signedUrl, downloadPath, options === null || options === void 0 ? void 0 : options.skipDecompress); - info2(`Artifact download completed successfully.`); + info(`Artifact download completed successfully.`); if (options === null || options === void 0 ? void 0 : options.expectedHash) { if ((options === null || options === void 0 ? void 0 : options.expectedHash) !== extractResponse.sha256Digest) { digestMismatch = true; - debug2(`Computed digest: ${extractResponse.sha256Digest}`); - debug2(`Expected digest: ${options.expectedHash}`); + debug(`Computed digest: ${extractResponse.sha256Digest}`); + debug(`Expected digest: ${options.expectedHash}`); } } - } catch (error9) { - throw new Error(`Unable to download and extract artifact: ${error9.message}`); + } catch (error2) { + throw new Error(`Unable to download and extract artifact: ${error2.message}`); } return { downloadPath, digestMismatch }; }); @@ -133394,10 +131665,10 @@ Are you trying to download from a different run? Try specifying a github-token w function resolveOrCreateDirectory() { return __awaiter10(this, arguments, void 0, function* (downloadPath = getGitHubWorkspaceDir()) { if (!(yield exists2(downloadPath))) { - debug2(`Artifact destination folder does not exist, creating: ${downloadPath}`); + debug(`Artifact destination folder does not exist, creating: ${downloadPath}`); yield import_promises3.default.mkdir(downloadPath, { recursive: true }); } else { - debug2(`Artifact destination folder already exists: ${downloadPath}`); + debug(`Artifact destination folder already exists: ${downloadPath}`); } return downloadPath; }); @@ -133418,7 +131689,7 @@ function getRetryOptions(defaultOptions4, retries = defaultMaxRetryNumber, exemp retryOptions.doNotRetry = exemptStatusCodes; } const requestOptions = Object.assign(Object.assign({}, defaultOptions4.request), { retries }); - debug2(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : "octokit default: [400, 401, 403, 404, 422]"})`); + debug(`GitHub client configured with: (retries: ${requestOptions.retries}, retry-exempt-status-code: ${(_a = retryOptions.doNotRetry) !== null && _a !== void 0 ? _a : "octokit default: [400, 401, 403, 404, 422]"})`); return [retryOptions, requestOptions]; } @@ -133438,12 +131709,12 @@ function requestLog(octokit) { `${requestOptions.method} ${path10} - ${response.status} with id ${requestId2} in ${Date.now() - start}ms` ); return response; - }).catch((error9) => { - const requestId2 = error9.response?.headers["x-github-request-id"] || "UNKNOWN"; + }).catch((error2) => { + const requestId2 = error2.response?.headers["x-github-request-id"] || "UNKNOWN"; octokit.log.error( - `${requestOptions.method} ${path10} - ${error9.status} with id ${requestId2} in ${Date.now() - start}ms` + `${requestOptions.method} ${path10} - ${error2.status} with id ${requestId2} in ${Date.now() - start}ms` ); - throw error9; + throw error2; }); }); } @@ -133452,27 +131723,27 @@ requestLog.VERSION = VERSION7; // node_modules/@octokit/plugin-retry/dist-bundle/index.js var import_light = __toESM(require_light(), 1); var VERSION8 = "0.0.0-development"; -function isRequestError(error9) { - return error9.request !== void 0; +function isRequestError(error2) { + return error2.request !== void 0; } -async function errorRequest(state3, octokit, error9, options) { - if (!isRequestError(error9) || !error9?.request.request) { - throw error9; +async function errorRequest(state3, octokit, error2, options) { + if (!isRequestError(error2) || !error2?.request.request) { + throw error2; } - if (error9.status >= 400 && !state3.doNotRetry.includes(error9.status)) { + if (error2.status >= 400 && !state3.doNotRetry.includes(error2.status)) { const retries = options.request.retries != null ? options.request.retries : state3.retries; const retryAfter = Math.pow((options.request.retryCount || 0) + 1, 2); - throw octokit.retry.retryRequest(error9, retries, retryAfter); + throw octokit.retry.retryRequest(error2, retries, retryAfter); } - throw error9; + throw error2; } async function wrapRequest(state3, octokit, request2, options) { const limiter = new import_light.default(); - limiter.on("failed", function(error9, info17) { - const maxRetries = ~~error9.request.request?.retries; - const after = ~~error9.request.request?.retryAfter; - options.request.retryCount = info17.retryCount + 1; - if (maxRetries > info17.retryCount) { + limiter.on("failed", function(error2, info2) { + const maxRetries = ~~error2.request.request?.retries; + const after = ~~error2.request.request?.retryAfter; + options.request.retryCount = info2.retryCount + 1; + if (maxRetries > info2.retryCount) { return after * state3.retryAfterBaseValue; } }); @@ -133486,11 +131757,11 @@ async function requestWithGraphqlErrorHandling(state3, octokit, request2, option if (response.data && response.data.errors && response.data.errors.length > 0 && /Something went wrong while executing your query/.test( response.data.errors[0].message )) { - const error9 = new RequestError(response.data.errors[0].message, 500, { + const error2 = new RequestError(response.data.errors[0].message, 500, { request: options, response }); - return errorRequest(state3, octokit, error9, options); + return errorRequest(state3, octokit, error2, options); } return response; } @@ -133506,12 +131777,12 @@ function retry(octokit, octokitOptions) { ); const retryPlugin = { retry: { - retryRequest: (error9, retries, retryAfter) => { - error9.request.request = Object.assign({}, error9.request.request, { + retryRequest: (error2, retries, retryAfter) => { + error2.request.request = Object.assign({}, error2.request.request, { retries, retryAfter }); - return error9; + return error2; } } }; @@ -133580,7 +131851,7 @@ function getArtifactPublic(artifactName, workflowRunId, repositoryOwner, reposit let artifact3 = getArtifactResp.data.artifacts[0]; if (getArtifactResp.data.artifacts.length > 1) { artifact3 = getArtifactResp.data.artifacts.sort((a, b) => b.id - a.id)[0]; - debug2(`More than one artifact found for a single name, returning newest (id: ${artifact3.id})`); + debug(`More than one artifact found for a single name, returning newest (id: ${artifact3.id})`); } return { artifact: { @@ -133612,7 +131883,7 @@ function getArtifactInternal(artifactName) { let artifact3 = res.artifacts[0]; if (res.artifacts.length > 1) { artifact3 = res.artifacts.sort((a, b) => Number(b.databaseId) - Number(a.databaseId))[0]; - debug2(`More than one artifact found for a single name, returning newest (id: ${artifact3.databaseId})`); + debug(`More than one artifact found for a single name, returning newest (id: ${artifact3.databaseId})`); } return { artifact: { @@ -133696,7 +131967,7 @@ function deleteArtifactInternal(artifactName) { let artifact3 = listRes.artifacts[0]; if (listRes.artifacts.length > 1) { artifact3 = listRes.artifacts.sort((a, b) => Number(b.databaseId) - Number(a.databaseId))[0]; - debug2(`More than one artifact found for a single name, returning newest (id: ${artifact3.databaseId})`); + debug(`More than one artifact found for a single name, returning newest (id: ${artifact3.databaseId})`); } const req = { workflowRunBackendId: artifact3.workflowRunBackendId, @@ -133704,7 +131975,7 @@ function deleteArtifactInternal(artifactName) { name: artifact3.name }; const res = yield artifactClient.DeleteArtifact(req); - info2(`Artifact '${artifactName}' (ID: ${res.artifactId}) deleted`); + info(`Artifact '${artifactName}' (ID: ${res.artifactId}) deleted`); return { id: Number(res.artifactId) }; @@ -133744,7 +132015,7 @@ var paginationCount = 100; var maxNumberOfPages = Math.ceil(maximumArtifactCount / paginationCount); function listArtifactsPublic(workflowRunId_1, repositoryOwner_1, repositoryName_1, token_1) { return __awaiter13(this, arguments, void 0, function* (workflowRunId, repositoryOwner, repositoryName, token, latest = false) { - info2(`Fetching artifact list for workflow run ${workflowRunId} in repository ${repositoryOwner}/${repositoryName}`); + info(`Fetching artifact list for workflow run ${workflowRunId} in repository ${repositoryOwner}/${repositoryName}`); let artifacts = []; const [retryOpts, requestOpts] = getRetryOptions(defaults); const opts = { @@ -133766,7 +132037,7 @@ function listArtifactsPublic(workflowRunId_1, repositoryOwner_1, repositoryName_ let numberOfPages = Math.ceil(listArtifactResponse.total_count / paginationCount); const totalArtifactCount = listArtifactResponse.total_count; if (totalArtifactCount > maximumArtifactCount) { - warning2(`Workflow run ${workflowRunId} has ${totalArtifactCount} artifacts, exceeding the limit of ${maximumArtifactCount}. Results will be incomplete as only the first ${maximumArtifactCount} artifacts will be returned`); + warning(`Workflow run ${workflowRunId} has ${totalArtifactCount} artifacts, exceeding the limit of ${maximumArtifactCount}. Results will be incomplete as only the first ${maximumArtifactCount} artifacts will be returned`); numberOfPages = maxNumberOfPages; } for (const artifact3 of listArtifactResponse.artifacts) { @@ -133780,7 +132051,7 @@ function listArtifactsPublic(workflowRunId_1, repositoryOwner_1, repositoryName_ } currentPageNumber++; for (currentPageNumber; currentPageNumber <= numberOfPages; currentPageNumber++) { - debug2(`Fetching page ${currentPageNumber} of artifact list`); + debug(`Fetching page ${currentPageNumber} of artifact list`); const { data: listArtifactResponse2 } = yield github.request("GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts", { owner: repositoryOwner, repo: repositoryName, @@ -133801,7 +132072,7 @@ function listArtifactsPublic(workflowRunId_1, repositoryOwner_1, repositoryName_ if (latest) { artifacts = filterLatest(artifacts); } - info2(`Found ${artifacts.length} artifact(s)`); + info(`Found ${artifacts.length} artifact(s)`); return { artifacts }; @@ -133829,7 +132100,7 @@ function listArtifactsInternal() { if (latest) { artifacts = filterLatest(artifacts); } - info2(`Found ${artifacts.length} artifact(s)`); + info(`Found ${artifacts.length} artifact(s)`); return { artifacts }; @@ -133895,13 +132166,13 @@ var DefaultArtifactClient = class { throw new GHESNotSupportedError(); } return uploadArtifact(name, files, rootDirectory, options); - } catch (error9) { - warning2(`Artifact upload failed with error: ${error9}. + } catch (error2) { + warning(`Artifact upload failed with error: ${error2}. Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information. If the error persists, please check whether Actions is operating normally at [https://githubstatus.com](https://www.githubstatus.com).`); - throw error9; + throw error2; } }); } @@ -133916,13 +132187,13 @@ If the error persists, please check whether Actions is operating normally at [ht return downloadArtifactPublic(artifactId, repositoryOwner, repositoryName, token, downloadOptions); } return downloadArtifactInternal(artifactId, options); - } catch (error9) { - warning2(`Download Artifact failed with error: ${error9}. + } catch (error2) { + warning(`Download Artifact failed with error: ${error2}. Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information. If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`); - throw error9; + throw error2; } }); } @@ -133937,13 +132208,13 @@ If the error persists, please check whether Actions and API requests are operati return listArtifactsPublic(workflowRunId, repositoryOwner, repositoryName, token, options === null || options === void 0 ? void 0 : options.latest); } return listArtifactsInternal(options === null || options === void 0 ? void 0 : options.latest); - } catch (error9) { - warning2(`Listing Artifacts failed with error: ${error9}. + } catch (error2) { + warning(`Listing Artifacts failed with error: ${error2}. Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information. If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`); - throw error9; + throw error2; } }); } @@ -133958,13 +132229,13 @@ If the error persists, please check whether Actions and API requests are operati return getArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token); } return getArtifactInternal(artifactName); - } catch (error9) { - warning2(`Get Artifact failed with error: ${error9}. + } catch (error2) { + warning(`Get Artifact failed with error: ${error2}. Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information. If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`); - throw error9; + throw error2; } }); } @@ -133979,13 +132250,13 @@ If the error persists, please check whether Actions and API requests are operati return deleteArtifactPublic(artifactName, workflowRunId, repositoryOwner, repositoryName, token); } return deleteArtifactInternal(artifactName); - } catch (error9) { - warning2(`Delete Artifact failed with error: ${error9}. + } catch (error2) { + warning(`Delete Artifact failed with error: ${error2}. Errors can be temporary, so please try again and optionally run the action with debug mode enabled for more information. If the error persists, please check whether Actions and API requests are operating normally at [https://githubstatus.com](https://www.githubstatus.com).`); - throw error9; + throw error2; } }); } @@ -134081,53 +132352,53 @@ var PolicyCheck = class { initStatus() { if (this._status === "UNINITIALIZED" /* UNINITIALIZED */) throw new Error(`Error on finish. Policy "${this.checkName}" is not created.`); - core3.debug(`Running policy check: ${this.checkName}`); + debug(`Running policy check: ${this.checkName}`); this._status = "RUNNING" /* RUNNING */; } /** * Cancels the policy check when the workflow fails before policy execution. * Only acts on check runs that were started but not yet finished. */ - async cancel(summary3) { + async cancel(summary2) { if (this._status === "FINISHED" /* FINISHED */ || this._status === "UNINITIALIZED" /* UNINITIALIZED */) return; this._conclusion = "cancelled" /* Cancelled */; - await this.finish(summary3); + await this.finish(summary2); } /** * Marks the policy check as successful. */ - async success(summary3, text) { + async success(summary2, text) { this._conclusion = "success" /* Success */; - return await this.finish(summary3, text); + return await this.finish(summary2, text); } /** * Marks the policy check as rejected due to policy violations. */ - async reject(summary3, text) { + async reject(summary2, text) { if (POLICIES_HALT_ON_FAILURE) this._conclusion = "action_required" /* ActionRequired */; else this._conclusion = "neutral" /* Neutral */; - await this.finish(summary3, text); + await this.finish(summary2, text); } /** * Handles technical errors during policy check execution. */ - async technicalError(summary3, text) { + async technicalError(summary2, text) { if (HALT_ON_ERROR) this._conclusion = "failure" /* Failure */; else this._conclusion = "neutral" /* Neutral */; - await this.finish(summary3, text); + await this.finish(summary2, text); } /** * Finalizes the policy check and updates GitHub status. */ - async finish(summary3, text) { - core3.debug(`Finish policy check: ${this.checkName}. (conclusion=${this._conclusion})`); + async finish(summary2, text) { + debug(`Finish policy check: ${this.checkName}. (conclusion=${this._conclusion})`); this._status = "FINISHED" /* FINISHED */; - await this.updateCheck(summary3, text); + await this.updateCheck(summary2, text); } /** * Updates the GitHub check run with results. */ - async updateCheck(summary3, text) { + async updateCheck(summary2, text) { await this.octokit.rest.checks.update({ owner: import_github5.context.repo.owner, repo: import_github5.context.repo.repo, @@ -134136,7 +132407,7 @@ var PolicyCheck = class { conclusion: this._conclusion, output: { title: this.checkName, - summary: summary3, + summary: summary2, text } }); @@ -134150,7 +132421,7 @@ var PolicyCheck = class { Download the [${this.getPolicyName()} Result](${import_github5.context.serverUrl}/${import_github5.context.repo.owner}/${import_github5.context.repo.repo}/actions/runs/${import_github5.context.runId}/artifacts/${artifactId})`; let text = details + link; if (isOverMaxCharacterLimitAPI(text)) { - core3.info(`Policy check results: ${details}`); + info(`Policy check results: ${details}`); text = `Policy check details omitted from GitHub UI due to length.See console logs for details or download the [${this.getPolicyName()} Result](${import_github5.context.serverUrl}/${import_github5.context.repo.owner}/${import_github5.context.repo.repo}/actions/runs/${import_github5.context.runId}/artifacts/${artifactId})`; } return text; @@ -134190,7 +132461,6 @@ var generateTable = (headers, rows, centeredColumns) => { var import_github8 = __toESM(require_github()); // src/utils/license.utils.ts -var core4 = __toESM(require_core()); var LicenseUtil = class { BASE_OSADL_URL = "https://spdx.org/licenses"; HTML = "html"; @@ -134232,20 +132502,20 @@ var LicenseUtil = class { init() { if (COPYLEFT_LICENSE_EXPLICIT) { const explicitCopyleftLicenses = COPYLEFT_LICENSE_EXPLICIT.split(",").map((pn) => pn.trim().toLowerCase()); - core4.debug(`Explicit licenses: ${explicitCopyleftLicenses}`); + debug(`Explicit licenses: ${explicitCopyleftLicenses}`); this.copyLeftLicenses = new Set(explicitCopyleftLicenses); return; } - core4.debug(`Explicit licenses not defined, setting default licenses...`); + debug(`Explicit licenses not defined, setting default licenses...`); this.copyLeftLicenses = this.defaultCopyleftLicenses; if (COPYLEFT_LICENSE_INCLUDE) { const includedCopyleftLicenses = COPYLEFT_LICENSE_INCLUDE.split(",").map((pn) => pn.trim()); - core4.debug(`Included copyleft licenses: ${includedCopyleftLicenses}`); + debug(`Included copyleft licenses: ${includedCopyleftLicenses}`); includedCopyleftLicenses.forEach((l) => this.copyLeftLicenses.add(l.toLowerCase())); } if (COPYLEFT_LICENSE_EXCLUDE) { const excludedCopyleftLicenses = COPYLEFT_LICENSE_EXCLUDE.split(",").map((pn) => pn.trim()); - core4.debug(`Excluded copyleft licenses: ${excludedCopyleftLicenses}`); + debug(`Excluded copyleft licenses: ${excludedCopyleftLicenses}`); excludedCopyleftLicenses.forEach((l) => this.copyLeftLicenses.delete(l.toLowerCase())); } } @@ -134263,22 +132533,21 @@ var ArgumentBuilder = class { }; // src/policies/argument_builders/licenses/base-license-argument-builder.ts -var core5 = __toESM(require_core()); var BaseLicenseArgumentBuilder = class extends ArgumentBuilder { /** * Builds copyleft license filtering arguments based on configuration. */ buildCopyleftArgs() { if (COPYLEFT_LICENSE_EXPLICIT) { - core5.info(`Explicit copyleft licenses: ${COPYLEFT_LICENSE_EXPLICIT}`); + info(`Explicit copyleft licenses: ${COPYLEFT_LICENSE_EXPLICIT}`); return ["--explicit", COPYLEFT_LICENSE_EXPLICIT]; } if (COPYLEFT_LICENSE_INCLUDE) { - core5.info(`Included copyleft licenses: ${COPYLEFT_LICENSE_INCLUDE}`); + info(`Included copyleft licenses: ${COPYLEFT_LICENSE_INCLUDE}`); return ["--include", COPYLEFT_LICENSE_INCLUDE]; } if (COPYLEFT_LICENSE_EXCLUDE) { - core5.info(`Excluded copyleft licenses: ${COPYLEFT_LICENSE_EXCLUDE}`); + info(`Excluded copyleft licenses: ${COPYLEFT_LICENSE_EXCLUDE}`); return ["--exclude", COPYLEFT_LICENSE_EXCLUDE]; } return []; @@ -134331,7 +132600,6 @@ var LicenseSummaryArgumentBuilder = class extends CopyLeftArgumentBuilder { // src/services/license.service.ts var exec = __toESM(require_exec()); -var core6 = __toESM(require_core()); async function getLicenseSummary() { const licenseSummaryBuilder = new LicenseSummaryArgumentBuilder(); const args = await licenseSummaryBuilder.build(); @@ -134341,7 +132609,7 @@ async function getLicenseSummary() { }; const { stdout, stderr, exitCode } = await exec.getExecOutput(EXECUTABLE, args, options); if (exitCode === 1) { - core6.warning(`Unable to extract licenses for job summary: ${stderr}`); + warning(`Unable to extract licenses for job summary: ${stderr}`); return { licenses: [], detectedLicenses: 0, detectedLicensesWithCopyleft: 0 }; } return JSON.parse(stdout); @@ -134349,7 +132617,6 @@ async function getLicenseSummary() { // src/services/component.service.ts var exec2 = __toESM(require_exec()); -var core7 = __toESM(require_core()); // src/policies/argument_builders/components/component-summary-argument-builder.ts var ComponentSummaryArgumentBuilder = class extends ArgumentBuilder { @@ -134381,7 +132648,7 @@ async function getComponentSummary() { }; const { stdout, stderr, exitCode } = await exec2.getExecOutput(EXECUTABLE, args, options); if (exitCode === 1) { - core7.warning(`Unable to extract components for job summary: ${stderr}`); + warning(`Unable to extract components for job summary: ${stderr}`); return { components: [], totalComponents: 0, @@ -134525,37 +132792,32 @@ async function generateJobSummary(policies, uploadResult) { licenseTable = "License table too large to display, omitted from GitHub UI due to length"; } const scanPathHeading = SCAN_PATH && SCAN_PATH !== "." ? `Scan Report Section (Scanned: \`${SCAN_PATH}\`)` : "Scan Report Section"; - const summary3 = core8.summary.addHeading(scanPathHeading, 2).addHeading("Licenses", 3).addCodeBlock(LicensesPie(licenseSummary.licenses), "mermaid").addRaw(licenseTable).addSeparator().addHeading("Policies", 3).addRaw(PoliciesTable(policies)); + const summary2 = summary.addHeading(scanPathHeading, 2).addHeading("Licenses", 3).addCodeBlock(LicensesPie(licenseSummary.licenses), "mermaid").addRaw(licenseTable).addSeparator().addHeading("Policies", 3).addRaw(PoliciesTable(policies)); if (uploadResult) { const statusChecksTable = await StatusChecksTable(uploadResult); const linksTable = LinksTable(uploadResult); if (statusChecksTable || linksTable) { - summary3.addSeparator().addHeading("Details", 3); + summary2.addSeparator().addHeading("Details", 3); if (statusChecksTable) { - summary3.addHeading("Status Checks", 4).addRaw(statusChecksTable); + summary2.addHeading("Status Checks", 4).addRaw(statusChecksTable); } if (linksTable) { - summary3.addHeading("Links", 4).addRaw(linksTable); + summary2.addHeading("Links", 4).addRaw(linksTable); } } } - await summary3.write(); + await summary2.write(); } -// src/main.ts -var core21 = __toESM(require_core()); - // src/services/scan.service.ts var exec4 = __toESM(require_exec()); var import_fs4 = __toESM(require("fs")); -var core10 = __toESM(require_core()); var path9 = __toESM(require("path")); // src/services/delta.service.ts var import_github11 = __toESM(require_github()); -var core9 = __toESM(require_core()); var exec3 = __toESM(require_exec()); -var fs8 = __toESM(require("fs")); +var fs9 = __toESM(require("fs")); var path8 = __toESM(require("path")); var artifact = new DefaultArtifactClient(); var DeltaService = class { @@ -134571,10 +132833,10 @@ var DeltaService = class { async prepareDeltaScan() { let changedFiles; if (isPullRequest()) { - core9.info("Fetching changed files from pull request..."); + info("Fetching changed files from pull request..."); changedFiles = await this.getChangedFilesFromPR(); } else if (import_github11.context.eventName === "push") { - core9.info("Fetching changed files from push commit..."); + info("Fetching changed files from push commit..."); changedFiles = await this.getChangedFilesFromPush(); } else { throw new Error( @@ -134582,17 +132844,17 @@ var DeltaService = class { ); } if (changedFiles.length === 0) { - core9.warning("No files changed, falling back to full scan"); + warning("No files changed, falling back to full scan"); return null; } - core9.info(`Found ${changedFiles.length} changed files`); + info(`Found ${changedFiles.length} changed files`); const tempFile = await this.createTempFileList(changedFiles); try { const deltaDir = await this.runDeltaCopy(tempFile); return { deltaDir, tempFile }; - } catch (error9) { + } catch (error2) { await this.cleanup(tempFile); - throw error9; + throw error2; } } /** @@ -134613,9 +132875,9 @@ var DeltaService = class { pull_number: pullNumber }); return files.filter((f) => ["added", "modified", "renamed"].includes(f.status)).map((file) => file.filename); - } catch (error9) { - const message = error9 instanceof Error ? error9.message : "Unknown error"; - core9.error(`Failed to fetch PR files: ${message}`); + } catch (error2) { + const message = error2 instanceof Error ? error2.message : "Unknown error"; + error(`Failed to fetch PR files: ${message}`); throw new Error(`Failed to fetch changed files from GitHub API: ${message}`); } } @@ -134648,14 +132910,14 @@ var DeltaService = class { files = commit.data.files?.filter((f) => ["added", "modified", "renamed"].includes(f.status || "")).map((f) => f.filename) || []; } if (files.length >= 3e3) { - core9.warning( + warning( `Commit contains ${files.length} files. GitHub API may truncate file lists for commits with 3000+ files. Delta scan may be incomplete. Consider using full scan mode for very large commits.` ); } return files; - } catch (error9) { - const message = error9 instanceof Error ? error9.message : "Unknown error"; - core9.error(`Failed to fetch commit files: ${message}`); + } catch (error2) { + const message = error2 instanceof Error ? error2.message : "Unknown error"; + error(`Failed to fetch commit files: ${message}`); throw new Error(`Failed to fetch changed files from GitHub API: ${message}`); } } @@ -134668,13 +132930,13 @@ var DeltaService = class { const tempFile = path8.join(REPO_DIR, `delta-files-${Date.now()}.txt`); try { const content = filePaths.join("\n"); - await fs8.promises.writeFile(tempFile, content, "utf-8"); - core9.debug(`Created temporary file list at: ${tempFile}`); + await fs9.promises.writeFile(tempFile, content, "utf-8"); + debug(`Created temporary file list at: ${tempFile}`); await this.uploadDeltaResults(tempFile); return tempFile; - } catch (error9) { - const message = error9 instanceof Error ? error9.message : "Unknown error"; - core9.error(`Failed to create temporary file: ${message}`); + } catch (error2) { + const message = error2 instanceof Error ? error2.message : "Unknown error"; + error(`Failed to create temporary file: ${message}`); throw new Error(`Failed to create temporary file list: ${message}`); } } @@ -134685,7 +132947,7 @@ var DeltaService = class { * @throws {Error} When docker command fails or delta directory cannot be extracted */ async runDeltaCopy(inputFile) { - core9.info("Running scanoss-py delta copy command..."); + info("Running scanoss-py delta copy command..."); const relativeTempFile = path8.relative(REPO_DIR, inputFile); const args = [ "run", @@ -134705,16 +132967,16 @@ var DeltaService = class { const stdout = result.stdout; const stderr = result.stderr; if (result.exitCode !== 0) { - core9.error(`Delta copy command failed with exit code ${result.exitCode}`); - core9.error(`Stderr: ${stderr}`); + error(`Delta copy command failed with exit code ${result.exitCode}`); + error(`Stderr: ${stderr}`); throw new Error(`Delta copy command failed: ${stderr}`); } - core9.debug(`Delta copy stdout: ${stdout}`); + debug(`Delta copy stdout: ${stdout}`); const deltaDir = this.extractDeltaDir(stdout); if (!deltaDir) { throw new Error("Failed to extract delta directory from command output"); } - core9.info(`Delta directory created: ${deltaDir}`); + info(`Delta directory created: ${deltaDir}`); return deltaDir; } /** @@ -134730,12 +132992,12 @@ var DeltaService = class { return null; } if (trimmed.includes("..") || trimmed.includes("/") || trimmed.includes("\\")) { - core9.error(`Invalid delta directory name: ${trimmed}`); + error(`Invalid delta directory name: ${trimmed}`); throw new Error("Delta directory name contains invalid path components"); } const safeDirPattern = /^[a-zA-Z0-9._-]+$/; if (!safeDirPattern.test(trimmed)) { - core9.error(`Invalid delta directory name: ${trimmed}`); + error(`Invalid delta directory name: ${trimmed}`); throw new Error("Delta directory name contains invalid characters"); } return trimmed; @@ -134758,12 +133020,12 @@ var DeltaService = class { */ async cleanup(tempFile) { try { - await fs8.promises.unlink(tempFile); - core9.debug(`Cleaned up temporary file: ${tempFile}`); - core9.debug(`Delta directory is preserved and will be cleaned up by CI environment`); - } catch (error9) { - const message = error9 instanceof Error ? error9.message : "Unknown error"; - core9.warning(`Failed to cleanup temporary file ${tempFile}: ${message}`); + await fs9.promises.unlink(tempFile); + debug(`Cleaned up temporary file: ${tempFile}`); + debug(`Delta directory is preserved and will be cleaned up by CI environment`); + } catch (error2) { + const message = error2 instanceof Error ? error2.message : "Unknown error"; + warning(`Failed to cleanup temporary file ${tempFile}: ${message}`); } } }; @@ -134819,21 +133081,21 @@ var ScanService = class { this.checkBasicConfig(); const scanMode = SCAN_MODE || "full"; if (scanMode === "delta") { - core10.info("Delta scan mode enabled, preparing delta directory..."); + info("Delta scan mode enabled, preparing delta directory..."); try { this.deltaResult = await deltaService.prepareDeltaScan(); if (!this.deltaResult) { - core10.info("No changed files detected, performing full scan instead"); + info("No changed files detected, performing full scan instead"); } - } catch (error9) { - const message = error9 instanceof Error ? error9.message : "Unknown error"; - core10.error(`Failed to prepare delta scan: ${message}`); - throw error9; + } catch (error2) { + const message = error2 instanceof Error ? error2.message : "Unknown error"; + error(`Failed to prepare delta scan: ${message}`); + throw error2; } } else if (scanMode === "full") { - core10.info("Full scan mode enabled."); + info("Full scan mode enabled."); } else { - core10.warning(`Unknown scan mode selected: ${scanMode}. Switching to full scan mode.`); + warning(`Unknown scan mode selected: ${scanMode}. Switching to full scan mode.`); } const options = { failOnStdErr: false, @@ -134843,9 +133105,9 @@ var ScanService = class { const args = await this.buildArgs(); const { stdout, stderr, exitCode } = await exec4.getExecOutput(EXECUTABLE, args, options); if (exitCode !== 0) { - core10.error(`Scan execution completed with exit code ${exitCode}`); + error(`Scan execution completed with exit code ${exitCode}`); if (stderr) { - core10.error(`Scan stderr: ${stderr}`); + error(`Scan stderr: ${stderr}`); } throw new Error(`Scan execution failed with stderr: ${stderr}`); } @@ -134877,7 +133139,7 @@ var ScanService = class { (scope) => scope !== "" && scope !== void 0 ); if (setScopes.length > 1) { - core10.error("Only one dependency scope filter can be set"); + error("Only one dependency scope filter can be set"); } if (dependencyScopeExclude && dependencyScopeExclude !== "") return ["--dep-scope-exc", dependencyScopeExclude]; if (dependencyScopeInclude && dependencyScopeInclude !== "") return ["--dep-scope-inc", dependencyScopeInclude]; @@ -134933,7 +133195,7 @@ var ScanService = class { */ async buildArgs() { const scanPath = this.deltaResult ? `./${this.deltaResult.deltaDir}` : SCAN_PATH; - core10.debug(`Building scan args with scan path: ${scanPath}`); + debug(`Building scan args with scan path: ${scanPath}`); return [ "run", "-v", @@ -134964,9 +133226,9 @@ var ScanService = class { */ checkBasicConfig() { if (!this.options.scanFiles && !this.options.dependenciesEnabled) { - core10.error(`At least one scan option should be enabled: [scanFiles, dependencyEnabled]`); + error(`At least one scan option should be enabled: [scanFiles, dependencyEnabled]`); } - core10.info("Basic scan config is valid"); + info("Basic scan config is valid"); } /** * Constructs the command segment for SBOM ingestion based on the current configuration. This method checks if SBOM @@ -134985,17 +133247,17 @@ var ScanService = class { const hostPath = this.options.settingsFilePath; const { fullPath: abs, githubPath: rel } = resolveSettingsPath(hostPath, SCAN_PATH, this.options.inputFilepath); if (rel.startsWith("..")) { - core10.error("Settings file must reside under the scan input path"); + error("Settings file must reside under the scan input path"); throw new Error("Settings file must reside under the scan input path"); } try { await import_fs4.default.promises.access(abs, import_fs4.default.constants.F_OK); const containerPath = `/scanoss/${rel.replace(/\\/g, "/")}`; return ["--settings", containerPath]; - } catch (error9) { + } catch (error2) { if (this.options.settingsFilePath === this.DEFAULT_SETTING_FILE_PATH) return []; - core10.debug(`>${error9.message}<`); - core10.warning(`SCANOSS settings file not found at '${this.options.settingsFilePath}'. + debug(`>${error2.message}<`); + warning(`SCANOSS settings file not found at '${this.options.settingsFilePath}'. Please provide a valid SCANOSS settings file path.`); return []; } @@ -135012,9 +133274,6 @@ var ScanService = class { }; var scanService = new ScanService(); -// src/policies/copyleft-policy-check.ts -var core11 = __toESM(require_core()); - // src/app.config.ts var CHECK_NAME = "Policy Check"; var STATUS_NAME = "Status Check"; @@ -135035,7 +133294,7 @@ var CopyleftPolicyCheck = class _CopyleftPolicyCheck extends PolicyCheck { * Executes the copyleft policy check. */ async run() { - core11.info(`Running Copyleft Policy Check...`); + info(`Running Copyleft Policy Check...`); super.initStatus(); const args = await this.argumentBuilder.build(); const options = { @@ -135043,7 +133302,7 @@ var CopyleftPolicyCheck = class _CopyleftPolicyCheck extends PolicyCheck { ignoreReturnCode: true }; const { stdout, stderr, exitCode } = await exec5.getExecOutput(EXECUTABLE, args, options); - let summary3 = stdout; + let summary2 = stdout; let details = stderr; if (exitCode === 0) { await this.success( @@ -135053,8 +133312,8 @@ var CopyleftPolicyCheck = class _CopyleftPolicyCheck extends PolicyCheck { ); return; } else if (exitCode === 1) { - core11.warning("Copyleft policy check encountered an error"); - core11.debug(`Copyleft policy check stderr: ${stderr}`); + warning("Copyleft policy check encountered an error"); + debug(`Copyleft policy check stderr: ${stderr}`); const errorSummary = `### :warning: Policy Check Error${getScanPathSuffix(SCAN_PATH)} #### Unable to complete copyleft license check`; const errorDetails = "Error details: Check debug logs for more information"; @@ -135062,14 +133321,14 @@ var CopyleftPolicyCheck = class _CopyleftPolicyCheck extends PolicyCheck { return; } const { id } = await this.uploadArtifact(stdout); - core11.debug(`Copyleft Artifact ID: ${id}`); + debug(`Copyleft Artifact ID: ${id}`); if (id) { details = await this.concatPolicyArtifactURLToPolicyCheck(stderr, id); } - if (isOverMaxCharacterLimitAPI(summary3)) { - summary3 = ""; + if (isOverMaxCharacterLimitAPI(summary2)) { + summary2 = ""; } - return this.reject(summary3, details); + return this.reject(summary2, details); } /** * Returns the artifact filename for copyleft policy results. @@ -135086,7 +133345,6 @@ var CopyleftPolicyCheck = class _CopyleftPolicyCheck extends PolicyCheck { }; // src/policies/undeclared-policy-check.ts -var core12 = __toESM(require_core()); var exec6 = __toESM(require_exec()); // src/policies/argument_builders/components/undeclared-argument-builder.ts @@ -135113,7 +133371,7 @@ var UndeclaredArgumentBuilder = class extends ArgumentBuilder { // src/policies/undeclared-policy-check.ts var import_github15 = __toESM(require_github()); -var fs10 = __toESM(require("fs")); +var fs11 = __toESM(require("fs")); var UndeclaredPolicyCheck = class _UndeclaredPolicyCheck extends PolicyCheck { static policyName = "Undeclared"; argumentBuilder; @@ -135125,19 +133383,19 @@ var UndeclaredPolicyCheck = class _UndeclaredPolicyCheck extends PolicyCheck { * Executes the undeclared components policy check. */ async run() { - core12.info(`Running Undeclared Components Policy Check...`); + info(`Running Undeclared Components Policy Check...`); super.initStatus(); const args = await this.argumentBuilder.build(); - core12.debug(`Args: ${args}`); + debug(`Args: ${args}`); const options = { failOnStdErr: false, ignoreReturnCode: true }; const { stdout, stderr, exitCode } = await exec6.getExecOutput(EXECUTABLE, args, options); - let summary3 = stdout; + let summary2 = stdout; let details = stderr; if (!SCANOSS_SETTINGS) { - core12.warning("Undeclared policy is being used with SCANOSS settings disabled"); + warning("Undeclared policy is being used with SCANOSS settings disabled"); } if (exitCode === 0) { await this.success( @@ -135148,8 +133406,8 @@ var UndeclaredPolicyCheck = class _UndeclaredPolicyCheck extends PolicyCheck { return; } if (exitCode === 1) { - core12.warning("Undeclared policy check encountered an error"); - core12.debug(`Undeclared policy check stderr: ${stderr}`); + warning("Undeclared policy check encountered an error"); + debug(`Undeclared policy check stderr: ${stderr}`); const errorSummary = `### :warning: Policy Check Error${getScanPathSuffix(SCAN_PATH)} #### Unable to complete undeclared component check`; const errorDetails = "Error details: Check debug logs for more information"; @@ -135182,7 +133440,7 @@ ${stderr}`; SCAN_PATH, REPO_DIR ); - if (fs10.existsSync(fullSettingsPath)) { + if (fs11.existsSync(fullSettingsPath)) { const { owner, repo } = resolveRepoAndSha(); const encodedPath = githubSettingsPath.split("/").map(encodeURIComponent).join("/"); const settingsFileUrl = `https://github.com/${owner}/${repo}/edit/${branchName}/${encodedPath}`; @@ -135211,17 +133469,17 @@ ${mergedJson} `; details += `[Create ${githubSettingsPath} file](${createFileUrl})`; } else { - core12.warning("Could not extract JSON content for file creation link, but continuing with policy failure"); + warning("Could not extract JSON content for file creation link, but continuing with policy failure"); details += `${githubSettingsPath} doesn't exist. Create it in your repository with the JSON snippet provided above to resolve policy violations.`; } } const { id } = await this.uploadArtifact(details); - core12.debug(`Undeclared Artifact ID: ${id}`); + debug(`Undeclared Artifact ID: ${id}`); if (id) details = await this.concatPolicyArtifactURLToPolicyCheck(details, id); - if (isOverMaxCharacterLimitAPI(summary3)) { - summary3 = ""; + if (isOverMaxCharacterLimitAPI(summary2)) { + summary2 = ""; } - return this.reject(summary3, details); + return this.reject(summary2, details); } /** * Returns the filename for undeclared policy check artifact results. @@ -135249,15 +133507,15 @@ function extractJsonFromPolicyDetails(details) { } } if (jsonStart === -1 || jsonEnd === -1) { - core12.warning("Could not find JSON code block in policy details"); + warning("Could not find JSON code block in policy details"); return null; } const jsonContent = lines.slice(jsonStart, jsonEnd).join("\n"); try { JSON.parse(jsonContent); return jsonContent; - } catch (error9) { - core12.warning(`Extracted content is not valid JSON: ${error9}`); + } catch (error2) { + warning(`Extracted content is not valid JSON: ${error2}`); return null; } } @@ -135265,16 +133523,16 @@ function mergeWithExistingScanossJson(policyDetails, settingsFilePath) { try { const jsonContent = extractJsonFromPolicyDetails(policyDetails); if (!jsonContent) { - core12.warning("Could not extract new components from policy details"); + warning("Could not extract new components from policy details"); return null; } const newStructure = JSON.parse(jsonContent); const newComponents = newStructure.bom?.include || []; if (newComponents.length === 0) { - core12.warning("No new components found to add"); + warning("No new components found to add"); return null; } - const existingContent = fs10.readFileSync(settingsFilePath, "utf8"); + const existingContent = fs11.readFileSync(settingsFilePath, "utf8"); const existingConfig = JSON.parse(existingContent); if (!existingConfig.bom) { existingConfig.bom = {}; @@ -135283,20 +133541,19 @@ function mergeWithExistingScanossJson(policyDetails, settingsFilePath) { existingConfig.bom.include = []; } if (!Array.isArray(existingConfig.bom.include)) { - core12.warning("Existing bom.include is not an array, creating new array"); + warning("Existing bom.include is not an array, creating new array"); existingConfig.bom.include = []; } existingConfig.bom.include.push(...newComponents); - core12.info(`Added ${newComponents.length} new components to existing settings file structure`); + info(`Added ${newComponents.length} new components to existing settings file structure`); return JSON.stringify(existingConfig, null, 2); - } catch (error9) { - core12.warning(`Failed to merge with existing settings file: ${error9}`); + } catch (error2) { + warning(`Failed to merge with existing settings file: ${error2}`); return null; } } // src/policies/dep-track-policy-check.ts -var core13 = __toESM(require_core()); var exec7 = __toESM(require_exec()); // src/policies/argument_builders/dependency_track/dep-track-argument-builder.ts @@ -135442,8 +133699,8 @@ Solutions: Create project in Dependency Track first` if (!["http:", "https:"].includes(url2.protocol)) { invalidParams.push("deptrack.url (must use http:// or https://)"); } - } catch (error9) { - invalidParams.push(`deptrack.url (invalid URL format): ${error9.message}`); + } catch (error2) { + invalidParams.push(`deptrack.url (invalid URL format): ${error2.message}`); } } if (!DEPENDENCY_TRACK_API_KEY) { @@ -135481,9 +133738,9 @@ Please check your parameter values and try again.` */ async run() { try { - if (DEPENDENCY_TRACK_API_KEY) core13.setSecret(DEPENDENCY_TRACK_API_KEY); - if (DEPENDENCY_TRACK_UPLOAD_TOKEN) core13.setSecret(DEPENDENCY_TRACK_UPLOAD_TOKEN); - core13.info(`Checking Dependency Track for Project Violations...`); + if (DEPENDENCY_TRACK_API_KEY) setSecret(DEPENDENCY_TRACK_API_KEY); + if (DEPENDENCY_TRACK_UPLOAD_TOKEN) setSecret(DEPENDENCY_TRACK_UPLOAD_TOKEN); + info(`Checking Dependency Track for Project Violations...`); super.initStatus(); this.validatePolicyConfiguration(); const args = await this.argumentBuilder.build(); @@ -135495,15 +133752,15 @@ Please check your parameter values and try again.` }; const { stdout, stderr, exitCode } = await exec7.getExecOutput(EXECUTABLE, args, options); if (stderr && !this.isInformationalMessage(stderr)) { - core13.error(stderr); + error(stderr); } - let summary3 = stdout; + let summary2 = stdout; let details = stderr; if (exitCode === 0) { let successMessage = `### :white_check_mark: Policy Pass${getScanPathSuffix(SCAN_PATH)} #### No policy violations were found`; if (!this.uploadAttempted) { - core13.warning( + warning( "No policy violations found, but SBOM upload to Dependency Track was not attempted - may have missed new issues" ); successMessage += "\n\n:warning: **Warning**: SBOM upload to Dependency Track was not attempted. Results may not reflect latest changes."; @@ -135520,14 +133777,14 @@ Please check your parameter values and try again.` errorMessage = message; errorDetails = details2; } - core13.warning(`Dependency Track policy check encountered an error: ${errorMessage}`); + warning(`Dependency Track policy check encountered an error: ${errorMessage}`); const errorSummary = `### :warning: Policy Check Error${getScanPathSuffix(SCAN_PATH)} #### ${errorMessage}`; await this.technicalError(errorSummary, errorDetails); return; } if (!this.uploadAttempted) { - core13.warning( + warning( "Policy violations found, but SBOM upload to Dependency Track was not attempted - results may be outdated" ); const uploadWarning = "\n\n:warning: **Warning**: SBOM upload to Dependency Track was not attempted. These policy violations may be based on outdated data."; @@ -135541,16 +133798,16 @@ View project in Dependency Track [here](${DEPENDENCY_TRACK_URL}/projects/${DEPEN details = details + projectLink; } const { id } = await this.uploadArtifact(stdout); - core13.debug(`Dependency Track Artifact ID: ${id}`); + debug(`Dependency Track Artifact ID: ${id}`); if (id) { details = await this.concatPolicyArtifactURLToPolicyCheck(details || stderr, id); } - if (isOverMaxCharacterLimitAPI(summary3)) { - summary3 = ""; + if (isOverMaxCharacterLimitAPI(summary2)) { + summary2 = ""; } - return this.reject(summary3, details); + return this.reject(summary2, details); } catch (validationError) { - core13.warning(`Dependency Track policy check configuration error: ${validationError.message}`); + warning(`Dependency Track policy check configuration error: ${validationError.message}`); const errorSummary = "### :warning: Configuration Error \n #### Dependency Track policy check misconfigured"; await this.technicalError(errorSummary, validationError.message); } @@ -135584,7 +133841,6 @@ View project in Dependency Track [here](${DEPENDENCY_TRACK_URL}/projects/${DEPEN }; // src/policies/policy.manager.ts -var core14 = __toESM(require_core()); var PolicyManager = class { policyRegistry; constructor(policyRegistry) { @@ -135601,19 +133857,19 @@ var PolicyManager = class { * Gets instances of the specified policy checks. */ getPolicies() { - core14.debug(`Policy Registry: ${this.policyRegistry}`); + debug(`Policy Registry: ${this.policyRegistry}`); if (!POLICIES || !POLICIES.trim()) { - core14.info(`No policies specified`); + info(`No policies specified`); return []; } const pNames = POLICIES.split(",").map((pn) => pn.trim()); if (pNames.length === 0) { - core14.info(`No policies specified`); + info(`No policies specified`); return []; } - core14.info(`Policies: ${pNames}`); + info(`Policies: ${pNames}`); pNames.forEach((pName) => { - core14.info(`Policy: ${pName}`); + info(`Policy: ${pName}`); if (pName.length > 0) { if (!this.policyRegistry[pName]) throw new Error(`Policy ${pName} does not exist`); } @@ -135624,7 +133880,6 @@ var PolicyManager = class { var policyManager = new PolicyManager(); // src/services/dependency-track.service.ts -var core15 = __toESM(require_core()); var exec8 = __toESM(require_exec()); var import_fs5 = __toESM(require("fs")); var DependencyTrackService = class { @@ -135665,7 +133920,7 @@ var DependencyTrackService = class { invalidParams.push("deptrack.apikey (appears to be too short)"); } if (missingParams.length > 0) { - core15.warning( + warning( `Dependency Track upload skipped: Required parameters are missing. Missing: ${missingParams.join(", ")} Please set these parameters in your workflow configuration.` @@ -135673,7 +133928,7 @@ Please set these parameters in your workflow configuration.` return false; } if (invalidParams.length > 0) { - core15.warning( + warning( `Dependency Track upload skipped: Invalid parameter values. Invalid: ${invalidParams.join(", ")} Please check your parameter values and try again.` @@ -135685,7 +133940,7 @@ Please check your parameter values and try again.` if (!this.options.projectName) missingProjectParams.push("deptrack.projectname"); if (!this.options.projectVersion) missingProjectParams.push("deptrack.projectversion"); if (missingProjectParams.length > 0) { - core15.warning( + warning( `Dependency Track upload skipped: Project identification is incomplete. You must provide EITHER: \u2022 deptrack.projectid (for existing projects), OR @@ -135706,7 +133961,7 @@ Missing: ${missingProjectParams.join(", ")}` const startTime = Date.now(); try { if (!this.options.enabled) { - core15.debug("Dependency Track upload is disabled"); + debug("Dependency Track upload is disabled"); return { success: false, enabled: false @@ -135728,13 +133983,13 @@ Missing: ${missingProjectParams.join(", ")}` const cycloneDxData = JSON.parse(cycloneDxContent); componentsCount = cycloneDxData.components?.length || 0; } catch (fileError) { - core15.warning(`Could not read SBOM file details: ${fileError}`); + warning(`Could not read SBOM file details: ${fileError}`); } - core15.info("Starting Dependency Track upload process..."); + info("Starting Dependency Track upload process..."); const uploadError = await this.uploadCycloneDXToDependencyTrack(); const uploadTime = (Date.now() - startTime) / 1e3; if (uploadError) { - core15.error(uploadError.message); + error(uploadError.message); return { success: false, enabled: true, @@ -135759,7 +134014,7 @@ Missing: ${missingProjectParams.join(", ")}` }; } catch (e) { const uploadTime = (Date.now() - startTime) / 1e3; - core15.error(e.message); + error(e.message); return { success: false, enabled: true, @@ -135890,13 +134145,13 @@ Troubleshooting: } return new Error(errorMessage); } - core15.info("CycloneDX successfully uploaded to Dependency Track"); + info("CycloneDX successfully uploaded to Dependency Track"); if (stderr) { - core15.debug(`Dependency Track upload stderr: ${stderr}`); + debug(`Dependency Track upload stderr: ${stderr}`); const trimmedStderr = stderr.trim(); const isHarmlessInfo = trimmedStderr.startsWith("Reading SBOM file:") || trimmedStderr.includes("Reading SBOM file:") || trimmedStderr.match(/^Reading .+ file:/); if (!isHarmlessInfo) { - core15.warning("Dependency Track upload completed with warnings. Check debug logs for details."); + warning("Dependency Track upload completed with warnings. Check debug logs for details."); } } const response = JSON.parse(stdout); @@ -135907,7 +134162,6 @@ Troubleshooting: var dependencyTrackService = new DependencyTrackService(); // src/services/dependency-track-status.service.ts -var core16 = __toESM(require_core()); var import_github18 = __toESM(require_github()); var DependencyTrackStatusService = class { checkName = formatCheckName(`${STATUS_NAME}: Dependency Track Upload`, SCAN_PATH); @@ -135924,17 +134178,17 @@ var DependencyTrackStatusService = class { const sha = await getSHA(); let conclusion; let title; - let summary3; + let summary2; let text; if (result.success) { conclusion = "success"; title = "SBOM successfully uploaded to Dependency Track"; - summary3 = "### \u2705 Dependency Track Upload\n#### SBOM successfully uploaded to Dependency Track"; + summary2 = "### \u2705 Dependency Track Upload\n#### SBOM successfully uploaded to Dependency Track"; text = this.createSuccessDetails(result); } else { conclusion = "failure"; title = "Failed to upload SBOM to Dependency Track"; - summary3 = "### \u274C Dependency Track Upload\n#### Failed to upload SBOM to Dependency Track"; + summary2 = "### \u274C Dependency Track Upload\n#### Failed to upload SBOM to Dependency Track"; text = this.createFailureDetails(result); } const response = await octokit.rest.checks.create({ @@ -135946,14 +134200,14 @@ var DependencyTrackStatusService = class { conclusion, output: { title, - summary: summary3, + summary: summary2, text } }); - core16.debug(`Dependency Track upload status check created: ${conclusion}, ID: ${response.data.id}`); + debug(`Dependency Track upload status check created: ${conclusion}, ID: ${response.data.id}`); result.checkRunId = response.data.id; - } catch (error9) { - core16.warning(`Failed to create Dependency Track upload status check: ${error9}`); + } catch (error2) { + warning(`Failed to create Dependency Track upload status check: ${error2}`); } } /** @@ -136000,7 +134254,6 @@ var dependencyTrackStatusService = new DependencyTrackStatusService(); // src/services/scanoss.service.ts var exec9 = __toESM(require_exec()); -var core17 = __toESM(require_core()); var ScanOssService = class { /** * Build scanoss-py conversion parameters */ @@ -136026,7 +134279,7 @@ var ScanOssService = class { */ async reformatScanResults(format) { try { - core17.info(`Converting SCANOSS results to ${format} format...`); + info(`Converting SCANOSS results to ${format} format...`); const options = { failOnStdErr: false, ignoreReturnCode: false @@ -136044,29 +134297,25 @@ var ScanOssService = class { return new Error(`Error converting scan results into ${format} format`); } try { - const fs13 = await import("fs"); - await fs13.promises.access(filename, fs13.constants.F_OK); + const fs14 = await import("fs"); + await fs14.promises.access(filename, fs14.constants.F_OK); await uploadToArtifacts(filename); - core17.info(`Successfully converted results into ${format} format`); + info(`Successfully converted results into ${format} format`); } catch (fileError) { - core17.debug(fileError.message); - core17.info(`${format} conversion completed but no file generated (likely empty repository)`); + debug(fileError.message); + info(`${format} conversion completed but no file generated (likely empty repository)`); } } catch (e) { - core17.error(e.message); + error(e.message); } } }; var scanossService = new ScanOssService(); // src/utils/snippet-annotations.utils.ts -var core20 = __toESM(require_core()); -var fs12 = __toESM(require("fs")); +var fs13 = __toESM(require("fs")); var import_github24 = __toESM(require_github()); -// src/utils/annotation-creators.ts -var core18 = __toESM(require_core()); - // src/utils/line-parsers.ts function sanitizeLineRange(str) { return str.replace(/[^0-9,-]/g, ""); @@ -136149,10 +134398,10 @@ function createSnippetSummaryAnnotation(snippetMatches) { message += `- ... and ${Object.keys(fileGroups).length - 10} more files `; } - core18.notice(message, { + notice(message, { title: "Code Snippet Matches Summary" }); - core18.info(`Created snippet summary annotation for ${snippetMatches.length} matches`); + info(`Created snippet summary annotation for ${snippetMatches.length} matches`); } function createFileMatchSummaryAnnotation(fileMatches) { const { owner, repo, sha } = resolveRepoAndSha(); @@ -136176,14 +134425,13 @@ function createFileMatchSummaryAnnotation(fileMatches) { message += `- ... and ${fileMatches.length - 10} more files `; } - core18.notice(message, { + notice(message, { title: "Full File Matches Summary" }); - core18.info(`Created file match summary annotation for ${fileMatches.length} matches`); + info(`Created file match summary annotation for ${fileMatches.length} matches`); } // src/utils/github-comment-api.ts -var core19 = __toESM(require_core()); var import_github22 = __toESM(require_github()); // src/utils/api-cache.ts @@ -136337,7 +134585,7 @@ function formatFileAnnotationMessage(filePath, fileMatch) { async function createSnippetCommitComment(filePath, snippetMatch) { const localLines = parseLineRange(snippetMatch.lines); if (!localLines) { - core19.warning(`Could not parse line range: ${snippetMatch.lines} for file: ${filePath}`); + warning(`Could not parse line range: ${snippetMatch.lines} for file: ${filePath}`); return false; } const message = formatSnippetAnnotationMessage(filePath, snippetMatch, localLines); @@ -136355,21 +134603,21 @@ ${message}`; line: localLines.start, body: commentBody }; - core19.info(`Creating commit comment for snippet match at ${filePath}`); + info(`Creating commit comment for snippet match at ${filePath}`); const deduplicationKey = `snippet-comment:${sha}:${filePath}:${snippetMatch.component}`; await requestDeduplicator.deduplicate(deduplicationKey, async () => { return await octokit.rest.repos.createCommitComment(params); }); - core19.info(`Successfully created commit comment for snippet match at ${filePath}`); + info(`Successfully created commit comment for snippet match at ${filePath}`); return true; - } catch (error9) { - core19.error(`Failed to create commit comment for ${filePath}`); - if (error9 instanceof Error) { - core19.error(`Error: ${error9.message}`); - const status = error9?.status; - const url2 = error9?.request?.url; - if (status || url2) core19.error(`Context: status=${status ?? "n/a"} url=${url2 ?? "n/a"}`); - core19.debug(`Error details: ${JSON.stringify(error9, null, 2)}`); + } catch (error2) { + error(`Failed to create commit comment for ${filePath}`); + if (error2 instanceof Error) { + error(`Error: ${error2.message}`); + const status = error2?.status; + const url2 = error2?.request?.url; + if (status || url2) error(`Context: status=${status ?? "n/a"} url=${url2 ?? "n/a"}`); + debug(`Error details: ${JSON.stringify(error2, null, 2)}`); } return false; } @@ -136389,28 +134637,28 @@ ${message}`; path: filePath, body: commentBody }; - core19.info(`Creating file commit comment for ${filePath}`); + info(`Creating file commit comment for ${filePath}`); const deduplicationKey = `file-comment:${sha}:${filePath}:${fileMatch.component}${fileMatch.version ? `:v${fileMatch.version}` : ""}`; await requestDeduplicator.deduplicate(deduplicationKey, async () => { return await octokit.rest.repos.createCommitComment(params); }); - core19.info(`Successfully created commit comment for file match at ${filePath}`); + info(`Successfully created commit comment for file match at ${filePath}`); return true; - } catch (error9) { - core19.error(`Failed to create commit comment for ${filePath}`); - if (error9 instanceof Error) { - core19.error(`Error: ${error9.message}`); - const status = error9?.status; - const url2 = error9?.request?.url; - if (status || url2) core19.error(`Context: status=${status ?? "n/a"} url=${url2 ?? "n/a"}`); - core19.debug(`Error details: ${JSON.stringify(error9, null, 2)}`); + } catch (error2) { + error(`Failed to create commit comment for ${filePath}`); + if (error2 instanceof Error) { + error(`Error: ${error2.message}`); + const status = error2?.status; + const url2 = error2?.request?.url; + if (status || url2) error(`Context: status=${status ?? "n/a"} url=${url2 ?? "n/a"}`); + debug(`Error details: ${JSON.stringify(error2, null, 2)}`); } return false; } } async function createMainConversationComment(snippetMatches, fileMatches) { if (!isPullRequest()) { - core19.info("Skipping main conversation comment - not in PR context"); + info("Skipping main conversation comment - not in PR context"); return; } const { owner, repo, sha } = resolveRepoAndSha(); @@ -136452,20 +134700,20 @@ async function createMainConversationComment(snippetMatches, fileMatches) { repo, body: message }); - core19.info(`Successfully created main conversation comment (PR #${import_github22.context.issue.number})`); - } catch (error9) { - core19.error(`Failed to create main conversation comment: ${error9}`); + info(`Successfully created main conversation comment (PR #${import_github22.context.issue.number})`); + } catch (error2) { + error(`Failed to create main conversation comment: ${error2}`); } } // src/utils/snippet-annotations.utils.ts async function createSnippetAnnotations(resultsPath) { - if (!fs12.existsSync(resultsPath)) { - core20.warning(`Results file not found: ${resultsPath}`); + if (!fs13.existsSync(resultsPath)) { + warning(`Results file not found: ${resultsPath}`); return; } try { - const resultsContent = fs12.readFileSync(resultsPath, "utf8"); + const resultsContent = fs13.readFileSync(resultsPath, "utf8"); const results = JSON.parse(resultsContent); const snippetMatches = []; const fileMatches = []; @@ -136488,7 +134736,7 @@ async function createSnippetAnnotations(resultsPath) { if (fileMatches.length > 0) { createFileMatchSummaryAnnotation(fileMatches); } - core20.info(`GitHub context: owner=${import_github24.context.repo.owner}, repo=${import_github24.context.repo.repo}, sha=${import_github24.context.sha}`); + info(`GitHub context: owner=${import_github24.context.repo.owner}, repo=${import_github24.context.repo.repo}, sha=${import_github24.context.sha}`); const snippetPromises = snippetMatches.map( async ({ filePath, match }) => createSnippetCommitComment(filePath, match) ); @@ -136497,16 +134745,16 @@ async function createSnippetAnnotations(resultsPath) { const successCount = commentResults.filter(Boolean).length; const failedCount = commentResults.length - successCount; if (failedCount > 0) { - core20.warning(`${failedCount} commit comments failed to create, ${successCount} succeeded`); + warning(`${failedCount} commit comments failed to create, ${successCount} succeeded`); } if (snippetMatches.length > 0 || fileMatches.length > 0) { await createMainConversationComment(snippetMatches, fileMatches); } - core20.info( + info( `Created summary annotations, attempted ${snippetMatches.length + fileMatches.length} commit comments, and main conversation comment` ); - } catch (error9) { - core20.error(`Failed to create snippet annotations from ${resultsPath}: ${error9}`); + } catch (error2) { + error(`Failed to create snippet annotations from ${resultsPath}: ${error2}`); } } @@ -136514,10 +134762,10 @@ async function createSnippetAnnotations(resultsPath) { async function run() { let policies = []; try { - if (API_KEY) core21.setSecret(API_KEY); - if (GITHUB_TOKEN) core21.setSecret(GITHUB_TOKEN); - core21.debug(`SCANOSS Scan Action started...`); - core21.debug(`Creating policies`); + if (API_KEY) setSecret(API_KEY); + if (GITHUB_TOKEN) setSecret(GITHUB_TOKEN); + debug(`SCANOSS Scan Action started...`); + debug(`Creating policies`); const firstRunId = await getFirstRunId(); policies = policyManager.getPolicies(); for (const policy of policies) { @@ -136538,27 +134786,27 @@ async function run() { await policy.run(); } if (MATCH_ANNOTATIONS) { - core21.info("Creating match annotations and commit comments..."); + info("Creating match annotations and commit comments..."); await createSnippetAnnotations(OUTPUT_FILEPATH); } else { - core21.info("Skipping match annotations - disabled by matchAnnotations parameter"); + info("Skipping match annotations - disabled by matchAnnotations parameter"); } if (isPullRequest()) { const report = await generatePRSummary(policies); await createCommentOnPR(report); } await generateJobSummary(policies, uploadResult); - core21.setOutput(RESULT_FILEPATH, OUTPUT_FILEPATH); - core21.setOutput(STDOUT_SCAN_COMMAND, stdout); - } catch (error9) { + setOutput(RESULT_FILEPATH, OUTPUT_FILEPATH); + setOutput(STDOUT_SCAN_COMMAND, stdout); + } catch (error2) { for (const policy of policies) { try { - await policy.cancel(error9 instanceof Error ? error9.message : "Workflow failed"); + await policy.cancel(error2 instanceof Error ? error2.message : "Workflow failed"); } catch (e) { - core21.warning(`Failed to cancel policy check "${policy.name}": ${e instanceof Error ? e.message : e}`); + warning(`Failed to cancel policy check "${policy.name}": ${e instanceof Error ? e.message : e}`); } } - if (error9 instanceof Error) core21.setFailed(error9.message); + if (error2 instanceof Error) setFailed(error2.message); } } diff --git a/dist/licenses.txt b/dist/licenses.txt index 3d90969..0310403 100644 --- a/dist/licenses.txt +++ b/dist/licenses.txt @@ -11,7 +11,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI --- -@actions/core@3.0.0 +@actions/core@3.0.1 The MIT License (MIT) Copyright 2019 GitHub diff --git a/package-lock.json b/package-lock.json index 7bfe85c..c7dc533 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "scanoss-code-scan-action", - "version": "1.6.0", + "version": "1.6.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "scanoss-code-scan-action", - "version": "1.6.0", + "version": "1.6.2", "license": "MIT", "dependencies": { "@actions/artifact": "6.2.0", - "@actions/core": "^1.11.1", + "@actions/core": "^3.0.0", "@actions/exec": "^1.1.1", "@actions/github": "^6.0.1" }, @@ -18,17 +18,17 @@ "@eslint/js": "^9.39.3", "@octokit/types": "^15.0.0", "@types/jest": "^29.5.12", - "@types/node": "^20.11.20", + "@types/node": "^25.3.5", "@typescript-eslint/eslint-plugin": "^8.56.1", "@typescript-eslint/parser": "^8.56.1", "esbuild": "^0.27.3", "esbuild-plugin-license": "^1.2.3", "eslint": "^9.39.3", "eslint-plugin-github": "^5.1.8", - "eslint-plugin-jest": "^28.14.0", + "eslint-plugin-jest": "^29.15.2", "eslint-plugin-jsonc": "^2.21.0", "eslint-plugin-prettier": "^5.5.4", - "globals": "^15.15.0", + "globals": "^17.4.0", "jest": "^29.7.0", "make-coverage-badge": "^1.2.0", "prettier": "^3.6.2", @@ -62,25 +62,6 @@ "unzip-stream": "^0.3.1" } }, - "node_modules/@actions/artifact/node_modules/@actions/core": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.0.tgz", - "integrity": "sha512-zYt6cz+ivnTmiT/ksRVriMBOiuoUpDCJJlZ5KPl2/FRdvwU3f7MPh9qftvbkXJThragzUZieit2nyHUyw53Seg==", - "license": "MIT", - "dependencies": { - "@actions/exec": "^3.0.0", - "@actions/http-client": "^4.0.0" - } - }, - "node_modules/@actions/artifact/node_modules/@actions/exec": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-3.0.0.tgz", - "integrity": "sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==", - "license": "MIT", - "dependencies": { - "@actions/io": "^3.0.2" - } - }, "node_modules/@actions/artifact/node_modules/@actions/github": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/@actions/github/-/github-9.0.0.tgz", @@ -106,12 +87,6 @@ "undici": "^6.23.0" } }, - "node_modules/@actions/artifact/node_modules/@actions/io": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz", - "integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==", - "license": "MIT" - }, "node_modules/@actions/artifact/node_modules/undici": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/undici/-/undici-6.23.0.tgz", @@ -122,25 +97,30 @@ } }, "node_modules/@actions/core": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.11.1.tgz", - "integrity": "sha512-hXJCSrkwfA46Vd9Z3q4cpEpHB1rL5NG04+/rbqW9d3+CSvtB1tYe8UTpAlixa1vj0m/ULglfEK2UKxMGxCxv5A==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.1.tgz", + "integrity": "sha512-a6d/Nwahm9fliVGRhdhofo40HjHQasUPusmc7vBfyky+7Z+P2A1J68zyFVaNcEclc/Se+eO595oAr5nwEIoIUA==", "license": "MIT", "dependencies": { - "@actions/exec": "^1.1.1", - "@actions/http-client": "^2.0.1" + "@actions/exec": "^3.0.0", + "@actions/http-client": "^4.0.0" } }, - "node_modules/@actions/core/node_modules/@actions/http-client": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.2.3.tgz", - "integrity": "sha512-mx8hyJi/hjFvbPokCg4uRd4ZX78t+YyRPtnKWwIl+RzNaVuFpQHfmlGVfsKEJN8LwTCvL+DfVgAM04XaHkm6bA==", + "node_modules/@actions/core/node_modules/@actions/exec": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-3.0.0.tgz", + "integrity": "sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==", "license": "MIT", "dependencies": { - "tunnel": "^0.0.6", - "undici": "^5.25.4" + "@actions/io": "^3.0.2" } }, + "node_modules/@actions/core/node_modules/@actions/io": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz", + "integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==", + "license": "MIT" + }, "node_modules/@actions/exec": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz", @@ -2946,13 +2926,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.19.35", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.35.tgz", - "integrity": "sha512-Uarfe6J91b9HAUXxjvSOdiO2UPOKLm07Q1oh0JHxoZ1y8HoqxDAu3gVrsrOHeiio0kSsoVBt4wFrKOm0dKxVPQ==", + "version": "25.8.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.8.0.tgz", + "integrity": "sha512-TCFSk8IZh+iLX1xtksoBVtdmgL+1IX0fC9BeU4QqFSuNdN/K+HUlhqOzEmSYYpZUVsLYcPqc9KX+60iDuninSQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.21.0" + "undici-types": ">=7.24.0 <7.24.7" } }, "node_modules/@types/stack-utils": { @@ -5116,6 +5096,19 @@ "eslint": "^8 || ^9" } }, + "node_modules/eslint-plugin-github/node_modules/globals": { + "version": "15.15.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", + "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/eslint-plugin-i18n-text": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/eslint-plugin-i18n-text/-/eslint-plugin-i18n-text-1.0.1.tgz", @@ -5212,21 +5205,22 @@ } }, "node_modules/eslint-plugin-jest": { - "version": "28.14.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-28.14.0.tgz", - "integrity": "sha512-P9s/qXSMTpRTerE2FQ0qJet2gKbcGyFTPAJipoKxmWqR6uuFqIqk8FuEfg5yBieOezVrEfAMZrEwJ6yEp+1MFQ==", + "version": "29.15.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-29.15.2.tgz", + "integrity": "sha512-kEN4r9RZl1xcsb4arGq89LrcVdOUFII/JSCwtTPJyv16mDwmPrcuEQwpxqZHeINvcsd7oK5O/rhdGlxFRaZwvQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/utils": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/utils": "^8.0.0" }, "engines": { - "node": "^16.10.0 || ^18.12.0 || >=20.0.0" + "node": "^20.12.0 || ^22.0.0 || >=24.0.0" }, "peerDependencies": { - "@typescript-eslint/eslint-plugin": "^6.0.0 || ^7.0.0 || ^8.0.0", - "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0", - "jest": "*" + "@typescript-eslint/eslint-plugin": "^8.0.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "jest": "*", + "typescript": ">=4.8.4 <7.0.0" }, "peerDependenciesMeta": { "@typescript-eslint/eslint-plugin": { @@ -5234,6 +5228,9 @@ }, "jest": { "optional": true + }, + "typescript": { + "optional": true } } }, @@ -6060,9 +6057,9 @@ } }, "node_modules/globals": { - "version": "15.15.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-15.15.0.tgz", - "integrity": "sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==", + "version": "17.6.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.6.0.tgz", + "integrity": "sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA==", "dev": true, "license": "MIT", "engines": { @@ -10010,9 +10007,9 @@ } }, "node_modules/undici-types": { - "version": "6.21.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", - "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "version": "7.24.6", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.24.6.tgz", + "integrity": "sha512-WRNW+sJgj5OBN4/0JpHFqtqzhpbnV0GuB+OozA9gCL7a993SmU+1JBZCzLNxYsbMfIeDL+lTsphD5jN5N+n0zg==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index 54d9720..c6021d4 100644 --- a/package.json +++ b/package.json @@ -69,7 +69,7 @@ }, "dependencies": { "@actions/artifact": "6.2.0", - "@actions/core": "^1.11.1", + "@actions/core": "^3.0.0", "@actions/exec": "^1.1.1", "@actions/github": "^6.0.1" }, @@ -77,17 +77,17 @@ "@eslint/js": "^9.39.3", "@octokit/types": "^15.0.0", "@types/jest": "^29.5.12", - "@types/node": "^20.11.20", + "@types/node": "^25.3.5", "@typescript-eslint/eslint-plugin": "^8.56.1", "@typescript-eslint/parser": "^8.56.1", "esbuild": "^0.27.3", "esbuild-plugin-license": "^1.2.3", "eslint": "^9.39.3", "eslint-plugin-github": "^5.1.8", - "eslint-plugin-jest": "^28.14.0", + "eslint-plugin-jest": "^29.15.2", "eslint-plugin-jsonc": "^2.21.0", "eslint-plugin-prettier": "^5.5.4", - "globals": "^15.15.0", + "globals": "^17.4.0", "jest": "^29.7.0", "make-coverage-badge": "^1.2.0", "prettier": "^3.6.2", From 7dcbaaeb4efe32b79e2fb861eaaefbe27dd82d22 Mon Sep 17 00:00:00 2001 From: Alex Egan Date: Mon, 18 May 2026 12:59:57 +0100 Subject: [PATCH 2/5] Upgraded actions/upload-artifact to 7. Added mock for @actions/core. Upgraded Node.js to 24. Updated CHANGELOG.md. Added __mocks__/** as test files. --- .github/workflows/check-dist.yml | 2 +- .node-version | 2 +- CHANGELOG.md | 10 ++++++ __mocks__/@actions/core.ts | 40 ++++++++++++++++++++++++ __tests__/dep-track-policy-check.test.ts | 9 +----- action.yml | 2 +- dist/index.js | 2 +- esbuild.config.mjs | 2 +- eslint.config.mjs | 2 +- package-lock.json | 2 +- package.json | 4 +-- tsconfig.json | 2 +- 12 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 __mocks__/@actions/core.ts diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index 4736b04..47d59c3 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -58,7 +58,7 @@ jobs: - if: ${{ failure() && steps.diff.outcome == 'failure' }} name: Upload Artifact id: upload - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: dist path: dist/ diff --git a/.node-version b/.node-version index 1cc433a..5bf4400 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -20.6.0 +24.15.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f1bdb9..b5ff2ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.6.3] - 2026-05-18 +### Changed +- Upgraded Node.js to 24 +- Upgraded eslint-plugin jest to 29.15.2 +- Upgraded @types/node to 25.3.5 +- Upgraded @actions/core to 3.0.0 +- Upgraded globals to 17.4.0 +- Upgraded actions/upload-artifact to 7 +- Added __mocks__/@actions/core.ts to mock @actions/core for tests + ## [1.6.2] - 2026-05-11 ### Changed - Upgraded `scanoss.py` runtime container to v1.52.1 diff --git a/__mocks__/@actions/core.ts b/__mocks__/@actions/core.ts new file mode 100644 index 0000000..9ed3bdd --- /dev/null +++ b/__mocks__/@actions/core.ts @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: MIT +/* + Copyright (c) 2026, SCANOSS + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + */ + +export const debug = jest.fn(); +export const error = jest.fn(); +export const info = jest.fn(); +export const notice = jest.fn(); +export const warning = jest.fn(); +export const setFailed = jest.fn(); +export const setOutput = jest.fn(); +export const setSecret = jest.fn(); +export const getInput = jest.fn().mockReturnValue(''); + +export const summary = { + addHeading: jest.fn().mockReturnThis(), + addRaw: jest.fn().mockReturnThis(), + addSeparator: jest.fn().mockReturnThis(), + addCodeBlock: jest.fn().mockReturnThis(), + write: jest.fn().mockResolvedValue(undefined) +}; diff --git a/__tests__/dep-track-policy-check.test.ts b/__tests__/dep-track-policy-check.test.ts index 436b21d..9b78ffa 100644 --- a/__tests__/dep-track-policy-check.test.ts +++ b/__tests__/dep-track-policy-check.test.ts @@ -69,19 +69,12 @@ jest.mock('@actions/github', () => ({ const mockGetExecOutput = jest.spyOn(exec, 'getExecOutput'); -// Mock core.warning at the module level -jest.mock('@actions/core', () => ({ - ...jest.requireActual('@actions/core'), - warning: jest.fn() -})); - const mockCoreWarning = core.warning as jest.MockedFunction; describe('DepTrackPolicyCheck', () => { let depTrackPolicyCheck: DepTrackPolicyCheck; const appInput = jest.requireMock('../src/app.input'); - const TEST_DIR = __dirname; - const TEST_REPO_DIR = path.join(TEST_DIR, 'data'); + const TEST_REPO_DIR = path.join(__dirname, 'data'); beforeEach(() => { appInput.REPO_DIR = TEST_REPO_DIR; diff --git a/action.yml b/action.yml index 0bcd6ae..ca15a69 100644 --- a/action.yml +++ b/action.yml @@ -120,5 +120,5 @@ outputs: description: 'Scanner command output' runs: - using: node20 + using: node24 main: dist/index.js diff --git a/dist/index.js b/dist/index.js index 0139401..ec77412 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -/*! scanoss-code-scan-action v1.6.2 | MIT */ +/*! scanoss-code-scan-action v1.6.3 | MIT */ "use strict"; var __create = Object.create; var __defProp = Object.defineProperty; diff --git a/esbuild.config.mjs b/esbuild.config.mjs index c921022..7a07340 100644 --- a/esbuild.config.mjs +++ b/esbuild.config.mjs @@ -5,7 +5,7 @@ await build({ entryPoints: ['src/index.ts'], bundle: true, platform: 'node', - target: 'node20', + target: 'node24', format: 'cjs', outfile: 'dist/index.js', plugins: [ diff --git a/eslint.config.mjs b/eslint.config.mjs index c0663a8..13e0a26 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -90,7 +90,7 @@ export default tseslint.config( // Test files — relax rules that conflict with jest patterns { - files: ['__tests__/**/*.ts'], + files: ['__tests__/**/*.ts', '__mocks__/**/*.ts'], ...jest.configs['flat/recommended'], languageOptions: { globals: { ...globals.jest } diff --git a/package-lock.json b/package-lock.json index c7dc533..2b9a079 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "typescript-eslint": "^8.56.1" }, "engines": { - "node": ">=20" + "node": ">=22" } }, "node_modules/@actions/artifact": { diff --git a/package.json b/package.json index c6021d4..16b451e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "scanoss-code-scan-action", "description": "SCANOSS Code Scan Action", - "version": "1.6.2", + "version": "1.6.3", "author": "SCANOSS", "private": true, "homepage": "https://github.com/scanoss/code-scan-action/", @@ -23,7 +23,7 @@ ".": "./dist/index.js" }, "engines": { - "node": ">=20" + "node": ">=22" }, "scripts": { "bundle": "npm run format:write && npm run package", diff --git a/tsconfig.json b/tsconfig.json index 59c4087..1605ac5 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,5 +18,5 @@ "rules": { "@typescript-eslint/no-explicit-any": "off" }, - "exclude": ["./dist", "./node_modules", "./__tests__", "./coverage", "./tsconfig.json", "./.prettierrc.json"] + "exclude": ["./dist", "./node_modules", "./__tests__", "./__mocks__", "./coverage", "./tsconfig.json", "./.prettierrc.json"] } From 08cb65cf929b7040afa1a087b68481dbf52113fb Mon Sep 17 00:00:00 2001 From: Alex Egan Date: Mon, 18 May 2026 14:33:33 +0100 Subject: [PATCH 3/5] Moving to Node 24 as a minimum. --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2b9a079..9049695 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "scanoss-code-scan-action", - "version": "1.6.2", + "version": "1.6.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "scanoss-code-scan-action", - "version": "1.6.2", + "version": "1.6.3", "license": "MIT", "dependencies": { "@actions/artifact": "6.2.0", @@ -37,7 +37,7 @@ "typescript-eslint": "^8.56.1" }, "engines": { - "node": ">=22" + "node": ">=24" } }, "node_modules/@actions/artifact": { diff --git a/package.json b/package.json index 16b451e..7ee2a80 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ ".": "./dist/index.js" }, "engines": { - "node": ">=22" + "node": ">=24" }, "scripts": { "bundle": "npm run format:write && npm run package", From 1e6dafd04dac9edc79e96617c42c5596e49be773 Mon Sep 17 00:00:00 2001 From: Alex Egan Date: Mon, 18 May 2026 15:42:48 +0100 Subject: [PATCH 4/5] Updated README.md to use 'gha-code-scan' and actions/checkout to use @v6. --- .github/workflows/ci.yml | 2 +- CHANGELOG.md | 3 +++ README.md | 20 ++++++++++---------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c28c586..062170f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Checkout id: checkout - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Setup Node.js id: setup-node diff --git a/CHANGELOG.md b/CHANGELOG.md index b5ff2ad..9215705 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Upgraded globals to 17.4.0 - Upgraded actions/upload-artifact to 7 - Added __mocks__/@actions/core.ts to mock @actions/core for tests +- Updated actions/checkout to v6 in README.md +### Fixed +- Changed 'code-scan-action' to 'gha-code-scan' in README.md ## [1.6.2] - 2026-05-11 ### Changed diff --git a/README.md b/README.md index 7d045f4..b18e245 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # SCANOSS Code Scan Action -[![GitHub Super-Linter](https://github.com/scanoss/code-scan-action/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter) -![CI](https://github.com/scanoss/code-scan-action/actions/workflows/ci.yml/badge.svg) -[![Check dist/](https://github.com/scanoss/code-scan-action/actions/workflows/check-dist.yml/badge.svg)](https://github.com/scanoss/scanoss-code-scan-step/actions/workflows/check-dist.yml) -[![CodeQL](https://github.com/scanoss/code-scan-action/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/scanoss/scanoss-code-scan-step/actions/workflows/codeql-analysis.yml) +[![GitHub Super-Linter](https://github.com/scanoss/gha-code-scan/actions/workflows/linter.yml/badge.svg)](https://github.com/super-linter/super-linter) +![CI](https://github.com/scanoss/gha-code-scan/actions/workflows/ci.yml/badge.svg) +[![Check dist/](https://github.com/scanoss/gha-code-scan/actions/workflows/check-dist.yml/badge.svg)](https://github.com/scanoss/scanoss-code-scan-step/actions/workflows/check-dist.yml) +[![CodeQL](https://github.com/scanoss/gha-code-scan/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/scanoss/scanoss-code-scan-step/actions/workflows/codeql-analysis.yml) ![Coverage](./badges/coverage.svg) The SCANOSS Code Scan Action enhances your software development process by automatically scanning your code for security @@ -77,11 +77,11 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run SCANOSS Code Scan id: scanoss-code-scan-step - uses: scanoss/code-scan-action@v1 + uses: scanoss/gha-code-scan@v1 ``` For example workflow runs, check out our @@ -178,7 +178,7 @@ When Dependency Track integration is enabled, you'll see these checks in your Gi #### Basic Configuration ```yaml - name: Run SCANOSS Code Scan with Dependency Track - uses: scanoss/code-scan-action@v1 + uses: scanoss/gha-code-scan@v1 with: deptrack.upload: true deptrack.url: 'https://your-dt-instance.com' @@ -190,7 +190,7 @@ When Dependency Track integration is enabled, you'll see these checks in your Gi #### Advanced Configuration with Policies ```yaml - name: Run SCANOSS Code Scan with Full Dependency Track Integration - uses: scanoss/code-scan-action@v1 + uses: scanoss/gha-code-scan@v1 with: policies: copyleft, undeclared, dt # Enable all policies including Dependency Track deptrack.upload: true @@ -237,11 +237,11 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run SCANOSS Code Scan id: scanoss-code-scan-step - uses: scanoss/code-scan-action@v1 + uses: scanoss/gha-code-scan@v1 with: policies: copyleft, undeclared, dt scanMode: 'delta' From fe82d5f27194d34081915cc526b8ee4882bb7029 Mon Sep 17 00:00:00 2001 From: Alex Egan Date: Tue, 19 May 2026 09:55:58 +0100 Subject: [PATCH 5/5] Fixed CHANGELOG.md. Updated README.md. --- CHANGELOG.md | 9 +++++---- README.md | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9215705..0d790da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -## [1.6.3] - 2026-05-18 +## [1.6.3] - 2026-05-19 ### Changed - Upgraded Node.js to 24 -- Upgraded eslint-plugin jest to 29.15.2 +- Upgraded eslint-plugin-jest to 29.15.2 - Upgraded @types/node to 25.3.5 - Upgraded @actions/core to 3.0.0 - Upgraded globals to 17.4.0 @@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added __mocks__/@actions/core.ts to mock @actions/core for tests - Updated actions/checkout to v6 in README.md ### Fixed -- Changed 'code-scan-action' to 'gha-code-scan' in README.md +- Changed `code-scan-action` to `gha-code-scan` in README.md ## [1.6.2] - 2026-05-11 ### Changed @@ -212,4 +212,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [1.5.0]: https://github.com/scanoss/gha-code-scan/compare/v1.4.0...v1.5.0 [1.6.0]: https://github.com/scanoss/gha-code-scan/compare/v1.5.0...v1.6.0 [1.6.1]: https://github.com/scanoss/gha-code-scan/compare/v1.6.0...v1.6.1 -[1.6.2]: https://github.com/scanoss/gha-code-scan/compare/v1.6.1...v1.6.2 \ No newline at end of file +[1.6.2]: https://github.com/scanoss/gha-code-scan/compare/v1.6.1...v1.6.2 +[1.6.3]: https://github.com/scanoss/gha-code-scan/compare/v1.6.2...v1.6.3 \ No newline at end of file diff --git a/README.md b/README.md index b18e245..6c448d5 100644 --- a/README.md +++ b/README.md @@ -175,6 +175,8 @@ When Dependency Track integration is enabled, you'll see these checks in your Gi ### Configuration +**Note:** Please note that the action name has changed from `code-scan-action` to `gha-code-scan`. + #### Basic Configuration ```yaml - name: Run SCANOSS Code Scan with Dependency Track